X11workbench Toolkit  1.0
dialog_window.h File Reference
#include "window_helper.h"

Go to the source code of this file.

Data Structures

struct  s_WB_DIALOG_ENTRY
 Structure identifying one of the controls that appears on a dialog window. More...
 
struct  s_WB_DIALOG_WINDOW
 Structure identifying a dialog (frame) window. More...
 

Macros

#define DIALOG_WINDOW_TAG   (*((const unsigned int *)"DLGW"))
 
#define DIALOG_ENTRY_TAG   (*((const unsigned int *)"DLGE"))
 

Typedefs

typedef struct s_WB_DIALOG_ENTRY WBDialogEntry
 Structure identifying one of the controls that appears on a dialog window. More...
 
typedef struct s_WB_DIALOG_WINDOW WBDialogWindow
 Structure identifying a dialog (frame) window. More...
 

Enumerations

enum  WBDialogWindowFlags {
  WBDialogWindow_APP_WINDOW = 1,
  WBDialogWindow_VISIBLE = 2,
  WBDialogWindow_DOMODAL = 4,
  WBDialogWindow_CENTERMOUSE = 8,
  WBDialogWindow_HRESIZE = 0x100,
  WBDialogWindow_VRESIZE = 0x200,
  WBDialogWindow_MAX = 0x80000000L
}
 enumeration for the iFlags member of WBDialogWindow More...
 
enum  WBDialogEntryFlags {
  WBDialogEntry_VISIBLE = 0x00000001,
  WBDialogEntry_EDIT = 0x00000002,
  WBDialogEntry_MULTILINE = 0x00000004,
  WBDialogEntry_ALLCHARS = 0x00000008,
  WBDialogEntry_TRISTATE = 0x00000010,
  WBDialogEntry_CHECKED = 0x00000020,
  WBDialogEntry_NO_BORDER = 0x00000040,
  WBDialogEntry_VA_TEXT_CENTER = 0x00000000,
  WBDialogEntry_VA_TEXT_TOP = 0x00000100,
  WBDialogEntry_VA_TEXT_BOTTOM = 0x00000200,
  WBDialogEntry_VA_TEXT_MASK = 0x00000300,
  WBDialogEntry_HA_TEXT_LEFT = 0x00000000,
  WBDialogEntry_HA_TEXT_CENTER = 0x00000400,
  WBDialogEntry_HA_TEXT_RIGHT = 0x00000800,
  WBDialogEntry_HA_TEXT_MASK = 0x00000c00,
  WBDialogEntry_ALIGN_TEXT_MASK = 0x00000f00,
  WBDialogEntry_HResize = 0x00040000,
  WBDialogEntry_VResize = 0x00080000,
  WBDialogEntry_ResizeMask = 0x000c0000,
  WBDialogEntry_VAlignFixed = 0x00000000,
  WBDialogEntry_VAlignTop = 0x00100000,
  WBDialogEntry_VAlignBottom = 0x00200000,
  WBDialogEntry_VAlignCenter = 0x00300000,
  WBDialogEntry_VAlignMask = 0x00300000,
  WBDialogEntry_HAlignFixed = 0x00000000,
  WBDialogEntry_HAlignLeft = 0x00400000,
  WBDialogEntry_HAlignRight = 0x00800000,
  WBDialogEntry_HAlignCenter = 0x00c00000,
  WBDialogEntry_HAlignMask = 0x00c00000,
  WBDialogEntry_AlignMask = 0x00f00000,
  WBDialogEntry_Reserved24 = 0x01000000,
  WBDialogEntry_Reserved25 = 0x02000000,
  WBDialogEntry_DISABLED = 0x04000000,
  WBDialogEntry_PRESSED = 0x08000000,
  WBDialogEntry_CAN_HAVE_FOCUS = 0x10000000,
  WBDialogEntry_HAS_FOCUS = 0x20000000,
  WBDialogEntry_PUSHBUTTON = 0x40000000,
  WBDialogEntry_DEFAULT = 0x80000000
}
 enumeration for the iFlags member of WBDialogEntry More...
 
enum  MessageBoxEnum {
  MessageBox_Error =0,
  MessageBox_Warning =1,
  MessageBox_Info =2,
  MessageBox_Asterisk =3,
  MessageBox_Question =4,
  MessageBox_BoldQuestion =5,
  MessageBox_WTF =6,
  MessageBox_Bang =7,
  MessageBox_Triangle =8,
  MessageBox_FaceOfDeath =9,
  MessageBox_JollyRoger =10,
  MessageBox_ThumbsUp =11,
  MessageBox_ThumbsDown =12,
  MessageBox_MiddleFinger =13,
  MessageBox_TeddyBear =14,
  MessageBox_Barney =15,
  MessageBox_App =16,
  MessageBox_ICON_MASK = 0x1f,
  MessageBox_Default = 0,
  MessageBox_OK = 0x20,
  MessageBox_Yes = 0x40,
  MessageBox_No = 0x80,
  MessageBox_Abort = 0x100,
  MessageBox_Retry = 0x200,
  MessageBox_Ignore = 0x400,
  MessageBox_Cancel = 0x800,
  MessageBox_OKCancel = 0x820,
  MessageBox_YesNo = 0xc0,
  MessageBox_YesNoCancel = 0x8c0,
  MessageBox_AbortRetry = 0x500,
  MessageBox_AbortRetryIgnore = 0x700,
  MessageBox_BUTTON_MASK = 0xfe0
}
 Message Box flag enumeration. More...
 
enum  FileDialogEnum {
  FileDialog_Open = 0,
  FileDialog_Save = 1,
  FileDialog_SaveAs = 2,
  FileDialog_Folder = 3,
  FileDialog_MASK = 0xf,
  FileDialog_ReadOnly = 0x10,
  FileDialog_NoOverwrite = 0x20,
  FileDialog_NoOverwritePrompt = 0x40,
  FileDialog_NoFolderNav = 0x80,
  FileDialog_Simple = 0x100,
  FileDialog_MODIFIER_MASK = 0xff0
}
 FileDialog enumeration. More...
 

Functions

WBDialogWindowDLGCreateDialogWindow (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 More...
 
void DLGAssignOwner (WBDialogWindow *pDlg, Window wIDOwner)
 Assign owning window to dialog. More...
 
void DLGRecalcLayout (Window wID)
 Force re-calculation of dialog window (and control) layout. More...
 
int DLGPixelHeight (WBDialogWindow *pDlg, int iHeight)
 Height of a single dialog unit (in pixels) More...
 
int DLGPixelWidth (WBDialogWindow *pDlg, int iWidth)
 Width of a single dialog unit (in pixels) More...
 
void DLGSetUserCallback (WBDialogWindow *pDLG, WBWinEvent pCallBack)
 Assign the callback function for a dialog window. More...
 
int DLGProcessHotKey (WBDialogWindow *pDLG, XEvent *pEvent)
 return non-zero if a hot-key was processed and no further processing should be done. Otherwise returns zero.
 
static __inline__ WBDialogWindowDLGGetDialogWindowStruct (Window wID)
 Returns a pointer to the dialog window's WBDialogWindow structure. More...
 
void * DLGGetDialogWindowUserData (Window wID)
 Returns a pointer to the dialog window's 'user data' assigned at create time. More...
 
void DLGDestroyDialogWindow (Window wID)
 Destroy a modeless dialog window via its window ID. More...
 
void DLGDestroyDialogWindow2 (WBDialogWindow *pDialogWindow)
 Destroy a modeless dialog window via a pointer to its WBDialogWindow structure. More...
 
Window DLGGetDialogControl (WBDialogWindow *pDialog, int iControlID)
 returns the Window ID of a member control of the dialog window using the 'control ID' More...
 
WBDialogEntryDLGGetDialogControlEntry (WBDialogWindow *pDialog, Window idControl)
 returns a pointer to the WBDialogEntry for a member control using the control's Window ID More...
 
Window DLGGetFirstDialogControl (WBDialogWindow *pDialog)
 Return the Window ID of the FIRST dialog control within the 'tab order'. More...
 
Window DLGGetNextDialogControl (WBDialogWindow *pDialog, Window idControl)
 Return the Window ID of the NEXT dialog control within the 'tab order', based on the specified control window ID. More...
 
Window DLGGetPrevDialogControl (WBDialogWindow *pDialog, Window idControl)
 Return the Window ID of the PREVIOUS dialog control within the 'tab order', based on the specified control window ID. More...
 
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. More...
 
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 callback function. More...
 
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. More...
 
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. More...
 
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 containing a fully qualified file or path name. More...
 
int DLGColorDialog (Window wIDOwner, XStandardColormap *pColorMap, XColor *pColor)
 Display a modal Color Dialog window, returning the selected color in the XColor structure pointed to by 'pColor'. More...
 
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 'pColor'. More...
 
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. More...
 

Detailed Description

Definitions for dialog (frame) window and intercommunication structures and dialog-related APIs

Definition in file dialog_window.h.