module VDiskQuota /* VDiskQuota MOTIF/UIL module */ names = case_sensitive objects = { XmToggleButton = gadget; XmPushButton = gadget; XmLabel = gadget; XmSeparator = gadget; } /* ******************************************************************************* * VToolkit (1995) "If it doesn't use VToolkit, it isn't cool!" * * (c) Steve Klein * * Unpublished rights reserved under the copyright laws of the United States. * ******************************************************************************* This module contains the MOTIF UIL definitions for the VDiskQuota sample program. MODIFICATION HISTORY: 07-Sep-1993 (sjk/nfc) VToolkit V2. 17-Jul-1991 (sjk) Workaround MOTIF UIL color table bug. 09-Apr-1990 (sjk) Port to MOTIF. 15-Mar-1990 (sjk) Initial entry. */ include file 'XmAppl.uil'; /* MOTIF definitions */ include file 'vtoolkit.uil'; /* VToolkit definitions */ procedure VdqCreateCallback; VdqCustomizeHistogramCallback; VdqHistDialogCancelCallback; VdqHistDialogOkCallback; VdqQuitCallback; VdqSaveSettingsCallback; VdqUpdateCallback; object vdqHistMaxLabel : XmLabel widget { arguments { XmNlabelString = 'Upper limit:'; XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 15; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 12; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistMaxSText : XmText { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (5);}; arguments { XmNresizeWidth = false; XmNresizeHeight = false; XmNrows = 1; XmNcolumns = 8; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = 10; XmNleftWidget = XmLabel vdqHistMaxLabel; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 8; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistRedLabel : XmLabel widget { arguments { XmNlabelString = 'Red limit:'; XmNforeground = color ('red', foreground); XmNleftAttachment = XmATTACH_NONE; XmNrightAttachment = XmATTACH_OPPOSITE_WIDGET; XmNrightWidget = XmLabel vdqHistMaxLabel; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 12; XmNtopWidget = XmLabel vdqHistMaxLabel; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistRedSText : XmText { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (6);}; arguments { XmNresizeWidth = false; XmNresizeHeight = false; XmNrows = 1; XmNcolumns = 8; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = 10; XmNleftWidget = XmLabel vdqHistMaxLabel; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 10; XmNtopWidget = XmLabel vdqHistMaxLabel; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistYellowLabel : XmLabel widget { arguments { XmNlabelString = 'Yellow limit:'; XmNforeground = color ('yellow', foreground); XmNleftAttachment = XmATTACH_NONE; XmNrightAttachment = XmATTACH_OPPOSITE_WIDGET; XmNrightWidget = XmLabel vdqHistMaxLabel; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 12; XmNtopWidget = XmLabel vdqHistRedLabel; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistYellowSText : XmText { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (7);}; arguments { XmNresizeWidth = false; XmNresizeHeight = false; XmNrows = 1; XmNcolumns = 8; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = 10; XmNleftWidget = XmLabel vdqHistMaxLabel; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 10; XmNtopWidget = XmLabel vdqHistRedLabel; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistWidthSizerLabel : XmLabel { arguments { XmNlabelString = ' '; XmNwidth = 1; XmNheight = 1; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = 10; XmNleftWidget = XmText vdqHistMaxSText; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_NONE; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistOkButton : XmPushButton { arguments { XmNlabelString = 'OK'; XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 25; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 20; XmNtopWidget = XmLabel vdqHistYellowLabel; XmNbottomAttachment = XmATTACH_NONE;}; callbacks {XmNactivateCallback = procedure VdqHistDialogOkCallback;};}; object vdqHistCancelButton : XmPushButton { arguments { XmNlabelString = 'Cancel'; XmNleftAttachment = XmATTACH_NONE; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 25; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 20; XmNtopWidget = XmLabel vdqHistYellowLabel; XmNbottomAttachment = XmATTACH_NONE;}; callbacks {XmNactivateCallback = procedure VdqHistDialogCancelCallback;};}; object vdqHistHeightSizerLabel : XmLabel { arguments { XmNlabelString = ' '; XmNwidth = 1; XmNheight = 1; XmNleftAttachment = XmATTACH_NONE; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 10; XmNtopWidget = XmPushButton vdqHistCancelButton; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqHistDialog : XmFormDialog { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (4);}; arguments {XmNunitType = XmPIXELS; XmNcancelButton = XmPushButton vdqHistCancelButton; XmNdefaultButton = XmPushButton vdqHistOkButton; XmNdefaultPosition = true; XmNautoUnmanage = false; XmNdialogTitle = 'Customize Histogram';}; controls { XmLabel vdqHistMaxLabel; XmText vdqHistMaxSText; XmLabel vdqHistRedLabel; XmText vdqHistRedSText; XmLabel vdqHistYellowLabel; XmText vdqHistYellowSText; XmLabel vdqHistWidthSizerLabel; XmPushButton vdqHistOkButton; XmPushButton vdqHistCancelButton; XmLabel vdqHistHeightSizerLabel;};}; object vdqLabel : XmLabel { arguments { XmNlabelString = 'Devices:'; XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 10; XmNrightAttachment = XmATTACH_NONE; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 12; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqUpdateButton : XmPushButton { callbacks { XmNactivateCallback = procedure VdqUpdateCallback; MrmNcreateCallback = procedure VdqCreateCallback (8);}; arguments { XmNlabelString = 'Update'; XmNleftAttachment = XmATTACH_NONE; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 10; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 10; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqSText : XmText { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (3);}; arguments { XmNresizeWidth = false; XmNresizeHeight = false; XmNrows = 1; XmNcolumns = 16; XmNleftAttachment = XmATTACH_WIDGET; XmNleftOffset = 10; XmNleftWidget = XmLabel vdqLabel; XmNrightAttachment = XmATTACH_WIDGET; XmNrightOffset = 10; XmNrightWidget = XmPushButton vdqUpdateButton; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 8; XmNbottomAttachment = XmATTACH_NONE;};}; object vdqVScrollBar : XmScrollBar {arguments {XmNorientation = XmVERTICAL; XmNheight = 1;};}; object vdqHScrollBar : XmScrollBar {arguments {XmNorientation = XmHORIZONTAL; XmNwidth = 1;};}; object vdqHeader : user_defined procedure VHeaderCreate {}; value vdqColor1 : color ('red', foreground); /* coloridx 1 */ value vdqColor2 : color ('orange', foreground); /* coloridx 2 */ value vdqColor3 : color ('yellow', foreground); /* coloridx 3 */ value vdqColor4 : color ('green', foreground); /* coloridx 4 */ value vdqColor5 : color ('blue', foreground); /* coloridx 5 */ value vdqColor6 : color ('magenta', foreground); /* coloridx 6 */ value vdqColorList : icon (color_table = color_table ( foreground color = '0', /* coloridx 0 */ vdqColor1 = '1', /* coloridx 1 */ vdqColor2 = '2', /* coloridx 2 */ vdqColor3 = '3', /* coloridx 3 */ vdqColor4 = '4', /* coloridx 4 */ vdqColor5 = '5', /* coloridx 5 */ vdqColor6 = '6'), /* coloridx 6 */ '0123456'); /* tiny pixmap containing one pixel of each color */ object vdqVList : user_defined procedure VListCreate { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (1);}; arguments { XmNborderPixmap = icon ('*** '); /* dashed line between header and list */ vlist_select_style = VListSelectStyleExtend; vlist_color_list = vdqColorList; vlist_select_unit = VListSelectUnitRow; vlist_column_style = VListColumnStyleBestFit; vlist_h_scroll_bar_policy = VListScrollBarPolicyAsNeeded; vlist_v_scroll_bar_policy = VListScrollBarPolicyAsNeeded; vlist_v_scroll_bar_position = VListScrollBarPositionRight;};}; object vdqVFrame : user_defined procedure VFrameCreate { controls { unmanaged XmScrollBar vdqHScrollBar; unmanaged XmScrollBar vdqVScrollBar; user_defined vdqVList; unmanaged user_defined vdqHeader;}; arguments { XmNborderWidth = 2; XmNbackgroundPixmap = icon ('* *', ' * ', ' ** ', ' *'); XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 10; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 10; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 10; XmNtopWidget = XmText vdqSText; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 10;};}; object vdqMenuBar : XmMenuBar { controls { XmCascadeButton {arguments {XmNlabelString = 'Control';}; controls { XmPulldownMenu { controls { XmPushButton {arguments {XmNlabelString = 'Update';}; callbacks {XmNactivateCallback = procedure VdqUpdateCallback;};}; XmPushButton {arguments {XmNlabelString = 'Quit';}; callbacks {XmNactivateCallback = procedure VdqQuitCallback;};}; };};};}; XmCascadeButton {arguments {XmNlabelString = 'Customize';}; controls { XmPulldownMenu { controls { XmPushButton {arguments {XmNlabelString = 'Histogram...';}; callbacks {XmNactivateCallback = procedure VdqCustomizeHistogramCallback;};}; XmSeparator {}; XmPushButton {arguments {XmNlabelString = 'Save Current Settings';}; callbacks {XmNactivateCallback = procedure VdqSaveSettingsCallback;};}; };};};}; };}; object vdqMain : XmMainWindow { callbacks {MrmNcreateCallback = procedure VdqCreateCallback (2);}; controls { XmMenuBar vdqMenuBar; XmForm { arguments {XmNunitType = XmPIXELS; XmNdefaultButton = XmPushButton vdqUpdateButton;}; controls { XmLabel vdqLabel; XmPushButton vdqUpdateButton; XmText vdqSText; user_defined vdqVFrame; unmanaged XmFormDialog vdqHistDialog; };};};}; end module;