3.64 DM_SetToolkitData
With this function a direct access to the window system is possible. This means that with this function the application is able to change attributes that are not supported by the ISA Dialog Manager but exist in the toolkit.
DM_Boolean DML_default DM_EXPORT DM_SetToolkitData
(
DM_ID objectID,
DM_Attribute attr
FPTR value,
DM_Options options
)
Parameters
-> DM_ID objectID
This parameter is the identifier of the object whose window system specific data is to be changed.
-> DM_Attribute attr
With the help of this parameter you can define which window system attribute should be changed.
-> FPTR value
This parameter can be used to set new, window system specific data of the object.
-> DM_Options options
This parameter is currently not used and must therefore be set to 0.
Return value
TRUE |
The attribute was set successfully. |
FALSE |
The attribute could not be set successfully. |
The attributes and the associated return values are window system dependent and will be explained in the following chapters.
3.64.1 Motif
These functions can be used to change the data necessary for X-Windows, such as window-id
, widget
and color
. The meaning of these data types is explained in the corresponding X-Windows manuals.
The following values are allowed for the attributes:
attribute |
Meaning |
---|---|
AT_CanvasData |
This value stores the user-specific data of a canvas. This data is remembered by the specified canvas and contains user-specific data. See also Chapter “Structures for Canvas Functions” in manual “C Interface - Basics” |
AT_XAppClass |
|
AT_XColor |
This value sets the X-Windows specific structure for the specified color. The value of the value parameter of the function should be of type |
AT_XCursor |
This value sets the X-Windows specific structure for the specified cursor. The value of the value parameter of the function should be of type |
AT_XFont |
This value sets the X-Windows specific structure for the specified font. The value of the value parameter of the function should be of type XFontStruct*. The availability of this attribute depends on the Motif version used. |
AT_XFontSet |
This value sets the X-Windows specific structure for the specified font. The value of the value parameter of the function should be of type XFontSet. The availability of this attribute depends on the Motif version used. |
AT_XmFontList |
This value sets the X-Windows specific structure for the specified font. The value of the value parameter of the function should be of type XmFontList. The availability of this attribute depends on the Motif version used. |
AT_XtAddEvents |
This attribute can be used to request additional X events for a canvas, e.g. mouse movements. When using this attribute, the event mask ("event_mask") must be passed in the value parameter and the non-selected events in options (non-maskable). If no more additional events are to be sent to the canvas, value and options must be set to 0. |
Note for multiscreen dialogs
When called with AT_XTile or AT_XColor, only the tile or color of the default screen can be set.
See also
Chapter“Multiscreen support under Motif” in manual “Programming Techniques”
3.64.2 Microsoft Windows
With the help of these functions the data necessary for Microsoft Windows can be changed. The meaning of these data types is explained in the corresponding Microsoft Windows manuals.
The following values are allowed for the attributes:
attribute |
Meaning |
---|---|
AT_CanvasData |
This value stores the user-specific data of a canvas. This data is remembered by the specified canvas and contains user-specific data. See also Chapter “Structures for Canvas Functions” in manual “C Interface - Basics” |
AT_ClipboardText |
Permitted only at the setup object. The AT_ClipboardText attribute can be used to set the content of the MS Windows clipboard: DM_SetToolkitData(<setup>, AT_ClipboardText, str, 0); The string obtained remains valid until DM_GetToolkitData or DM_SetToolkitData is called again. To release the string without changing the clipboard use the call DM_SetToolkitData(<setup>, AT_ClipboardText, (FPTR) 0, 0); |
AT_WinDisableAll |
This value makes all toplevel windows of the same application insensitive - except for the window whose DM-ID is specified as value parameter. |
AT_WinEnableAll |
This value makes all toplevel windows of the same application sensitive - except for the window whose DM-ID is specified as value parameter. |
AT_XColor |
This is used to set a Microsoft Windows RGB value for a color resource. The value 0 resets to the original resource value. |
AT_XTile |
This is used to set a Microsoft Windows Brush for a color resource. The value must be a valid Microsoft Windows Brush handle. The value should absolutely correspond to the value of AT_XColor, since it cannot be predicted when the Dialog Manager will use the AT_XColor value or the AT_XTile value. The value 0 resets to the original resource value. Attention If the value is invalid, the ISA Dialog Manager may crash. |
AT_wsidata |
This is used to set a Microsoft Windows cursor for a cursor resource. The value must be a valid Microsoft Windows cursor handle. Der Wert 0 setzt wieder auf den originalen Ressourcenwert zurück.The value 0 resets to the original resource value. Attention If the value is invalid, the ISA Dialog Manager may crash. |
AT_wsidata |
Allows you to set a Microsoft Windows font for a font resource. The value must be a valid Microsoft Windows font handle. The value 0 resets to the original resource value. Attention If the value is invalid, the ISA Dialog Manager may crash. |
AT_Tile / AT_XTile / AT_wsidata |
This allows the setting of an own image for a tile resource. Depending on the option set, the following data types must be specified: - DMF_TlkDataIsIcon: Microsoft Windows Icon Handle The value 0 resets to the original resource value. Attention If the value is invalid, the ISA Dialog Manager may crash. Note: If a HANDLE is set, it is usually converted internally to a Microsoft Direct2D object. A query returns the set HANDLE and not the converted value. |
AT_XColor |
This is used to set a Microsoft Windows color palette for a tile resource, which is used to draw a bitmap (not an icon). The value must be a valid Microsoft Windows palette handle. The value 0 resets to the original resource value. Attention If the value is invalid, the ISA Dialog Manager may crash. |