X11 Work Bench Toolkit  1.0
Dialog Box Controls

Modules

 'Control Name' Atoms for standard dialog controls
 
 CONTROL NOTIFY Atoms for dialog controls
 

Data Structures

struct  __WB_DIALOG_PROP__
 Dialog property storage structure. More...
 
struct  __WB_DIALOG_PROPLIST__
 Dialog Property List, container for WB_DIALOG_PROP. More...
 
struct  __WB_DIALOG_CONTROL__
 Structure identifying the properties of a dialog box control. More...
 
struct  _WB_IMAGE_CONTROL_
 Static 'Image' control structure. More...
 
struct  _WB_PUSHBUTTON_CONTROL_
 Button 'pushbutton' control structure. More...
 
struct  _WB_EDIT_CONTROL_
 Edit control structure. More...
 
struct  _WB_LIST_CONTROL_
 List control structure. More...
 
struct  _WB_COMBO_CONTROL_
 List control structure. More...
 
struct  _WB_TREE_CONTROL_
 Static 'Image' control structure. More...
 

Macros

#define DIALOG_CONTROL_TAG   (*((const unsigned int *)"DLGC"))
 TAG for the WBDialogControl structure.
 

Typedefs

typedef struct __WB_DIALOG_PROP__ WB_DIALOG_PROP
 Dialog property storage structure. More...
 
typedef struct
__WB_DIALOG_PROPLIST__ 
WBDialogPropList
 Dialog Property List, container for WB_DIALOG_PROP. More...
 
typedef struct
__WB_DIALOG_CONTROL__ 
WBDialogControl
 Structure identifying the properties of a dialog box control. More...
 
typedef struct _WB_IMAGE_CONTROL_ WBImageControl
 Static 'Image' control structure. More...
 
typedef struct
_WB_PUSHBUTTON_CONTROL_ 
WBPushButtonControl
 Button 'pushbutton' control structure. More...
 
typedef struct _WB_EDIT_CONTROL_ WBEditControl
 Edit control structure. More...
 
typedef struct _WB_LIST_CONTROL_ WBListControl
 List control structure. More...
 
typedef struct _WB_COMBO_CONTROL_ WBComboControl
 List control structure. More...
 
typedef struct _WB_TREE_CONTROL_ WBTreeControl
 Static 'Image' control structure. More...
 

Functions

void WBDialogControlsInit (void)
 Initialization function for dialog controls. More...
 
WBDialogControlWBDialogControlCreate (Atom aClass, WBDialogWindow *pOwner, WBDialogEntry *pDialogEntry, int iX, int iY, int iWidth, int iHeight, const char *szTitle, const char *szPropertyList)
 Create a dialog control window. More...
 
void DLGRegisterControlCallback (WBDialogControl *pDialogControl, const char *szClassName, WBWinEvent pCallback)
 Register the dialog control's callback function and class name. More...
 
int WBDialogControlSetDialogProp (WBDialogControl *pCtrl, WB_DIALOG_PROP *pPropVal)
 Low-level dialog control property assignment. More...
 
void WBDialogControlDelDialogProp (WBDialogControl *pCtrl, Atom aProp)
 Low-level dialog control property removal. More...
 
const WB_DIALOG_PROPWBDialogControlGetDialogProp (WBDialogControl *pCtrl, Atom aProp)
 Low-level dialog control property retrieval. More...
 
static __inline__ const
WBDialogPropList
WBDialogControlGetPropList (WBDialogControl *pCtrl)
 Low-level dialog control property list retrieval. More...
 
int WBDialogControlSetPropList (WBDialogControl *pCtrl, const char *szPropList)
 Mid-level dialog control property list assignment. More...
 
int WBDialogControlSetProperty (WBDialogControl *pCtrl, Atom aPropName, const char *szPropVal)
 Mid-level dialog control property assignment (character string) More...
 
void WBDialogControlSetProperty2 (WBDialogControl *pCtrl, Atom aPropName, void *szPropVal)
 Mid-level dialog control property list assignment (generic pointer) More...
 
const char * WBDialogControlGetProperty (WBDialogControl *pCtrl, Atom aPropName)
 Mid-level dialog control property retrieval (character string) More...
 
void * WBDialogControlGetProperty2 (WBDialogControl *pCtrl, Atom aPropName)
 Mid-level dialog control property list retrieval (generic pointer) More...
 
static __inline__ WBDialogControlDLGGetDialogControlStruct (Window wID)
 Returns a pointer to the WBDialogControl structure for a dialog control with validation. May return NULL. More...
 
void WBDialogControlSetCaption (WBDialogControl *pCtrl, const char *szCaption)
 Assign text to the 'CAPTION' property of a dialog control. More...
 
const char * WBDialogControlGetCaption (WBDialogControl *pCtrl)
 Obtain a pointer to the assigned text for the 'CAPTION' property of a dialog control. More...
 
void WBDialogControlSetPixmap (WBDialogControl *pCtrl, Pixmap pixmap)
 Assign the PIXMAP (image) property for a control. More...
 
Pixmap WBDialogControlGetPixmap (WBDialogControl *pCtrl)
 Obtain the assigned PIXMAP (image) property for a control. More...
 
void WBDialogControlSetIconPixmap (WBDialogControl *pCtrl, Pixmap pixmap, Pixmap pixmap2)
 Assign the ICON (image) property for a control, which consists of 2 pixmaps. More...
 
Pixmap WBDialogControlGetIconPixmap (WBDialogControl *pCtrl, Pixmap *pPixmap2)
 Obtain the assigned ICON (image) property for a control, which consists of 2 pixmaps. More...
 
static __inline__ void WBDialogControlSetText (WBDialogControl *pCtrl, const char *szText)
 Assign the TEXT property for a control, which is different from the CAPTION or Title. More...
 
static __inline__ const char * WBDialogControlGetText (WBDialogControl *pCtrl)
 Obtain the assigned TEXT property for a control, which is different from the CAPTION or Title. More...
 
static __inline__ WBDialogControlDLGGetDialogControlStructFromID (WBDialogWindow *pDialog, int iControlID)
 Returns a pointer to the WBDialogControl structure for a dialog control with validation. May return NULL. More...
 
static __inline__ void DLGSetControlCaption (WBDialogWindow *pDialog, int iControlID, const char *szCaption)
 Convenience function to assign a dialog control's caption based on its control ID. More...
 
static __inline__ const char * DLGGetControlCaption (WBDialogWindow *pDialog, int iControlID)
 Convenience function to query a dialog control's caption based on its control ID. More...
 
static __inline__ void DLGSetControlText (WBDialogWindow *pDialog, int iControlID, const char *szText)
 Convenience function to assign a dialog control's TEXT based on its control ID. More...
 
static __inline__ const char * DLGGetControlText (WBDialogWindow *pDialog, int iControlID)
 Convenience function to query a dialog control's TEXT based on its control ID. More...
 
static __inline__ int DLGSetControlProperty (WBDialogWindow *pDialog, int iControlID, Atom aPropName, const char *szPropVal)
 Convenience function to assign a text property for a dialog control based on its control ID. More...
 
static __inline__ const char * DLGGetControlProperty (WBDialogWindow *pDialog, int iControlID, Atom aPropName)
 Convenience function to query a text property for a dialog control based on its control ID. More...
 
void DLGCDestroyProperties (WBDialogPropList *pPropList)
 Destroy Properties for a dialog control. More...
 
LISTINFODLGCListInfoConstructor (Window wOwner, int nMax, int nFlags, void *(*pfnAllocator)(const void *, int), void(*pfnDestructor)(void *), void(*pfnDisplay)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet), int(*pfnSort)(const void *, const void *))
 Create LISTINFO structure for a list type control. More...
 
void DLGCListInfoDestructor (LISTINFO *pListInfo)
 Destroy a LISTINFO structure. More...
 
void DLGCDefaultListControlDisplayProc (WBDialogControl *pList, void *pData, int iSelected, GC gc, WB_GEOM *pGeom, XFontSet fontSet)
 The default 'display proc' for displaying a list item from a LISTINFO structure. More...
 

Variables

Atom aDLGC_TEXT
 dialog control TEXT property - see WBDialogControlGetText() More...
 
Atom aDLGC_CAPTION
 dialog control CAPTION property - see WBDialogControlGetCaption()
 
Atom aDLGC_FONT
 dialog control FONT property - reserved More...
 
Atom aDLGC_SCROLLINFO
 dialog control SCROLLINFO property - see WB_SCROLLINFO structure More...
 
Atom aDLGC_LISTINFO
 dialog control LISTINFO property - see DLGInitControlListInfo() etc. More...
 
Atom aDLGC_PATH
 dialog control PATH property, for file and directory controls More...
 
enum  {
  WB_SCROLL_DEFAULT = 0, WB_SCROLL_HORIZONTAL = 1, WB_SCROLL_VERTICAL = 2, WB_SCROLL_KNOB = 0,
  WB_SCROLL_FORWARD = 1, WB_SCROLL_BACKWARD = -1, WB_SCROLL_PAGEFWD = 2, WB_SCROLL_PAGEBACK = -2,
  WB_SCROLL_FIRST = -3, WB_SCROLL_LAST = 3, WB_SCROLL_DBLCLICK = 4, WB_SCROLL_ABSOLUTE = 99,
  WB_SCROLL_RELATIVE = -99, WB_SCROLL_NA = 0x80000000
}
 Enumeration for aSCROLL_NOTIFY CLientMessage. More...
 
enum  CONTROL_FLAGS {
  CONTROL_Reserved00 = 0x00000001, CONTROL_Reserved01 = 0x00000002, CONTROL_Reserved02 = 0x00000004, CONTROL_Reserved03 = 0x00000008,
  CONTROL_Reserved04 = 0x00000010, CONTROL_Reserved05 = 0x00000020, CONTROL_Reserved06 = 0x00000040, CONTROL_Reserved07 = 0x00000080,
  CONTROL_Reserved08 = 0x00000100, CONTROL_Reserved09 = 0x00000200, CONTROL_Reserved10 = 0x00000400, CONTROL_Reserved11 = 0x00000800,
  CONTROL_Reserved12 = 0x00001000, CONTROL_Reserved13 = 0x00002000, CONTROL_Reserved14 = 0x00004000, CONTROL_SupportListInfo = 0x00008000,
  STATIC_Frame = 0x00010000, STATIC_Text = 0x00020000, STATIC_Icon = 0x00030000, STATIC_Image = 0x00040000,
  STATIC_TYPEMASK = 0x000f0000, STATIC_3DBorder = 0x00100000, BUTTON_PushButton = 0x00010000, BUTTON_DefPushButton = 0x00020000,
  BUTTON_CancelButton = 0x00030000, BUTTON_RadioButton = 0x00040000, BUTTON_FirstRadioButton = 0x00050000, BUTTON_CheckButton = 0x00060000,
  BUTTON_TriStateButton = 0x00070000, BUTTON_TYPEMASK = 0x000f0000, CONTROL_VAlignFixed = WBDialogEntry_VAlignFixed, CONTROL_VAlignTop = WBDialogEntry_VAlignTop,
  CONTROL_VAlignBottom = WBDialogEntry_VAlignBottom, CONTROL_VAlignCenter = WBDialogEntry_VAlignCenter, CONTROL_VAlignMask = WBDialogEntry_VAlignMask, CONTROL_HAlignFixed = WBDialogEntry_HAlignFixed,
  CONTROL_HAlignLeft = WBDialogEntry_HAlignLeft, CONTROL_HAlignRight = WBDialogEntry_HAlignRight, CONTROL_HAlignCenter = WBDialogEntry_HAlignCenter, CONTROL_HAlignMask = WBDialogEntry_HAlignMask,
  CONTROL_AlignMask = WBDialogEntry_AlignMask, CUSTOM_Reserved24 = 0x01000000, CUSTOM_Reserved25 = 0x02000000, CUSTOM_Reserved26 = 0x04000000,
  CUSTOM_Reserved27 = 0x08000000, CUSTOM_Reserved28 = 0x10000000, CUSTOM_Reserved29 = 0x20000000, CUSTOM_Reserved30 = 0x40000000,
  CUSTOM_Reserved31 = 0x80000000
}
 Various bit flags used for controls, defined here for convenience. More...
 
enum  ControlListIndex {
  ControlListIndex_FIRST = 0, ControlListIndex_LAST = 0x7fffffff, ControlListIndex_INSERT_FIRST = -1, ControlListIndex_INSERT_LAST = 0x7fffffff,
  ControlListIndex_DELETE_ALL = -1, ControlListIndex_NONE = -1
}
 LIST-related constants for the index of an item within a list. More...
 
enum  ListInfoFlags {
  ListInfoFlags_SORTED = 1, ListInfoFlags_RESERVED1 = 2, ListInfoFlags_RESERVED2 = 4, ListInfoFlags_RESERVED3 = 8,
  ListInfoFlags_RESERVED4 = 0x10, ListInfoFlags_RESERVED5 = 0x20, ListInfoFlags_RESERVED6 = 0x40, ListInfoFlags_RESERVED7 = 0x80
}
 Create flags specified in the call to DLGInitControlListInfo() More...
 
const Atom aFRAME_CONTROL
 Standard Dialog Control - transparent frame with optional text - see FRAME_CONTROL_STR.
 
const Atom aTEXT_CONTROL
 Standard Dialog Control - static text (single or multi-line) - see TEXT_CONTROL_STR.
 
const Atom aICON_CONTROL
 Standard Dialog Control - icon container (has a nice 3D border) - see ICON_CONTROL_STR.
 
const Atom aIMAGE_CONTROL
 Standard Dialog Control - generic image/pixmap holder - see IMAGE_CONTROL_STR.
 
const Atom aEDIT_CONTROL
 Standard Dialog Control - editable text (single or multi-line, scrollable, clipboard) - see EDIT_CONTROL_STR.
 
const Atom aPUSHBUTTON_CONTROL
 Standard Dialog Control - Pushbutton control - see PUSHBUTTON_CONTROL_STR.
 
const Atom aDEFPUSHBUTTON_CONTROL
 Standard Dialog Control - default Pushbutton control (has dark border, accepts <ENTER> as hotkey) - see DEFPUSHBUTTON_CONTROL_STR.
 
const Atom aCANCELBUTTON_CONTROL
 Standard Dialog Control - cancel pushbutton control (accepts <ESC> as hotkey) - see CANCELBUTTON_CONTROL_STR.
 
const Atom aRADIOBUTTON_CONTROL
 Standard Dialog Control - radio button - see RADIOBUTTON_CONTROL_STR.
 
const Atom aFIRSTRADIOBUTTON_CONTROL
 Standard Dialog Control - 'first' radio button - defines start of radio button 'group' - see FIRSTRADIOBUTTON_CONTROL_STR.
 
const Atom aCHECKBUTTON_CONTROL
 Standard Dialog Control - check[box] button - push-on/push-off with 'check mark' (or whatever) - see CHECKBUTTON_CONTROL_STR.
 
const Atom aTRISTATEBUTTON_CONTROL
 Standard Dialog Control - tristate - like check, but with a third state - see TRISTATEBUTTON_CONTROL_STR.
 
const Atom aHSCROLL_CONTROL
 Standard Dialog Control - horizontal scroll - see HSCROLL_CONTROL_STR.
 
const Atom aVSCROLL_CONTROL
 Standard Dialog Control - vertical scroll - see VSCROLL_CONTROL_STR.
 
const Atom aSLIDER_CONTROL
 Standard Dialog Control - volume control (slider bar) (h or v depending on geometry) - see SLIDER_CONTROL_STR.
 
const Atom aKNOB_CONTROL
 Standard Dialog Control - "volume knob" (270 degrees of rotation, left to right) - see KNOB_CONTROL_STR.
 
const Atom aLIST_CONTROL
 Standard Dialog Control - list - single, multi, extended select (h, v, multicol) - see LIST_CONTROL_STR.
 
const Atom aCOMBO_CONTROL
 Standard Dialog Control - classic 'combo box' control - see COMBO_CONTROL_STR.
 
const Atom aTREE_CONTROL
 Standard Dialog Control - class 'tree' control - see TREE_CONTROL_STR.
 
const Atom aCOMBOTREE_CONTROL
 Standard Dialog Control - 'combo tree' (tree with interlocked edit/text box like combo box) - see COMBOTREE_CONTROL_STR.
 
const Atom aFILE_LIST_CONTROL
 Standard Dialog Control - File List - see FILE_LIST_CONTROL_STR.
 
const Atom aFILE_COMBO_CONTROL
 Standard Dialog Control - file combo control - see FILE_COMBO_CONTROL_STR.
 
const Atom aPATH_TREE_CONTROL
 Standard Dialog Control - path tree - directory hierarchy - see PATH_TREE_CONTROL_STR.
 
const Atom aTAB_CONTROL
 Standard Dialog Control -'tab' container (auto enable/disable contents) - see TAB_CONTROL_STR.
 
const Atom aBUTTON_PRESS
 CONTROL_NOTIFY ClientMessage for BUTTON_PRESS event. More...
 
const Atom aLIST_NOTIFY
 CONTROL_NOTIFY ClientMessage for LIST_NOTIFY event. More...
 
const Atom aTEXT_CHANGED
 CONTROL_NOTIFY ClientMessage for TEXT_CHANGED event. More...
 
const Atom aTEXTSELECT_CHANGE
 CONTROL_NOTIFY ClientMessage for TEXTSELECT_CHANGE event. More...
 
const Atom aSCROLL_NOTIFY
 
const Atom aGOTFOCUS
 CONTROL_NOTIFY ClientMessage for GOTFOCUS event. More...
 
const Atom aLOSTFOCUS
 CONTROL_NOTIFY ClientMessage for LOSTFOCUS event. More...
 
const Atom aMOUSE_DOWN
 CONTROL_NOTIFY ClientMessage for MOUSE_DOWN event. More...
 
const Atom aMOUSE_UP
 CONTROL_NOTIFY ClientMessage for MOUSE_UP event. More...
 
const Atom aMOUSE_DRAG
 CONTROL_NOTIFY ClientMessage for MOUSE_DRAG event. More...
 
const Atom aKEY_DOWN
 CONTROL_NOTIFY ClientMessage for KEY_DOWN event. More...
 
const Atom aKEY_UP
 CONTROL_NOTIFY ClientMessage for KEY_UP event. More...
 
const Atom aKEYSTROKE
 CONTROL_NOTIFY ClientMessage for KEYSTROKE event. More...
 
const Atom aDIALOG_INIT
 DIALOG_INIT ClientMessage, sent to dialog window callback on frame create. More...
 
Atom aDLGC_PROP_NOTIFY
 DLGC_PROP_NOTIFY ClientMessage, notify control of property change. More...
 
Atom aDLGC_PATH
 dialog control PATH property, for file and directory controls More...
 
int DLGScrollBarHandler (Window wID, WBDialogControl *pCtrl, XEvent *pEvent)
 Scroll bar event filter for dialog control callback function. Generates scroll events. More...
 
static __inline__ void DLGNotifyOwner (WBDialogControl *pDialogControl, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
 Notify Owner by calling the owner window's callback function directly with an event. More...
 
static __inline__ void DLGNotifySelf (WBDialogControl *pDialogControl, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
 Notify 'self' by calling the window's own callback function directly with an event. More...
 
static __inline__ void DLGNotifyOwnerAsync (WBDialogControl *pDialogControl, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
 Notify Owner by posting an event that will ASYNCHRONOUSLY be sent to the owner window's callback function. More...
 
static __inline__ void DLGNotifySelfAsync (WBDialogControl *pDialogControl, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
 Notify 'self' by posting an event that will ASYNCHRONOUSLY be sent to the window's callback function. More...
 
void * DLGCDefaultListInfoAllocator (const void *pData, int cbData)
 The default 'List Info' data allocator for a control's list info. More...
 
const char * DLGGetControlListText (WBDialogControl *pCtrl, int iIndex)
 Retrieve the text poiner for a single list entry (listbox, combo, and tree controls only) More...
 
const void * DLGGetControlListData (WBDialogControl *pCtrl, int iIndex)
 Retrieve the data pointer for a single list entry (listbox, combo, and tree controls only) More...
 
int DLGInitControlListInfo (WBDialogControl *pCtrl, int nFlags, void *(*pfnAllocator)(const void *, int), void(*pfnDestructor)(void *), void(*pfnDisplay)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet), int(*pfnSort)(const void *, const void *))
 Initialize the 'List Entry' for a control, specifying various callbacks and flags. More...
 
int DLGModifyControlListInfo (WBDialogControl *pCtrl, int bFlags, int nFlags, int bAllocator, void *(*pfnAllocator)(const void *, int), int bDestructor, void(*pfnDestructor)(void *), int bDisplay, void(*pfnDisplay)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet), int bSort, int(*pfnSort)(const void *, const void *))
 Modify the 'List Entry' for a control, specifying various callbacks and flags. More...
 
int DLGAddControlListEntry (WBDialogControl *pCtrl, const char *pData, long cbData, int iIndex)
 Add a list entry to a control's list info. More...
 
void DLGDelControlListEntry (WBDialogControl *pCtrl, int iIndex)
 Delete a list entry from a control's list info at a specified index (or deletes ALL entries) More...
 
int DLGGetControlListSelection (WBDialogControl *pCtrl)
 Obtain the current selection index for a single-selection list. More...
 
void DLGSetControlListSelection (WBDialogControl *pCtrl, int iIndex)
 Assign the current selection index for a single-selection list. More...
 
void DLGSetControlListSelectionValue (WBDialogControl *pCtrl, int iIndex, int iSelState)
 Assign the selection state for a specific index within a control's list info. More...
 
int DLGGetControlListSelectionBits (WBDialogControl *pCtrl, unsigned int *piBits, int nSize)
 Query the selection state for multiple items within a control's list info. More...
 
char * DLGGetControlListSelectionText (WBDialogControl *pCtrl)
 Query the selection text as multiple strings in an allocated buffer. More...
 
#define WB_MIN_STD_CTRL_ID   0x7ffffff0
 
#define IDOK   0x7ffffff0
 
#define IDNO   0x7ffffff1
 
#define IDYES   0x7ffffff2
 
#define IDABORT   0x7ffffff3
 
#define IDRETRY   0x7ffffff4
 
#define IDIGNORE   0x7ffffff5
 
#define IDCANCEL   0x7fffffff
 
#define IDSTATIC   -1
 
#define IDNONE   0
 
#define FRAME_CONTROL_STR   "Frame"
 
#define TEXT_CONTROL_STR   "Text"
 
#define ICON_CONTROL_STR   "Icon"
 
#define IMAGE_CONTROL_STR   "Image"
 
#define EDIT_CONTROL_STR   "Edit"
 
#define PUSHBUTTON_CONTROL_STR   "PushButton"
 
#define DEFPUSHBUTTON_CONTROL_STR   "DefPushButton"
 
#define CANCELBUTTON_CONTROL_STR   "CancelButton"
 
#define RADIOBUTTON_CONTROL_STR   "RadioButton"
 
#define FIRSTRADIOBUTTON_CONTROL_STR   "FirstRadioButton"
 
#define CHECKBUTTON_CONTROL_STR   "CheckButton"
 
#define TRISTATEBUTTON_CONTROL_STR   "TriStateButton"
 
#define HSCROLL_CONTROL_STR   "HScroll"
 
#define VSCROLL_CONTROL_STR   "VScroll"
 
#define SLIDER_CONTROL_STR   "Slider"
 
#define KNOB_CONTROL_STR   "Knob"
 
#define LIST_CONTROL_STR   "List"
 
#define COMBO_CONTROL_STR   "Combo"
 
#define TREE_CONTROL_STR   "Tree"
 
#define COMBOTREE_CONTROL_STR   "ComboTree"
 
#define FILE_LIST_CONTROL_STR   "FileList"
 
#define FILE_COMBO_CONTROL_STR   "FileCombo"
 
#define PATH_TREE_CONTROL_STR   "PathTree"
 
#define TAB_CONTROL_STR   "Tab"
 
#define WB_LIST_NONE   0
 
#define WB_LIST_SELCHANGE   1
 
#define WB_LIST_DBLCLICK   2
 
#define DLGInitControlListInfoDefault(X)   DLGInitControlListInfo(X, ListInfoFlags_SORTED, DLGCDefaultListInfoAllocator, WBFree, NULL, NULL)
 wrapper macro for DLGInitControlListInfo() for standard WBAlloc'd text data More...
 

Detailed Description

Structures and API functions used for dialog controls

Macro Definition Documentation

#define CANCELBUTTON_CONTROL_STR   "CancelButton"

Cancel Push Button Control - aCANCELBUTTON_CONTROL

Definition at line 798 of file dialog_controls.h.

#define CHECKBUTTON_CONTROL_STR   "CheckButton"

Checkbox Button Control - aCHECKBUTTON_CONTROL

Definition at line 804 of file dialog_controls.h.

#define COMBO_CONTROL_STR   "Combo"

Combo Box Control - aCOMBO_CONTROL

Definition at line 818 of file dialog_controls.h.

#define COMBOTREE_CONTROL_STR   "ComboTree"

Combo Tree Control - aCOMBOTREE_CONTROL

Definition at line 822 of file dialog_controls.h.

#define DEFPUSHBUTTON_CONTROL_STR   "DefPushButton"

Default Push Button Control - aDEFPUSHBUTTON_CONTROL

Definition at line 796 of file dialog_controls.h.

#define DLGInitControlListInfoDefault (   X)    DLGInitControlListInfo(X, ListInfoFlags_SORTED, DLGCDefaultListInfoAllocator, WBFree, NULL, NULL)

wrapper macro for DLGInitControlListInfo() for standard WBAlloc'd text data

This macro creates a standard WBAlloc'd text data list entry using DLGCDefaultListInfoAllocator() and WBFree, for sorted text data with standard display and sort comparison functions NOTE: using DLGInitControlListInfoDefault implies string data that's WBAlloc'd. For some other scheme of maintaining and copying data pointers for a listbox, substitute your own function pointers as needed.

Definition at line 1172 of file dialog_controls.h.

#define EDIT_CONTROL_STR   "Edit"

Edit (Text) Control - aEDIT_CONTROL

Definition at line 792 of file dialog_controls.h.

#define FILE_COMBO_CONTROL_STR   "FileCombo"

File Combo Control - aFILE_COMBO_CONTROL

Definition at line 826 of file dialog_controls.h.

#define FILE_LIST_CONTROL_STR   "FileList"

File List Control - aFILE_LIST_CONTROL

Definition at line 824 of file dialog_controls.h.

#define FIRSTRADIOBUTTON_CONTROL_STR   "FirstRadioButton"

First Radio Button Control - aFIRSTRADIOBUTTON_CONTROL

Definition at line 802 of file dialog_controls.h.

#define FRAME_CONTROL_STR   "Frame"

Static Frame Control - aFRAME_CONTROL

Definition at line 784 of file dialog_controls.h.

#define HSCROLL_CONTROL_STR   "HScroll"

Horizontal Scroll Bar Control - aHSCROLL_CONTROL

Definition at line 808 of file dialog_controls.h.

#define ICON_CONTROL_STR   "Icon"

Static Icon Control - aICON_CONTROL

Definition at line 788 of file dialog_controls.h.

#define IDABORT   0x7ffffff3

'ABORT' button

Definition at line 773 of file dialog_controls.h.

#define IDCANCEL   0x7fffffff

'CANCEL' button

Definition at line 776 of file dialog_controls.h.

#define IDIGNORE   0x7ffffff5

'IGNORE' button

Definition at line 775 of file dialog_controls.h.

#define IDNO   0x7ffffff1

'NO' button

Definition at line 771 of file dialog_controls.h.

#define IDNONE   0

'no ID' - this may be repeated as needed for things that need no ID

Definition at line 778 of file dialog_controls.h.

#define IDOK   0x7ffffff0

'OK' button

Definition at line 770 of file dialog_controls.h.

#define IDRETRY   0x7ffffff4

'RETRY' button

Definition at line 774 of file dialog_controls.h.

#define IDSTATIC   -1

non-unique 'static' item; may exist more than once within a dialog resource

Definition at line 777 of file dialog_controls.h.

#define IDYES   0x7ffffff2

'YES' button

Definition at line 772 of file dialog_controls.h.

#define IMAGE_CONTROL_STR   "Image"

Static Image Control - aIMAGE_CONTROL

Definition at line 790 of file dialog_controls.h.

#define KNOB_CONTROL_STR   "Knob"

'Volume' Knob Control - aKNOB_CONTROL

Definition at line 814 of file dialog_controls.h.

#define LIST_CONTROL_STR   "List"

List Box Control - aLIST_CONTROL

Definition at line 816 of file dialog_controls.h.

#define PATH_TREE_CONTROL_STR   "PathTree"

Path Tree Control - aPATH_TREE_CONTROL

Definition at line 828 of file dialog_controls.h.

#define PUSHBUTTON_CONTROL_STR   "PushButton"

Push Button Control - aPUSHBUTTON_CONTROL

Definition at line 794 of file dialog_controls.h.

#define RADIOBUTTON_CONTROL_STR   "RadioButton"

Radio Button Control - aRADIOBUTTON_CONTROL

Definition at line 800 of file dialog_controls.h.

#define SLIDER_CONTROL_STR   "Slider"

Sliding Bar Control - aSLIDER_CONTROL

Definition at line 812 of file dialog_controls.h.

#define TAB_CONTROL_STR   "Tab"

Tab Control - aTAB_CONTROL

Definition at line 830 of file dialog_controls.h.

#define TEXT_CONTROL_STR   "Text"

Static Text Control - aTEXT_CONTROL

Definition at line 786 of file dialog_controls.h.

#define TREE_CONTROL_STR   "Tree"

Tree Control - aTREE_CONTROL

Definition at line 820 of file dialog_controls.h.

#define TRISTATEBUTTON_CONTROL_STR   "TriStateButton"

Tri-State Button Control - aTRISTATEBUTTON_CONTROL

Definition at line 806 of file dialog_controls.h.

#define VSCROLL_CONTROL_STR   "VScroll"

Vertical Scroll Bar Control - aVSCROLL_CONTROL

Definition at line 810 of file dialog_controls.h.

#define WB_LIST_DBLCLICK   2

double click by default drives an 'End Dialog' with IDOK

Definition at line 951 of file dialog_controls.h.

#define WB_LIST_NONE   0

'default' notification value (no action needed)

Definition at line 947 of file dialog_controls.h.

#define WB_LIST_SELCHANGE   1

simple notification that the selection has changed

Definition at line 949 of file dialog_controls.h.

#define WB_MIN_STD_CTRL_ID   0x7ffffff0

minimum value for standard dialog control ID

Definition at line 769 of file dialog_controls.h.

Typedef Documentation

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 __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
WB_DIALOG_PROP and WBDialogPropList

List control structure.

typedef struct _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

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 __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
WB_DIALOG_CONTROL and 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 __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:

Edit control structure.

typedef struct _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

Static 'Image' control structure.

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

Structure allocated for Image control

List control structure.

typedef struct _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))
XFontSet fsBold; // bold font set - assigned on the fly, struct creator must free if not 'None'

Structure allocated for List control

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

Static 'Image' control structure.

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

Structure allocated for Tree control

Enumeration Type Documentation

anonymous enum

Enumeration for aSCROLL_NOTIFY CLientMessage.

Enumeration of values used in scroll notification messages.

See Also
DLGScrollBarHandler()
Enumerator
WB_SCROLL_DEFAULT 

1st parameter (bar) - 'Default Bar', currently not implemented, probably won't be used

WB_SCROLL_HORIZONTAL 

1st parameter (bar) - The horizontal scroll bar for the control or window

WB_SCROLL_VERTICAL 

1st parameter (bar) - The vertical scroll bar for the control or window.

WB_SCROLL_KNOB 

2nd parameter (direction) - 'knob track' - pos in data.l[2]

WB_SCROLL_FORWARD 

2nd parameter (direction) - down, right

WB_SCROLL_BACKWARD 

2nd parameter (direction) - up, left

WB_SCROLL_PAGEFWD 

2nd parameter (direction) - pgdn, pgright

WB_SCROLL_PAGEBACK 

2nd parameter (direction) - pgup, pgleft

WB_SCROLL_FIRST 

2nd parameter (direction) - home, top

WB_SCROLL_LAST 

2nd parameter (direction) - bottom, end

WB_SCROLL_DBLCLICK 

2nd parameter (direction) - double-clicked item (no selection change info) (sent to list control's owner)

WB_SCROLL_ABSOLUTE 

2nd parameter (direction) - absolute scroll - pos in data.l[2]

WB_SCROLL_RELATIVE 

2nd parameter (direction) - relative scroll - rel pos in data.l[2]

WB_SCROLL_NA 

generic 'NA' or 'UNDEFINED' value

Definition at line 965 of file dialog_controls.h.

Various bit flags used for controls, defined here for convenience.

Intended for the 'ulFlags' member of the WBDialogControl structure. Bits 0000ffff are 'common' flags for all controls. Bits 00ff0000 are control-specific flags. Bits ff000000 are 'reserved' for custom usage.

Enumerator
CONTROL_Reserved00 

CONTROL bits, reserved 00.

CONTROL_Reserved01 

CONTROL bits, reserved 01.

CONTROL_Reserved02 

CONTROL bits, reserved 02.

CONTROL_Reserved03 

CONTROL bits, reserved 03.

CONTROL_Reserved04 

CONTROL bits, reserved 04.

CONTROL_Reserved05 

CONTROL bits, reserved 05.

CONTROL_Reserved06 

CONTROL bits, reserved 06.

CONTROL_Reserved07 

CONTROL bits, reserved 07.

CONTROL_Reserved08 

CONTROL bits, reserved 08.

CONTROL_Reserved09 

CONTROL bits, reserved 09.

CONTROL_Reserved10 

CONTROL bits, reserved 10.

CONTROL_Reserved11 

CONTROL bits, reserved 11.

CONTROL_Reserved12 

CONTROL bits, reserved 12.

CONTROL_Reserved13 

CONTROL bits, reserved 13.

CONTROL_Reserved14 

CONTROL bits, reserved 14.

CONTROL_SupportListInfo 

this control supports a LISTINFO property.

STATIC_Frame 

STATIC - frame control window.

STATIC_Text 

STATIC - Text control window.

STATIC_Icon 

STATIC - Icon control window.

STATIC_Image 

STATIC - Image control window.

STATIC_TYPEMASK 

STATIC - 'type mask' for static controls.

STATIC_3DBorder 

STATIC - display with a 3D-looking border.

BUTTON_PushButton 

BUTTON - Push button (generic)

BUTTON_DefPushButton 

BUTTON - Default Push Button (activate by <ENTER>)

BUTTON_CancelButton 

BUTTON - Cancel Push Button (activate by <ESC>)

BUTTON_RadioButton 

BUTTON - Radio button (generic)

BUTTON_FirstRadioButton 

BUTTON - 'First' radio button in a group.

BUTTON_CheckButton 

BUTTON - Checkbox button.

BUTTON_TriStateButton 

BUTTON - Tri-state button.

BUTTON_TYPEMASK 

BUTTON - 'type mask' for buttons.

CONTROL_VAlignFixed 

default position re-alignment with respect to center (as a percentage, no stretching)

CONTROL_VAlignTop 

resize maintains position/size with respect to top

CONTROL_VAlignBottom 

resize maintains position/size with respect to bottom

CONTROL_VAlignCenter 

re-alignment with respect to center (as a percentage, stretching allowed)

CONTROL_VAlignMask 

vertical alignment mask

CONTROL_HAlignFixed 

default position re-alignment with respect to center (as a percentage, no stretching)

CONTROL_HAlignLeft 

resize maintains position/size with respect to left

CONTROL_HAlignRight 

resize maintains position/size with respect to right

CONTROL_HAlignCenter 

re-alignment with respect to center (as a percentage, stretching allowed)

CONTROL_HAlignMask 

vertical alignment mask

CONTROL_AlignMask 

alignment mask (both horizontal and vertical)

CUSTOM_Reserved24 

CUSTOM - reserved bit 24.

CUSTOM_Reserved25 

CUSTOM - reserved bit 25.

CUSTOM_Reserved26 

CUSTOM - reserved bit 26.

CUSTOM_Reserved27 

CUSTOM - reserved bit 27.

CUSTOM_Reserved28 

CUSTOM - reserved bit 28.

CUSTOM_Reserved29 

CUSTOM - reserved bit 29.

CUSTOM_Reserved30 

CUSTOM - reserved bit 30.

CUSTOM_Reserved31 

CUSTOM - reserved bit 31.

Definition at line 1039 of file dialog_controls.h.

LIST-related constants for the index of an item within a list.

See Also
DLGGetControlListText(), DLGGetControlListData(), DLGAddControlListEntry(), DLGDelControlListEntry()
Enumerator
ControlListIndex_FIRST 

first list index

ControlListIndex_LAST 

last list index

ControlListIndex_INSERT_FIRST 

always insert at beginning

ControlListIndex_INSERT_LAST 

always insert at end

ControlListIndex_DELETE_ALL 

delete all

ControlListIndex_NONE 

"no selection"

Definition at line 1000 of file dialog_controls.h.

Create flags specified in the call to DLGInitControlListInfo()

Enumerator
ListInfoFlags_SORTED 

list is sorted

ListInfoFlags_RESERVED1 

reserved 1

ListInfoFlags_RESERVED2 

reserved 2

ListInfoFlags_RESERVED3 

reserved 3

ListInfoFlags_RESERVED4 

reserved 4

ListInfoFlags_RESERVED5 

reserved 5

ListInfoFlags_RESERVED6 

reserved 6

ListInfoFlags_RESERVED7 

reserved 7

Definition at line 1014 of file dialog_controls.h.

Function Documentation

int DLGAddControlListEntry ( WBDialogControl pCtrl,
const char *  pData,
long  cbData,
int  iIndex 
)

Add a list entry to a control's list info.

Parameters
pCtrlIdentifies the WBDialogControl structure
pDataPointer to the data for the added item (may be NULL with cbData == 0 for "null data")
cbDataData size in bytes. May also indicate copy method (default allocator uses cbData < 0 to copy as string, > 0 as binary data). cbData is zero to assign 'pData' "as-is" (i.e. without copying) [allocator/deallocator should be NULL for this to work]
iIndexInsert point. Can be an actual index (inserts after that point) or one of the ControlListIndex_INSERT_xxx' enumerations.
Returns
Non-zero on error, zero on success

Although there are some specific nuances associated with the use of this function (such as 'string copy') the 'pData' and 'cbData' parameters are passed along without modification to the allocator function. Whenever DefaultListInfoAllocator() is used, a cbData value less than zero indicates that pData points to a null-byte terminated string, and whenever cbData is equal to zero, the pointer value of 'pData' is assigned to the internal list entry 'as-is'.

Header File: dialog_controls.h

Definition at line 1387 of file dialog_support.c.

void DLGCDefaultListControlDisplayProc ( WBDialogControl pList,
void *  pData,
int  iSelected,
GC  gc,
WB_GEOM pGeom,
XFontSet  fontSet 
)

The default 'display proc' for displaying a list item from a LISTINFO structure.

Parameters
pListA pointer to a WBDialogControl structure for the list type control
pDataA pointer to the data to display
iSelectedA flag indicating whether the item has been selected (1 = selected, 0 = not selected)
gcThe graphics context for displaying the data
pGeoma WB_GEOM representing the rectangular area to draw the item in.
fontSetAn XFontSet to use when displaying the text. May be 'None', which will use the default font set for the display
Returns
void

Pass this function's address as 'pfnDisplay' when calling DLGCListInfoConstructor to get a default display handler for your listbox items.

Header File: dialog_support.h

Definition at line 1722 of file dialog_support.c.

void* DLGCDefaultListInfoAllocator ( const void *  pData,
int  cbData 
)

The default 'List Info' data allocator for a control's list info.

Header File: dialog_controls.h

Definition at line 1070 of file dialog_support.c.

void DLGCDestroyProperties ( WBDialogPropList pPropList)

Destroy Properties for a dialog control.

Parameters
pPropListA pointer to the property list for the dialog control
Returns
void

Call this function to destroy the property list for a dialog control

Header File: dialog_support.h

Definition at line 1007 of file dialog_support.c.

LISTINFO* DLGCListInfoConstructor ( Window  wOwner,
int  nMax,
int  nFlags,
void *(*)(const void *, int)  pfnAllocator,
void(*)(void *)  pfnDestructor,
void(*)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet)  pfnDisplay,
int(*)(const void *, const void *)  pfnSort 
)

Create LISTINFO structure for a list type control.

Parameters
wOwnerthe Window ID for the owner of the LISTINFO structure
nMaxthe initial maximum size of the list (can be increased, but needs re-allocation)
nFlagsA binary flag indicating various properties, such as 'sorted'
pfnAllocatorA pointer to a constructor callback for a new list item. Use NULL for default
pfnDestructorA pointer to a destructor callback for the list item. Use NULL for default
pfnDisplayA pointer to a 'display' callback
pfnSortA pointer to a 'sort' callback. NULL uses the default
Returns
An allocated pointer to a LISTINFO structure. To free this pointer, call DLGCListINfoDestructor()

Call this function to create a LISTINFO structure associated with a list type control

See Also
LISTINFO

Header File: dialog_support.h

Definition at line 1222 of file dialog_support.c.

void DLGCListInfoDestructor ( LISTINFO pListInfo)

Destroy a LISTINFO structure.

Parameters
pListInfoA pointer to a LISTINFO structure created by DLGCListInfoConstructor()
Returns
void

Call this function to destroy the LISTINFO structure created by DLGCListInfoConstructor()

Header File: dialog_support.h

Definition at line 1261 of file dialog_support.c.

void DLGDelControlListEntry ( WBDialogControl pCtrl,
int  iIndex 
)

Delete a list entry from a control's list info at a specified index (or deletes ALL entries)

Parameters
pCtrlIdentifies the WBDialogControl structure
iIndexIdentifies the index of the entry to delete, or is < 0 (i.e. ControlListIndex_DELETE_ALL) to delete ALL entries

Use this function to remove one or all entries from the control's list info

Header File: dialog_controls.h

Definition at line 1558 of file dialog_support.c.

static __inline__ const char* DLGGetControlCaption ( WBDialogWindow pDialog,
int  iControlID 
)
static

Convenience function to query a dialog control's caption based on its control ID.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control

Often it is desirable to query control properties using the WBDialogWindow structure for the dialog (frame) window and the control's ID, rather than writing several lines of code to query for the correct information, test for validity, etc. and THEN make the final query. When the control ID is known, but the Window or WBDialogControl structure pointer is not, use THIS function to query for the caption.

Header File: dialog_controls.h

Definition at line 604 of file dialog_controls.h.

const void* DLGGetControlListData ( WBDialogControl pCtrl,
int  iIndex 
)

Retrieve the data pointer for a single list entry (listbox, combo, and tree controls only)

Header File: dialog_controls.h

Definition at line 1347 of file dialog_support.c.

int DLGGetControlListSelection ( WBDialogControl pCtrl)

Obtain the current selection index for a single-selection list.

Parameters
pCtrlIdentifies the WBDialogControl structure
Returns
The index of the selected item, or ControlListIndex_NONE

In a single-selection list, or in a list where multiple selection operations are being performed, there is one item that has a 'selected' state. This function returns the index for that item.

Header File: dialog_controls.h

Definition at line 1641 of file dialog_support.c.

int DLGGetControlListSelectionBits ( WBDialogControl pCtrl,
unsigned int *  piBits,
int  nSize 
)

Query the selection state for multiple items within a control's list info.

Parameters
pCtrlIdentifies the WBDialogControl structure
piBits(reserved) A pointer to a block of memory that is 'nSize' integers in length, where the index is a LSB bit within the integer. A '1' bit indicates 'selected', a '0' bit indicates 'not selected'
nSizeThe size of the 'piBits' array as a number of int elements.
Returns
0 for no sel, > 0 for the number of selections, < 0 on error. If 'piBits is NULL, it returns the necessary size for the array (in integers)

The 'piBits' and 'nSize' parameters must indicate a memory block of sufficient size, or an error will be returned. Use a NULL value of 'piBits' to obtain the necessary size of the array, if it is not known. To determine if a specific bit is set, use a formula similar to the following

piBits[(iIndex >> 32)] & (1 << (iIndex & 31)) ? TRUE : FALSE

where 'iIndex' represents the index of the bit you wish to query.

Header File: dialog_controls.h

Definition at line 1697 of file dialog_support.c.

char* DLGGetControlListSelectionText ( WBDialogControl pCtrl)

Query the selection text as multiple strings in an allocated buffer.

The return value is a single allocated buffer (using 'WBAlloc') containing a set of string entries, each separated by a newline character, corresponding to the selected list entries (TEXT elements only).
The return value is NULL if there are no selections or on error.
For non-NULL return values, the caller must use 'WBFree()' to destroy the allocated buffer.

Header File: dialog_controls.h

Definition at line 1702 of file dialog_support.c.

const char* DLGGetControlListText ( WBDialogControl pCtrl,
int  iIndex 
)

Retrieve the text poiner for a single list entry (listbox, combo, and tree controls only)

Header File: dialog_controls.h

Definition at line 1317 of file dialog_support.c.

static __inline__ const char* DLGGetControlProperty ( WBDialogWindow pDialog,
int  iControlID,
Atom  aPropName 
)
static

Convenience function to query a text property for a dialog control based on its control ID.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control
aPropNameAtom for the property to be assigned
Returns
A (const) pointer to the (text) data associated with the property, or NULL

Often it is desirable to query control properties using the WBDialogWindow structure for the dialog (frame) window and the control's ID, rather than writing several lines of code to query for the correct information, test for validity, etc. and THEN make the final query. When the control ID is known, but the Window or WBDialogControl structure pointer is not, use THIS function to query for the text property.

See Also
WBDialogControlGetProperty()

Header File: dialog_controls.h

Definition at line 745 of file dialog_controls.h.

static __inline__ const char* DLGGetControlText ( WBDialogWindow pDialog,
int  iControlID 
)
static

Convenience function to query a dialog control's TEXT based on its control ID.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control

Often it is desirable to query control properties using the WBDialogWindow structure for the dialog (frame) window and the control's ID, rather than writing several lines of code to query for the correct information, test for validity, etc. and THEN make the final query. When the control ID is known, but the Window or WBDialogControl structure pointer is not, use THIS function to query for the caption.

Header File: dialog_controls.h

Definition at line 669 of file dialog_controls.h.

static __inline__ WBDialogControl* DLGGetDialogControlStruct ( Window  wID)
static

Returns a pointer to the WBDialogControl structure for a dialog control with validation. May return NULL.

Parameters
wIDWindow ID of the dialog control
Returns
Pointer to WBDialogControl structure associated with the dialog control, or NULL if error or nonexistent

This is the preferred function for obtaining a pointer to the WBDialogControl structure for a dialog control window

Header File: dialog_controls.h

Definition at line 401 of file dialog_controls.h.

static __inline__ WBDialogControl* DLGGetDialogControlStructFromID ( WBDialogWindow pDialog,
int  iControlID 
)
static

Returns a pointer to the WBDialogControl structure for a dialog control with validation. May return NULL.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control
Returns
Pointer to WBDialogControl structure associated with the dialog control, or NULL if error or nonexistent

This is the preferred function for obtaining a pointer to the WBDialogControl structure for a dialog control window using the control ID and owning dialog window

Header File: dialog_controls.h

Definition at line 542 of file dialog_controls.h.

int DLGInitControlListInfo ( WBDialogControl pCtrl,
int  nFlags,
void *(*)(const void *, int)  pfnAllocator,
void(*)(void *)  pfnDestructor,
void(*)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet)  pfnDisplay,
int(*)(const void *, const void *)  pfnSort 
)

Initialize the 'List Entry' for a control, specifying various callbacks and flags.

Parameters
pCtrlPointer to the WBDialogControl structure
nFlagsFlags that identify the data type in the list
pfnAllocatorThe allocator that must be used when adding new data
pfnDestructorThe de-allocator that must be used when removing data (including cleanup)
pfnDisplayThe function that is called to display the data
pfnSortThe compare function that is called to sort the data
Returns
non-zero on error, zero on success

This is a generic method by which a control's list entry can be initialized. If the control's list consists entirely of text data, you can simplify the process by using DLGInitControlListInfoDefault()

Header File: dialog_controls.h

Definition at line 1108 of file dialog_support.c.

int DLGModifyControlListInfo ( WBDialogControl pCtrl,
int  bFlags,
int  nFlags,
int  bAllocator,
void *(*)(const void *, int)  pfnAllocator,
int  bDestructor,
void(*)(void *)  pfnDestructor,
int  bDisplay,
void(*)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet)  pfnDisplay,
int  bSort,
int(*)(const void *, const void *)  pfnSort 
)

Modify the 'List Entry' for a control, specifying various callbacks and flags.

Parameters
pCtrlPointer to the WBDialogControl structure
bFlagsIndicates whether to modify the Flags - 1 to modify, 0 to use the existing value
nFlagsFlags that identify the data type in the list
bAllocatorIndicates whether to modify the Allocator - 1 to modify, 0 to use the existing value
pfnAllocatorThe allocator that must be used when adding new data
bDestructorIndicates whether to modify the Destructor - 1 to modify, 0 to use the existing value
pfnDestructorThe de-allocator that must be used when removing data (including cleanup)
bDisplayIndicates whether to modify the Display function - 1 to modify, 0 to use the existing value
pfnDisplayThe function that is called to display the data
bSortIndicates whether to modify the Sort function - 1 to modify, 0 to use the existing value
pfnSortThe compare function that is called to sort the data
Returns
non-zero on error, zero on success

This is a generic method by which the parameters of a control's list entry can be modified. If the entry does not already exist, a new entry will be initialized with 'default' parameters assigned using the same values you would get with DLGInitControlListInfoDefault()

Header File: dialog_controls.h

Definition at line 1143 of file dialog_support.c.

static __inline__ void DLGNotifyOwner ( WBDialogControl pDialogControl,
Atom  aNotify,
long  lData0,
long  lData1,
long  lData2,
long  lData3,
long  lData4 
)
static

Notify Owner by calling the owner window's callback function directly with an event.

Use this function when immediate notification is needed, and there is no possibility of a blocking call, recursion, or invalid state as a result of the event processing

See Also
DLGNotifyOwnerAsync()

Header File: dialog_controls.h

Definition at line 1353 of file dialog_controls.h.

static __inline__ void DLGNotifyOwnerAsync ( WBDialogControl pDialogControl,
Atom  aNotify,
long  lData0,
long  lData1,
long  lData2,
long  lData3,
long  lData4 
)
static

Notify Owner by posting an event that will ASYNCHRONOUSLY be sent to the owner window's callback function.

Use this function whenever immediate notification is NOT needed, or if there is a possibility of a blocking call, recursion, or invalid state as a result of a direct call to the owner window's callback function.

See Also
DLGNotifyOwner()

Header File: dialog_controls.h

Definition at line 1443 of file dialog_controls.h.

static __inline__ void DLGNotifySelf ( WBDialogControl pDialogControl,
Atom  aNotify,
long  lData0,
long  lData1,
long  lData2,
long  lData3,
long  lData4 
)
static

Notify 'self' by calling the window's own callback function directly with an event.

Use this function when immediate notification is needed, and there is no possibility of a blocking call, recursion, or invalid state as a result of the event processing.

Often it's useful to consilidate processing for a single type of event, such as clicking on a scrollbar or pressing an arrow key. Both send completely different event sequences to the control, but have similar processing after a certain point. If each of these generates a 'scroll' type event, and the event is sent to the control's callback, the 'scroll' functionality can be consolidated for both types of event handlers and you avoid duplication and the potential for additional 'bugginess'.

See Also
DLGNotifySelfAsync()

Header File: dialog_controls.h

Definition at line 1407 of file dialog_controls.h.

static __inline__ void DLGNotifySelfAsync ( WBDialogControl pDialogControl,
Atom  aNotify,
long  lData0,
long  lData1,
long  lData2,
long  lData3,
long  lData4 
)
static

Notify 'self' by posting an event that will ASYNCHRONOUSLY be sent to the window's callback function.

Use this function whenever immediate notification is NOT needed, or if there is a possibility of a blocking call, recursion, or invalid state as a result of a direct call to the window's callback function.

Often it's useful to consilidate processing for a single type of event, such as clicking on a scrollbar or pressing an arrow key. Both send completely different event sequences to the control, but have similar processing after a certain point. If each of these generates a 'scroll' type event, and the event is sent to the control's callback, the 'scroll' functionality can be consolidated for both types of event handlers and you avoid duplication and the potential for additional 'bugginess'.

See Also
DLGNotifySelf()

Header File: dialog_controls.h

Definition at line 1487 of file dialog_controls.h.

void DLGRegisterControlCallback ( WBDialogControl pDialogControl,
const char *  szClassName,
WBWinEvent  pCallback 
)

Register the dialog control's callback function and class name.

Parameters
pDialogControlA pointer to the WBDialogControl structure that is associated with the dialog control window
szClassNameAn optional 'class name' string to be used for debug and tracing (may be NULL)
pCallbackThe callback function to assign to the control window

Registers the callback function for the dialog control. Also assigns the class name string pointer (for debug and trace purposes), which may be different from the default in the case of a subclassed control. This will normally be called immediately after creating the control using WBDialogControlCreate()

Header File: dialog_controls.h

Definition at line 355 of file dialog_controls.c.

int DLGScrollBarHandler ( Window  wID,
WBDialogControl pCtrl,
XEvent *  pEvent 
)

Scroll bar event filter for dialog control callback function. Generates scroll events.

Parameters
wIDThe Window ID of the dialog control
pCtrlA pointer to the WBDialogControl structure for the dialog control
pEventThe event to query and possibly filter
Returns
A zero if the event is to pass on to the rest of the callback; otherwise, the return value for the dialog control's callback function (the callback function must return this value unmodified)

When a dialog control needs to process events for scroll bars, it should FIRST call this function to ensure that they are handled properly in a standardized manner. If the return value is non-zero, that value must be returned unmodified (the dialog control callback handler uses this value). Otherwise, processing can continue.

Scroll events are send via a ClientMessage using aSCROLL_NOTIFY .

Header File: dialog_controls.h

Definition at line 1812 of file dialog_support.c.

static __inline__ void DLGSetControlCaption ( WBDialogWindow pDialog,
int  iControlID,
const char *  szCaption 
)
static

Convenience function to assign a dialog control's caption based on its control ID.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control
szCaptionpointer to ASCII string containing the new caption

Often it is desirable to assign control properties using the WBDialogWindow structure for the dialog (frame) window and the control's ID, rather than writing several lines of code to query for the correct information, test for validity, etc. and THEN make the assignment. When the control ID is known, but the Window or WBDialogControl structure pointer is not, use THIS function to assign the caption.

Header File: dialog_controls.h

Definition at line 573 of file dialog_controls.h.

void DLGSetControlListSelection ( WBDialogControl pCtrl,
int  iIndex 
)

Assign the current selection index for a single-selection list.

Parameters
pCtrlIdentifies the WBDialogControl structure
iIndexIdentifies the new selection index. May be ControlListIndex_NONE for NO selection.

In a single-selection list, or in a list where multiple selection operations are being performed, there is one item that has a 'selected' state. This function assigns the index for that item.

Header File: dialog_controls.h

Definition at line 1654 of file dialog_support.c.

void DLGSetControlListSelectionValue ( WBDialogControl pCtrl,
int  iIndex,
int  iSelState 
)

Assign the selection state for a specific index within a control's list info.

Parameters
pCtrlIdentifies the WBDialogControl structure
iIndexIdentifies the index for the new selection state.
iSelStateThe new selection state for that index (reserved)

In a multi-selection list, each item has a specified 'selection state' that identifies whether or not the item is selected. This function assigns that value for a single item.

Header File: dialog_controls.h

Definition at line 1693 of file dialog_support.c.

static __inline__ int DLGSetControlProperty ( WBDialogWindow pDialog,
int  iControlID,
Atom  aPropName,
const char *  szPropVal 
)
static

Convenience function to assign a text property for a dialog control based on its control ID.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control
aPropNameAtom for the property to be assigned
szPropVala pointer to the (text) data to assign to the property

Often it is desirable to assign control properties using the WBDialogWindow structure for the dialog (frame) window and the control's ID, rather than writing several lines of code to query for the correct information, test for validity, etc. and THEN make the assignment. When the control ID is known, but the Window or WBDialogControl structure pointer is not, use THIS function to assign the property's text value.

See Also
WBDialogControlSetProperty()

Header File: dialog_controls.h

Definition at line 708 of file dialog_controls.h.

static __inline__ void DLGSetControlText ( WBDialogWindow pDialog,
int  iControlID,
const char *  szText 
)
static

Convenience function to assign a dialog control's TEXT based on its control ID.

Parameters
pDialogPointer to the WBDialogWindow structure of the parent
iControlIDDialog control ID for the desired control
szTextpointer to ASCII string containing the new text

Often it is desirable to assign control properties using the WBDialogWindow structure for the dialog (frame) window and the control's ID, rather than writing several lines of code to query for the correct information, test for validity, etc. and THEN make the assignment. When the control ID is known, but the Window or WBDialogControl structure pointer is not, use THIS function to assign the caption.

Header File: dialog_controls.h

Definition at line 638 of file dialog_controls.h.

WBDialogControl* WBDialogControlCreate ( Atom  aClass,
WBDialogWindow pOwner,
WBDialogEntry pDialogEntry,
int  iX,
int  iY,
int  iWidth,
int  iHeight,
const char *  szTitle,
const char *  szPropertyList 
)

Create a dialog control window.

Returns
Pointer to a WBDialogControl structure associated with the dialog control window
Parameters
aClassThe class name atom for the window being created (may be None)
pOwnerThe owner window (usually a dialog frame window)
pDialogEntryA pointer to the WBDialogEntry structure associated with the control (the one I will be using)
iXThe horizontal position of the upper left corner of the control window (relative to the owner window)
iYThe vertical position of the upper left corner of the control window (relative to the owner window)
iWidthThe width of the control window
iHeightThe height of the control window
szTitleA null-byte terminated string containing the 'title' text for the control (may be NULL)
szPropertyListA set of newline terminated strings, ending with a null-byte, containing property/value pairs for initial property assignment
Returns
A pointer to a WBDialogControl structure identifying the control

Use this function to create a dialog conrol window, returning a pointer to the WBDialogControl class containing its properties.

Header File: dialog_controls.h

Definition at line 363 of file dialog_controls.c.

void WBDialogControlDelDialogProp ( WBDialogControl pCtrl,
Atom  aProp 
)

Low-level dialog control property removal.

Header File: dialog_controls.h

Definition at line 913 of file dialog_support.c.

const char* WBDialogControlGetCaption ( WBDialogControl pCtrl)

Obtain a pointer to the assigned text for the 'CAPTION' property of a dialog control.

The CAPTION property is a standard property for a dialog control. Since it has its own data member in the WBDialogControl structure, you should only query it using this function. It is equivalent to the 'Title'.

Header File: dialog_controls.h

Definition at line 535 of file dialog_support.c.

const WB_DIALOG_PROP* WBDialogControlGetDialogProp ( WBDialogControl pCtrl,
Atom  aProp 
)

Low-level dialog control property retrieval.

Header File: dialog_controls.h

Definition at line 984 of file dialog_support.c.

Pixmap WBDialogControlGetIconPixmap ( WBDialogControl pCtrl,
Pixmap *  pPixmap2 
)

Obtain the assigned ICON (image) property for a control, which consists of 2 pixmaps.

Parameters
pCtrlA ponter to the WBDialogControl structure for the control
pPixmap2A pointer to the storage for the returned transparency (mask) pixmap for the ICON image. May be NULL
Returns
The foreground pixmap for the ICON image. May be None if no pixmap has been assigned.

The ICON property is a standard property for a dialog control. Since it has its own data member in the WBDialogControl structure, you should only maintain it using this function. It is equivalent to the IMAGE or PIXMAP property.

Header File: dialog_controls.h

Definition at line 691 of file dialog_support.c.

Pixmap WBDialogControlGetPixmap ( WBDialogControl pCtrl)

Obtain the assigned PIXMAP (image) property for a control.

The PIXMAP property is a standard property for a dialog control. Since it has its own data member in the WBDialogControl structure, you should only query it using this function. It is equivalent to the IMAGE or ICON property.

Header File: dialog_controls.h

Definition at line 607 of file dialog_support.c.

const char* WBDialogControlGetProperty ( WBDialogControl pCtrl,
Atom  aPropName 
)

Mid-level dialog control property retrieval (character string)

This function returns the actual string pointer stored within the property list, and may be NULL. To modify an existing sring value, you should first make a copy of the string (as needed), then modify the copy and re-assign teh value via WBDialogControlSetProperty().

Header File: dialog_controls.h

Definition at line 759 of file dialog_support.c.

void* WBDialogControlGetProperty2 ( WBDialogControl pCtrl,
Atom  aPropName 
)

Mid-level dialog control property list retrieval (generic pointer)

Pointers assigned as a property must have been allocated using 'WBAlloc()'. Any existing pointer already assigned to this property will be automatically destroyed using 'WBFree()'. The property itself is considered to be 'owned' by the property list, and will be cleaned up when the control window is destroyed.

Header File: dialog_controls.h

Definition at line 771 of file dialog_support.c.

static __inline__ const WBDialogPropList* WBDialogControlGetPropList ( WBDialogControl pCtrl)
static

Low-level dialog control property list retrieval.

Header File: dialog_controls.h

Definition at line 325 of file dialog_controls.h.

static __inline__ const char* WBDialogControlGetText ( WBDialogControl pCtrl)
static

Obtain the assigned TEXT property for a control, which is different from the CAPTION or Title.

The TEXT property is a standard property for a dialog control. To preserve consistency use this function to query it, rather than querying the TEXT property directly.

Header File: dialog_controls.h

Definition at line 515 of file dialog_controls.h.

void WBDialogControlSetCaption ( WBDialogControl pCtrl,
const char *  szCaption 
)

Assign text to the 'CAPTION' property of a dialog control.

The CAPTION property is a standard property for a dialog control. Since it has its own data member in the WBDialogControl structure, you should maintain it using this function. It is equivalent to the 'Title'.

Header File: dialog_controls.h

Definition at line 518 of file dialog_support.c.

int WBDialogControlSetDialogProp ( WBDialogControl pCtrl,
WB_DIALOG_PROP pPropVal 
)

Low-level dialog control property assignment.

Header File: dialog_controls.h

Definition at line 806 of file dialog_support.c.

void WBDialogControlSetIconPixmap ( WBDialogControl pCtrl,
Pixmap  pixmap,
Pixmap  pixmap2 
)

Assign the ICON (image) property for a control, which consists of 2 pixmaps.

Parameters
pCtrlA ponter to the WBDialogControl structure for the control
pixmapThe foreground pixmap for the ICON image
pixmap2The transparency (mask) pixmap for the ICON image

The ICON property is a standard property for a dialog control. Since it has its own data member in the WBDialogControl structure, you should only maintain it using this function. It is equivalent to the IMAGE or PIXMAP property.

Header File: dialog_controls.h

Definition at line 629 of file dialog_support.c.

void WBDialogControlSetPixmap ( WBDialogControl pCtrl,
Pixmap  pixmap 
)

Assign the PIXMAP (image) property for a control.

The PIXMAP property is a standard property for a dialog control. Since it has its own data member in the WBDialogControl structure, you should only maintain it using this function. It is equivalent to the IMAGE or ICON property.

Header File: dialog_controls.h

Definition at line 545 of file dialog_support.c.

int WBDialogControlSetProperty ( WBDialogControl pCtrl,
Atom  aPropName,
const char *  szPropVal 
)

Mid-level dialog control property assignment (character string)

Strings are stored internally within the property list as a memory block allocated via 'WBAlloc()'. If an existing pointer is already present when a new string is assigned, it is destroyed via 'WBFree()'. The assigned value is then copied into a memory block allocated via 'WBAlloc()' and stored in the property list.

Header File: dialog_controls.h

Definition at line 731 of file dialog_support.c.

void WBDialogControlSetProperty2 ( WBDialogControl pCtrl,
Atom  aPropName,
void *  szPropVal 
)

Mid-level dialog control property list assignment (generic pointer)

Pointers assigned as a property must have been allocated using 'WBAlloc()' (or NULL). Any existing pointer already assigned to this property will be automatically destroyed using 'WBFree()'. The property itself is considered to be 'owned' by the property list, and will be cleaned up when the control window is destroyed.

Header File: dialog_controls.h

Definition at line 748 of file dialog_support.c.

int WBDialogControlSetPropList ( WBDialogControl pCtrl,
const char *  szPropList 
)

Mid-level dialog control property list assignment.

Header File: dialog_controls.h

Definition at line 724 of file dialog_support.c.

static __inline__ void WBDialogControlSetText ( WBDialogControl pCtrl,
const char *  szText 
)
static

Assign the TEXT property for a control, which is different from the CAPTION or Title.

The TEXT property is a standard property for a dialog control. To preserve consistency use this function to assign it, rather than assigning the TEXT property directly.

Header File: dialog_controls.h

Definition at line 494 of file dialog_controls.h.

void WBDialogControlsInit ( void  )

Initialization function for dialog controls.

This function must be called once before using any of the Dialog Control functions. Normally an explicit call to this won't be necessary since Dialog (frame) Window support code in dialog_window.c does this automatically.

Header File: dialog_controls.h

Definition at line 454 of file dialog_support.c.

Variable Documentation

const Atom aBUTTON_PRESS

CONTROL_NOTIFY ClientMessage for BUTTON_PRESS event.

BUTTON PRESS message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aBUTTON_PRESS
data.l[1] == Control ID of originating conrol window
data.l[2] == truncated (32-bit) pointer to WBDialogControl structure

Definition at line 218 of file dialog_support.c.

const Atom aDIALOG_INIT

DIALOG_INIT ClientMessage, sent to dialog window callback on frame create.

DIALOG_INIT message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aDIALOG_INIT
format == 32 (always)

Definition at line 375 of file dialog_support.c.

Atom aDLGC_FONT

dialog control FONT property - reserved

This is used internally and should not be invoked directly

Definition at line 421 of file dialog_support.c.

Atom aDLGC_LISTINFO

dialog control LISTINFO property - see DLGInitControlListInfo() etc.

Contains the listbox 'info' structure, to be maintained by APIs only

This is used internally and should not be invoked directly

Definition at line 440 of file dialog_support.c.

Atom aDLGC_PATH

dialog control PATH property, for file and directory controls

Text property identifying a directory name, standard for file and directory controls. Can be maintained and queried directly using property API functions.

This is used internally and should not be invoked directly

Definition at line 451 of file dialog_support.c.

Atom aDLGC_PATH

dialog control PATH property, for file and directory controls

Text property identifying a directory name, standard for file and directory controls. Can be maintained and queried directly using property API functions.

This is used internally and should not be invoked directly

Definition at line 451 of file dialog_support.c.

Atom aDLGC_PROP_NOTIFY

DLGC_PROP_NOTIFY ClientMessage, notify control of property change.

DLGC_PROP_NOTIFY message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aDLGC_PROP_NOTIFY
format == 32 (always)
data.l[0] == Atom of property that changed

Definition at line 387 of file dialog_support.c.

Atom aDLGC_SCROLLINFO

dialog control SCROLLINFO property - see WB_SCROLLINFO structure

Property contains the WB_SCROLLINFO structure, to be maintained by APIs only.

This is used internally and should not be invoked directly

Definition at line 430 of file dialog_support.c.

Atom aDLGC_TEXT

dialog control TEXT property - see WBDialogControlGetText()

This is used internally and should not be invoked directly

Definition at line 409 of file dialog_support.c.

const Atom aGOTFOCUS

CONTROL_NOTIFY ClientMessage for GOTFOCUS event.

GOT FOCUS message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aGOTFOCUS
data.l[1] == Control ID of originating conrol window
data.l[2] == truncated (32-bit) pointer to WBDialogConrol structure

Definition at line 273 of file dialog_support.c.

const Atom aKEY_DOWN

CONTROL_NOTIFY ClientMessage for KEY_DOWN event.

KEY DOWN message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aKEY_DOWN
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement or remove?)

Definition at line 338 of file dialog_support.c.

const Atom aKEY_UP

CONTROL_NOTIFY ClientMessage for KEY_UP event.

KEY UP message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aKEY_UP
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement or remove?)

Definition at line 351 of file dialog_support.c.

const Atom aKEYSTROKE

CONTROL_NOTIFY ClientMessage for KEYSTROKE event.

KEYSTROKE message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aKEYSTROKE
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement or remove?)

Definition at line 364 of file dialog_support.c.

const Atom aLIST_NOTIFY

CONTROL_NOTIFY ClientMessage for LIST_NOTIFY event.

LIST NOTIFY message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aLIST_NOTIFY
data.l[1] == Control ID of originating conrol window
data.l[2] == notification code (one of WB_LIST_NONE, WB_LIST_SELCHANGE, or WB_LIST_DBLCLICK)
data.l[3] == currently highlighted (selected) item in list, -1 if none

Definition at line 232 of file dialog_support.c.

const Atom aLOSTFOCUS

CONTROL_NOTIFY ClientMessage for LOSTFOCUS event.

LOST FOCUS message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aLOSTFOCUS
data.l[1] == Control ID of originating conrol window
data.l[2] == truncated (32-bit) pointer to WBDialogConrol structure

Definition at line 286 of file dialog_support.c.

const Atom aMOUSE_DOWN

CONTROL_NOTIFY ClientMessage for MOUSE_DOWN event.

MOUSE DOWN message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aMOUSE_DOWN
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement or remove?)

Definition at line 299 of file dialog_support.c.

const Atom aMOUSE_DRAG

CONTROL_NOTIFY ClientMessage for MOUSE_DRAG event.

MOUSE DRAG message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aMOUSE_DRAG
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement or remove?)

Definition at line 325 of file dialog_support.c.

const Atom aMOUSE_UP

CONTROL_NOTIFY ClientMessage for MOUSE_UP event.

MOUSE UP message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aMOUSE_UP
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement or remove?)

Definition at line 312 of file dialog_support.c.

const Atom aSCROLL_NOTIFY

Scroll notifications via ClientMessage

MENU_COMMAND message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aSCROLL_NOTIFY
format == 32 (always)
data.l[0] Identifies the bar (SCROLL_VERTICAL, SCROLL_HORIZONTAL, or SCROLL_DEFAULT)
data.l[1] Indicates the notification type, one of the following:

  • WB_SCROLL_KNOB 'knob track' - knob position will be in data.l[2]
  • WB_SCROLL_FORWARD move down, or move right
  • WB_SCROLL_BACKWARD move up, or move left
  • WB_SCROLL_PAGEFWD page down or page right
  • WB_SCROLL_PAGEBACK page up or page left
  • WB_SCROLL_FIRST scroll to first entry, i.e. home or top
  • WB_SCROLL_LAST scroll to last entry, i.e. bottom or end
  • WB_SCROLL_DBLCLICK double-click detection (no selection info in data.l[2])
  • WB_SCROLL_ABSOLUTE absolute scroll, to the absolute position in data.l[2]
  • WB_SCROLL_RELATIVE relative scroll, relative +/- position in data.l[2]
  • WB_SCROLL_NA generic 'NA' or 'UNDEFINED' value

data.l[2] Optional parameter, typically the absolute or relative scroll position

Definition at line 203 of file dialog_support.c.

const Atom aTEXT_CHANGED

CONTROL_NOTIFY ClientMessage for TEXT_CHANGED event.

TEXT CHANGED message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aTEXT_CHANGED
data.l[1] == Control ID of originating conrol window
data.l[2] == truncated (32-bit) pointer to WBDialogConrol structure

Definition at line 245 of file dialog_support.c.

const Atom aTEXTSELECT_CHANGE

CONTROL_NOTIFY ClientMessage for TEXTSELECT_CHANGE event.

TEXTSELECT CHANGE message format (relative to XEvent.xclient)
type == ClientMessage
message_type == aCONTROL_NOTIFY
format == 32 (always)
data.l[0] == aTEXTSELECT_CHANGE
data.l[1] == Control ID of originating conrol window
data.l[2] == reserved (TODO: implement)
data.l[3] == reserved (TODO: implement)
data.l[4] == reserved (TODO: implement)

Definition at line 260 of file dialog_support.c.