X11 Work Bench Toolkit  1.0
dialog_controls.h
Go to the documentation of this file.
1 // //
3 // _ _ _ _ _ _ //
4 // __| |(_) __ _ | | ___ __ _ ___ ___ _ __ | |_ _ __ ___ | | ___ | |__ //
5 // / _` || | / _` || | / _ \ / _` | / __|/ _ \ | '_ \ | __|| '__|/ _ \ | |/ __| | '_ \ //
6 // | (_| || || (_| || || (_) || (_| | | (__| (_) || | | || |_ | | | (_) || |\__ \ _| | | | //
7 // \__,_||_| \__,_||_| \___/ \__, |_____\___|\___/ |_| |_| \__||_| \___/ |_||___/(_)_| |_| //
8 // |___/|_____| //
9 // //
10 // dialog control support //
11 // //
13 
14 /*****************************************************************************
15 
16  X11workbench - X11 programmer's 'work bench' application and toolkit
17  Copyright (c) 2010-2016 by Bob Frazier (aka 'Big Bad Bombastic Bob')
18  all rights reserved
19 
20  DISCLAIMER: The X11workbench application and toolkit software are supplied
21  'as-is', with no warranties, either implied or explicit.
22  Any claims to alleged functionality or features should be
23  considered 'preliminary', and might not function as advertised.
24 
25  BSD-like license:
26 
27  There is no restriction as to what you can do with this software, so long
28  as you include the above copyright notice and DISCLAIMER for any distributed
29  work that is equal to or derived from this one, along with this paragraph
30  that explains the terms of the license if the source is also being made
31  available. A "derived work" describes a work that uses a significant portion
32  of the source files or algorithms that are included with this one.
33  Specifically excluded from this are files that were generated by the software,
34  or anything that is included with the software that is part of another package
35  (such as files that were created or added during the 'configure' process).
36  Specifically included is the use of part or all of any of the X11 workbench
37  toolkit source or header files in your distributed application. If you do not
38  ship the source, the above copyright statement is still required to be placed
39  in a reasonably prominent place, such as documentation, splash screens, and/or
40  'about the application' dialog boxes.
41 
42  Use and distribution are in accordance with GPL, LGPL, and/or the above
43  BSD-like license. See COPYING and README files for more information.
44 
45 
46  Additional information at http://sourceforge.net/projects/X11workbench
47 
48 ******************************************************************************/
49 
50 
51 #ifndef DIALOG_CONTROLS_H_INCLUDED
52 #define DIALOG_CONTROLS_H_INCLUDED
53 
54 #include "window_helper.h"
55 #include "dialog_window.h"
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif // __cplusplus
60 
61 
81 #define DIALOG_CONTROL_TAG (*((const unsigned int *)"DLGC"))
82 
112 typedef struct __WB_DIALOG_PROP__
113 {
114  Atom aProp;
115  unsigned long lVal;
116  void *pVal;
118 
119 
155 {
157  int nProps,
159  nMaxProps;
168  WB_DIALOG_PROP aDlgProp[1];
170 
171 
222 typedef struct __WB_DIALOG_CONTROL__
223 {
224  unsigned int ulTag;
225  Window wID;
226  Atom aClass;
230  unsigned long ulFlags;
231  XColor clrFG,
232  clrBG,
233  clrBD;
234  XColor clrBD2,
235  clrBD3;
236  XColor clrHFG,
237  clrHBG;
238  XColor clrAFG,
239  clrABG;
240  char *pCaption;
243 
244  // unique per-control data members follow (see cbStructSize for validation)
245 
247 
248 
258 void WBDialogControlsInit(void); // call once before using (dialog_window.c does this for you)
259 
281  WBDialogEntry *pDialogEntry, // pointer to the dialog entry I'll be using
282  int iX, int iY, int iWidth, int iHeight,
283  const char *szTitle, const char *szPropertyList);
284 
298 void DLGRegisterControlCallback(WBDialogControl *pDialogControl, const char *szClassName, WBWinEvent pCallback);
299 
300 
301 // generic property list helpers (low level)
307 int WBDialogControlSetDialogProp(WBDialogControl *pCtrl, WB_DIALOG_PROP *pPropVal); // returns 0 on success
326 {
327  if(pCtrl)
328  {
329  return pCtrl->pPropList;
330  }
331  return NULL;
332 }
333 
334 // generic property list helpers (mid-level)
335 
341 int WBDialogControlSetPropList(WBDialogControl *pCtrl, const char *szPropList); // prop:value prop:"value" etc. separated by white space
351 int WBDialogControlSetProperty(WBDialogControl *pCtrl, Atom aPropName, const char *szPropVal);
362 void WBDialogControlSetProperty2(WBDialogControl *pCtrl, Atom aPropName, void *szPropVal); // szPropVal must be WBAlloc'd pointer or NULL
363 
373 const char *WBDialogControlGetProperty(WBDialogControl *pCtrl, Atom aPropName);
384 void *WBDialogControlGetProperty2(WBDialogControl *pCtrl, Atom aPropName); // returns actual WBAlloc'd pointer or NULL
385 
386 // NOTE: use WBDialogControlSetProperty2 to directly assign WBAlloc'd pointer, and modify actual data returned by above
387 // Assigning different pointer in WBDialogControlGetProperty2 'WBFree's existing pointer
388 // Destroying property list does the same thing.
389 
390 
401 static __inline__ WBDialogControl *DLGGetDialogControlStruct(Window wID) // for frame windows, returns the frame window struct
402 {
403  WBDialogControl *pRval = (WBDialogControl *)WBGetWindowData(wID, 0); // offset 0 for window-specific structs
404 
405  if(pRval && pRval->ulTag == DIALOG_CONTROL_TAG)
406  return(pRval);
407 
408  return(NULL);
409 }
410 
411 
412 
413 // dialog control property management (high level)
414 
424 void WBDialogControlSetCaption(WBDialogControl *pCtrl, const char *szCaption); // caption (all, equiv to 'title')
434 const char *WBDialogControlGetCaption(WBDialogControl *pCtrl);
435 
445 void WBDialogControlSetPixmap(WBDialogControl *pCtrl, Pixmap pixmap); // pixmaps (image, icon, button?)
456 
470 void WBDialogControlSetIconPixmap(WBDialogControl *pCtrl, Pixmap pixmap, Pixmap pixmap2); // icons only
484 Pixmap WBDialogControlGetIconPixmap(WBDialogControl *pCtrl, Pixmap *pPixmap2);
485 
494 static __inline__ void WBDialogControlSetText(WBDialogControl *pCtrl, const char *szText)
495 {
496 #ifdef DIALOG_SUPPORT_C
497 extern Atom aDLGC_TEXT;
498 #else // DIALOG_SUPPORT_C
499 extern const Atom aDLGC_TEXT;
500 #endif // DIALOG_SUPPORT_C
501 
502  // multi-line edit, listboxes, and combo boxes use this
503 
504  WBDialogControlSetProperty(pCtrl, aDLGC_TEXT, szText);
505 }
506 
515 static __inline__ const char *WBDialogControlGetText(WBDialogControl *pCtrl)
516 {
517 #ifdef DIALOG_SUPPORT_C
518 extern Atom aDLGC_TEXT;
519 #else // DIALOG_SUPPORT_C
520 extern const Atom aDLGC_TEXT;
521 #endif // DIALOG_SUPPORT_C
522 
523  return WBDialogControlGetProperty(pCtrl, aDLGC_TEXT);
524 }
525 
526 
527 
528 // combined functionality with dialog window
529 
542 static __inline__ WBDialogControl *DLGGetDialogControlStructFromID(WBDialogWindow *pDialog, int iControlID)
543 {
544  if(pDialog)
545  {
546  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
547  if(idCtrl > 0)
548  {
549  WBDialogControl *pRval = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
550 
551  if(pRval && pRval->ulTag == DIALOG_CONTROL_TAG)
552  return(pRval);
553  }
554  }
555  return NULL;
556 }
557 
573 static __inline__ void DLGSetControlCaption(WBDialogWindow *pDialog, int iControlID, const char *szCaption)
574 {
575  if(pDialog)
576  {
577  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
578  if(idCtrl > 0)
579  {
580  WBDialogControl *pCtrl = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
581 
582  if(pCtrl && pCtrl->ulTag == DIALOG_CONTROL_TAG)
583  {
584  WBDialogControlSetCaption(pCtrl, szCaption);
585  }
586  }
587  }
588 }
589 
604 static __inline__ const char * DLGGetControlCaption(WBDialogWindow *pDialog, int iControlID)
605 {
606  if(pDialog)
607  {
608  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
609  if(idCtrl > 0)
610  {
611  WBDialogControl *pCtrl = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
612 
613  if(pCtrl && pCtrl->ulTag == DIALOG_CONTROL_TAG)
614  {
615  return WBDialogControlGetCaption(pCtrl);
616  }
617  }
618  }
619 
620  return NULL;
621 }
622 
638 static __inline__ void DLGSetControlText(WBDialogWindow *pDialog, int iControlID, const char *szText)
639 {
640  if(pDialog)
641  {
642  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
643  if(idCtrl > 0)
644  {
645  WBDialogControl *pCtrl = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
646 
647  if(pCtrl && pCtrl->ulTag == DIALOG_CONTROL_TAG)
648  {
649  WBDialogControlSetText(pCtrl, szText);
650  }
651  }
652  }
653 }
654 
669 static __inline__ const char * DLGGetControlText(WBDialogWindow *pDialog, int iControlID)
670 {
671  if(pDialog)
672  {
673  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
674  if(idCtrl > 0)
675  {
676  WBDialogControl *pCtrl = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
677 
678  if(pCtrl && pCtrl->ulTag == DIALOG_CONTROL_TAG)
679  {
680  return WBDialogControlGetText(pCtrl);
681  }
682  }
683  }
684 
685  return NULL;
686 }
687 
688 // simplified string property handlers
689 
708 static __inline__ int DLGSetControlProperty(WBDialogWindow *pDialog, int iControlID, Atom aPropName, const char *szPropVal)
709 {
710  if(pDialog)
711  {
712  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
713  if(idCtrl > 0)
714  {
715  WBDialogControl *pCtrl = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
716 
717  if(pCtrl && pCtrl->ulTag == DIALOG_CONTROL_TAG)
718  {
719  return WBDialogControlSetProperty(pCtrl, aPropName, szPropVal);
720  }
721  }
722  }
723 
724  return -1; // error
725 }
726 
745 static __inline__ const char * DLGGetControlProperty(WBDialogWindow *pDialog, int iControlID, Atom aPropName)
746 {
747  if(pDialog)
748  {
749  Window idCtrl = DLGGetDialogControl(pDialog, iControlID);
750  if(idCtrl > 0)
751  {
752  WBDialogControl *pCtrl = (WBDialogControl *)WBGetWindowData(idCtrl, 0); // offset 0 for window-specific structs
753 
754  if(pCtrl && pCtrl->ulTag == DIALOG_CONTROL_TAG)
755  {
756  return WBDialogControlGetProperty(pCtrl, aPropName);
757  }
758  }
759  }
760 
761  return NULL;
762 }
763 
764 
768 // standard control IDs
769 #define WB_MIN_STD_CTRL_ID 0x7ffffff0
770 #define IDOK 0x7ffffff0
771 #define IDNO 0x7ffffff1
772 #define IDYES 0x7ffffff2
773 #define IDABORT 0x7ffffff3
774 #define IDRETRY 0x7ffffff4
775 #define IDIGNORE 0x7ffffff5
776 #define IDCANCEL 0x7fffffff
777 #define IDSTATIC -1
778 #define IDNONE 0
781 // standard atoms for control types
782 
784 #define FRAME_CONTROL_STR "Frame"
786 #define TEXT_CONTROL_STR "Text"
788 #define ICON_CONTROL_STR "Icon"
790 #define IMAGE_CONTROL_STR "Image"
792 #define EDIT_CONTROL_STR "Edit"
794 #define PUSHBUTTON_CONTROL_STR "PushButton"
796 #define DEFPUSHBUTTON_CONTROL_STR "DefPushButton"
798 #define CANCELBUTTON_CONTROL_STR "CancelButton"
800 #define RADIOBUTTON_CONTROL_STR "RadioButton"
802 #define FIRSTRADIOBUTTON_CONTROL_STR "FirstRadioButton"
804 #define CHECKBUTTON_CONTROL_STR "CheckButton"
806 #define TRISTATEBUTTON_CONTROL_STR "TriStateButton"
808 #define HSCROLL_CONTROL_STR "HScroll"
810 #define VSCROLL_CONTROL_STR "VScroll"
812 #define SLIDER_CONTROL_STR "Slider"
814 #define KNOB_CONTROL_STR "Knob"
816 #define LIST_CONTROL_STR "List"
818 #define COMBO_CONTROL_STR "Combo"
820 #define TREE_CONTROL_STR "Tree"
822 #define COMBOTREE_CONTROL_STR "ComboTree"
824 #define FILE_LIST_CONTROL_STR "FileList"
826 #define FILE_COMBO_CONTROL_STR "FileCombo"
828 #define PATH_TREE_CONTROL_STR "PathTree"
830 #define TAB_CONTROL_STR "Tab"
833 // atoms and strings for standard control types (doxygen - these are documented in dialog_controls.c)
834 #ifndef DIALOG_SUPPORT_C
835 
836 // static controls
837 
838 extern const Atom aFRAME_CONTROL; // transparent frame with optional text - \ref FRAME_CONTROL_STR
839 extern const Atom aTEXT_CONTROL; // static text (single or multi-line) - \ref TEXT_CONTROL_STR
840 extern const Atom aICON_CONTROL; // icon container (has a nice 3D border) - \ref ICON_CONTROL_STR
841 extern const Atom aIMAGE_CONTROL; // generic image/pixmap holder - \ref IMAGE_CONTROL_STR
842 
843 
844 // text entry
845 
846 extern const Atom aEDIT_CONTROL; // editable text (single or multi-line, scrollable, clipboard) - \ref EDIT_CONTROL_STR
847 
848 
849 // buttons, knobs, and sliders
850 
851 extern const Atom aPUSHBUTTON_CONTROL; // Pushbutton control - \ref PUSHBUTTON_CONTROL_STR
852 extern const Atom aDEFPUSHBUTTON_CONTROL; // default Pushbutton control (has dark border, accepts <ENTER> as hotkey) - \ref DEFPUSHBUTTON_CONTROL_STR
853 extern const Atom aCANCELBUTTON_CONTROL; // cancel pushbutton control (accepts <ESC> as hotkey) - \ref CANCELBUTTON_CONTROL_STR
854 extern const Atom aRADIOBUTTON_CONTROL; // radio button - \ref RADIOBUTTON_CONTROL_STR
855 extern const Atom aFIRSTRADIOBUTTON_CONTROL; // 'first' radio button - defines start of radio button 'group' - \ref FIRSTRADIOBUTTON_CONTROL_STR
856 extern const Atom aCHECKBUTTON_CONTROL; // check[box] button - push-on/push-off with 'check mark' (or whatever) - \ref CHECKBUTTON_CONTROL_STR
857 extern const Atom aTRISTATEBUTTON_CONTROL; // tristate - like check, but with a third state - \ref TRISTATEBUTTON_CONTROL_STR
858 extern const Atom aHSCROLL_CONTROL; // horizontal scroll - \ref HSCROLL_CONTROL_STR
859 extern const Atom aVSCROLL_CONTROL; // vertical scroll - \ref VSCROLL_CONTROL_STR
860 extern const Atom aSLIDER_CONTROL; // volume control (slider bar) (h or v depending on geometry) - \ref SLIDER_CONTROL_STR
861 extern const Atom aKNOB_CONTROL; // "volume knob" (270 degrees of rotation, left to right) - \ref KNOB_CONTROL_STR
862 
863 
864 // lists
865 
866 extern const Atom aLIST_CONTROL; // list - single, multi, extended select (h, v, multicol) - \ref LIST_CONTROL_STR
867 extern const Atom aCOMBO_CONTROL; // classic 'combo box' control - \ref COMBO_CONTROL_STR
868 extern const Atom aTREE_CONTROL; // class 'tree' control - \ref TREE_CONTROL_STR
869 extern const Atom aCOMBOTREE_CONTROL; // 'combo tree' (tree with interlocked edit/text box like combo box) - \ref COMBOTREE_CONTROL_STR
870 
871 
872 // file lists
873 
874 extern const Atom aFILE_LIST_CONTROL; // File List - \ref FILE_LIST_CONTROL_STR
875 extern const Atom aFILE_COMBO_CONTROL; // file combo control - \ref FILE_COMBO_CONTROL_STR
876 extern const Atom aPATH_TREE_CONTROL; // path tree - directory hierarchy - \ref PATH_TREE_CONTROL_STR
877 
878 
879 // containers
880 
881 extern const Atom aTAB_CONTROL; // 'tab' container (auto enable/disable contents) - \ref TAB_CONTROL_STR
882 
883 
884 
885 // messages
886 
887 // generic control notification - use aCONTROL_NOTIFY (doxygen docs in dialog_controls.c)
888 
889 //extern const Atom aCONTROL_NOTIFY;
890 // 'notify' message - l[0] is notify code, l[1] is control ID, l[2] is pointer to control object
891 // others are message-specific
892 
893 // CONTROL_NOTIFY "NOTIFICATION" CODES (code will be in data.l[0])
894 // button-specific notifications
895 extern const Atom aBUTTON_PRESS;
896 // l[1] is control ID, l[2] is (truncated) pointer to pDlgControlEntry
897 
898 // list-specific
899 extern const Atom aLIST_NOTIFY; // also applies to tab controls, combos, etc.
900 // data.l[1] is control ID, data.l[2] is notification, data.l[3] is selection index
901 // on receipt default dialog proc will end dialog with 'IDOK'
902 
903 // edit-specific, combo-specific
904 extern const Atom aTEXT_CHANGED;
905 extern const Atom aTEXTSELECT_CHANGE;
906 
907 
908 // other notification messages
909 
910 
911 // common to all
912 extern const Atom aGOTFOCUS; // sent as its own message type - data.l[0] = wID, data.l[1] = pDlgControlEntry
913 extern const Atom aLOSTFOCUS; // sent as its own message type - data.l[0] = wID, data.l[1] = pDlgControlEntry
914 
915 
916 // low level common (not all return these)
917 extern const Atom aMOUSE_DOWN;
918 extern const Atom aMOUSE_UP;
919 extern const Atom aMOUSE_DRAG;
920 extern const Atom aKEY_DOWN;
921 extern const Atom aKEY_UP;
922 extern const Atom aKEYSTROKE; // valid key down/up sequence, including repeat
923 
924 
925 // other dialog-related message atoms
926 extern const Atom aDIALOG_INIT;
927 
928 //extern const Atom aDIALOG_SETFOCUS; // l[0] is <,0,> for prev, 'set to', next. For 'set to' l[1] is item ID
929 extern Atom aDLGC_PROP_NOTIFY; // l[0] is the property Atom
930 
931 // control-specific 'globally known' atoms
932 
933 extern Atom aDLGC_PATH; // PATH information for file-related controls
934 
935 #endif // DIALOG_SUPPORT_C
936 
937 
938 // NOTIFICATION PARAMETERS
939 
940 // data.l[2] parameter definitions for aCONTROL_NOTIFY + aLIST_NOTIFY ClientMessage
941 
943 #define WB_LIST_NONE 0
945 #define WB_LIST_SELCHANGE 1
947 #define WB_LIST_DBLCLICK 2
952 // control-specific definitions
954 
956 // LISTBOX-related (applies to anything with a LIST property)
957 
965 {
967  ControlListIndex_LAST = 0x7fffffff,
972 };
973 
979 {
988 
989  // others are reserved
990 };
991 
992 
993 
994 // 'ulFlags' bits 0000ffff is "common", 00ff0000 is control-specific, ff000000 is 'reserved for custom'
1004 {
1005  // COMMON bits (APPLIES TO ALL)
1006  CONTROL_Reserved00 = 0x00000001,
1007  CONTROL_Reserved01 = 0x00000002,
1008  CONTROL_Reserved02 = 0x00000004,
1009  CONTROL_Reserved03 = 0x00000008,
1010  CONTROL_Reserved04 = 0x00000010,
1011  CONTROL_Reserved05 = 0x00000020,
1012  CONTROL_Reserved06 = 0x00000040,
1013  CONTROL_Reserved07 = 0x00000080,
1014  CONTROL_Reserved08 = 0x00000100,
1015  CONTROL_Reserved09 = 0x00000200,
1016  CONTROL_Reserved10 = 0x00000400,
1017  CONTROL_Reserved11 = 0x00000800,
1018  CONTROL_Reserved12 = 0x00001000,
1019  CONTROL_Reserved13 = 0x00002000,
1020  CONTROL_Reserved14 = 0x00004000,
1021 
1023  // NOTE: A \ref WBListCurSel struct must immediately follow the \ref WBDialogControl members
1024 
1025  // CONTROL TYPE-SPECIFIC bits
1026 
1027  // STATIC bits
1028 
1029  STATIC_Frame = 0x00010000,
1030  STATIC_Text = 0x00020000,
1031  STATIC_Icon = 0x00030000,
1032  STATIC_Image = 0x00040000,
1033 
1034  STATIC_TYPEMASK = 0x000f0000,
1035 
1036  STATIC_3DBorder = 0x00100000,
1037 
1038 
1039  // BUTTON bits
1040 
1041  BUTTON_PushButton = 0x00010000,
1042  BUTTON_DefPushButton = 0x00020000,
1043  BUTTON_CancelButton = 0x00030000,
1044  BUTTON_RadioButton = 0x00040000,
1046  BUTTON_CheckButton = 0x00060000,
1047  BUTTON_TriStateButton = 0x00070000,
1048 
1049  BUTTON_TYPEMASK = 0x000f0000,
1050 
1051 
1052  // others here
1053 
1054  // auto-alignment flags (for resizable dialog boxes)
1055 
1061 
1067 
1069 
1070  // reserved for custom controls
1071 
1072  CUSTOM_Reserved24 = 0x01000000,
1073  CUSTOM_Reserved25 = 0x02000000,
1074  CUSTOM_Reserved26 = 0x04000000,
1075  CUSTOM_Reserved27 = 0x08000000,
1076  CUSTOM_Reserved28 = 0x10000000,
1077  CUSTOM_Reserved29 = 0x20000000,
1078  CUSTOM_Reserved30 = 0x40000000,
1079  CUSTOM_Reserved31 = 0x80000000
1080 };
1081 
1082 
1084 // control-specific utility functions
1086 
1092 void * DLGCDefaultListInfoAllocator(const void *pData, int cbData);
1093 
1099 const char * DLGGetControlListText(WBDialogControl *pCtrl, int iIndex); // retrieve data pointer for single list entry
1105 const void * DLGGetControlListData(WBDialogControl *pCtrl, int iIndex); // retrieve data pointer for single list entry
1106 
1123 int DLGInitControlListInfo(WBDialogControl *pCtrl, int nFlags,
1124  void *(*pfnAllocator)(const void *,int), void (*pfnDestructor)(void *),
1125  void (*pfnDisplay)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet),
1126  int (*pfnSort)(const void *, const void *));
1127 
1136 #define DLGInitControlListInfoDefault(X) \
1137  DLGInitControlListInfo(X, ListInfoFlags_SORTED, DLGCDefaultListInfoAllocator, WBFree, NULL, NULL)
1138 
1139 
1140 
1163 int DLGModifyControlListInfo(WBDialogControl *pCtrl, int bFlags, int nFlags,
1164  int bAllocator, void *(*pfnAllocator)(const void *,int),
1165  int bDestructor, void (*pfnDestructor)(void *),
1166  int bDisplay, void (*pfnDisplay)(WBDialogControl *, void *, int, GC, WB_GEOM *, XFontSet),
1167  int bSort, int (*pfnSort)(const void *, const void *));
1168 
1186 int DLGAddControlListEntry(WBDialogControl *pCtrl, const char *pData, long cbData, int iIndex);
1187 
1198 void DLGDelControlListEntry(WBDialogControl *pCtrl, int iIndex); // delete item at index 'iIndex' (iIndex < 0 to delete all)
1199 
1211 int DLGGetControlListSelection(WBDialogControl *pCtrl); // get selection for single-selection list
1212 
1224 void DLGSetControlListSelection(WBDialogControl *pCtrl, int iIndex); // set single selection for list
1225 
1238 void DLGSetControlListSelectionValue(WBDialogControl *pCtrl, int iIndex, int iSelState); // set sel state for specific index
1239 
1262 int DLGGetControlListSelectionBits(WBDialogControl *pCtrl, unsigned int *piBits, int nSize);
1263  // piBits and nSize must be large enough to accomodate bits. 'nSize' is number of integers (not bytes)
1264  // return value is 0 for no sel, >0 for number of selections, < 0 on error. assume 32 bits per entry ( LSbit is entry '0' )
1265  // a '1' in a bit position indicates the entry has been selected.
1266 
1277 char * DLGGetControlListSelectionText(WBDialogControl *pCtrl); // caller must 'WBFree()' non-NULL returned pointer
1278  // this returns TEXT elements (separated by line feeds) for corresponding selected LB entries
1279  // use this for multi-selection listboxes with unique text entries for which the list text is desired
1280 
1281 
1282 // SCROLL NOTIFICATION GENERATOR - generic pre-filter / handler for embedded scroll bars
1283 
1300 int DLGScrollBarHandler(Window wID, WBDialogControl *pCtrl, XEvent *pEvent);
1301  // NOTE: if this function returns a non-zero value, that same value should be returned
1302  // unmodified from the control's message callback in order for this to work properly.
1303 
1304 
1305 // notification methods (inline functions) - messages "sent" (not placed in queue)
1306 
1317 static __inline__ void DLGNotifyOwner(WBDialogControl *pDialogControl, Atom aNotify,
1318  long lData0, long lData1, long lData2, long lData3, long lData4)
1319 {
1320 Display *pDisplay = WBGetWindowDisplay(pDialogControl->wID);
1321 
1322  if(pDialogControl->pOwner)
1323  {
1324 // C99 constructs are cool, but maybe not portable...
1325 // XClientMessageEvent evt = {
1326 // .type=ClientMessage,
1327 // .serial=0,
1328 // .send_event=0,
1329 // .display=pDisplay,
1330 // .window=pDialogControl->pOwner->wID,
1331 // .message_type=aNotify, // typically aCONTROL_NOTIFY
1332 // .format=32
1333 // };
1334  XClientMessageEvent evt;
1335 
1336  evt.type=ClientMessage;
1337  evt.serial=0;
1338  evt.send_event=0;
1339  evt.display=pDisplay;
1340  evt.window=pDialogControl->pOwner->wID;
1341  evt.message_type=aNotify; // typically aCONTROL_NOTIFY
1342  evt.format=32;
1343 
1344  evt.data.l[0] = lData0; // nearly always an Atom
1345  evt.data.l[1] = lData1; // typically the window ID
1346  evt.data.l[2] = lData2;
1347  evt.data.l[3] = lData3;
1348  evt.data.l[4] = lData4;
1349 
1350  WBWindowDispatch(pDialogControl->pOwner->wID, (XEvent *)&evt);
1351  }
1352 }
1353 
1371 static __inline__ void DLGNotifySelf(WBDialogControl *pDialogControl, Atom aNotify,
1372  long lData0, long lData1, long lData2, long lData3, long lData4)
1373 {
1374 Display *pDisplay = WBGetWindowDisplay(pDialogControl->wID);
1375 
1376  XClientMessageEvent evt = {
1377  .type=ClientMessage,
1378  .serial=0,
1379  .send_event=0,
1380  .display=pDisplay,
1381  .window=pDialogControl->wID,
1382  .message_type=aNotify,
1383  .format=32
1384  };
1385  evt.data.l[0] = lData0;
1386  evt.data.l[1] = lData1;
1387  evt.data.l[2] = lData2;
1388  evt.data.l[3] = lData3;
1389  evt.data.l[4] = lData4;
1390 
1391  WBWindowDispatch(pDialogControl->wID, (XEvent *)&evt);
1392 }
1393 
1394 // asynchronous versions (posts priority event on message queue)
1395 
1407 static __inline__ void DLGNotifyOwnerAsync(WBDialogControl *pDialogControl, Atom aNotify,
1408  long lData0, long lData1, long lData2, long lData3, long lData4)
1409 {
1410 Display *pDisplay = WBGetWindowDisplay(pDialogControl->wID);
1411 
1412  if(pDialogControl->pOwner)
1413  {
1414  XClientMessageEvent evt = {
1415  .type=ClientMessage,
1416  .serial=0,
1417  .send_event=0,
1418  .display=pDisplay,
1419  .window=pDialogControl->pOwner->wID,
1420  .message_type=aNotify,
1421  .format=32
1422  };
1423  evt.data.l[0] = lData0;
1424  evt.data.l[1] = lData1;
1425  evt.data.l[2] = lData2;
1426  evt.data.l[3] = lData3;
1427  evt.data.l[4] = lData4;
1428 
1429  WBPostPriorityEvent(pDialogControl->pOwner->wID, (XEvent *)&evt);
1430  }
1431 }
1432 
1451 static __inline__ void DLGNotifySelfAsync(WBDialogControl *pDialogControl, Atom aNotify,
1452  long lData0, long lData1, long lData2, long lData3, long lData4)
1453 {
1454 Display *pDisplay = WBGetWindowDisplay(pDialogControl->wID);
1455 
1456  XClientMessageEvent evt = {
1457  .type=ClientMessage,
1458  .serial=0,
1459  .send_event=0,
1460  .display=pDisplay,
1461  .window=pDialogControl->wID,
1462  .message_type=aNotify,
1463  .format=32
1464  };
1465  evt.data.l[0] = lData0;
1466  evt.data.l[1] = lData1;
1467  evt.data.l[2] = lData2;
1468  evt.data.l[3] = lData3;
1469  evt.data.l[4] = lData4;
1470 
1471  WBPostPriorityEvent(pDialogControl->wID, (XEvent *)&evt);
1472 }
1473 
1474 #ifdef __cplusplus
1475 };
1476 #endif // __cplusplus
1477 
1478 
1479 #endif // DIALOG_CONTROLS_H_INCLUDED
1480 
1481 
const Atom aEDIT_CONTROL
Standard Dialog Control - editable text (single or multi-line, scrollable, clipboard) - see EDIT_CONT...
resize maintains position/size with respect to right
const Atom aCANCELBUTTON_CONTROL
Standard Dialog Control - cancel pushbutton control (accepts <ESC> as hotkey) - see CANCELBUTTON_CONT...
const Atom aHSCROLL_CONTROL
Standard Dialog Control - horizontal scroll - see HSCROLL_CONTROL_STR.
int cbStructSize
assigned at allocation time, the total size of this structure
CUSTOM - reserved bit 29.
const Atom aLIST_CONTROL
Standard Dialog Control - list - single, multi, extended select (h, v, multicol) - see LIST_CONTROL_S...
void DLGDelControlListEntry(WBDialogControl *pCtrl, int iIndex)
Delete a list entry from a control&#39;s list info at a specified index (or deletes ALL entries) ...
&#39;window helper&#39; main header file for the X11workbench Toolkit API
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...
CONTROL bits, reserved 09.
const Atom aMOUSE_DRAG
CONTROL_NOTIFY ClientMessage for MOUSE_DRAG event.
int nProps
current number of (contiguous) properties in &#39;aDlgProp&#39;
struct __WB_DIALOG_PROPLIST__ WBDialogPropList
Dialog Property List, container for WB_DIALOG_PROP.
void DLGSetControlListSelectionValue(WBDialogControl *pCtrl, int iIndex, int iSelState)
Assign the selection state for a specific index within a control&#39;s list info.
BUTTON - &#39;First&#39; radio button in a group.
int DLGAddControlListEntry(WBDialogControl *pCtrl, const char *pData, long cbData, int iIndex)
Add a list entry to a control&#39;s list info.
CONTROL bits, reserved 04.
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&#39;s callback function directly with an event.
void * WBGetWindowData(Window wID, int iIndex)
Gets the data associated with this window and the specified index.
const Atom aTEXT_CONTROL
Standard Dialog Control - static text (single or multi-line) - see TEXT_CONTROL_STR.
const Atom aIMAGE_CONTROL
Standard Dialog Control - generic image/pixmap holder - see IMAGE_CONTROL_STR.
const Atom aFIRSTRADIOBUTTON_CONTROL
Standard Dialog Control - &#39;first&#39; radio button - defines start of radio button &#39;group&#39; - see FIRSTRAD...
ControlListIndex
LIST-related constants for the index of an item within a list.
CONTROL bits, reserved 01.
static __inline__ void DLGSetControlText(WBDialogWindow *pDialog, int iControlID, const char *szText)
Convenience function to assign a dialog control&#39;s TEXT based on its control ID.
CONTROL bits, reserved 10.
BUTTON - Tri-state button.
default position re-alignment with respect to center (as a percentage, no stretching) ...
Atom aDLGC_TEXT
dialog control TEXT property - see WBDialogControlGetText()
default position re-alignment with respect to center (as a percentage, no stretching) ...
resize maintains position/size with respect to bottom
int DLGGetControlListSelectionBits(WBDialogControl *pCtrl, unsigned int *piBits, int nSize)
Query the selection state for multiple items within a control&#39;s list info.
static __inline__ WBDialogControl * DLGGetDialogControlStructFromID(WBDialogWindow *pDialog, int iControlID)
Returns a pointer to the WBDialogControl structure for a dialog control with validation. May return NULL.
XColor clrHFG
highlighted state-based foreground color
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.
vertical alignment mask
STATIC - Icon control window.
const Atom aBUTTON_PRESS
CONTROL_NOTIFY ClientMessage for BUTTON_PRESS event.
unsigned int ulTag
The value DIALOG_CONTROL_TAG.
#define DIALOG_CONTROL_TAG
TAG for the WBDialogControl structure.
const Atom aTEXT_CHANGED
CONTROL_NOTIFY ClientMessage for TEXT_CHANGED event.
WBDialogEntry * pDlgControlEntry
pointer to dialog box&#39;s WBDialogEntry
last list index
int WBWindowDispatch(Window wID, XEvent *pEvent)
Dispatches a window XEvent. May be called directly.
re-alignment with respect to center (as a percentage, stretching allowed)
const Atom aVSCROLL_CONTROL
Standard Dialog Control - vertical scroll - see VSCROLL_CONTROL_STR.
default position re-alignment with respect to center (as a percentage, no stretching) ...
void DLGSetControlListSelection(WBDialogControl *pCtrl, int iIndex)
Assign the current selection index for a single-selection list.
void * DLGCDefaultListInfoAllocator(const void *pData, int cbData)
The default &#39;List Info&#39; data allocator for a control&#39;s list info.
this control supports a LISTINFO property.
CUSTOM - reserved bit 27.
vertical alignment mask
unsigned long ulFlags
generic flag bits
const Atom aTREE_CONTROL
Standard Dialog Control - class &#39;tree&#39; control - see TREE_CONTROL_STR.
int WBPostPriorityEvent(Window wID, XEvent *pEvent)
Places a copy of the specified event at the end of the priority (internal) event queue.
CONTROL bits, reserved 12.
CONTROL bits, reserved 14.
const Atom aRADIOBUTTON_CONTROL
Standard Dialog Control - radio button - see RADIOBUTTON_CONTROL_STR.
const Atom aPUSHBUTTON_CONTROL
Standard Dialog Control - Pushbutton control - see PUSHBUTTON_CONTROL_STR.
unsigned long lVal
&#39;long&#39; data value, assigned as needed
static __inline__ void DLGSetControlCaption(WBDialogWindow *pDialog, int iControlID, const char *szCaption)
Convenience function to assign a dialog control&#39;s caption based on its control ID.
CUSTOM - reserved bit 24.
STATIC - frame control window.
const Atom aICON_CONTROL
Standard Dialog Control - icon container (has a nice 3D border) - see ICON_CONTROL_STR.
const Atom aCOMBO_CONTROL
Standard Dialog Control - classic &#39;combo box&#39; control - see COMBO_CONTROL_STR.
CONTROL bits, reserved 05.
const Atom aMOUSE_UP
CONTROL_NOTIFY ClientMessage for MOUSE_UP event.
WBWinEvent pDLGControlCallback
control&#39;s callback function
WBDialogPropList * pPropList
pointer to the property list (may be NULL)
default position re-alignment with respect to center (as a percentage, no stretching) ...
ListInfoFlags
Create flags specified in the call to DLGInitControlListInfo()
void WBDialogControlDelDialogProp(WBDialogControl *pCtrl, Atom aProp)
Low-level dialog control property removal.
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...
const char * WBDialogControlGetProperty(WBDialogControl *pCtrl, Atom aPropName)
Mid-level dialog control property retrieval (character string)
Atom aClass
basic control class atom
const Atom aKEYSTROKE
CONTROL_NOTIFY ClientMessage for KEYSTROKE event.
const Atom aMOUSE_DOWN
CONTROL_NOTIFY ClientMessage for MOUSE_DOWN event.
void WBDialogControlSetIconPixmap(WBDialogControl *pCtrl, Pixmap pixmap, Pixmap pixmap2)
Assign the ICON (image) property for a control, which consists of 2 pixmaps.
Window wID
Window ID of the dialog control window.
const Atom aFILE_COMBO_CONTROL
Standard Dialog Control - file combo control - see FILE_COMBO_CONTROL_STR.
re-alignment with respect to center (as a percentage, stretching allowed)
const Atom aKEY_DOWN
CONTROL_NOTIFY ClientMessage for KEY_DOWN event.
Window DLGGetDialogControl(WBDialogWindow *pDialog, int iControlID)
returns the Window ID of a member control of the dialog window using the &#39;control ID&#39; ...
Pixmap WBDialogControlGetPixmap(WBDialogControl *pCtrl)
Obtain the assigned PIXMAP (image) property for a control.
CONTROL bits, reserved 06.
int WBDialogControlSetDialogProp(WBDialogControl *pCtrl, WB_DIALOG_PROP *pPropVal)
Low-level dialog control property assignment.
CUSTOM - reserved bit 30.
first list index
Dialog property storage structure.
CONTROL bits, reserved 03.
resize maintains position/size with respect to bottom
int WBDialogControlSetPropList(WBDialogControl *pCtrl, const char *szPropList)
Mid-level dialog control property list assignment.
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 &#39;List Entry&#39; for a control, specifying various callbacks and flags.
Window wID
window ID of the dialog (frame) window
int DLGGetControlListSelection(WBDialogControl *pCtrl)
Obtain the current selection index for a single-selection list.
STATIC - Image control window.
CONTROL bits, reserved 00.
void DLGRegisterControlCallback(WBDialogControl *pDialogControl, const char *szClassName, WBWinEvent pCallback)
Register the dialog control&#39;s callback function and class name.
BUTTON - Cancel Push Button (activate by <ESC>)
STATIC - display with a 3D-looking border.
Atom aDLGC_PATH
dialog control PATH property, for file and directory controls
const Atom aLOSTFOCUS
CONTROL_NOTIFY ClientMessage for LOSTFOCUS event.
CONTROL bits, reserved 02.
Atom aProp
Atom identifying the property.
static __inline__ const char * WBDialogControlGetText(WBDialogControl *pCtrl)
Obtain the assigned TEXT property for a control, which is different from the CAPTION or Title...
const Atom aCHECKBUTTON_CONTROL
Standard Dialog Control - check[box] button - push-on/push-off with &#39;check mark&#39; (or whatever) - see ...
CONTROL bits, reserved 13.
Dialog Property List, container for WB_DIALOG_PROP.
const Atom aLIST_NOTIFY
CONTROL_NOTIFY ClientMessage for LIST_NOTIFY event.
const Atom aTRISTATEBUTTON_CONTROL
Standard Dialog Control - tristate - like check, but with a third state - see TRISTATEBUTTON_CONTROL_...
void * WBDialogControlGetProperty2(WBDialogControl *pCtrl, Atom aPropName)
Mid-level dialog control property list retrieval (generic pointer)
int(* WBWinEvent)(Window wID, XEvent *pEvent)
event callback function type for window events
static __inline__ const WBDialogPropList * WBDialogControlGetPropList(WBDialogControl *pCtrl)
Low-level dialog control property list retrieval.
Structure identifying the properties of a dialog box control.
static __inline__ const char * DLGGetControlCaption(WBDialogWindow *pDialog, int iControlID)
Convenience function to query a dialog control&#39;s caption based on its control ID. ...
const Atom aDIALOG_INIT
DIALOG_INIT ClientMessage, sent to dialog window callback on frame create.
XColor clrFG
foreground color
BUTTON - &#39;type mask&#39; for buttons.
Structure identifying one of the controls that appears on a dialog window.
CONTROL bits, reserved 07.
const char * WBDialogControlGetCaption(WBDialogControl *pCtrl)
Obtain a pointer to the assigned text for the &#39;CAPTION&#39; property of a dialog control.
WBDialogWindow * pOwner
pointer to owner dialog box
const Atom aPATH_TREE_CONTROL
Standard Dialog Control - path tree - directory hierarchy - see PATH_TREE_CONTROL_STR.
const Atom aCOMBOTREE_CONTROL
Standard Dialog Control - &#39;combo tree&#39; (tree with interlocked edit/text box like combo box) - see COM...
resize maintains position/size with respect to top
const Atom aKNOB_CONTROL
Standard Dialog Control - "volume knob" (270 degrees of rotation, left to right) - see KNOB_CONTROL_S...
const WB_DIALOG_PROP * WBDialogControlGetDialogProp(WBDialogControl *pCtrl, Atom aProp)
Low-level dialog control property retrieval.
resize maintains position/size with respect to top
const Atom aTAB_CONTROL
Standard Dialog Control -&#39;tab&#39; container (auto enable/disable contents) - see TAB_CONTROL_STR.
char * DLGGetControlListSelectionText(WBDialogControl *pCtrl)
Query the selection text as multiple strings in an allocated buffer.
char * pCaption
allocated pointer to caption, in lieu of using a WM_NAME property (may be NULL)
static __inline__ void WBDialogControlSetText(WBDialogControl *pCtrl, const char *szText)
Assign the TEXT property for a control, which is different from the CAPTION or Title.
CONTROL bits, reserved 11.
Display * WBGetWindowDisplay(Window wID)
returns the Display associated with a window
BUTTON - Default Push Button (activate by <ENTER>)
const void * DLGGetControlListData(WBDialogControl *pCtrl, int iIndex)
Retrieve the data pointer for a single list entry (listbox, combo, and tree controls only) ...
alignment mask (both horizontal and vertical)
CUSTOM - reserved bit 25.
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 &#39;List Entry&#39; for a control, specifying various callbacks and flags.
BUTTON - Checkbox button.
resize maintains position/size with respect to right
CONTROL bits, reserved 08.
BUTTON - Push button (generic)
always insert at end
re-alignment with respect to center (as a percentage, stretching allowed)
vertical alignment mask
re-alignment with respect to center (as a percentage, stretching allowed)
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&#39;s callback func...
Atom aDLGC_PROP_NOTIFY
DLGC_PROP_NOTIFY ClientMessage, notify control of property change.
int DLGScrollBarHandler(Window wID, WBDialogControl *pCtrl, XEvent *pEvent)
Scroll bar event filter for dialog control callback function. Generates scroll events.
Structure identifying a dialog (frame) window.
static __inline__ void DLGNotifySelfAsync(WBDialogControl *pDialogControl, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
Notify &#39;self&#39; by posting an event that will ASYNCHRONOUSLY be sent to the window&#39;s callback function...
STATIC - &#39;type mask&#39; for static controls.
const char * DLGGetControlListText(WBDialogControl *pCtrl, int iIndex)
Retrieve the text poiner for a single list entry (listbox, combo, and tree controls only) ...
resize maintains position/size with respect to left
const Atom aFRAME_CONTROL
Standard Dialog Control - transparent frame with optional text - see FRAME_CONTROL_STR.
resize maintains position/size with respect to left
static __inline__ void DLGNotifySelf(WBDialogControl *pDialogControl, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
Notify &#39;self&#39; by calling the window&#39;s own callback function directly with an event.
CUSTOM - reserved bit 26.
const Atom aGOTFOCUS
CONTROL_NOTIFY ClientMessage for GOTFOCUS event.
CUSTOM - reserved bit 31.
horizontal alignment mask
const Atom aDEFPUSHBUTTON_CONTROL
Standard Dialog Control - default Pushbutton control (has dark border, accepts <ENTER> as hotkey) - s...
const Atom aKEY_UP
CONTROL_NOTIFY ClientMessage for KEY_UP event.
alignment mask (both horizontal and vertical)
const Atom aFILE_LIST_CONTROL
Standard Dialog Control - File List - see FILE_LIST_CONTROL_STR.
int WBDialogControlSetProperty(WBDialogControl *pCtrl, Atom aPropName, const char *szPropVal)
Mid-level dialog control property assignment (character string)
struct __WB_DIALOG_CONTROL__ WBDialogControl
Structure identifying the properties of a dialog box control.
Pixmap WBDialogControlGetIconPixmap(WBDialogControl *pCtrl, Pixmap *pPixmap2)
Obtain the assigned ICON (image) property for a control, which consists of 2 pixmaps.
void WBDialogControlsInit(void)
Initialization function for dialog controls.
void WBDialogControlSetPixmap(WBDialogControl *pCtrl, Pixmap pixmap)
Assign the PIXMAP (image) property for a control.
internal wrapper struct for X11 &#39;geometry&#39; definition
always insert at beginning
void WBDialogControlSetCaption(WBDialogControl *pCtrl, const char *szCaption)
Assign text to the &#39;CAPTION&#39; property of a dialog control.
const Atom aTEXTSELECT_CHANGE
CONTROL_NOTIFY ClientMessage for TEXTSELECT_CHANGE event.
BUTTON - Radio button (generic)
static __inline__ WBDialogControl * DLGGetDialogControlStruct(Window wID)
Returns a pointer to the WBDialogControl structure for a dialog control with validation. May return NULL.
void * pVal
pointer to data, as needed (may be allocated, some property types auto-free the data) ...
CUSTOM - reserved bit 28.
void WBDialogControlSetProperty2(WBDialogControl *pCtrl, Atom aPropName, void *szPropVal)
Mid-level dialog control property list assignment (generic pointer)
XColor clrAFG
active state-based foreground color
STATIC - Text control window.
struct __WB_DIALOG_PROP__ WB_DIALOG_PROP
Dialog property storage structure.
CONTROL_FLAGS
Various bit flags used for controls, defined here for convenience.
static __inline__ const char * DLGGetControlText(WBDialogWindow *pDialog, int iControlID)
Convenience function to query a dialog control&#39;s TEXT based on its control ID.
const Atom aSLIDER_CONTROL
Standard Dialog Control - volume control (slider bar) (h or v depending on geometry) - see SLIDER_CON...