X11workbench Toolkit  1.0

Typedefs

typedef struct s_WB_DIALOG_PROP WB_DIALOG_PROP
 Dialog property storage structure. More...
 
typedef struct s_WB_DIALOG_PROPLIST WBDialogPropList
 Dialog Property List, container for WB_DIALOG_PROP. More...
 
typedef struct s_WB_DIALOG_CONTROL WBDialogControl
 Structure identifying the properties of a dialog box control. More...
 
typedef struct s_WB_IMAGE_CONTROL WBImageControl
 Static 'Image' control structure. More...
 
typedef struct s_WB_PUSHBUTTON_CONTROL WBPushButtonControl
 Button 'pushbutton' control structure. More...
 
typedef struct s_WB_EDIT_CONTROL WBEditControl
 Edit control structure. More...
 
typedef struct s_WB_LIST_CONTROL WBListControl
 List control structure. More...
 
typedef struct s_WB_COMBO_CONTROL WBComboControl
 List control structure. More...
 
typedef struct s_WB_TREE_CONTROL WBTreeControl
 Static 'Image' control structure. More...
 

Detailed Description

Data Types for dialog controls

Typedef Documentation

◆ WB_DIALOG_PROP

Dialog property storage structure.

Internally dialog properties are stored using this structure. An array of these are stored as a WBDialogPropList for each dialog control that has properties. Certain properties, however, are mapped to structure members within the WBDialogControl structure.

typedef struct s_WB_DIALOG_PROP
{
Atom aProp; // Atom identifying the property
unsigned long lVal; // 'long' data value, assigned as needed
void *pVal; // pointer to data, as needed (may be allocated, some property types auto-free the data)

Dialog property storage structure. Additional details can be found in the documentation for WB_DIALOG_PROP and WBDialogPropList.

See also
s_WB_DIALOG_PROP and WBDialogPropList

◆ WBComboControl

List control structure.

typedef struct s_WB_COMBO_CONTROL
{
WBDialogControl wbDLGCtrl; // Standard dialog control members
WBListCurSel sel; // selection state, must follow wbDLGCtrl
TEXT_OBJECT xTextObject; // A Text Object associated with the editable text

Structure allocated for List control

◆ WBDialogControl

Structure identifying the properties of a dialog box control.

All dialog box controls have certain properties in common, and most of them also have a number of other common properties. Those properties most commonly used by dialog box controls are stored as members of a WBDialogControl structure and additional properties in an allocated WBDialogPropList (as needed)
For performance reasons, some control types may allocate a 'superclass' of this structure with additional data members.

typedef struct s_WB_DIALOG_CONTROL
{
unsigned int ulTag; // The value DIALOG_CONTROL_TAG
Window wID; // Window ID of the dialog control window
Atom aClass; // basic control class atom
WBDialogWindow *pOwner; // pointer to owner dialog box
WBDialogEntry *pDlgControlEntry; // pointer to dialog box's WBDialogEntry
WBWinEvent pDLGControlCallback; // control's callback function
unsigned long ulFlags; // generic flag bits
XColor clrFG, clrBG, clrBD; // FG, BG, and border colors
XColor clrBD2, clrBD3; // additional 3D border colors
XColor clrHFG, clrHBG; // highlight BG and FG colors
XColor clrAFG, clrABG; // active BG and FG colors
char *pCaption; // in lieu of using WM_NAME property
WBDialogPropList *pPropList; // property list
int cbStructSize; // assigned at allocation time, the total size of this structure
// unique per-control data members follow (see cbStructSize for validation)

This data structure identifies a dialog control's properties. For more information, see WBDialogControl . Typically, a dialog control will allocate a structure that is at LEAST the size of WBDialogControl. Additional private data can then be stored following the 'cbStructSize' member, which will identify the ACTUAL size of the structure.

For each dialog control, a pointer to this structure is assigned to window property index 0, and can be easily obtained using DLGGetDialogControlStruct() (preferred method)

See also
s_WB_DIALOG_CONTROL and WBDialogPropList

◆ WBDialogPropList

Dialog Property List, container for WB_DIALOG_PROP.

Container structure for WB_DIALOG_PROP structures, pre-allocated to hold 'nMaxProps'. Can be re-allocated as necessary to increase the total number of properties so long as the pointer to this structure isn't being cached outside of the WBDialogControl

typedef struct s_WB_DIALOG_PROPLIST
{
int nProps, nMaxProps; // total number of active properties and maximum size of aDlgProp
WB_DIALOG_PROP aDlgProp[1]; // Array of property definitions (contiguous, pre-allocated)
See also
WB_DIALOG_PROP

Properties are maintained using the following X11 Work Bench Toolkit API functions:

◆ WBEditControl

Edit control structure.

typedef struct s_WB_EDIT_CONTROL
{
WBDialogControl wbDLGCtrl; // Standard dialog control members
TEXT_OBJECT xTextObject; // A Text Object associated with the edit text

Structure allocated for Edit control, allows for an edit state buffer

◆ WBImageControl

Static 'Image' control structure.

typedef struct s_WB_IMAGE_CONTROL
{
WBDialogControl wbDLGCtrl; // Standard dialog control members
Pixmap pixmap; // foreground pixmap
Pixmap pixmap2; // background (transparency) pixmap

Structure allocated for Image control

◆ WBListControl

List control structure.

typedef struct s_WB_LIST_CONTROL
{
WBDialogControl wbDLGCtrl; // Standard dialog control members
WBListCurSel sel; // selection state, must follow wbDLGCtrl
int *pSelBitmap; // bitmap of selections (when applicable) (use 'WBAlloc/WBFree')
int cbBitmap; // size of bitmap (in bytes, granular at sizeof(int))
WB_FONT pBold; // bold font set - assigned on the fly, struct creator must free if not 'None'

Structure allocated for List control

◆ WBPushButtonControl

Button 'pushbutton' control structure.

{
WBDialogControl wbDLGCtrl; // Standard dialog control members
Pixmap pixmap; // foreground pixmap
Pixmap pixmap2; // background (transparency) pixmap

Structure allocated for pushbuttons. allows assigning an image or icon

◆ WBTreeControl

Static 'Image' control structure.

typedef struct s_WB_TREE_CONTROL
{
WBDialogControl wbDLGCtrl; // Standard dialog control members
WBListCurSel sel; // must follow wbDLGCtrl
WB_FONT pBold; // bold font set - assigned on the fly, struct creator must free if not 'None'

Structure allocated for Tree control