! ! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. ! ALL RIGHTS RESERVED ! ! ! Motif Release 1.2 ! ! $RCSfile: textedit.uil,v $ $Revision: 1.3.2.3 $ $Date: 1992/05/06 15:50:14 $ !****************************************************************************** !************************************************************ ! textedit.uil -- description of interface ! ! Describes widget hierarchy of main window & dialogues ! !************************************************************ module textedit names = case_sensitive include file "strings.uil"; ! Define callback procedures procedure ToggleOpCB(); ToggleKeepFileDialogueCB(); ToggleRevertToOpenCB(); TextChangedCB(); TextGainFocusCB(); TextLoseFocusCB(); TextGainPrimaryCB(); TextLosePrimaryCB(); NewCB(); OpenCB(); SaveCB(); SaveAsCB(); CopyFileCB(); MoveFileCB(); RemoveCB(); ExitCB(); CutCB(); CopyCB(); PasteCB(); ClearCB(); DeleteCB(); SplitCB(); RemovePaneCB(); OnePaneCB(); OkFileCB(); CancelFileCB(); SaveYesCB(); SaveNoCB(); SaveCancelCB(); WarnCancelCB(); QuestionYesCB(); !----------------------------------------------------------------- ! The Main Window Hierarchy !----------------------------------------------------------------- object mainWindow: XmMainWindow { arguments { XmNmenuBar = XmMenuBar menuBar; }; controls { XmPanedWindow panedWindow; XmMenuBar menuBar; }; }; object panedWindow: XmPanedWindow{ controls { XmScrolledText textFirst; }; }; object textFirst: XmScrolledText { callbacks { XmNvalueChangedCallback = procedure TextChangedCB(); XmNfocusCallback = procedure TextGainFocusCB(); XmNlosingFocusCallback = procedure TextLoseFocusCB(); XmNgainPrimaryCallback = procedure TextGainPrimaryCB(); XmNlosePrimaryCallback = procedure TextLosePrimaryCB(); }; arguments { XmNeditMode = XmMULTI_LINE_EDIT; XmNallowResize = true; XmNrows = 24; XmNcolumns = 80; XmNpaneMinimum = 20; }; }; object menuBar: XmMenuBar { controls { XmCascadeButton fileButton; XmCascadeButton editButton; XmCascadeButton viewButton; XmCascadeButton optionsButton; }; }; object fileButton: XmCascadeButton { arguments { XmNlabelString = fileString; XmNmnemonic = fileMnemonic; }; controls { XmPulldownMenu fileMenu; }; }; object editButton: XmCascadeButton { arguments { XmNlabelString = editString; XmNmnemonic = editMnemonic; }; controls { XmPulldownMenu editMenu; }; }; object viewButton: XmCascadeButton { arguments { XmNlabelString = viewString; XmNmnemonic = viewMnemonic; }; controls { XmPulldownMenu viewMenu; }; }; object optionsButton: XmCascadeButton { arguments { XmNlabelString = optionsString; XmNmnemonic = optionsMnemonic; }; controls { XmPulldownMenu optionsMenu; }; }; object fileMenu: XmPulldownMenu { controls { XmPushButton newButton; XmPushButton openButton; XmSeparator sep; XmPushButton saveButton; XmPushButton saveAsButton; XmSeparator sep; XmPushButton copyFileButton; XmPushButton moveFileButton; XmSeparator sep; XmPushButton removeButton; XmSeparator sep; XmPushButton exitButton; }; }; object editMenu: XmPulldownMenu { controls { XmPushButton cutButton; XmPushButton copyButton; XmPushButton pasteButton; XmSeparator sep; XmPushButton clearButton; XmPushButton deleteButton; }; }; object viewMenu: XmPulldownMenu { controls { XmPushButton splitButton; XmPushButton removePaneButton; XmPushButton onePaneButton; }; }; object optionsMenu: XmPulldownMenu { controls { XmToggleButton keepToggle; XmToggleButton revertToggle; }; }; object newButton: XmPushButton { arguments { XmNlabelString = newString; XmNmnemonic = newMnemonic; }; callbacks { XmNactivateCallback = procedure NewCB(); }; }; object openButton: XmPushButton { arguments { XmNlabelString = openAsString; XmNmnemonic = openAsMnemonic; }; callbacks { XmNactivateCallback = procedure OpenCB(); }; }; object sep: XmSeparator { }; object saveButton: XmPushButton { arguments { XmNlabelString = saveString; XmNmnemonic = saveMnemonic; }; callbacks { XmNactivateCallback = procedure SaveCB(); }; }; object saveAsButton: XmPushButton { arguments { XmNlabelString = saveAsString; XmNmnemonic = saveAsMnemonic; }; callbacks { XmNactivateCallback = procedure SaveAsCB(); }; }; object copyFileButton: XmPushButton { arguments { XmNlabelString = copyToString; XmNmnemonic = copyToMnemonic; }; callbacks { XmNactivateCallback = procedure CopyFileCB(); }; }; object moveFileButton: XmPushButton { arguments { XmNlabelString = moveToString; XmNmnemonic = moveToMnemonic; }; callbacks { XmNactivateCallback = procedure MoveFileCB(); }; }; object removeButton: XmPushButton { arguments { XmNlabelString = removeString; XmNmnemonic = removeMnemonic; }; callbacks { XmNactivateCallback = procedure RemoveCB(); }; }; object exitButton: XmPushButton { arguments { XmNlabelString = exitString; XmNmnemonic = exitMnemonic; }; callbacks { XmNactivateCallback = procedure ExitCB(); }; }; object cutButton: XmPushButton { arguments { XmNlabelString = cutString; XmNmnemonic = cutMnemonic; XmNacceleratorText = "Shift+Del"; }; callbacks { XmNactivateCallback = procedure CutCB(); }; }; object copyButton: XmPushButton { arguments { XmNlabelString = copyString; XmNmnemonic = copyMnemonic; XmNacceleratorText = "Ctrl+Ins"; }; callbacks { XmNactivateCallback = procedure CopyCB(); }; }; object pasteButton: XmPushButton { arguments { XmNlabelString = pasteString; XmNmnemonic = pasteMnemonic; XmNacceleratorText = "Shift+Ins"; }; callbacks { XmNactivateCallback = procedure PasteCB(); }; }; object clearButton: XmPushButton { arguments { XmNlabelString = clearString; XmNmnemonic = clearMnemonic; }; callbacks { XmNactivateCallback = procedure ClearCB(); }; }; object deleteButton: XmPushButton { arguments { XmNlabelString = deleteString; XmNmnemonic = deleteMnemonic; XmNacceleratorText = "Del"; }; callbacks { XmNactivateCallback = procedure DeleteCB(); }; }; object splitButton: XmPushButton { arguments { XmNlabelString = splitString; XmNmnemonic = splitMnemonic; }; callbacks { XmNactivateCallback = procedure SplitCB(); }; }; object removePaneButton: XmPushButton { arguments { XmNlabelString = removePaneString; XmNmnemonic = removePaneMnemonic; }; callbacks { XmNactivateCallback = procedure RemovePaneCB(); }; }; object onePaneButton: XmPushButton { arguments { XmNlabelString = onePaneString; XmNmnemonic = onePaneMnemonic; }; callbacks { XmNactivateCallback = procedure OnePaneCB(); }; }; object keepToggle: XmToggleButton { arguments { XmNlabelString = keepString; XmNset = false; }; callbacks { XmNvalueChangedCallback = procedure ToggleKeepFileDialogueCB(); }; }; object revertToggle: XmToggleButton { arguments { XmNlabelString = revertString; XmNset = true; }; callbacks { XmNvalueChangedCallback = procedure ToggleRevertToOpenCB(); }; }; !----------------------------------------------------------------- ! Provides a template for subsequently created text panes object textPane: XmScrolledText { callbacks { XmNvalueChangedCallback = procedure TextChangedCB(); XmNfocusCallback = procedure TextGainFocusCB(); XmNgainPrimaryCallback = procedure TextGainPrimaryCB(); XmNlosePrimaryCallback = procedure TextLosePrimaryCB(); XmNlosingFocusCallback = procedure TextLoseFocusCB(); }; arguments { XmNeditMode = XmMULTI_LINE_EDIT; XmNallowResize = true; }; }; ! A text widget to hold onto the shared source for all the text panes object textStore: XmText { arguments { XmNeditMode = XmMULTI_LINE_EDIT; }; }; !----------------------------------------------------------------- ! The File Selection Box Hierarchy !----------------------------------------------------------------- object fileDialog: XmFileSelectionDialog { callbacks { XmNokCallback = procedure OkFileCB(); XmNcancelCallback = procedure CancelFileCB(); }; controls { XmRowColumn extraBox; }; }; object extraBox: XmRowColumn { arguments { XmNorientation = XmVERTICAL; }; controls { ! XmFrame statusFrame; XmFrame opFrame; }; }; object statusFrame: XmFrame { controls { XmRowColumn statusCheckPanel; }; }; object opFrame: XmFrame { controls { XmRadioBox opRadioBox; }; }; object statusCheckPanel: XmRowColumn { arguments { XmNorientation = XmVERTICAL; }; controls { XmToggleButton keepToggle; XmToggleButton revertToggle; }; }; object opRadioBox: XmRadioBox { arguments { XmNorientation = XmHORIZONTAL; XmNpacking = XmPACK_COLUMN; }; callbacks { XmNentryCallback = procedure ToggleOpCB(); }; controls { XmToggleButton openToggle; XmToggleButton saveToggle; XmToggleButton copyToggle; XmToggleButton moveToggle; }; }; object openToggle: XmToggleButton { arguments { XmNlabelString = openString; }; }; object saveToggle: XmToggleButton { arguments { XmNlabelString = saveString; }; }; object copyToggle: XmToggleButton { arguments { XmNlabelString = copyString; }; }; object moveToggle: XmToggleButton { arguments { XmNlabelString = moveString; }; }; !----------------------------------------------------------------- ! The Save Dialog Hierarchy !----------------------------------------------------------------- object saveDialog: XmFormDialog { arguments { XmNcancelButton = cancelButton; XmNdefaultButton = yesButton; XmNdialogStyle = XmDIALOG_FULL_APPLICATION_MODAL; XmNdialogTitle = editSaveString; XmNnoResize = false; }; controls { XmLabel warnpixLabel; XmLabel questionLabel; XmPushButton yesButton; XmPushButton noButton; XmPushButton cancelButton; }; }; object warnpixLabel: XmLabel { arguments { XmNlabelType = XmPIXMAP; XmNlabelPixmap = xbitmapfile( 'decw$bitmaps:wingdogs' ); XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 10; XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 10; }; }; object questionLabel: XmLabel { arguments { XmNlabelString = editSaveString; XmNleftAttachment = XmATTACH_WIDGET; XmNleftWidget = warnpixLabel; XmNleftOffset = 10; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 8; ! ! Fixed bug, should use topAttachment instead of bottomAttachment ! CS, 11/21/92 ! ! XmNbottomAttachment = XmATTACH_OPPOSITE_WIDGET; ! XmNbottomWidget = warnpixLabel; XmNtopAttachment = XmATTACH_OPPOSITE_WIDGET; XmNtopWidget = warnpixLabel; }; }; object yesButton: XmPushButton { arguments { XmNlabelString = yesString; XmNleftAttachment = XmATTACH_OPPOSITE_WIDGET; XmNleftWidget = questionLabel; XmNleftOffset = -20; XmNtopAttachment = XmATTACH_WIDGET; XmNtopWidget = questionLabel; XmNtopOffset = 10; XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 8; }; callbacks { XmNactivateCallback = procedure SaveYesCB(); }; }; object noButton: XmPushButton { arguments { XmNlabelString = noString; XmNleftAttachment = XmATTACH_WIDGET; XmNleftWidget = yesButton; XmNleftOffset = 10; XmNbottomAttachment = XmATTACH_OPPOSITE_WIDGET; XmNbottomWidget = yesButton; XmNtopAttachment = XmATTACH_NONE; }; callbacks { XmNactivateCallback = procedure SaveNoCB(); }; }; object cancelButton: XmPushButton { arguments { XmNlabelString = cancelString; XmNleftAttachment = XmATTACH_WIDGET; XmNleftWidget = noButton; XmNleftOffset = 10; XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 8; XmNbottomAttachment = XmATTACH_OPPOSITE_WIDGET; XmNbottomWidget = yesButton; XmNtopAttachment = XmATTACH_NONE; }; callbacks { XmNactivateCallback = procedure SaveCancelCB(); }; }; !----------------------------------------------------------------- ! The Warning Dialog Hierarchy !----------------------------------------------------------------- object warnDialog: XmWarningDialog { arguments { XmNdialogTitle = warnString; }; callbacks { XmNcancelCallback = procedure WarnCancelCB(); }; }; !----------------------------------------------------------------- ! The Question Dialog Hierarchy !----------------------------------------------------------------- object questionDialog: XmQuestionDialog { arguments { XmNdialogTitle = questionString; XmNmessageString = questionDeleteString; XmNokLabelString = yesString; XmNcancelLabelString = noString; }; callbacks { XmNokCallback = procedure QuestionYesCB(); }; }; end module;