1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
12 // #pragma implementation
16 #include "wx/object.h"
17 #include "wx/window.h"
20 #include "wx/postscrp.h"
22 #define _MAXPATHLEN 500
24 /* Used for X resources */
26 #include <X11/Xutil.h>
27 #include <X11/Xresource.h>
29 wxResourceCache
*wxTheResourceCache
= (wxResourceCache
*) NULL
;
30 XrmDatabase wxResourceDatabase
;
32 /* Useful buffer, initialized in wxCommonInit */
33 char *wxBuffer
= (char *) NULL
;
36 wxList wxTopLevelWindows
;
38 /* List of windows pending deletion */
39 wxList wxPendingDelete
;
41 /* Current cursor, in order to hang on to
42 * cursor handle when setting the cursor globally */
43 wxCursor
*g_globalCursor
= (wxCursor
*) NULL
;
45 /* Don't allow event propagation during drag */
46 bool g_blockEventsOnDrag
= FALSE
;
48 /* Don't allow mouse event propagation during scroll */
49 bool g_blockEventsOnScroll
= FALSE
;
51 /* Message Strings for Internationalization */
52 char **wx_msg_str
= (char**)NULL
;
54 /* Custom OS version, as optionally placed in wx.ini/.wxrc
55 * Currently this can be Win95, Windows, Win32s, WinNT.
56 * For some systems, you can't tell until run-time what services you
57 * have. See wxGetOsVersion, which uses this string if present. */
58 char *wxOsVersion
= (char *) NULL
;
60 /* For printing several pages */
62 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= (wxPrintPaperDatabase
*) NULL
;
64 /* GDI Object Lists */
65 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
66 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
67 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
68 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
69 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) NULL
;
71 /* X only font names */
72 wxFontNameDirectory
*wxTheFontNameDirectory
;
75 wxFont
*wxNORMAL_FONT
;
77 wxFont
*wxITALIC_FONT
;
85 wxPen
*wxTRANSPARENT_PEN
;
86 wxPen
*wxBLACK_DASHED_PEN
;
88 wxPen
*wxMEDIUM_GREY_PEN
;
89 wxPen
*wxLIGHT_GREY_PEN
;
91 wxBrush
*wxBLUE_BRUSH
;
92 wxBrush
*wxGREEN_BRUSH
;
93 wxBrush
*wxWHITE_BRUSH
;
94 wxBrush
*wxBLACK_BRUSH
;
95 wxBrush
*wxTRANSPARENT_BRUSH
;
96 wxBrush
*wxCYAN_BRUSH
;
98 wxBrush
*wxGREY_BRUSH
;
99 wxBrush
*wxMEDIUM_GREY_BRUSH
;
100 wxBrush
*wxLIGHT_GREY_BRUSH
;
109 wxColour
*wxLIGHT_GREY
;
111 wxCursor
*wxSTANDARD_CURSOR
= (wxCursor
*) NULL
;
112 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
113 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) NULL
;
116 wxAcceleratorTable wxNullAcceleratorTable
;
117 wxBitmap wxNullBitmap
;
119 wxCursor wxNullCursor
;
123 wxColour wxNullColour
;
124 wxPalette wxNullPalette
;
125 wxRegion wxNullRegion
;
127 /* Default window names */
128 const char *wxButtonNameStr
= "button";
129 const char *wxCanvasNameStr
= "canvas";
130 const char *wxCheckBoxNameStr
= "check";
131 const char *wxChoiceNameStr
= "choice";
132 const char *wxComboBoxNameStr
= "comboBox";
133 const char *wxDialogNameStr
= "dialog";
134 const char *wxFrameNameStr
= "frame";
135 const char *wxGaugeNameStr
= "gauge";
136 const char *wxStaticBoxNameStr
= "groupBox";
137 const char *wxListBoxNameStr
= "listBox";
138 const char *wxStaticTextNameStr
= "message";
139 const char *wxStaticBitmapNameStr
= "message";
140 const char *wxMultiTextNameStr
= "multitext";
141 const char *wxPanelNameStr
= "panel";
142 const char *wxRadioBoxNameStr
= "radioBox";
143 const char *wxRadioButtonNameStr
= "radioButton";
144 const char *wxBitmapRadioButtonNameStr
= "radioButton";
145 const char *wxScrollBarNameStr
= "scrollBar";
146 const char *wxSliderNameStr
= "slider";
147 const char *wxStaticNameStr
= "static";
148 const char *wxTextCtrlWindowNameStr
= "textWindow";
149 const char *wxTextCtrlNameStr
= "text";
150 const char *wxVirtListBoxNameStr
= "virtListBox";
151 const char *wxButtonBarNameStr
= "buttonbar";
152 const char *wxEnhDialogNameStr
= "Shell";
153 const char *wxToolBarNameStr
= "toolbar";
154 const char *wxStatusLineNameStr
= "status_line";
155 const char *wxEmptyString
= "";
156 const char *wxGetTextFromUserPromptStr
= "Input Text";
157 const char *wxMessageBoxCaptionStr
= "Message";
158 const char *wxFileSelectorPromptStr
= "Select a file";
159 const char *wxFileSelectorDefaultWildcardStr
= "*.*";
160 const char *wxInternalErrorStr
= "wxWindows Internal Error";
161 const char *wxFatalErrorStr
= "wxWindows Fatal Error";
164 const char *wxFloatToStringStr
= "%.2f";
165 const char *wxDoubleToStringStr
= "%.2f";
167 /* Dafaults for wxWindow etc. */
168 const wxSize
wxDefaultSize(-1, -1);
169 const wxPoint
wxDefaultPosition(-1, -1);