From b7fc18165e7f30f90969a8dc6079c8f05708627c Mon Sep 17 00:00:00 2001 From: dmcoles Date: Tue, 9 Jul 2024 17:37:23 +0100 Subject: [PATCH] add hint buttons to all gadgets --- ListViewObject.e | 41 +++++++++---- SpeedBarObject.e | 22 ++++++- buttonObject.e | 30 +++++++++- checkboxObject.e | 22 ++++++- chooserObject.e | 21 ++++++- clickTabObject.e | 20 ++++++- colorWheelObject.e | 28 +++++++-- dateBrowserObject.e | 46 ++++++++++---- fuelGaugeObject.e | 21 ++++++- getColorObject.e | 19 +++++- getFileObject.e | 20 ++++++- getFontObject.e | 20 ++++++- getScreenModeObject.e | 33 ++++++++--- gradSliderObject.e | 21 ++++++- integerObject.e | 42 +++++++++---- listBrowserObject.e | 26 +++++++- paletteObject.e | 33 ++++++++--- radioObject.e | 20 ++++++- reactionForm.e | 22 +++++++ reactionObject.e | 135 +++++++++++++++++++++++++++++++++++++++++- scrollerObject.e | 29 +++++++-- sketchboardObject.e | 20 ++++++- sliderObject.e | 20 ++++++- stringObject.e | 21 ++++++- tabsObject.e | 20 ++++++- tapeDeckObject.e | 42 +++++++++---- textEditorObject.e | 44 ++++++++++---- textFieldObject.e | 41 +++++++++---- virtualObject.e | 30 ++++++++-- 29 files changed, 790 insertions(+), 119 deletions(-) diff --git a/ListViewObject.e b/ListViewObject.e index aad0be3..b1859ed 100644 --- a/ListViewObject.e +++ b/ListViewObject.e @@ -23,7 +23,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*listPicker','*stringlist','*reactionListObject','*reactionLists','*sourceGen','*validator' -EXPORT ENUM LVIEWGAD_IDENT, LVIEWGAD_LISTSELECT, LVIEWGAD_MULTISELECT, +EXPORT ENUM LVIEWGAD_IDENT, LVIEWGAD_HINT, LVIEWGAD_LISTSELECT, LVIEWGAD_MULTISELECT, LVIEWGAD_OK, LVIEWGAD_CHILD, LVIEWGAD_CANCEL @@ -88,22 +88,33 @@ PROC create() OF listViewSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ LVIEWGAD_HINT ]:=ButtonObject, + GA_ID, LVIEWGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + LayoutEnd, + + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, + LAYOUT_ADDCHILD, self.gadgetList[ LVIEWGAD_LISTSELECT ]:=ButtonObject, GA_ID, LVIEWGAD_LISTSELECT, GA_TEXT, '_Pick a List', GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, ButtonEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ LVIEWGAD_MULTISELECT ]:=CheckBoxObject, + GA_ID, LVIEWGAD_MULTISELECT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + GA_TEXT, 'Multi-select', + CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, + CheckBoxEnd, LayoutEnd, - LAYOUT_ADDCHILD, self.gadgetList[ LVIEWGAD_MULTISELECT ]:=CheckBoxObject, - GA_ID, LVIEWGAD_MULTISELECT, - GA_RELVERIFY, TRUE, - GA_TABCYCLE, TRUE, - GA_TEXT, 'Multi-select', - CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, - CheckBoxEnd, - LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -134,6 +145,7 @@ PROC create() OF listViewSettingsForm self.gadgetActions[LVIEWGAD_LISTSELECT]:={selectList} self.gadgetActions[LVIEWGAD_CHILD]:={editChildSettings} + self.gadgetActions[LVIEWGAD_HINT]:={editHint} self.gadgetActions[LVIEWGAD_CANCEL]:=MR_CANCEL self.gadgetActions[LVIEWGAD_OK]:=MR_OK ENDPROC @@ -174,12 +186,21 @@ EXPORT PROC canClose(modalRes) OF listViewSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF listViewSettingsForm + self:=nself + self.setBusy() + self.listViewObject.editHint() + self.clearBusy() + self.updateHint(LVIEWGAD_HINT, self.listViewObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO listViewObject) OF listViewSettingsForm DEF res self.listViewObject:=comp self.selectedListId:=comp.listObjectId - + + self.updateHint(LVIEWGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ LVIEWGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ LVIEWGAD_MULTISELECT ],0,0,[LVIEWGAD_MULTISELECT,comp.multiSelect,0]) diff --git a/SpeedBarObject.e b/SpeedBarObject.e index 204f0b0..dfa2038 100644 --- a/SpeedBarObject.e +++ b/SpeedBarObject.e @@ -26,7 +26,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*colourPicker','*sourcegen','*stringlist','*validator' -EXPORT ENUM SBARGAD_IDENT,SBARGAD_NAME, SBARGAD_BTNLIST, SBARGAD_BUTTON_TEXT, SBARGAD_BUTTON_TYPE, SBARGAD_BUTTON_ADD, SBARGAD_BUTTON_DEL, SBARGAD_ORIENTATION, SBARGAD_BGPEN, +EXPORT ENUM SBARGAD_IDENT,SBARGAD_NAME, SBARGAD_HINT, SBARGAD_BTNLIST, SBARGAD_BUTTON_TEXT, SBARGAD_BUTTON_TYPE, SBARGAD_BUTTON_ADD, SBARGAD_BUTTON_DEL, SBARGAD_ORIENTATION, SBARGAD_BGPEN, SBARGAD_STRUMBAR, SBARGAD_BEVELSTYLE, SBARGAD_OK, SBARGAD_CHILD, SBARGAD_CANCEL @@ -189,6 +189,14 @@ PROC create() OF speedBarSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ SBARGAD_HINT ]:=ButtonObject, + GA_ID, SBARGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LAYOUT_ADDCHILD, self.gadgetList[ SBARGAD_BGPEN ]:=ButtonObject, GA_ID, SBARGAD_BGPEN, GA_TEXT, 'Back_groundPen', @@ -321,6 +329,7 @@ PROC create() OF speedBarSettingsForm self.gadgetActions[SBARGAD_BTNLIST]:={selectItem} self.gadgetActions[SBARGAD_BGPEN]:={selectPen} self.gadgetActions[SBARGAD_CHILD]:={editChildSettings} + self.gadgetActions[SBARGAD_HINT]:={editHint} self.gadgetActions[SBARGAD_CANCEL]:=MR_CANCEL self.gadgetActions[SBARGAD_BUTTON_ADD]:={addItem} self.gadgetActions[SBARGAD_BUTTON_DEL]:={deleteItem} @@ -375,6 +384,14 @@ EXPORT PROC canClose(modalRes) OF speedBarSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF speedBarSettingsForm + self:=nself + self.setBusy() + self.speedBarObject.editHint() + self.clearBusy() + self.updateHint(SBARGAD_HINT, self.speedBarObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO speedBarObject) OF speedBarSettingsForm DEF res,i,n DEF typeStr[10]:STRING @@ -383,7 +400,8 @@ PROC editSettings(comp:PTR TO speedBarObject) OF speedBarSettingsForm self.speedBarObject:=comp self.tempBgPen:=comp.bgPen - + + self.updateHint(SBARGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[SBARGAD_BTNLIST],0,0,[LISTBROWSER_LABELS, Not(0), TAG_END]) FOR i:=0 TO comp.buttonList.count()-1 self.tempItems.add(comp.buttonList.item(i)) diff --git a/buttonObject.e b/buttonObject.e index 84bb973..9b3293b 100644 --- a/buttonObject.e +++ b/buttonObject.e @@ -18,7 +18,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*colourPicker','*sourceGen','*validator' -EXPORT ENUM BTNGAD_IDENT, BTNGAD_NAME, BTNGAD_TEXTPEN, BTNGAD_BGPEN, BTNGAD_FILLTEXTPEN, BTNGAD_FILLPEN, +EXPORT ENUM BTNGAD_IDENT, BTNGAD_NAME, BTNGAD_HINT, BTNGAD_TEXTPEN, BTNGAD_BGPEN, BTNGAD_FILLTEXTPEN, BTNGAD_FILLPEN, BTNGAD_AUTOBUTTON, BTNGAD_BEVELSTYLE, BTNGAD_JUSTIFICATION, BTNGAD_SELECTED, BTNGAD_DISABLED, BTNGAD_READONLY, BTNGAD_PUSHBUTTON, BTNGAD_TRANSPARENT, BTNGAD_OK, BTNGAD_CHILD, BTNGAD_CANCEL @@ -101,7 +101,6 @@ PROC create() OF buttonSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, - LAYOUT_ADDCHILD, self.gadgetList[ BTNGAD_NAME ]:=StringObject, GA_ID, BTNGAD_NAME, GA_RELVERIFY, TRUE, @@ -112,6 +111,14 @@ PROC create() OF buttonSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ BTNGAD_HINT ]:=ButtonObject, + GA_ID, BTNGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -266,6 +273,14 @@ PROC create() OF buttonSettingsForm GA_TABCYCLE, TRUE, ButtonEnd, +/* + LAYOUT_ADDCHILD, self.gadgetList[ BTNGAD_HINT ]:=ButtonObject, + GA_ID, BTNGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd,*/ + LAYOUT_ADDCHILD, self.gadgetList[ BTNGAD_CANCEL ]:=ButtonObject, GA_ID, BTNGAD_CANCEL, GA_TEXT, '_Cancel', @@ -278,6 +293,7 @@ PROC create() OF buttonSettingsForm WindowEnd self.gadgetActions[BTNGAD_CHILD]:={editChildSettings} + self.gadgetActions[BTNGAD_HINT]:={editHint} self.gadgetActions[BTNGAD_CANCEL]:=MR_CANCEL self.gadgetActions[BTNGAD_OK]:=MR_OK @@ -294,6 +310,14 @@ PROC editChildSettings(nself,gadget,id,code) OF buttonSettingsForm self.clearBusy() ENDPROC +PROC editHint(nself,gadget,id,code) OF buttonSettingsForm + self:=nself + self.setBusy() + self.buttonObject.editHint() + self.clearBusy() + self.updateHint(BTNGAD_HINT, self.buttonObject.hintText) +ENDPROC + PROC selectPen(nself,gadget,id,code) OF buttonSettingsForm DEF frmColourPicker:PTR TO colourPickerForm DEF selColour @@ -348,6 +372,8 @@ PROC editSettings(comp:PTR TO buttonObject) OF buttonSettingsForm self.tmpBgPen:=comp.bgPen self.tmpFillTextPen:=comp.fillTextPen self.tmpFillPen:=comp.fillPen + + self.updateHint(BTNGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ BTNGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ BTNGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) diff --git a/checkboxObject.e b/checkboxObject.e index 7a73732..3c77c98 100644 --- a/checkboxObject.e +++ b/checkboxObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*colourPicker','*sourcegen','*validator' -EXPORT ENUM CHKGAD_IDENT, CHKGAD_NAME, CHKGAD_TEXTPEN, CHKGAD_BGPEN, CHKGAD_FILLTEXTPEN, +EXPORT ENUM CHKGAD_IDENT, CHKGAD_NAME, CHKGAD_HINT, CHKGAD_TEXTPEN, CHKGAD_BGPEN, CHKGAD_FILLTEXTPEN, CHKGAD_DISABLED, CHKGAD_SELECTED, CHKGAD_LABELPLACE, CHKGAD_OK, CHKGAD_CHILD, CHKGAD_CANCEL @@ -101,6 +101,14 @@ PROC create() OF checkboxSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ CHKGAD_HINT ]:=ButtonObject, + GA_ID, CHKGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -198,6 +206,7 @@ PROC create() OF checkboxSettingsForm self.gadgetActions[CHKGAD_BGPEN]:={selectPen} self.gadgetActions[CHKGAD_FILLTEXTPEN]:={selectPen} self.gadgetActions[CHKGAD_CHILD]:={editChildSettings} + self.gadgetActions[CHKGAD_HINT]:={editHint} self.gadgetActions[CHKGAD_CANCEL]:=MR_CANCEL self.gadgetActions[CHKGAD_OK]:=MR_OK ENDPROC @@ -209,6 +218,14 @@ PROC editChildSettings(nself,gadget,id,code) OF checkboxSettingsForm self.clearBusy() ENDPROC +PROC editHint(nself,gadget,id,code) OF checkboxSettingsForm + self:=nself + self.setBusy() + self.checkboxObject.editHint() + self.clearBusy() + self.updateHint(CHKGAD_HINT, self.checkboxObject.hintText) +ENDPROC + PROC selectPen(nself,gadget,id,code) OF checkboxSettingsForm DEF frmColourPicker:PTR TO colourPickerForm DEF selColour @@ -258,6 +275,9 @@ PROC editSettings(comp:PTR TO checkboxObject) OF checkboxSettingsForm self.tempTextPen:=comp.textPen self.tempBgPen:=comp.bgPen self.tempFillTextPen:=comp.fillTextPen + + self.updateHint(CHKGAD_HINT, comp.hintText) + SetGadgetAttrsA(self.gadgetList[ CHKGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ CHKGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ CHKGAD_DISABLED ],0,0,[CHECKBOX_CHECKED,comp.disabled,0]) diff --git a/chooserObject.e b/chooserObject.e index 25d3f22..378ae69 100644 --- a/chooserObject.e +++ b/chooserObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*listPicker','*stringlist','*reactionListObject','*reactionLists','*sourceGen','*validator' -EXPORT ENUM CHOOSER_GAD_IDENT, CHOOSER_GAD_NAME, CHOOSER_GAD_LISTSELECT, +EXPORT ENUM CHOOSER_GAD_IDENT, CHOOSER_GAD_NAME, CHOOSER_GAD_HINT, CHOOSER_GAD_LISTSELECT, CHOOSER_GAD_MAXLABELS, CHOOSER_GAD_ACTIVE, CHOOSER_GAD_WIDTH, CHOOSER_GAD_READONLY, CHOOSER_GAD_DISABLED, CHOOSER_GAD_AUTOFIT, CHOOSER_GAD_POPUP, CHOOSER_GAD_DROPDOWN, @@ -102,6 +102,14 @@ PROC create() OF chooserSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ CHOOSER_GAD_HINT ]:=ButtonObject, + GA_ID, CHOOSER_GAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LAYOUT_ADDCHILD, self.gadgetList[ CHOOSER_GAD_LISTSELECT ]:=ButtonObject, GA_ID, CHOOSER_GAD_LISTSELECT, @@ -223,6 +231,7 @@ PROC create() OF chooserSettingsForm self.gadgetActions[CHOOSER_GAD_LISTSELECT]:={selectList} self.gadgetActions[CHOOSER_GAD_CHILD]:={editChildSettings} + self.gadgetActions[CHOOSER_GAD_HINT]:={editHint} self.gadgetActions[CHOOSER_GAD_CANCEL]:=MR_CANCEL self.gadgetActions[CHOOSER_GAD_OK]:=MR_OK ENDPROC @@ -242,6 +251,14 @@ PROC selectList(nself,gadget,id,code) OF chooserSettingsForm self.clearBusy() ENDPROC +PROC editHint(nself,gadget,id,code) OF chooserSettingsForm + self:=nself + self.setBusy() + self.chooserObject.editHint() + self.clearBusy() + self.updateHint(CHOOSER_GAD_HINT, self.chooserObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF chooserSettingsForm self:=nself self.setBusy() @@ -269,6 +286,8 @@ PROC editSettings(comp:PTR TO chooserObject) OF chooserSettingsForm self.chooserObject:=comp self.selectedListId:=comp.listObjectId + self.updateHint(CHOOSER_GAD_HINT, comp.hintText) + SetGadgetAttrsA(self.gadgetList[ CHOOSER_GAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ CHOOSER_GAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) diff --git a/clickTabObject.e b/clickTabObject.e index 763bdab..463fda1 100644 --- a/clickTabObject.e +++ b/clickTabObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*listPicker','*stringlist','*reactionListObject','*reactionLists','*sourceGen','*validator' -EXPORT ENUM CLICKTAB_GAD_IDENT,CLICKTAB_GAD_LISTSELECT, +EXPORT ENUM CLICKTAB_GAD_IDENT,CLICKTAB_GAD_HINT, CLICKTAB_GAD_LISTSELECT, CLICKTAB_GAD_TOP, CLICKTAB_GAD_LEFT, CLICKTAB_GAD_HEIGHT, CLICKTAB_GAD_CURRENT, CLICKTAB_GAD_DISABLED, CLICKTAB_GAD_OK, CLICKTAB_GAD_CHILD, CLICKTAB_GAD_CANCEL @@ -94,6 +94,13 @@ PROC create() OF clickTabSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ CLICKTAB_GAD_HINT ]:=ButtonObject, + GA_ID, CLICKTAB_GAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + LAYOUT_ADDCHILD, self.gadgetList[ CLICKTAB_GAD_LISTSELECT ]:=ButtonObject, GA_ID, CLICKTAB_GAD_LISTSELECT, GA_TEXT, '_Pick a List', @@ -187,6 +194,7 @@ PROC create() OF clickTabSettingsForm self.gadgetActions[CLICKTAB_GAD_LISTSELECT]:={selectList} self.gadgetActions[CLICKTAB_GAD_CHILD]:={editChildSettings} + self.gadgetActions[CLICKTAB_GAD_HINT]:={editHint} self.gadgetActions[CLICKTAB_GAD_CANCEL]:=MR_CANCEL self.gadgetActions[CLICKTAB_GAD_OK]:=MR_OK ENDPROC @@ -206,6 +214,14 @@ PROC selectList(nself,gadget,id,code) OF clickTabSettingsForm self.clearBusy() ENDPROC +PROC editHint(nself,gadget,id,code) OF clickTabSettingsForm + self:=nself + self.setBusy() + self.clickTabObject.editHint() + self.clearBusy() + self.updateHint(CLICKTAB_GAD_HINT, self.clickTabObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF clickTabSettingsForm self:=nself self.setBusy() @@ -233,6 +249,8 @@ PROC editSettings(comp:PTR TO clickTabObject) OF clickTabSettingsForm self.clickTabObject:=comp self.selectedListId:=comp.listObjectId + self.updateHint(CLICKTAB_GAD_HINT, comp.hintText) + SetGadgetAttrsA(self.gadgetList[ CLICKTAB_GAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ CLICKTAB_GAD_TOP ],0,0,[INTEGER_NUMBER,comp.top,0]) SetGadgetAttrsA(self.gadgetList[ CLICKTAB_GAD_LEFT ],0,0,[INTEGER_NUMBER,comp.left,0]) diff --git a/colorWheelObject.e b/colorWheelObject.e index 372706e..6fe0f14 100644 --- a/colorWheelObject.e +++ b/colorWheelObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM CWHEELGAD_IDENT, CWHEELGAD_BEVELBOX, +EXPORT ENUM CWHEELGAD_IDENT, CWHEELGAD_HINT, CWHEELGAD_BEVELBOX, CWHEELGAD_OK, CWHEELGAD_CHILD, CWHEELGAD_CANCEL @@ -80,15 +80,22 @@ PROC create() OF colorWheelSettingsForm LABEL_TEXT, '_Identifier', LabelEnd, - LAYOUT_ADDCHILD, self.gadgetList[ CWHEELGAD_BEVELBOX ]:=CheckBoxObject, - GA_ID, CWHEELGAD_BEVELBOX, + LAYOUT_ADDCHILD, self.gadgetList[ CWHEELGAD_HINT ]:=ButtonObject, + GA_ID, CWHEELGAD_HINT, + GA_TEXT, 'Hint', GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, - GA_TEXT, 'Bevel Box', - ->CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, - CheckBoxEnd, + ButtonEnd, LayoutEnd, + LAYOUT_ADDCHILD, self.gadgetList[ CWHEELGAD_BEVELBOX ]:=CheckBoxObject, + GA_ID, CWHEELGAD_BEVELBOX, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + GA_TEXT, 'Bevel Box', + ->CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, + CheckBoxEnd, + LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -118,10 +125,19 @@ PROC create() OF colorWheelSettingsForm WindowEnd self.gadgetActions[CWHEELGAD_CHILD]:={editChildSettings} + self.gadgetActions[CWHEELGAD_HINT]:={editHint} self.gadgetActions[CWHEELGAD_CANCEL]:=MR_CANCEL self.gadgetActions[CWHEELGAD_OK]:=MR_OK ENDPROC +PROC editHint(nself,gadget,id,code) OF colorWheelSettingsForm + self:=nself + self.setBusy() + self.colorWheelObject.editHint() + self.clearBusy() + self.updateHint(CWHEELGAD_HINT, self.colorWheelObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF colorWheelSettingsForm self:=nself self.setBusy() diff --git a/dateBrowserObject.e b/dateBrowserObject.e index 352c119..a76269f 100644 --- a/dateBrowserObject.e +++ b/dateBrowserObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM DATEGAD_IDENT, DATEGAD_MULTISELECT,DATEGAD_SHOWTITLE,DATEGAD_READONLY,DATEGAD_DISABLED, +EXPORT ENUM DATEGAD_IDENT, DATEGAD_HINT, DATEGAD_MULTISELECT,DATEGAD_SHOWTITLE,DATEGAD_READONLY,DATEGAD_DISABLED, DATEGAD_OK, DATEGAD_CHILD, DATEGAD_CANCEL @@ -70,16 +70,28 @@ PROC create() OF dateBrowserSettingsForm LAYOUT_SPACEOUTER, TRUE, LAYOUT_DEFERLAYOUT, TRUE, - LAYOUT_ADDCHILD, self.gadgetList[ DATEGAD_IDENT ]:=StringObject, - GA_ID, DATEGAD_IDENT, - GA_RELVERIFY, TRUE, - GA_TABCYCLE, TRUE, - STRINGA_MAXCHARS, 80, - StringEnd, - CHILD_LABEL, LabelObject, - LABEL_TEXT, 'Identifier', - LabelEnd, - + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_SPACEINNER, FALSE, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, + + LAYOUT_ADDCHILD, self.gadgetList[ DATEGAD_IDENT ]:=StringObject, + GA_ID, DATEGAD_IDENT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + STRINGA_MAXCHARS, 80, + StringEnd, + CHILD_LABEL, LabelObject, + LABEL_TEXT, 'Identifier', + LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ DATEGAD_HINT ]:=ButtonObject, + GA_ID, DATEGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + LayoutEnd, + LAYOUT_ADDCHILD, LayoutObject, LAYOUT_SPACEINNER, FALSE, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -150,10 +162,19 @@ PROC create() OF dateBrowserSettingsForm WindowEnd self.gadgetActions[DATEGAD_CHILD]:={editChildSettings} + self.gadgetActions[DATEGAD_HINT]:={editHint} self.gadgetActions[DATEGAD_CANCEL]:=MR_CANCEL self.gadgetActions[DATEGAD_OK]:=MR_OK ENDPROC +PROC editHint(nself,gadget,id,code) OF dateBrowserSettingsForm + self:=nself + self.setBusy() + self.dateBrowserObject.editHint() + self.clearBusy() + self.updateHint(DATEGAD_HINT, self.dateBrowserObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF dateBrowserSettingsForm self:=nself self.setBusy() @@ -162,7 +183,6 @@ PROC editChildSettings(nself,gadget,id,code) OF dateBrowserSettingsForm ENDPROC PROC end() OF dateBrowserSettingsForm - END self.gadgetList[NUM_DATE_GADS] END self.gadgetActions[NUM_DATE_GADS] ENDPROC @@ -181,6 +201,7 @@ PROC editSettings(comp:PTR TO dateBrowserObject) OF dateBrowserSettingsForm self.dateBrowserObject:=comp + self.updateHint(DATEGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ DATEGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ DATEGAD_MULTISELECT ],0,0,[CHECKBOX_CHECKED,comp.multiSelect,0]) SetGadgetAttrsA(self.gadgetList[ DATEGAD_SHOWTITLE ],0,0,[CHECKBOX_CHECKED,comp.showTitle,0]) @@ -260,7 +281,6 @@ EXPORT PROC serialiseData() OF dateBrowserObject IS makeProp(showTitle,FIELDTYPE_CHAR), makeProp(readOnly,FIELDTYPE_CHAR), makeProp(disabled,FIELDTYPE_CHAR) - ] EXPORT PROC genCodeProperties(srcGen:PTR TO srcGen) OF dateBrowserObject diff --git a/fuelGaugeObject.e b/fuelGaugeObject.e index 8416382..e0ea472 100644 --- a/fuelGaugeObject.e +++ b/fuelGaugeObject.e @@ -21,7 +21,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*colourPicker','*sourceGen','*validator' -EXPORT ENUM FGAUGEGAD_IDENT, FGAUGEGAD_NAME, FGAUGEGAD_MIN, FGAUGEGAD_MAX, FGAUGEGAD_LEVEL, FGAUGEGAD_TICKSIZE, +EXPORT ENUM FGAUGEGAD_IDENT, FGAUGEGAD_NAME, FGAUGEGAD_HINT, FGAUGEGAD_MIN, FGAUGEGAD_MAX, FGAUGEGAD_LEVEL, FGAUGEGAD_TICKSIZE, FGAUGEGAD_TICKS, FGAUGEGAD_ORIENTATION, FGAUGEGAD_JUSTIFICATION, FGAUGEGAD_SHORTTICKS, FGAUGEGAD_PERCENT, FGAUGEGAD_TICKPEN, FGAUGEGAD_PERCENTPEN, FGAUGEGAD_EMPTYPEN, FGAUGEGAD_FILLPEN, @@ -113,6 +113,13 @@ PROC create() OF fuelGaugeSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ FGAUGEGAD_HINT ]:=ButtonObject, + GA_ID, FGAUGEGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, LayoutEnd, @@ -316,10 +323,19 @@ PROC create() OF fuelGaugeSettingsForm WindowEnd self.gadgetActions[FGAUGEGAD_CHILD]:={editChildSettings} + self.gadgetActions[FGAUGEGAD_HINT]:={editHint} self.gadgetActions[FGAUGEGAD_CANCEL]:=MR_CANCEL self.gadgetActions[FGAUGEGAD_OK]:=MR_OK ENDPROC +PROC editHint(nself,gadget,id,code) OF fuelGaugeSettingsForm + self:=nself + self.setBusy() + self.fuelGaugeObject.editHint() + self.clearBusy() + self.updateHint(FGAUGEGAD_HINT, self.fuelGaugeObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF fuelGaugeSettingsForm self:=nself self.setBusy() @@ -350,7 +366,8 @@ PROC editSettings(comp:PTR TO fuelGaugeObject) OF fuelGaugeSettingsForm DEF res self.fuelGaugeObject:=comp - + self.updateHint(FGAUGEGAD_HINT, comp.hintText) + SetGadgetAttrsA(self.gadgetList[ FGAUGEGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ FGAUGEGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ FGAUGEGAD_MIN ],0,0,[INTEGER_NUMBER,comp.min,0]) diff --git a/getColorObject.e b/getColorObject.e index 97adfe6..540be6d 100644 --- a/getColorObject.e +++ b/getColorObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM GETCOLGAD_IDENT, GETCOLGAD_NAME, GETCOLGAD_TITLE,GETCOLGAD_COLORWHEEL,GETCOLGAD_RGBSLIDERS,GETCOLGAD_HSBSLIDERS, +EXPORT ENUM GETCOLGAD_IDENT, GETCOLGAD_NAME, GETCOLGAD_HINT, GETCOLGAD_TITLE,GETCOLGAD_COLORWHEEL,GETCOLGAD_RGBSLIDERS,GETCOLGAD_HSBSLIDERS, GETCOLGAD_SWITCHMODE, GETCOLGAD_INITIAL, GETCOLGAD_SHOWRGB, GETCOLGAD_SHOWHSB,GETCOLGAD_DISABLED, GETCOLGAD_OK, GETCOLGAD_CHILD, GETCOLGAD_CANCEL @@ -102,6 +102,13 @@ PROC create() OF getColorSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ GETCOLGAD_HINT ]:=ButtonObject, + GA_ID, GETCOLGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, LayoutEnd, LAYOUT_ADDCHILD, self.gadgetList[ GETCOLGAD_TITLE ]:=StringObject, @@ -235,10 +242,19 @@ PROC create() OF getColorSettingsForm WindowEnd self.gadgetActions[GETCOLGAD_CHILD]:={editChildSettings} + self.gadgetActions[GETCOLGAD_HINT]:={editHint} self.gadgetActions[GETCOLGAD_CANCEL]:=MR_CANCEL self.gadgetActions[GETCOLGAD_OK]:=MR_OK ENDPROC +PROC editHint(nself,gadget,id,code) OF getColorSettingsForm + self:=nself + self.setBusy() + self.getColorObject.editHint() + self.clearBusy() + self.updateHint(GETCOLGAD_HINT, self.getColorObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF getColorSettingsForm self:=nself self.setBusy() @@ -265,6 +281,7 @@ PROC editSettings(comp:PTR TO getColorObject) OF getColorSettingsForm DEF res self.getColorObject:=comp + self.updateHint(GETCOLGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ GETCOLGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ GETCOLGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) diff --git a/getFileObject.e b/getFileObject.e index 9fd386a..ecf6b20 100644 --- a/getFileObject.e +++ b/getFileObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM GETFILEGAD_IDENT, GETFILEGAD_NAME, GETFILEGAD_FILEGADNAME, GETFILEGAD_DRAWERGADNAME, GETFILEGAD_FULLFILENAME, +EXPORT ENUM GETFILEGAD_IDENT, GETFILEGAD_NAME, GETFILEGAD_HINT, GETFILEGAD_FILEGADNAME, GETFILEGAD_DRAWERGADNAME, GETFILEGAD_FULLFILENAME, GETFILEGAD_PATTERN, GETFILEGAD_REJECTPATTERN, GETFILEGAD_ACCEPTPATTERN, GETFILEGAD_LEFT, GETFILEGAD_TOP, GETFILEGAD_WIDTH, GETFILEGAD_HEIGHT, GETFILEGAD_FULLEXPAND, GETFILEGAD_DOSAVEMODE, GETFILEGAD_DOMULTISELECT, GETFILEGAD_DOPATTERNS, @@ -118,6 +118,14 @@ PROC create() OF getFileSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ GETFILEGAD_HINT ]:=ButtonObject, + GA_ID, GETFILEGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, LAYOUT_ADDCHILD, self.gadgetList[ GETFILEGAD_FILEGADNAME ]:=StringObject, @@ -342,10 +350,19 @@ PROC create() OF getFileSettingsForm WindowEnd self.gadgetActions[GETFILEGAD_CHILD]:={editChildSettings} + self.gadgetActions[GETFILEGAD_HINT]:={editHint} self.gadgetActions[GETFILEGAD_CANCEL]:=MR_CANCEL self.gadgetActions[GETFILEGAD_OK]:=MR_OK ENDPROC +PROC editHint(nself,gadget,id,code) OF getFileSettingsForm + self:=nself + self.setBusy() + self.getFileObject.editHint() + self.clearBusy() + self.updateHint(GETFILEGAD_HINT, self.getFileObject.hintText) +ENDPROC + PROC editChildSettings(nself,gadget,id,code) OF getFileSettingsForm self:=nself self.setBusy() @@ -371,6 +388,7 @@ PROC editSettings(comp:PTR TO getFileObject) OF getFileSettingsForm DEF res self.getFileObject:=comp + self.updateHint(GETFILEGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ GETFILEGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ GETFILEGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) diff --git a/getFontObject.e b/getFontObject.e index d3d61ba..10fd9ea 100644 --- a/getFontObject.e +++ b/getFontObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM GETFONTGAD_IDENT, GETFONTGAD_NAME, GETFONTGAD_TITLE, +EXPORT ENUM GETFONTGAD_IDENT, GETFONTGAD_NAME, GETFONTGAD_HINT, GETFONTGAD_TITLE, GETFONTGAD_LEFT, GETFONTGAD_TOP, GETFONTGAD_WIDTH, GETFONTGAD_HEIGHT, GETFONTGAD_MINHEIGHT, GETFONTGAD_MAXHEIGHT, GETFONTGAD_MAXFRONT, GETFONTGAD_MAXBACK, GETFONTGAD_DOFRONTPEN, GETFONTGAD_DOBACKPEN, GETFONTGAD_DOSTYLE, @@ -114,6 +114,14 @@ PROC create() OF getFontSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ GETFONTGAD_HINT ]:=ButtonObject, + GA_ID, GETFONTGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, LAYOUT_ADDCHILD, self.gadgetList[ GETFONTGAD_TITLE ]:=StringObject, @@ -308,6 +316,7 @@ PROC create() OF getFontSettingsForm WindowEnd self.gadgetActions[GETFONTGAD_CHILD]:={editChildSettings} + self.gadgetActions[GETFONTGAD_HINT]:={editHint} self.gadgetActions[GETFONTGAD_CANCEL]:=MR_CANCEL self.gadgetActions[GETFONTGAD_OK]:=MR_OK ENDPROC @@ -333,11 +342,20 @@ EXPORT PROC canClose(modalRes) OF getFontSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF getFontSettingsForm + self:=nself + self.setBusy() + self.getFontObject.editHint() + self.clearBusy() + self.updateHint(GETFONTGAD_HINT, self.getFontObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO getFontObject) OF getFontSettingsForm DEF res self.getFontObject:=comp + self.updateHint(GETFONTGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ GETFONTGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ GETFONTGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ GETFONTGAD_TITLE ],0,0,[STRINGA_TEXTVAL,comp.title,0]) diff --git a/getScreenModeObject.e b/getScreenModeObject.e index f3dae00..475c8fd 100644 --- a/getScreenModeObject.e +++ b/getScreenModeObject.e @@ -21,7 +21,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM GETSCREENGAD_IDENT, GETSCREENGAD_NAME, GETSCREENGAD_TITLE, +EXPORT ENUM GETSCREENGAD_IDENT, GETSCREENGAD_NAME, GETSCREENGAD_HINT, GETSCREENGAD_TITLE, GETSCREENGAD_LEFT, GETSCREENGAD_TOP, GETSCREENGAD_WIDTH, GETSCREENGAD_HEIGHT, GETSCREENGAD_MINWIDTH, GETSCREENGAD_MAXWIDTH, GETSCREENGAD_MINHEIGHT, GETSCREENGAD_MAXHEIGHT, GETSCREENGAD_MINDEPTH, GETSCREENGAD_MAXDEPTH, GETSCREENGAD_INFOLEFT, GETSCREENGAD_INFOTOP, @@ -132,17 +132,25 @@ PROC create() OF getScreenModeSettingsForm LABEL_TEXT, '_Label', LabelEnd, - LAYOUT_ADDCHILD, self.gadgetList[ GETSCREENGAD_TITLE ]:=StringObject, - GA_ID, GETSCREENGAD_TITLE, + LAYOUT_ADDCHILD, self.gadgetList[ GETSCREENGAD_HINT ]:=ButtonObject, + GA_ID, GETSCREENGAD_HINT, + GA_TEXT, 'Hint', GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, - STRINGA_MAXCHARS, 80, - StringEnd, - CHILD_LABEL, LabelObject, - LABEL_TEXT, '_Title', - LabelEnd, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, + LAYOUT_ADDCHILD, self.gadgetList[ GETSCREENGAD_TITLE ]:=StringObject, + GA_ID, GETSCREENGAD_TITLE, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + STRINGA_MAXCHARS, 80, + StringEnd, + CHILD_LABEL, LabelObject, + LABEL_TEXT, '_Title', + LabelEnd, + LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -471,6 +479,7 @@ PROC create() OF getScreenModeSettingsForm WindowEnd self.gadgetActions[GETSCREENGAD_CHILD]:={editChildSettings} + self.gadgetActions[GETSCREENGAD_HINT]:={editHint} self.gadgetActions[GETSCREENGAD_CANCEL]:=MR_CANCEL self.gadgetActions[GETSCREENGAD_OK]:=MR_OK ENDPROC @@ -499,6 +508,14 @@ EXPORT PROC canClose(modalRes) OF getScreenModeSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF getScreenModeSettingsForm + self:=nself + self.setBusy() + self.getScreenModeObject.editHint() + self.clearBusy() + self.updateHint(GETSCREENGAD_HINT, self.getScreenModeObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO getScreenModeObject) OF getScreenModeSettingsForm DEF res diff --git a/gradSliderObject.e b/gradSliderObject.e index d6d4fd9..9e1877e 100644 --- a/gradSliderObject.e +++ b/gradSliderObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM GRADSLDGAD_IDENT, GRADSLDGAD_NAME, GRADSLDGAD_MAXVAL,GRADSLDGAD_CURRVAL,GRADSLDGAD_SKIPVAL,GRADSLDGAD_KNOBPIXELS,GRADSLDGAD_ORIENTATION, +EXPORT ENUM GRADSLDGAD_IDENT, GRADSLDGAD_NAME, GRADSLDGAD_HINT, GRADSLDGAD_MAXVAL,GRADSLDGAD_CURRVAL,GRADSLDGAD_SKIPVAL,GRADSLDGAD_KNOBPIXELS,GRADSLDGAD_ORIENTATION, GRADSLDGAD_OK, GRADSLDGAD_CHILD, GRADSLDGAD_CANCEL EXPORT DEF gradientsliderbase @@ -99,6 +99,15 @@ PROC create() OF gradSliderSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ GRADSLDGAD_HINT ]:=ButtonObject, + GA_ID, GRADSLDGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -200,6 +209,7 @@ PROC create() OF gradSliderSettingsForm WindowEnd self.gadgetActions[GRADSLDGAD_CHILD]:={editChildSettings} + self.gadgetActions[GRADSLDGAD_HINT]:={editHint} self.gadgetActions[GRADSLDGAD_CANCEL]:=MR_CANCEL self.gadgetActions[GRADSLDGAD_OK]:=MR_OK ENDPROC @@ -226,11 +236,20 @@ EXPORT PROC canClose(modalRes) OF gradSliderSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF gradSliderSettingsForm + self:=nself + self.setBusy() + self.gradSliderObject.editHint() + self.clearBusy() + self.updateHint(GRADSLDGAD_HINT, self.gradSliderObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO gradSliderObject) OF gradSliderSettingsForm DEF res self.gradSliderObject:=comp + self.updateHint(GRADSLDGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ GRADSLDGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ GRADSLDGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ GRADSLDGAD_MAXVAL ],0,0,[INTEGER_NUMBER,comp.maxVal,0]) diff --git a/integerObject.e b/integerObject.e index 7451b95..2780dbd 100644 --- a/integerObject.e +++ b/integerObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM INTGAD_IDENT, INTGAD_NAME, INTGAD_MAXCHARS, INTGAD_VALUE,INTGAD_MINVISIBLE, +EXPORT ENUM INTGAD_IDENT, INTGAD_NAME,INTGAD_HINT, INTGAD_MAXCHARS, INTGAD_VALUE,INTGAD_MINVISIBLE, INTGAD_MINIMUM, INTGAD_MAXIMUM, INTGAD_DISABLED, INTGAD_TABCYCLE, INTGAD_ARROWS, INTGAD_OK, INTGAD_CHILD, INTGAD_CANCEL @@ -77,15 +77,25 @@ PROC create() OF integerSettingsForm LAYOUT_SPACEOUTER, TRUE, LAYOUT_DEFERLAYOUT, TRUE, - LAYOUT_ADDCHILD, self.gadgetList[ INTGAD_IDENT ]:=StringObject, - GA_ID, INTGAD_IDENT, - GA_RELVERIFY, TRUE, - GA_TABCYCLE, TRUE, - STRINGA_MAXCHARS, 80, - StringEnd, - CHILD_LABEL, LabelObject, - LABEL_TEXT, 'Identifier', - LabelEnd, + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, + LAYOUT_ADDCHILD, self.gadgetList[ INTGAD_IDENT ]:=StringObject, + GA_ID, INTGAD_IDENT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + STRINGA_MAXCHARS, 80, + StringEnd, + CHILD_LABEL, LabelObject, + LABEL_TEXT, 'Identifier', + LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ INTGAD_HINT ]:=ButtonObject, + GA_ID, INTGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + + LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -223,6 +233,7 @@ PROC create() OF integerSettingsForm WindowEnd self.gadgetActions[INTGAD_CHILD]:={editChildSettings} + self.gadgetActions[INTGAD_HINT]:={editHint} self.gadgetActions[INTGAD_CANCEL]:=MR_CANCEL self.gadgetActions[INTGAD_OK]:=MR_OK ENDPROC @@ -248,11 +259,20 @@ EXPORT PROC canClose(modalRes) OF integerSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF integerSettingsForm + self:=nself + self.setBusy() + self.integerObject.editHint() + self.clearBusy() + self.updateHint(INTGAD_HINT, self.integerObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO integerObject) OF integerSettingsForm DEF res self.integerObject:=comp - + + self.updateHint(INTGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ INTGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ INTGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ INTGAD_MAXCHARS ],0,0,[INTEGER_NUMBER,comp.maxChars,0]) diff --git a/listBrowserObject.e b/listBrowserObject.e index 1af728c..8658b7c 100644 --- a/listBrowserObject.e +++ b/listBrowserObject.e @@ -21,7 +21,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*listPicker','*stringlist','*reactionListObject','*reactionLists','*sourceGen','*validator' -EXPORT ENUM LISTBGAD_IDENT, LISTBGAD_LISTSELECT, LISTBGAD_COLUMNSBUTTON, +EXPORT ENUM LISTBGAD_IDENT, LISTBGAD_HINT, LISTBGAD_LISTSELECT, LISTBGAD_COLUMNSBUTTON, LISTBGAD_TOP, LISTBGAD_MAKEVISIBLE, LISTBGAD_POSITION, LISTBGAD_VIRTUALWIDTH, LISTBGAD_NUMCOLS, LISTBGAD_LEFT, LISTBGAD_SPACING, LISTBGAD_SELECTED, @@ -130,13 +130,22 @@ PROC create() OF listBrowserSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, 'Identifier', LabelEnd, - + + LAYOUT_ADDCHILD, self.gadgetList[ LISTBGAD_HINT ]:=ButtonObject, + GA_ID, LISTBGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LAYOUT_ADDCHILD, self.gadgetList[ LISTBGAD_LISTSELECT ]:=ButtonObject, GA_ID, LISTBGAD_LISTSELECT, GA_TEXT, '_Pick a List', GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LAYOUT_ADDCHILD, self.gadgetList[ LISTBGAD_COLUMNSBUTTON ]:=ButtonObject, GA_ID, LISTBGAD_COLUMNSBUTTON, @@ -144,6 +153,7 @@ PROC create() OF listBrowserSettingsForm GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -405,6 +415,7 @@ PROC create() OF listBrowserSettingsForm self.gadgetActions[LISTBGAD_CHILD]:={editChildSettings} self.gadgetActions[LISTBGAD_COLUMNTITLES]:={colTitles} self.gadgetActions[LISTBGAD_COLUMNSBUTTON]:={editColumns} + self.gadgetActions[LISTBGAD_HINT]:={editHint} self.gadgetActions[LISTBGAD_CANCEL]:=MR_CANCEL self.gadgetActions[LISTBGAD_OK]:=MR_OK ENDPROC @@ -466,6 +477,16 @@ EXPORT PROC canClose(modalRes) OF listBrowserSettingsForm ENDIF ENDPROC TRUE + + +PROC editHint(nself,gadget,id,code) OF listBrowserSettingsForm + self:=nself + self.setBusy() + self.listBrowserObject.editHint() + self.clearBusy() + self.updateHint(LISTBGAD_HINT, self.listBrowserObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO listBrowserObject) OF listBrowserSettingsForm DEF res @@ -474,6 +495,7 @@ PROC editSettings(comp:PTR TO listBrowserObject) OF listBrowserSettingsForm self.colTitles:=comp.colTitles self.colWidths:=comp.colWidths + self.updateHint(LISTBGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ LISTBGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ LISTBGAD_TOP ],0,0,[INTEGER_NUMBER,comp.top,0]) SetGadgetAttrsA(self.gadgetList[ LISTBGAD_MAKEVISIBLE ],0,0,[INTEGER_NUMBER,comp.makeVisible,0]) diff --git a/paletteObject.e b/paletteObject.e index beb0e54..b4fed32 100644 --- a/paletteObject.e +++ b/paletteObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM PALGAD_IDENT, PALGAD_NAME, PALGAD_DISABLED, +EXPORT ENUM PALGAD_IDENT, PALGAD_NAME, PALGAD_HINT, PALGAD_DISABLED, PALGAD_INITIAL, PALGAD_OFFSET, PALGAD_NUMCOLS, PALGAD_OK, PALGAD_CHILD, PALGAD_CANCEL @@ -94,13 +94,12 @@ PROC create() OF paletteSettingsForm LABEL_TEXT, '_Label', LabelEnd, - LAYOUT_ADDCHILD, self.gadgetList[ PALGAD_DISABLED ]:=CheckBoxObject, - GA_ID, PALGAD_DISABLED, + LAYOUT_ADDCHILD, self.gadgetList[ PALGAD_HINT ]:=ButtonObject, + GA_ID, PALGAD_HINT, + GA_TEXT, 'Hint', GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, - GA_TEXT, '_Disabled', - CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, - CheckBoxEnd, + ButtonEnd, LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -115,7 +114,7 @@ PROC create() OF paletteSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, 'Initial Colour', LabelEnd, - + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, LAYOUT_ADDCHILD, self.gadgetList[ PALGAD_OFFSET ]:=IntegerObject, GA_ID, PALGAD_OFFSET, GA_RELVERIFY, TRUE, @@ -125,7 +124,9 @@ PROC create() OF paletteSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, 'Colour _Offset', LabelEnd, + LayoutEnd, + LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ADDCHILD, self.gadgetList[ PALGAD_NUMCOLS ]:=IntegerObject, GA_ID, PALGAD_NUMCOLS, GA_RELVERIFY, TRUE, @@ -136,8 +137,17 @@ PROC create() OF paletteSettingsForm LABEL_TEXT, 'NumColours', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ PALGAD_DISABLED ]:=CheckBoxObject, + GA_ID, PALGAD_DISABLED, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + GA_TEXT, '_Disabled', + CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, + CheckBoxEnd, + LayoutEnd, + LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -166,6 +176,7 @@ PROC create() OF paletteSettingsForm WindowEnd self.gadgetActions[PALGAD_CHILD]:={editChildSettings} + self.gadgetActions[PALGAD_HINT]:={editHint} self.gadgetActions[PALGAD_CANCEL]:=MR_CANCEL self.gadgetActions[PALGAD_OK]:=MR_OK ENDPROC @@ -191,6 +202,14 @@ EXPORT PROC canClose(modalRes) OF paletteSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF paletteSettingsForm + self:=nself + self.setBusy() + self.paletteObject.editHint() + self.clearBusy() + self.updateHint(PALGAD_HINT, self.paletteObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO paletteObject) OF paletteSettingsForm DEF res diff --git a/radioObject.e b/radioObject.e index 294cabf..df64928 100644 --- a/radioObject.e +++ b/radioObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*listPicker','*stringlist','*reactionListObject','*reactionLists','*sourceGen','*validator' -EXPORT ENUM RADIOGAD_IDENT, RADIOGAD_LISTSELECT, RADIOGAD_LABELPLACE, +EXPORT ENUM RADIOGAD_IDENT, RADIOGAD_HINT, RADIOGAD_LISTSELECT, RADIOGAD_LABELPLACE, RADIOGAD_SPACING, RADIOGAD_SELECTED, RADIOGAD_OK, RADIOGAD_CHILD, RADIOGAD_CANCEL @@ -88,6 +88,14 @@ PROC create() OF radioSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ RADIOGAD_HINT ]:=ButtonObject, + GA_ID, RADIOGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LAYOUT_ADDCHILD, self.gadgetList[ RADIOGAD_LISTSELECT ]:=ButtonObject, GA_ID, RADIOGAD_LISTSELECT, GA_TEXT, '_Pick a List', @@ -163,6 +171,7 @@ PROC create() OF radioSettingsForm self.gadgetActions[RADIOGAD_LISTSELECT]:={selectList} self.gadgetActions[RADIOGAD_CHILD]:={editChildSettings} + self.gadgetActions[RADIOGAD_HINT]:={editHint} self.gadgetActions[RADIOGAD_CANCEL]:=MR_CANCEL self.gadgetActions[RADIOGAD_OK]:=MR_OK ENDPROC @@ -204,12 +213,21 @@ EXPORT PROC canClose(modalRes) OF radioSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF radioSettingsForm + self:=nself + self.setBusy() + self.radioObject.editHint() + self.clearBusy() + self.updateHint(RADIOGAD_HINT, self.radioObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO radioObject) OF radioSettingsForm DEF res self.radioObject:=comp self.selectedListId:=comp.listObjectId + self.updateHint(RADIOGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ RADIOGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ RADIOGAD_LABELPLACE ],0,0,[CHOOSER_SELECTED,comp.labelPlace,0]) SetGadgetAttrsA(self.gadgetList[ RADIOGAD_SPACING ],0,0,[INTEGER_NUMBER,comp.spacing,0]) diff --git a/reactionForm.e b/reactionForm.e index d0d5481..b5db36f 100644 --- a/reactionForm.e +++ b/reactionForm.e @@ -4,6 +4,7 @@ OPT MODULE, OSVERSION=37 'classes/window', 'intuition/gadgetclass', 'reaction/reaction_lib', + 'gadgets/button', 'amigalib/boopsi', 'intuition/intuition' @@ -14,6 +15,7 @@ EXPORT OBJECT reactionForm modalResult:LONG gadgetList:PTR TO LONG gadgetActions:PTR TO LONG + hintInfo:PTR TO hintinfo ENDOBJECT EXPORT PROC gadgetPress(id,codeval) OF reactionForm @@ -40,6 +42,24 @@ EXPORT PROC canClose(modalRes) OF reactionForm IS TRUE EXPORT PROC ticker() OF reactionForm IS 0 EXPORT PROC menuPick(menu,menuitem,subItem) OF reactionForm IS 0 +PROC updateHint(gadid,hintText:PTR TO CHAR) OF reactionForm + DEF win + win:=Gets(self.windowObj,WINDOW_WINDOW) + + IF self.hintInfo=0 + self.hintInfo:=New(SIZEOF hintinfo*2) + self.hintInfo.code:=-1 + self.hintInfo[1].gadgetid:=-1 + self.hintInfo[1].code:=-1 + ENDIF + self.hintInfo.gadgetid:=gadid + + SetGadgetAttrsA(self.gadgetList[ gadid ],win,0,[BUTTON_TEXTPEN,IF hintText THEN 2 ELSE 1,0]) + self.hintInfo.text:=hintText + Sets(self.windowObj,WINDOW_HINTINFO,self.hintInfo) + Sets(self.windowObj,WINDOW_GADGETHELP,TRUE) +ENDPROC + EXPORT PROC showModal() OF reactionForm HANDLE DEF running=TRUE,menu,menuitem,subitem DEF win:PTR TO window,wsig,code,tmp,sig,result=0 @@ -74,5 +94,7 @@ EXPORT PROC showModal() OF reactionForm HANDLE Raise("WIN") ENDIF + IF self.hintInfo THEN Dispose(self.hintInfo) + EXCEPT DO ENDPROC self.modalResult diff --git a/reactionObject.e b/reactionObject.e index 7ea1200..1a8feae 100644 --- a/reactionObject.e +++ b/reactionObject.e @@ -8,6 +8,7 @@ OPT MODULE,OSVERSION=37 'images/bevel', 'gadgets/integer','integer', 'gadgets/checkbox','checkbox', + 'gadgets/textEditor','texteditor', 'images/label','label', 'amigalib/boopsi', 'gadtools', @@ -20,6 +21,8 @@ OPT MODULE,OSVERSION=37 MODULE '*stringlist','*reactionForm','*fileStreamer','*sourceGen' +EXPORT DEF texteditorbase + EXPORT ENUM TYPE_REACTIONLIST,TYPE_SCREEN,TYPE_REXX, TYPE_WINDOW, TYPE_MENU, TYPE_BUTTON, TYPE_BITMAP, TYPE_CHECKBOX, TYPE_CHOOSER, TYPE_CLICKTAB, TYPE_FUELGAUGE, TYPE_GETFILE, TYPE_GETFONT, @@ -42,9 +45,13 @@ EXPORT ENUM CHIGAD_MINWIDTH, CHIGAD_MINHEIGHT, CHIGAD_MAXWIDTH, CHIGAD_MAXHEIGHT CHIGAD_NOMINALSIZE, CHIGAD_WEIGHTMINIMUM, CHIGAD_CACHEDOMAIN, CHIGAD_NODISPOSE, CHIGAD_WEIGHTBAR, CHIGAD_OK, CHIGAD_CANCEL +EXPORT ENUM HINTGAD_TEXT, HINTGAD_OK, HINTGAD_CANCEL + EXPORT ENUM FIELDTYPE_CHAR=1, FIELDTYPE_INT=2, FIELDTYPE_LONG=3, FIELDTYPE_STR=4, FIELDTYPE_STRLIST=5, FIELDTYPE_INTLIST=6 CONST NUM_CHI_GADS=CHIGAD_CANCEL+1 +CONST NUM_HINT_GADS=HINTGAD_CANCEL+1 + DEF objCount EXPORT DEF errorState @@ -54,6 +61,7 @@ EXPORT DEF imageData:PTR TO CHAR EXPORT OBJECT reactionObject ident[80]:ARRAY OF CHAR name[80]:ARRAY OF CHAR + hintText:PTR TO CHAR parent:PTR TO reactionObject children:PTR TO stdlist libsused:PTR TO LONG @@ -89,6 +97,9 @@ OBJECT childSettingsForm OF reactionForm childObject:PTR TO reactionObject ENDOBJECT +OBJECT hintEditForm OF reactionForm +ENDOBJECT + PROC create() OF childSettingsForm DEF gads:PTR TO LONG @@ -349,6 +360,101 @@ PROC editSettings(comp:PTR TO reactionObject) OF childSettingsForm ENDIF ENDPROC res=MR_OK +PROC create() OF hintEditForm + DEF gads:PTR TO LONG + DEF tempbase + + NEW gads[NUM_HINT_GADS] + self.gadgetList:=gads + NEW gads[NUM_HINT_GADS] + + tempbase:=textfieldbase + textfieldbase:=texteditorbase + + self.gadgetActions:=gads + self.windowObj:=WindowObject, + WA_TITLE, 'Hint Text Editor', + WA_LEFT, 0, + WA_TOP, 0, + WA_HEIGHT, 80, + WA_WIDTH, 150, + WA_MINWIDTH, 150, + WA_MAXWIDTH, 8192, + WA_MINHEIGHT, 80, + WA_MAXHEIGHT, 8192, + WA_ACTIVATE, TRUE, + WINDOW_POSITION, WPOS_CENTERSCREEN, + WA_PUBSCREEN, 0, + ->WA_CustomScreen, gScreen, + ->WINDOW_AppPort, gApp_port, + WA_CLOSEGADGET, TRUE, + WA_DEPTHGADGET, TRUE, + WA_SIZEGADGET, TRUE, + WA_DRAGBAR, TRUE, + WA_NOCAREREFRESH, TRUE, + WA_IDCMP,IDCMP_GADGETDOWN OR IDCMP_GADGETUP OR IDCMP_CLOSEWINDOW OR 0, + + WINDOW_PARENTGROUP, VLayoutObject, + LAYOUT_SPACEOUTER, TRUE, + LAYOUT_DEFERLAYOUT, TRUE, + + LAYOUT_ADDCHILD, self.gadgetList[ HINTGAD_TEXT ]:=NewObjectA( TextEditor_GetClass(), NIL,[ + GA_ID, HINTGAD_TEXT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + GA_READONLY, FALSE, + TAG_END]), + + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, + + LAYOUT_ADDCHILD, self.gadgetList[ HINTGAD_OK ]:=ButtonObject, + GA_ID, HINTGAD_OK, + GA_TEXT, '_OK', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ HINTGAD_CANCEL ]:=ButtonObject, + GA_ID, HINTGAD_CANCEL, + GA_TEXT, '_Cancel', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + LayoutEnd, + LayoutEnd, + WindowEnd + + textfieldbase:=tempbase + + self.gadgetActions[HINTGAD_CANCEL]:=MR_CANCEL + self.gadgetActions[HINTGAD_OK]:=MR_OK +ENDPROC + +PROC end() OF hintEditForm + END self.gadgetList[NUM_HINT_GADS] + END self.gadgetActions[NUM_HINT_GADS] +ENDPROC + +PROC editHint(comp:PTR TO reactionObject) OF hintEditForm + DEF res,newval + + SetGadgetAttrsA(self.gadgetList[ HINTGAD_TEXT ],0,0,[GA_TEXTEDITOR_CONTENTS,IF comp.hintText THEN comp.hintText ELSE '',0]) + + res:=self.showModal() + IF res=MR_OK + DisposeLink(comp.hintText) + + newval:=DoMethod(self.gadgetList[ HINTGAD_TEXT ], GM_TEXTEDITOR_EXPORTTEXT); + IF StrLen(newval) + comp.hintText:=AstrClone(newval) + ELSE + comp.hintText:=0 + ENDIF + FreeVec(newval) + ENDIF +ENDPROC res=MR_OK + EXPORT PROC create(parent) OF reactionObject DEF stdlist:PTR TO stdlist DEF name[80]:STRING @@ -360,6 +466,8 @@ EXPORT PROC create(parent) OF reactionObject StringF(name,'\s_\d',self.getTypeName(),self.id) AstrCopy(self.name,name) AstrCopy(self.ident,name) + + self.hintText:=0 NEW stdlist.stdlist(20) self.children:=stdlist @@ -457,17 +565,27 @@ EXPORT PROC editChildSettings() OF reactionObject END editForm ENDPROC res +EXPORT PROC editHint() OF reactionObject + DEF editForm:PTR TO hintEditForm + DEF res + + NEW editForm.create() + res:=editForm.editHint(self) + END editForm +ENDPROC + EXPORT PROC serialiseData() OF reactionObject IS [] EXPORT PROC serialise(fser:PTR TO fileStreamer) OF reactionObject DEF tempStr[200]:STRING DEF tempStr2[200]:STRING + DEF encoded:PTR TO CHAR DEF list:PTR TO LONG,i,j,count DEF strlist:PTR TO stringlist DEF intlist:PTR TO stdlist DEF fieldname,fieldtype,fieldptr DEF childcomp:PTR TO reactionObject - + DEF hex:PTR TO CHAR StringF(tempStr,'TYPE: \d',self.type) fser.writeLine(tempStr) @@ -484,6 +602,16 @@ EXPORT PROC serialise(fser:PTR TO fileStreamer) OF reactionObject fser.writeLine(tempStr) StringF(tempStr,'IDENT: \s',self.ident) fser.writeLine(tempStr) + IF self.hintText + encoded:=String(StrLen(self.hintText)*2+6) + StrCopy(encoded,'HINT: ') + FOR i:=0 TO StrLen(self.hintText) + StrAddChar(encoded,65+Shr(self.hintText[i] AND $F0,4)) + StrAddChar(encoded,65+(self.hintText[i] AND $F)) + ENDFOR + fser.writeLine(encoded) + DisposeLink(encoded) + ENDIF StringF(tempStr,'MINWIDTH: \d',self.minWidth) fser.writeLine(tempStr) StringF(tempStr,'MINHEIGHT: \d',self.minHeight) @@ -580,6 +708,11 @@ PROC deserialise(fser:PTR TO fileStreamer) OF reactionObject ELSE self.tempParentId:=Val(tempStr+STRLEN) ENDIF + ELSEIF StrCmp('HINT: ',tempStr,STRLEN) + self.hintText:=String(StrLen(tempStr+STRLEN)/2) + FOR i:=0 TO StrLen(tempStr+STRLEN)-1 STEP 2 + StrAddChar(self.hintText,Shl(Char(tempStr+STRLEN+i)-65,4)+(Char(tempStr+STRLEN+i+1)-65)) + ENDFOR ELSEIF StrCmp('NAME: ',tempStr,STRLEN) AstrCopy(self.name,tempStr+STRLEN,80) ELSEIF StrCmp('IDENT: ',tempStr,STRLEN) diff --git a/scrollerObject.e b/scrollerObject.e index f99ee0f..5bcaa72 100644 --- a/scrollerObject.e +++ b/scrollerObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM SCLGAD_IDENT, SCLGAD_NAME, SCLGAD_TOP, SCLGAD_VISIBLE, SCLGAD_TOTAL, SCLGAD_ARROWDELTA, +EXPORT ENUM SCLGAD_IDENT, SCLGAD_NAME, SCLGAD_HINT, SCLGAD_TOP, SCLGAD_VISIBLE, SCLGAD_TOTAL, SCLGAD_ARROWDELTA, SCLGAD_ARROWS, SCLGAD_ORIENTATION, SCLGAD_OK, SCLGAD_CHILD, SCLGAD_CANCEL @@ -55,8 +55,8 @@ PROC create() OF scrollerSettingsForm WA_LEFT, 0, WA_TOP, 0, WA_HEIGHT, 80, - WA_WIDTH, 150, - WA_MINWIDTH, 150, + WA_WIDTH, 450, + WA_MINWIDTH, 250, WA_MAXWIDTH, 8192, WA_MINHEIGHT, 80, WA_MAXHEIGHT, 8192, @@ -99,6 +99,12 @@ PROC create() OF scrollerSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ SCLGAD_HINT ]:=ButtonObject, + GA_ID, SCLGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -123,6 +129,10 @@ PROC create() OF scrollerSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Visible', LabelEnd, + LayoutEnd, + + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, LAYOUT_ADDCHILD, self.gadgetList[ SCLGAD_TOTAL ]:=IntegerObject, GA_ID, SCLGAD_TOTAL, @@ -143,7 +153,6 @@ PROC create() OF scrollerSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Visible', LabelEnd, - LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -201,6 +210,7 @@ PROC create() OF scrollerSettingsForm WindowEnd self.gadgetActions[SCLGAD_CHILD]:={editChildSettings} + self.gadgetActions[SCLGAD_HINT]:={editHint} self.gadgetActions[SCLGAD_CANCEL]:=MR_CANCEL self.gadgetActions[SCLGAD_OK]:=MR_OK ENDPROC @@ -227,11 +237,20 @@ EXPORT PROC canClose(modalRes) OF scrollerSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF scrollerSettingsForm + self:=nself + self.setBusy() + self.scrollerObject.editHint() + self.clearBusy() + self.updateHint(SCLGAD_HINT, self.scrollerObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO scrollerObject) OF scrollerSettingsForm DEF res self.scrollerObject:=comp - + + self.updateHint(SCLGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ SCLGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ SCLGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ SCLGAD_TOP ],0,0,[INTEGER_NUMBER,comp.top,0]) diff --git a/sketchboardObject.e b/sketchboardObject.e index 992bc6a..14a7231 100644 --- a/sketchboardObject.e +++ b/sketchboardObject.e @@ -22,7 +22,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*colourPicker', '*sourcegen','*validator' -EXPORT ENUM SBOARDGAD_IDENT, SBOARDGAD_WIDTH, SBOARDGAD_HEIGHT, SBOARDGAD_PEN, SBOARDGAD_ACTIVETOOL, +EXPORT ENUM SBOARDGAD_IDENT, SBOARDGAD_HINT, SBOARDGAD_WIDTH, SBOARDGAD_HEIGHT, SBOARDGAD_PEN, SBOARDGAD_ACTIVETOOL, SBOARDGAD_GRID, SBOARDGAD_SCALE, SBOARDGAD_BEVEL, SBOARDGAD_READONLY, SBOARDGAD_DISABLED, SBOARDGAD_OK, SBOARDGAD_CHILD, SBOARDGAD_CANCEL @@ -61,7 +61,7 @@ PROC create() OF sketchboardSettingsForm WA_LEFT, 0, WA_TOP, 0, WA_HEIGHT, 60, - WA_WIDTH, 260, + WA_WIDTH, 450, WA_MINWIDTH, 150, WA_MAXWIDTH, 8192, WA_MINHEIGHT, 60, @@ -93,6 +93,12 @@ PROC create() OF sketchboardSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ SBOARDGAD_HINT ]:=ButtonObject, + GA_ID, SBOARDGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, LAYOUT_ADDCHILD, self.gadgetList[ SBOARDGAD_PEN ]:=ButtonObject, GA_ID, SBOARDGAD_PEN, @@ -229,6 +235,7 @@ PROC create() OF sketchboardSettingsForm self.gadgetActions[SBOARDGAD_PEN]:={selectPen} self.gadgetActions[SBOARDGAD_CHILD]:={editChildSettings} + self.gadgetActions[SBOARDGAD_HINT]:={editHint} self.gadgetActions[SBOARDGAD_CANCEL]:=MR_CANCEL self.gadgetActions[SBOARDGAD_OK]:=MR_OK ENDPROC @@ -272,6 +279,14 @@ EXPORT PROC canClose(modalRes) OF sketchboardSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF sketchboardSettingsForm + self:=nself + self.setBusy() + self.sketchboardObject.editHint() + self.clearBusy() + self.updateHint(SBOARDGAD_HINT, self.sketchboardObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO sketchboardObject) OF sketchboardSettingsForm DEF res @@ -279,6 +294,7 @@ PROC editSettings(comp:PTR TO sketchboardObject) OF sketchboardSettingsForm self.tmpPen:=comp.pen + self.updateHint(SBOARDGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ SBOARDGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ SBOARDGAD_WIDTH ],0,0,[INTEGER_NUMBER,comp.width,0]) SetGadgetAttrsA(self.gadgetList[ SBOARDGAD_HEIGHT ],0,0,[INTEGER_NUMBER,comp.height,0]) diff --git a/sliderObject.e b/sliderObject.e index bfcd73b..2f855f4 100644 --- a/sliderObject.e +++ b/sliderObject.e @@ -20,7 +20,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM SLDGAD_IDENT, SLDGAD_NAME, SLDGAD_MIN, SLDGAD_MAX, SLDGAD_LEVEL, SLDGAD_TICKS,SLDGAD_TICKSIZE, +EXPORT ENUM SLDGAD_IDENT, SLDGAD_NAME, SLDGAD_HINT, SLDGAD_MIN, SLDGAD_MAX, SLDGAD_LEVEL, SLDGAD_TICKS,SLDGAD_TICKSIZE, SLDGAD_MAXLEN, SLDGAD_SHORTTICKS, SLDGAD_INVERT, SLDGAD_ORIENTATION, SLDGAD_LEVELPLACE, SLDGAD_LEVELJUSTIFY, SLDGAD_DISABLED, @@ -110,6 +110,14 @@ PROC create() OF sliderSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, 'Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ SLDGAD_HINT ]:=ButtonObject, + GA_ID, SLDGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -291,6 +299,7 @@ PROC create() OF sliderSettingsForm WindowEnd self.gadgetActions[SLDGAD_CHILD]:={editChildSettings} + self.gadgetActions[SLDGAD_HINT]:={editHint} self.gadgetActions[SLDGAD_CANCEL]:=MR_CANCEL self.gadgetActions[SLDGAD_OK]:=MR_OK ENDPROC @@ -319,11 +328,20 @@ EXPORT PROC canClose(modalRes) OF sliderSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF sliderSettingsForm + self:=nself + self.setBusy() + self.sliderObject.editHint() + self.clearBusy() + self.updateHint(SLDGAD_HINT, self.sliderObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO sliderObject) OF sliderSettingsForm DEF res self.sliderObject:=comp + self.updateHint(SLDGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ SLDGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ SLDGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ SLDGAD_MIN ],0,0,[INTEGER_NUMBER,comp.min,0]) diff --git a/stringObject.e b/stringObject.e index b8b1e25..7e5c892 100644 --- a/stringObject.e +++ b/stringObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourceGen','*validator' -EXPORT ENUM STRGAD_IDENT, STRGAD_NAME, STRGAD_MAXCHARS, STRGAD_VALUE,STRGAD_MINVISIBLE, STRGAD_JUSTIFY, +EXPORT ENUM STRGAD_IDENT, STRGAD_NAME, STRGAD_HINT, STRGAD_MAXCHARS, STRGAD_VALUE,STRGAD_MINVISIBLE, STRGAD_JUSTIFY, STRGAD_DISABLED, STRGAD_READONLY, STRGAD_TABCYCLE, STRGAD_REPLACEMODE, STRGAD_OK, STRGAD_CHILD, STRGAD_CANCEL @@ -100,6 +100,15 @@ PROC create() OF stringSettingsForm CHILD_LABEL, LabelObject, LABEL_TEXT, '_Label', LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ STRGAD_HINT ]:=ButtonObject, + GA_ID, STRGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, @@ -217,6 +226,7 @@ PROC create() OF stringSettingsForm WindowEnd self.gadgetActions[STRGAD_CHILD]:={editChildSettings} + self.gadgetActions[STRGAD_HINT]:={editHint} self.gadgetActions[STRGAD_CANCEL]:=MR_CANCEL self.gadgetActions[STRGAD_OK]:=MR_OK ENDPROC @@ -243,11 +253,20 @@ EXPORT PROC canClose(modalRes) OF stringSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF stringSettingsForm + self:=nself + self.setBusy() + self.stringObject.editHint() + self.clearBusy() + self.updateHint(STRGAD_HINT, self.stringObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO stringObject) OF stringSettingsForm DEF res self.stringObject:=comp + self.updateHint(STRGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ STRGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ STRGAD_NAME ],0,0,[STRINGA_TEXTVAL,comp.name,0]) SetGadgetAttrsA(self.gadgetList[ STRGAD_MAXCHARS ],0,0,[INTEGER_NUMBER,comp.maxChars,0]) diff --git a/tabsObject.e b/tabsObject.e index 03fb20e..1bb6cbd 100644 --- a/tabsObject.e +++ b/tabsObject.e @@ -21,7 +21,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*stringlist','*listPicker','*reactionListObject','*reactionLists','*validator' -EXPORT ENUM TABSGAD_IDENT, TABSGAD_LISTSELECT, TABSGAD_DISABLED, TABSGAD_CHILDMAXWIDTH, TABSGAD_CURRENT, +EXPORT ENUM TABSGAD_IDENT, TABSGAD_HINT, TABSGAD_LISTSELECT, TABSGAD_DISABLED, TABSGAD_CHILDMAXWIDTH, TABSGAD_CURRENT, TABSGAD_OK, TABSGAD_CHILD, TABSGAD_CANCEL EXPORT DEF tabsbase @@ -90,6 +90,14 @@ PROC create() OF tabsSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ TABSGAD_HINT ]:=ButtonObject, + GA_ID, TABSGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LAYOUT_ADDCHILD, self.gadgetList[ TABSGAD_LISTSELECT ]:=ButtonObject, GA_ID, TABSGAD_LISTSELECT, GA_TEXT, '_Pick a List', @@ -157,6 +165,7 @@ PROC create() OF tabsSettingsForm self.gadgetActions[TABSGAD_LISTSELECT]:={selectList} self.gadgetActions[TABSGAD_CHILD]:={editChildSettings} + self.gadgetActions[TABSGAD_HINT]:={editHint} self.gadgetActions[TABSGAD_CANCEL]:=MR_CANCEL self.gadgetActions[TABSGAD_OK]:=MR_OK ENDPROC @@ -199,11 +208,20 @@ EXPORT PROC canClose(modalRes) OF tabsSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF tabsSettingsForm + self:=nself + self.setBusy() + self.tabsObject.editHint() + self.clearBusy() + self.updateHint(TABSGAD_HINT, self.tabsObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO tabsObject) OF tabsSettingsForm DEF res self.tabsObject:=comp self.selectedListId:=comp.listObjectId + self.updateHint(TABSGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ TABSGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ TABSGAD_DISABLED ],0,0,[CHECKBOX_CHECKED,comp.disabled,0]) SetGadgetAttrsA(self.gadgetList[ TABSGAD_CHILDMAXWIDTH ],0,0,[CHECKBOX_CHECKED,comp.childMaxWidth,0]) diff --git a/tapeDeckObject.e b/tapeDeckObject.e index 08a84ca..e13d07c 100644 --- a/tapeDeckObject.e +++ b/tapeDeckObject.e @@ -21,7 +21,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM TAPEGAD_IDENT, TAPEGAD_ANIM,TAPEGAD_MODE,TAPEGAD_FRAMES,TAPEGAD_CURRFRAME, +EXPORT ENUM TAPEGAD_IDENT, TAPEGAD_HINT, TAPEGAD_ANIM,TAPEGAD_MODE,TAPEGAD_FRAMES,TAPEGAD_CURRFRAME, TAPEGAD_OK, TAPEGAD_CHILD, TAPEGAD_CANCEL EXPORT DEF tapedeckbase @@ -76,16 +76,28 @@ PROC create() OF tapeDeckSettingsForm LAYOUT_SPACEOUTER, TRUE, LAYOUT_DEFERLAYOUT, TRUE, - LAYOUT_ADDCHILD, self.gadgetList[ TAPEGAD_IDENT ]:=StringObject, - GA_ID, TAPEGAD_IDENT, - GA_RELVERIFY, TRUE, - GA_TABCYCLE, TRUE, - STRINGA_MAXCHARS, 80, - StringEnd, + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, + LAYOUT_ADDCHILD, self.gadgetList[ TAPEGAD_IDENT ]:=StringObject, + GA_ID, TAPEGAD_IDENT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + STRINGA_MAXCHARS, 80, + StringEnd, - CHILD_LABEL, LabelObject, - LABEL_TEXT, 'Identifier', - LabelEnd, + CHILD_LABEL, LabelObject, + LABEL_TEXT, 'Identifier', + LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ TAPEGAD_HINT ]:=ButtonObject, + GA_ID, TAPEGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + + LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -176,6 +188,7 @@ PROC create() OF tapeDeckSettingsForm self.gadgetActions[TAPEGAD_CHILD]:={editChildSettings} self.gadgetActions[TAPEGAD_CANCEL]:=MR_CANCEL + self.gadgetActions[TAPEGAD_HINT]:={editHint} self.gadgetActions[TAPEGAD_OK]:=MR_OK ENDPROC @@ -201,11 +214,20 @@ EXPORT PROC canClose(modalRes) OF tapeDeckSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF tapeDeckSettingsForm + self:=nself + self.setBusy() + self.tapeDeckObject.editHint() + self.clearBusy() + self.updateHint(TAPEGAD_HINT, self.tapeDeckObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO tapeDeckObject) OF tapeDeckSettingsForm DEF res self.tapeDeckObject:=comp + self.updateHint(TAPEGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ TAPEGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ TAPEGAD_ANIM ],0,0,[CHOOSER_SELECTED,comp.anim,0]) SetGadgetAttrsA(self.gadgetList[ TAPEGAD_MODE ],0,0,[CHOOSER_SELECTED,comp.mode,0]) diff --git a/textEditorObject.e b/textEditorObject.e index 438748b..609be07 100644 --- a/textEditorObject.e +++ b/textEditorObject.e @@ -21,7 +21,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM TEXTEDGAD_IDENT, TEXTEDGAD_EXPORTWRAP,TEXTEDGAD_FIXEDFONT,TEXTEDGAD_FLOW,TEXTEDGAD_IMPORTWRAP, +EXPORT ENUM TEXTEDGAD_IDENT, TEXTEDGAD_HINT, TEXTEDGAD_EXPORTWRAP,TEXTEDGAD_FIXEDFONT,TEXTEDGAD_FLOW,TEXTEDGAD_IMPORTWRAP, TEXTEDGAD_INDENTWIDTH,TEXTEDGAD_LINEENDING,TEXTEDGAD_LINENUMBERS,TEXTEDGAD_SPACESPERTAB,TEXTEDGAD_TABTYPE,TEXTEDGAD_READONLY, TEXTEDGAD_OK, TEXTEDGAD_CHILD, TEXTEDGAD_CANCEL @@ -86,17 +86,29 @@ PROC create() OF textEditorSettingsForm LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, - LAYOUT_ADDCHILD, self.gadgetList[ TEXTEDGAD_IDENT ]:=StringObject, - GA_ID, TEXTEDGAD_IDENT, - GA_RELVERIFY, TRUE, - GA_TABCYCLE, TRUE, - STRINGA_MAXCHARS, 80, - StringEnd, + LAYOUT_ADDCHILD, self.gadgetList[ TEXTEDGAD_IDENT ]:=StringObject, + GA_ID, TEXTEDGAD_IDENT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + STRINGA_MAXCHARS, 80, + StringEnd, - CHILD_LABEL, LabelObject, - LABEL_TEXT, 'Identifier', - LabelEnd, + CHILD_LABEL, LabelObject, + LABEL_TEXT, 'Identifier', + LabelEnd, + LAYOUT_ADDCHILD, self.gadgetList[ TEXTEDGAD_HINT ]:=ButtonObject, + GA_ID, TEXTEDGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + + LayoutEnd, + + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, LAYOUT_ADDCHILD, self.gadgetList[ TEXTEDGAD_EXPORTWRAP ]:=CheckBoxObject, GA_ID, TEXTEDGAD_EXPORTWRAP, @@ -248,6 +260,7 @@ PROC create() OF textEditorSettingsForm WindowEnd self.gadgetActions[TEXTEDGAD_CHILD]:={editChildSettings} + self.gadgetActions[TEXTEDGAD_HINT]:={editHint} self.gadgetActions[TEXTEDGAD_CANCEL]:=MR_CANCEL self.gadgetActions[TEXTEDGAD_OK]:=MR_OK ENDPROC @@ -277,11 +290,20 @@ EXPORT PROC canClose(modalRes) OF textEditorSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF textEditorSettingsForm + self:=nself + self.setBusy() + self.textEditorObject.editHint() + self.clearBusy() + self.updateHint(TEXTEDGAD_HINT, self.textEditorObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO textEditorObject) OF textEditorSettingsForm DEF res self.textEditorObject:=comp - + + self.updateHint(TEXTEDGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ TEXTEDGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ TEXTEDGAD_EXPORTWRAP ],0,0,[CHECKBOX_CHECKED,comp.exportWrap,0]) SetGadgetAttrsA(self.gadgetList[ TEXTEDGAD_FIXEDFONT ],0,0,[CHECKBOX_CHECKED,comp.fixedFont,0]) diff --git a/textFieldObject.e b/textFieldObject.e index 3eb6fab..3f03863 100644 --- a/textFieldObject.e +++ b/textFieldObject.e @@ -22,7 +22,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*colourPicker','*sourceGen','*validator' -EXPORT ENUM TEXTFIELDGAD_IDENT, TEXTFIELDGAD_DELIM, TEXTFIELDGAD_ACCEPT, TEXTFIELDGAD_REJECT, +EXPORT ENUM TEXTFIELDGAD_IDENT, TEXTFIELDGAD_HINT, TEXTFIELDGAD_DELIM, TEXTFIELDGAD_ACCEPT, TEXTFIELDGAD_REJECT, TEXTFIELDGAD_BLINKRATE, TEXTFIELDGAD_MAXSIZE, TEXTFIELDGAD_SPACING, TEXTFIELDGAD_TABSPACES, TEXTFIELDGAD_DISABLED, TEXTFIELDGAD_TABCYCLE, TEXTFIELDGAD_BLOCK, TEXTFIELDGAD_MAXSIZEBEEP, TEXTFIELDGAD_PARTIAL, TEXTFIELDGAD_NOGHOST, TEXTFIELDGAD_READONLY, TEXTFIELDGAD_NONPRINTCHARS, TEXTFIELDGAD_INVERTED, TEXTFIELDGAD_VCENTER, @@ -175,17 +175,28 @@ PROC create() OF textFieldSettingsForm LAYOUT_SPACEOUTER, TRUE, LAYOUT_DEFERLAYOUT, TRUE, + LAYOUT_ADDCHILD, LayoutObject, + LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, - LAYOUT_ADDCHILD, self.gadgetList[ TEXTFIELDGAD_IDENT ]:=StringObject, - GA_ID, TEXTFIELDGAD_IDENT, - GA_RELVERIFY, TRUE, - GA_TABCYCLE, TRUE, - STRINGA_MAXCHARS, 80, - StringEnd, + LAYOUT_ADDCHILD, self.gadgetList[ TEXTFIELDGAD_IDENT ]:=StringObject, + GA_ID, TEXTFIELDGAD_IDENT, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + STRINGA_MAXCHARS, 80, + StringEnd, - CHILD_LABEL, LabelObject, - LABEL_TEXT, 'Identifier', - LabelEnd, + CHILD_LABEL, LabelObject, + LABEL_TEXT, 'Identifier', + LabelEnd, + + LAYOUT_ADDCHILD, self.gadgetList[ TEXTFIELDGAD_HINT ]:=ButtonObject, + GA_ID, TEXTFIELDGAD_HINT, + GA_TEXT, 'Hint', + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, + LayoutEnd, LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -477,6 +488,7 @@ PROC create() OF textFieldSettingsForm self.gadgetActions[TEXTFIELDGAD_INKPEN]:={selectPen} self.gadgetActions[TEXTFIELDGAD_LINEPEN]:={selectPen} self.gadgetActions[TEXTFIELDGAD_CHILD]:={editChildSettings} + self.gadgetActions[TEXTFIELDGAD_HINT]:={editHint} self.gadgetActions[TEXTFIELDGAD_CANCEL]:=MR_CANCEL self.gadgetActions[TEXTFIELDGAD_OK]:=MR_OK ENDPROC @@ -530,6 +542,14 @@ EXPORT PROC canClose(modalRes) OF textFieldSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF textFieldSettingsForm + self:=nself + self.setBusy() + self.textFieldObject.editHint() + self.clearBusy() + self.updateHint(TEXTFIELDGAD_HINT, self.textFieldObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO textFieldObject) OF textFieldSettingsForm DEF res @@ -539,6 +559,7 @@ PROC editSettings(comp:PTR TO textFieldObject) OF textFieldSettingsForm self.tempInkPen:=comp.inkPen self.tempLinePen:=comp.linePen + self.updateHint(TEXTFIELDGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ TEXTFIELDGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ TEXTFIELDGAD_DELIM ],0,0,[STRINGA_TEXTVAL,comp.delimiters,0]) SetGadgetAttrsA(self.gadgetList[ TEXTFIELDGAD_ACCEPT ],0,0,[STRINGA_TEXTVAL,comp.acceptChars,0]) diff --git a/virtualObject.e b/virtualObject.e index 7121929..1141e28 100644 --- a/virtualObject.e +++ b/virtualObject.e @@ -19,7 +19,7 @@ OPT MODULE, OSVERSION=37 MODULE '*reactionObject','*reactionForm','*sourcegen','*validator' -EXPORT ENUM VIRTGAD_IDENT, VIRTGAD_SCROLLER, +EXPORT ENUM VIRTGAD_IDENT, VIRTGAD_HINT, VIRTGAD_SCROLLER, VIRTGAD_OK, VIRTGAD_CHILD, VIRTGAD_CANCEL @@ -81,15 +81,23 @@ PROC create() OF virtualSettingsForm LABEL_TEXT, 'Identifier', LabelEnd, - LAYOUT_ADDCHILD, self.gadgetList[ VIRTGAD_SCROLLER ]:=CheckBoxObject, - GA_ID, VIRTGAD_SCROLLER, + LAYOUT_ADDCHILD, self.gadgetList[ VIRTGAD_HINT ]:=ButtonObject, + GA_ID, VIRTGAD_HINT, + GA_TEXT, 'Hint', GA_RELVERIFY, TRUE, GA_TABCYCLE, TRUE, - GA_TEXT, 'Scroller', - ->CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, - CheckBoxEnd, + ButtonEnd, + CHILD_WEIGHTEDWIDTH,50, LayoutEnd, + LAYOUT_ADDCHILD, self.gadgetList[ VIRTGAD_SCROLLER ]:=CheckBoxObject, + GA_ID, VIRTGAD_SCROLLER, + GA_RELVERIFY, TRUE, + GA_TABCYCLE, TRUE, + GA_TEXT, 'Scroller', + ->CHECKBOX_TEXTPLACE, PLACETEXT_LEFT, + CheckBoxEnd, + LAYOUT_ADDCHILD, LayoutObject, LAYOUT_ORIENTATION, LAYOUT_ORIENT_HORIZ, @@ -119,6 +127,7 @@ PROC create() OF virtualSettingsForm WindowEnd self.gadgetActions[VIRTGAD_CHILD]:={editChildSettings} + self.gadgetActions[VIRTGAD_HINT]:={editHint} self.gadgetActions[VIRTGAD_CANCEL]:=MR_CANCEL self.gadgetActions[VIRTGAD_OK]:=MR_OK ENDPROC @@ -145,11 +154,20 @@ EXPORT PROC canClose(modalRes) OF virtualSettingsForm ENDIF ENDPROC TRUE +PROC editHint(nself,gadget,id,code) OF virtualSettingsForm + self:=nself + self.setBusy() + self.virtualObject.editHint() + self.clearBusy() + self.updateHint(VIRTGAD_HINT, self.virtualObject.hintText) +ENDPROC + PROC editSettings(comp:PTR TO virtualObject) OF virtualSettingsForm DEF res self.virtualObject:=comp + self.updateHint(VIRTGAD_HINT, comp.hintText) SetGadgetAttrsA(self.gadgetList[ VIRTGAD_IDENT ],0,0,[STRINGA_TEXTVAL,comp.ident,0]) SetGadgetAttrsA(self.gadgetList[ VIRTGAD_SCROLLER ],0,0,[CHECKBOX_CHECKED,comp.scroller,0])