50 #ifndef DIALOG_WINDOW_H_INCLUDED 51 #define DIALOG_WINDOW_H_INCLUDED 165 #define DIALOG_WINDOW_TAG (*((const unsigned int *)"DLGW")) 166 #define DIALOG_ENTRY_TAG (*((const unsigned int *)"DLGE")) 205 typedef struct s_WB_DIALOG_ENTRY 429 const char *szDialogResource,
430 int iX,
int iY,
int iWidth,
int iHeight,
641 long lData0,
long lData1,
long lData2,
long lData3,
long lData4)
645 XClientMessageEvent evt = {
651 .message_type=aNotify,
654 evt.data.l[0] = lData0;
655 evt.data.l[1] = lData1;
656 evt.data.l[2] = lData2;
657 evt.data.l[3] = lData3;
658 evt.data.l[4] = lData4;
676 long lData0,
long lData1,
long lData2,
long lData3,
long lData4)
680 XClientMessageEvent evt = {
686 .message_type=aNotify,
689 evt.data.l[0] = lData0;
690 evt.data.l[1] = lData1;
691 evt.data.l[2] = lData2;
692 evt.data.l[3] = lData3;
693 evt.data.l[4] = lData4;
777 int DLGMessageBox(
int iType, Window wIDOwner,
const char *szTitle,
const char *szMessage);
796 char *
DLGInputBox(Window wIDOwner,
const char *szTitle,
const char *szPrompt,
const char *szDefault,
797 int iWidth,
int iMaxChar);
858 char *
DLGFileDialog(
int iType, Window wIDOwner,
const char *szDefPath,
const char *szDefName,
859 const char *szExtAndDescList);
878 int DLGColorDialog(Window wIDOwner, XStandardColormap *pColorMap, XColor *pColor);
916 void DLGSplashScreen(
char * aXPM[],
const char *szCopyright,
unsigned long clrText);
921 #endif // __cplusplus 924 #endif // DIALOG_WINDOW_H_INCLUDED bit mask for modifier flag
Icon - multiple question marks in red triangle.
XColor clrBD
border pixel color
XColor clrBG
background pixel color
unsigned int ulTag
tag word, always assigned to DIALOG_ENTRY_TAG
Structure identifying one of the controls that appears on a dialog window.
void * DLGGetDialogWindowUserData(Window wID)
Returns a pointer to the dialog window's 'user data' assigned at create time.
'window helper' main header file for the X11workbench Toolkit API
Horizontal text alignment bits.
Button Bits - default button (currently 'OK')
Modifier Flag - simple 'file name input'.
set for "default" controls
WBDialogWindowFlags
enumeration for the iFlags member of WBDialogWindow
void * WBGetWindowData(Window wID, int iIndex)
Gets the data associated with this window and the specified index.
struct s_WB_DIALOG_WINDOW WBDialogWindow
Structure identifying a dialog (frame) window.
Icon - black question mark in yellow triangle.
Icon - white skull and crossbones on black square.
static __inline__ void DLGNotifyDlg(WBDialogWindow *pDLG, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
Notify dialog window by calling the window's own callback function directly with an event.
Icon - white question mark in green triangle.
Button Bits - Cancel button.
Button Bits - Abort button plus Retry button.
Modifier Flag - No 'Overwrite Prompt' if overwriting.
for pushbuttons, causes it to be drawn 'pressed'
int DLGColorDialog(Window wIDOwner, XStandardColormap *pColorMap, XColor *pColor)
Display a modal Color Dialog window, returning the selected color in the XColor structure pointed to ...
Modifier Flag - No 'Folder Navigation'.
MessageBoxEnum
Message Box flag enumeration.
char * DLGInputBox(Window wIDOwner, const char *szTitle, const char *szPrompt, const char *szDefault, int iWidth, int iMaxChar)
Displays a special purpose dialog window that retrieves a character string as input.
Icon - white asterisk on blue circle.
Window DLGGetNextDialogControl(WBDialogWindow *pDialog, Window idControl)
Return the Window ID of the NEXT dialog control within the 'tab order', based on the specified contro...
int WBWindowDispatch(Window wID, XEvent *pEvent)
Dispatches a window XEvent. May be called directly.
Auto-center mouse pointer.
default position re-alignment with respect to center (as a percentage, no stretching)
int iFlags
visibility, focus, etc.
Icon - yellow triangle (nothing else)
int iID
control unique identifier (number or atom, as appropriate, unique to dialog window)
int DLGPixelHeight(WBDialogWindow *pDlg, int iHeight)
Height of a single dialog unit (in pixels)
Button Bits - Yes button plus No button and Cancel button.
Modifier Flag - No Overwrite.
Button Bits - Yes button plus No button.
void * pUserData
user data that's assignable via API
int WBPostPriorityEvent(Window wID, XEvent *pEvent)
Places a copy of the specified event at the end of the priority (internal) event queue.
Button Bits - Yes button.
Window DLGGetFirstDialogControl(WBDialogWindow *pDialog)
Return the Window ID of the FIRST dialog control within the 'tab order'.
for edit controls, prevents trapping <ENTER>
Horizontally align text center.
Horizontally align text right.
WBDialogEntryFlags
enumeration for the iFlags member of WBDialogEntry
prevents trapping <ESC> <ENTER> and anything else
Icon - white fright mask on black circle.
int iClientY
vertical position of upper left corner of client area, relative to the window
WBDialogWindow * DLGCreateDialogWindow(Window wIDOwner, const char *szTitle, const char *szDialogResource, int iX, int iY, int iWidth, int iHeight, WBWinEvent pUserCallback, int iFlags, void *pUserData)
create a dialog window using a text resource
default position re-alignment with respect to center (as a percentage, no stretching)
Structure identifying a dialog (frame) window.
Icon - white thumb up on green square.
unsigned int ulTag
tag word, always assigned to DIALOG_WINDOW_TAG
#define DIALOG_WINDOW_TAG
Icon - white 'middle finger' on red triangle.
static __inline__ void DLGNotifyDlgAsync(WBDialogWindow *pDLG, Atom aNotify, long lData0, long lData1, long lData2, long lData3, long lData4)
Notify dialog window by posting an event that will ASYNCHRONOUSLY be sent to the dialog window's call...
Modifier Flag - Read Only.
dialog box flag, can be resized vertically
Type Flag - File Save As Dialog.
re-alignment with respect to center (as a percentage, stretching allowed)
Window DLGGetDialogControl(WBDialogWindow *pDialog, int iControlID)
returns the Window ID of a member control of the dialog window using the 'control ID'
void DLGSplashScreen(char *aXPM[], const char *szCopyright, unsigned long clrText)
Display a splash screen for 5 seconds (with animation and copyright string), and then return.
int DLGProcessHotKey(WBDialogWindow *pDLG, XEvent *pEvent)
return non-zero if a hot-key was processed and no further processing should be done....
resize maintains position/size with respect to bottom
void DLGSetUserCallback(WBDialogWindow *pDLG, WBWinEvent pCallBack)
Assign the callback function for a dialog window.
int iClientX
horizontal position of upper left corner of client area, relative to the window
Button Bits - Retry button.
causes the control to be drawn 'disabled' and NOT be selectable for focus
Window wID
window ID of control
Icon - brown and tan teddy bear on grey circle.
Vertically align text center (default)
struct s_WB_DIALOG_ENTRY WBDialogEntry
Structure identifying one of the controls that appears on a dialog window.
int iClientWidth
width of the dialog window's client area
int DLGPixelWidth(WBDialogWindow *pDlg, int iWidth)
Width of a single dialog unit (in pixels)
set for 'pushbuttons' (which override 'default' for <ENTER>)
int iFlags
bitmask of attribute flags (see 'WBDialogWindowFlags' enumeration)
void DLGDestroyDialogWindow(Window wID)
Destroy a modeless dialog window via its window ID.
resize mask for dialog box
int(* WBWinEvent)(Window wID, XEvent *pEvent)
event callback function type for window events
void DLGAssignOwner(WBDialogWindow *pDlg, Window wIDOwner)
Assign owning window to dialog.
Icon - purple T-Rex head on white circle (more like mozilla)
void DLGDestroyDialogWindow2(WBDialogWindow *pDialogWindow)
Destroy a modeless dialog window via a pointer to its WBDialogWindow structure.
resize maintains position/size with respect to top
Display * WBGetWindowDisplay(Window wID)
returns the Display associated with a window
Button Bits - Ignore button.
static __inline__ WBDialogWindow * DLGGetDialogWindowStruct(Window wID)
Returns a pointer to the dialog window's WBDialogWindow structure.
WB_FONT DLGFontDialog(Display *pDisplay, Window wIDOwner, WB_FONTC pDefault)
Display a modal Font Dialog window, returning the selected font in the XColor structure pointed to by...
set when item gets focus. cleared when no focus
Type Flag - File Save Dialog.
resize maintains position/size with respect to right
'no border' flag (don't display a border - statics, typically)
re-alignment with respect to center (as a percentage, stretching allowed)
Type Flag - File Open Dialog.
Horizontally align text left (default)
Window DLGGetPrevDialogControl(WBDialogWindow *pDialog, Window idControl)
Return the Window ID of the PREVIOUS dialog control within the 'tab order', based on the specified co...
Window wIDOwner
window ID of the dialog's OWNER (can be 'None', should be assigned for Modal dialogs)
Icon - application icon (from icon_app.xpm)
WBDialogEntry * DLGGetDialogControlEntry(WBDialogWindow *pDialog, Window idControl)
returns a pointer to the WBDialogEntry for a member control using the control's Window ID
Vertically align text top.
Icon - exclamation point on yellow triangle.
resize maintains position/size with respect to left
An allocated structure containing XFontStruct, XFontInfo, and XftFont [as applicable] for a specified...
char * DLGFileDialog(int iType, Window wIDOwner, const char *szDefPath, const char *szDefName, const char *szExtAndDescList)
Display a modal File Dialog window, returning a WBAlloc'd pointer to a null-byte terminated string co...
Button Bits - Abort button plus Retry button and Ignore button.
set when item CAN have focus.
void DLGRecalcLayout(Window wID)
Force re-calculation of dialog window (and control) layout.
horizontal alignment mask
Vertical text alignment bits.
alignment mask (both horizontal and vertical)
dialog box flag, can be resized horizontally
Icon - white thumb down on red square.
Vertically align text bottom.
XColor clrFG
foreground pixel color
Window wID
window ID of the dialog (frame) window
Button Bits - Abort button.
int iClientHeight
height of the dialog window's client area
FileDialogEnum
FileDialog enumeration.
int iY
vertical position of upper left corner of control (client-relative)
Icon - yellow circle with white exclamation point.
Button Bits - OK button plus Cancel button.
int DLGMessageBox(int iType, Window wIDOwner, const char *szTitle, const char *szMessage)
Display a modal 'message box' dialog window with a specific title, message, and button combination.
'tri-stated' state (overrides 'checked' state)
Type Flag - Folder Dialog.
Atom aClass
control class identifier