Extended OBJECT types of windom

Windom defines some extra OBJECTs, based on mydial objects.

The table hereafter summaries all the extended objects of windom.

name ob_type Xtype ob_flag & ob_state Shortcut
Long boxed text (internal windom constant: XTEDINFO) G_BOXTEXT, G_TEXT 11 No
Long boxed text (internal windom constant: XBOXLONGTEXT) G_BOXTEXT, G_TEXT 12 No
Color icons (internal windom constant: XCICON) G_CICON 13 optional ob_state: [STATE8] No
Editable field (internal windom constant: XEDIT) G_FTEXT, G_TEXT 14 mandatory ob_flag : EDITABLE
optional ob_state : [DRAW3D]
No
Menu item (internal windom constant: MENUTITLE) G_STRING 15 No
Menu title (internal windom constant: MENUTITLE) G_TITLE 15 No
Thumb index button (internal windom constant: ONGLET) G_BUTTON, G_STRING 16 mandatory ob_flag: RBUTTON
optional ob_state: [DRAW3D][STATE8][STATE15]
Yes
Thumb index background (internal windom constant: ONGLET) G_BUTTON, G_STRING 16 forbidden ob_flag: RBUTTON
optional ob_state: [DRAW3D]
Yes
Background form (internal windom constant: DIALMOVER) G_BOX 17 optional ob_state: [DRAW3D][OUTLINE] No
Radio button (internal windom constant: DCRBUTTON) G_BUTTON, G_STRING 18 mandatory ob_flag: RBUTTON
optinal ob_state: [DRAW3D] [STATE8]
Yes
Checked button (internal windom constant: DCRBUTTON) G_BUTTON, G_STRING 18 forbidden ob_flag: RBUTTON, EXIT
optinal ob_state: [DRAW3D][STATE8]
Yes
Exit button (internal windom constant: DCRBUTTON) G_BUTTON, G_STRING 18 mandatory ob_flag: EXIT
forbidden ob_flag: RBUTTON
optional ob_flag: [DEFAULT]
optional ob_state: [DRAW3D]
Yes
Cycle button (internal windom constant: CIRCLEBUT) G_BUTTON, G_STRING 22 optional ob_state: [DRAW3D] No
Underlined texte (internal windom constant: UNDERLINE) G_BUTTON, G_STRING 19 optional ob_state: [DRAW3D] Yes
Frame with title (internal windom constant: TITLEBOX) G_BUTTON 20 optional ob_state: [DRAW3D] No
Help button (internal windom constant: HELPBUT) G_BUTTON 21 No
Text with keyboard shortcut (internal windom constant: KPOPUPSTRG) G_BUTTON, G_STRING 24 optional ob_state: [DISABLED] Yes
Box Char (internal windom constant: SLIDEPART) G_BOXCHAR 25 optional ob_state: [DRAW3D] No
Undo button (internal windom constant: UNDOHELP) G_BUTTON 31 No
Undo object any FLAG11 No
Relief button - - optional ob_state: [DRAW3D] No
Userdraw object - 255 No

Legend:
If you use such extended objects in your application, your should call RsrcXtype() to transform these "standard" objects with an extended type to a G_USERDEF object with the nice rendering awaiting.

Note:
Please note that such "extended" objects may be transformed to a G_USERDEF object, and so it's forbidden to diectly access to the ob_spec data. You should use generic ObjcString() function instead to change or get the object text for example.
TODO: SLIDEPART is deprecated ? Undo object deprecated (reserved for highligh flag ?)

Note:
SLIDEPART is an object used to create boxchar (specially for scrolling objects) having the same apparence under TOS, Naes or MagiC.
Windom specific objects

Usual extended states

Follow, the signification of the ob_state bits unused by AES but used by WinDom.

Keyboard shortcuts

Some objects can display a keybord shortcut (see table ...). A keyboard shortcut is a underlined letter inside the text. It means that the object can be selected by typing the key combinaison [Alternate + letter]. To make appear this shortcut, just add a '[' character behing the letter. For example: (!nl)

[Cancel -> (!U)C(!u)ancel -> alt+c.

Special text objects

WinDom defines two special text objects : XBOXLONGTEXT and XBOXLONGTEXT.

The first one allows you to display a long text in a BOXTEXT objet. The text can be display on sereval lines if needed. Just set the extended type in your ressource editor. Long text is read or written using the function ObjcString().

The second one is an editable object without limitation of text size. This object is very easy to handle and usefull and replaces effiencly the standard EDITABLE object. However, standard EDITABLE object can be used in a case of formated fields (such as date input for example) because XEDIT objects don't use the template string (as G_FTEXT objets).

The UserDraw objects

These objects are not really extended object. The extended type (255) should never be set directly by the user from the ressource editor. This value is not used by RsrcXtype() but by RsrcUserDraw().

The goal of these objects is to provide an easy way to draw something in a formular or a toolbar inside a window. Drawing inside classical GEM formular is not possible.

To attribute a drawing function to an object, you have to use the RsrcUserDraw() function. This function transforms the object in a special extended type (255) format. After this call, the AES will call the function given to RsrcUserDraw() to draw the object. The function given to RsrcUserDraw() - that we call the UserDraw function - and the Userdef function are differents. Actually, the Userdef function calls the drawing function to draw the object. The main raison of this system is that the drawing function is similar to a standard drawing function of a window (i.e. the function called by (!B)WM_REDRAW(!b)), but there are some differences:

The only one difference with a Userdef function is that we should never clip the redraw area of the object. This action is performed by the userdef function calling your UserDraw function.


Generated on Thu Jun 22 11:45:27 2006 for WinDom by  doxygen 1.4.6