1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 // #pragma implementation
15 #include "wx/object.h"
16 #include "wx/window.h"
22 #define _MAXPATHLEN 500
24 /* Useful buffer, initialized in wxCommonInit */
25 wxChar
*wxBuffer
= (wxChar
*) NULL
;
28 wxWindowList wxTopLevelWindows
;
30 /* List of windows pending deletion */
31 wxList wxPendingDelete
;
33 /* Current cursor, in order to hang on to
34 * cursor handle when setting the cursor globally */
35 wxCursor g_globalCursor
;
37 /* Don't allow event propagation during drag */
38 bool g_blockEventsOnDrag
= FALSE
;
40 /* Don't allow mouse event propagation during scroll */
41 bool g_blockEventsOnScroll
= FALSE
;
43 /* Don't allow window closing if there are open dialogs */
44 int g_openDialogs
= 0;
46 /* TRUE when the message queue is empty. this gets set to
47 FALSE by all event callbacks before anything else is done */
48 bool g_isIdle
= FALSE
;
50 /* Message Strings for Internationalization */
51 char **wx_msg_str
= (char**)NULL
;
53 /* Custom OS version, as optionally placed in wx.ini/.wxrc
54 * Currently this can be Win95, Windows, Win32s, WinNT.
55 * For some systems, you can't tell until run-time what services you
56 * have. See wxGetOsVersion, which uses this string if present. */
57 char *wxOsVersion
= (char *) NULL
;
59 /* For printing several pages */
62 // Now in prntbase.cpp
63 // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
65 /* GDI Object Lists */
66 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
67 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
68 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
69 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
70 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) NULL
;
72 /* X only font names */
74 wxFontNameDirectory *wxTheFontNameDirectory;
78 wxFont
*wxNORMAL_FONT
;
80 wxFont
*wxITALIC_FONT
;
88 wxPen
*wxTRANSPARENT_PEN
;
89 wxPen
*wxBLACK_DASHED_PEN
;
91 wxPen
*wxMEDIUM_GREY_PEN
;
92 wxPen
*wxLIGHT_GREY_PEN
;
94 wxBrush
*wxBLUE_BRUSH
;
95 wxBrush
*wxGREEN_BRUSH
;
96 wxBrush
*wxWHITE_BRUSH
;
97 wxBrush
*wxBLACK_BRUSH
;
98 wxBrush
*wxTRANSPARENT_BRUSH
;
99 wxBrush
*wxCYAN_BRUSH
;
100 wxBrush
*wxRED_BRUSH
;
101 wxBrush
*wxGREY_BRUSH
;
102 wxBrush
*wxMEDIUM_GREY_BRUSH
;
103 wxBrush
*wxLIGHT_GREY_BRUSH
;
112 wxColour
*wxLIGHT_GREY
;
114 wxCursor
*wxSTANDARD_CURSOR
= (wxCursor
*) NULL
;
115 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
116 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) NULL
;
120 wxAcceleratorTable wxNullAcceleratorTable
;
121 #endif // wxUSE_ACCEL
123 wxBitmap wxNullBitmap
;
125 wxCursor wxNullCursor
;
129 wxColour wxNullColour
;
130 wxPalette wxNullPalette
;
132 /* Default window names */
133 const wxChar
*wxControlNameStr
= wxT("control");
134 const wxChar
*wxButtonNameStr
= wxT("button");
135 const wxChar
*wxCanvasNameStr
= wxT("canvas");
136 const wxChar
*wxCheckBoxNameStr
= wxT("check");
137 const wxChar
*wxChoiceNameStr
= wxT("choice");
138 const wxChar
*wxComboBoxNameStr
= wxT("comboBox");
139 const wxChar
*wxDialogNameStr
= wxT("dialog");
140 const wxChar
*wxFrameNameStr
= wxT("frame");
141 const wxChar
*wxGaugeNameStr
= wxT("gauge");
142 const wxChar
*wxStaticBoxNameStr
= wxT("groupBox");
143 const wxChar
*wxListBoxNameStr
= wxT("listBox");
144 const wxChar
*wxStaticTextNameStr
= wxT("message");
145 const wxChar
*wxStaticBitmapNameStr
= wxT("message");
146 const wxChar
*wxMultiTextNameStr
= wxT("multitext");
147 const wxChar
*wxPanelNameStr
= wxT("panel");
148 const wxChar
*wxRadioBoxNameStr
= wxT("radioBox");
149 const wxChar
*wxRadioButtonNameStr
= wxT("radioButton");
150 const wxChar
*wxBitmapRadioButtonNameStr
= wxT("radioButton");
151 const wxChar
*wxScrollBarNameStr
= wxT("scrollBar");
152 const wxChar
*wxSliderNameStr
= wxT("slider");
153 const wxChar
*wxStaticNameStr
= wxT("static");
154 const wxChar
*wxTextCtrlWindowNameStr
= wxT("textWindow");
155 const wxChar
*wxTextCtrlNameStr
= wxT("text");
156 const wxChar
*wxVirtListBoxNameStr
= wxT("virtListBox");
157 const wxChar
*wxButtonBarNameStr
= wxT("buttonbar");
158 const wxChar
*wxEnhDialogNameStr
= wxT("Shell");
159 const wxChar
*wxToolBarNameStr
= wxT("toolbar");
160 const wxChar
*wxStatusLineNameStr
= wxT("status_line");
161 const wxChar
*wxGetTextFromUserPromptStr
= wxT("Input Text");
162 const wxChar
*wxMessageBoxCaptionStr
= wxT("Message");
163 const wxChar
*wxFileSelectorPromptStr
= wxT("Select a file");
164 const wxChar
*wxFileSelectorDefaultWildcardStr
= wxT("*");
165 const wxChar
*wxInternalErrorStr
= wxT("wxWindows Internal Error");
166 const wxChar
*wxFatalErrorStr
= wxT("wxWindows Fatal Error");
167 const wxChar
*wxDirDialogNameStr
= wxT("wxDirCtrl");
168 const wxChar
*wxDirDialogDefaultFolderStr
= wxT("/");
169 const wxChar
*wxTreeCtrlNameStr
= wxT("wxTreeCtrl");
172 const wxChar
*wxFloatToStringStr
= wxT("%.2f");
173 const wxChar
*wxDoubleToStringStr
= wxT("%.2f");
175 /* Dafaults for wxWindow etc. */
176 const wxSize
wxDefaultSize(-1, -1);
177 const wxPoint
wxDefaultPosition(-1, -1);