module BTrap /* Broadcast message trapper - MOTIF/UIL */ 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 description of the BTrap program. MODIFICATION HISTORY: 07-Sep-1993 (sjk/nfc) VToolkit V2. 14-Nov-1991 (sjk) Use VtkCreateCallback. 16-Jul-1991 (sjk) Workaround for MOTIF UIL color_table bug. 03-Apr-1991 (sjk) Initial entry. */ include file 'XmAppl.uil'; /* MOTIF definitions */ include file 'vtoolkit.uil'; /* VToolkit definitions */ value MAIN_I : 1; TLIST_I : 2; POPUP_MENU_I : 3; procedure BTrapResetCallback; BTrapSaveSettingsCallback; BTrapQuitCallback; object headerLabel : XmLabel { arguments {XmNlabelString = 'Press MB3 for Popup Menu'; XmNleftAttachment = XmATTACH_FORM; XmNrightAttachment = XmATTACH_FORM; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 3; XmNbottomAttachment = XmATTACH_NONE;};}; /* Define the color list pixmap for the TList widget. When a line is added to * the widget, its color index is used to index into this list. If a color * list is not supplied, all lines will be drawn using the foreground color. */ value tListColor1 : color ('red', foreground); /* coloridx 1 */ value tListColor2 : color ('orange', foreground); /* coloridx 2 */ value tListColor3 : color ('yellow', foreground); /* coloridx 3 */ value tListColor4 : color ('green', foreground); /* coloridx 4 */ value tListColor5 : color ('blue', foreground); /* coloridx 5 */ value tListColor6 : color ('magenta', foreground); /* coloridx 6 */ value tListColorList : icon (color_table = color_table ( foreground color = '0', /* coloridx 0 */ tListColor1 = '1', /* coloridx 1 */ tListColor2 = '2', /* coloridx 2 */ tListColor3 = '3', /* coloridx 3 */ tListColor4 = '4', /* coloridx 4 */ tListColor5 = '5', /* coloridx 5 */ tListColor6 = '6'), /* coloridx 6 */ '0123456'); /* tiny pixmap containing one pixel of each color */ object tList : user_defined procedure TListCreate { callbacks {MrmNcreateCallback = procedure VtkCreateCallback (TLIST_I);}; arguments {tlist_max_line_cnt = 200; tlist_color_list = tListColorList;};}; /* Define vertical and horizontal scrollbars for use by the TList widget. */ object tListVScrollBar : XmScrollBar {arguments {XmNorientation = XmVERTICAL; XmNheight = 1;};}; object tListHScrollBar : XmScrollBar {arguments {XmNorientation = XmHORIZONTAL; XmNwidth = 1;};}; /* Define a VFrame widget to hold the TList widget and the scrollbars. The order of children in * the controls list is important to get the proper widget stacking. */ object tListVFrame : user_defined procedure VFrameCreate { controls { /* XmScrollBar tListHScrollBar; */ XmScrollBar tListVScrollBar; user_defined tList;}; arguments { XmNborderWidth = 2; XmNbackgroundPixmap = icon ('* *', ' * ', ' ** ', ' *'); /* pattern in lower right corner */ XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 3; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 3; XmNtopAttachment = XmATTACH_WIDGET; XmNtopOffset = 3; XmNtopWidget = XmLabel headerLabel; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 3;};}; object bTrapMain : XmMainWindow { callbacks {MrmNcreateCallback = procedure VtkCreateCallback (MAIN_I);}; controls { XmForm { controls { XmLabel headerLabel; user_defined tListVFrame;};};};}; object bTrapPopupMenu : XmPopupMenu { callbacks {MrmNcreateCallback = procedure VtkCreateCallback (POPUP_MENU_I);}; controls { XmPushButton {arguments {XmNlabelString = 'Clear Display';}; callbacks {XmNactivateCallback = procedure BTrapResetCallback;};}; XmPushButton {arguments {XmNlabelString = 'Save Current Settings';}; callbacks {XmNactivateCallback = procedure BTrapSaveSettingsCallback;};}; XmPushButton {arguments {XmNlabelString = 'Quit';}; callbacks {XmNactivateCallback = procedure BTrapQuitCallback;};}; };}; end module;