X11 Work Bench Toolkit  1.0
dialog_window.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <memory.h>
#include <string.h>
#include <strings.h>
#include <signal.h>
#include <time.h>
#include <X11/keysymdef.h>
#include "window_helper.h"
#include "pixmap_helper.h"
#include "dialog_window.h"
#include "dialog_controls.h"
#include "conf_help.h"
#include "draw_text.h"

Go to the source code of this file.

Data Structures

struct  __DIALOG_WINDOW__
 DIALOG_WINDOW structure (internal), an extension of WBDialogWindow. More...
 

Macros

#define XK_MISCELLANY   /* mostly for interix */
 
#define THIS_SUBSYSTEM   DebugSubSystem_Dialog
 
#define LOAD_COLOR0(X, Y)   if(CHGetResourceString(WBGetDefaultDisplay(), X, Y, sizeof(Y)) > 0) { }
 
#define LOAD_COLOR(X, Y, Z)   if(CHGetResourceString(WBGetDefaultDisplay(), X, Y, sizeof(Y)) <= 0){ WB_WARN_PRINT("%s - WARNING: can't find color %s, using default value %s\n", __FUNCTION__, X, Z); strcpy(Y,Z); }
 

Typedefs

typedef struct __DIALOG_WINDOW__ DIALOG_WINDOW
 DIALOG_WINDOW structure (internal), an extension of WBDialogWindow. More...
 

Enumerations

enum  DlgResourceStringKeywordIndices {
  DlgResourceKW__BEGIN_DIALOG =0, DlgResourceKW__END_DIALOG, DlgResourceKW__FONT, DlgResourceKW__CONTROL,
  DlgResourceKW__ID, DlgResourceKW__X, DlgResourceKW__Y, DlgResourceKW__WIDTH,
  DlgResourceKW__HEIGHT, DlgResourceKW__VISIBLE, DlgResourceKW__TITLE, DlgResourceKW__VATOP,
  DlgResourceKW__VABOTTOM, DlgResourceKW__VACENTER, DlgResourceKW__HALEFT, DlgResourceKW__HARIGHT,
  DlgResourceKW__HACENTER, DlgResourceKW__VRESIZE, DlgResourceKW__HRESIZE
}
 

Functions

static int InternalCreateChildWindows (DIALOG_WINDOW *pDlg, const char *szDialogResource)
 
int DLGDefaultCallback (Window wID, XEvent *pEvent)
 
static void __internal_destroy_dialog_window (DIALOG_WINDOW *pTemp)
 
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 WBDialogWindowExit ()
 
static void InternalCheckColors (void)
 
WBDialogWindowDLGCreateDialogWindow (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 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...
 
void DLGSetUserCallback (WBDialogWindow *pDialogWindow, WBWinEvent pCallBack)
 Assign the callback function for a dialog window. More...
 
void DLGRecalcLayout (Window wID)
 Force re-calculation of dialog window (and control) layout. More...
 
void * DLGGetDialogWindowUserData (Window wID)
 Returns a pointer to the dialog window's 'user data' assigned at create time. 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...
 
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 int InternalCreateChildWindowsSub (DIALOG_WINDOW *pDlg, const char **pszDialogResource)
 
static int get_id_val (const char *szVal, int iLen)
 

Variables

static DIALOG_WINDOWpDialogs = NULL
 
static XColor clrFG
 
static XColor clrBG
 
static XColor clrBD
 
static int iInitColorFlag = 0
 
static const char *const aszKeywords []
 
static const char *const aszSymbols [] ={ "IDOK", "IDCANCEL", "IDYES", "IDNO", "IDRETRY", "IDABORT", "IDIGNORE", "IDSTATIC", "IDNONE", NULL }
 
static const int iIDSymbols [] ={ IDOK, IDCANCEL, IDYES, IDNO, IDRETRY, IDABORT, IDIGNORE, IDSTATIC, IDNONE, -1 }
 

Detailed Description

Implementation for dialog (frame) window and intercommunication structures and APIs

Definition in file dialog_window.c.

Variable Documentation

const char* const aszKeywords[]
static
Initial value:
={ "BEGIN_DIALOG","END_DIALOG","FONT","CONTROL","ID","X","Y","WIDTH","HEIGHT","VISIBLE","TITLE",
"VALIGN_BOTTOM","VALIGN_TOP","VALIGN_CENTER","HALIGN_LEFT","HALIGN_RIGHT","HALIGN_CENTER",
"VRESIZE","HRESIZE",
NULL }

Definition at line 1547 of file dialog_window.c.