]> git.saurik.com Git - wxWidgets.git/blob - src/gtk/data.cpp
some != NULL checks
[wxWidgets.git] / src / gtk / data.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: data.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifdef __GNUG__
11 // #pragma implementation
12 #endif
13
14 #include "wx/defs.h"
15 #include "wx/object.h"
16 #include "wx/window.h"
17 #include "wx/dc.h"
18
19 #if wxUSE_ACCEL
20 #include "wx/accel.h"
21 #endif
22
23 #include "wx/dcps.h"
24 #include "wx/icon.h"
25
26 #define _MAXPATHLEN 500
27
28 /* Useful buffer, initialized in wxCommonInit */
29 wxChar *wxBuffer = (wxChar *) NULL;
30
31 /* Windows List */
32 wxWindowList wxTopLevelWindows;
33
34 /* List of windows pending deletion */
35 wxList wxPendingDelete;
36
37 /* Current cursor, in order to hang on to
38 * cursor handle when setting the cursor globally */
39 wxCursor g_globalCursor;
40
41 /* Don't allow event propagation during drag */
42 bool g_blockEventsOnDrag = FALSE;
43
44 /* Don't allow mouse event propagation during scroll */
45 bool g_blockEventsOnScroll = FALSE;
46
47 /* Don't allow window closing if there are open dialogs */
48 int g_openDialogs = 0;
49
50 /* TRUE when the message queue is empty. this gets set to
51 FALSE by all event callbacks before anything else is done */
52 bool g_isIdle = FALSE;
53
54 /* Message Strings for Internationalization */
55 char **wx_msg_str = (char**)NULL;
56
57 /* Custom OS version, as optionally placed in wx.ini/.wxrc
58 * Currently this can be Win95, Windows, Win32s, WinNT.
59 * For some systems, you can't tell until run-time what services you
60 * have. See wxGetOsVersion, which uses this string if present. */
61 char *wxOsVersion = (char *) NULL;
62
63 /* For printing several pages */
64 int wxPageNumber;
65
66 // Now in prntbase.cpp
67 // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
68
69 /* GDI Object Lists */
70 wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
71 wxPenList *wxThePenList = (wxPenList *) NULL;
72 wxFontList *wxTheFontList = (wxFontList *) NULL;
73 wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
74 wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
75
76 /* X only font names */
77 /*
78 wxFontNameDirectory *wxTheFontNameDirectory;
79 */
80
81 /* Stock objects */
82 wxFont *wxNORMAL_FONT;
83 wxFont *wxSMALL_FONT;
84 wxFont *wxITALIC_FONT;
85 wxFont *wxSWISS_FONT;
86
87 wxPen *wxRED_PEN;
88 wxPen *wxCYAN_PEN;
89 wxPen *wxGREEN_PEN;
90 wxPen *wxBLACK_PEN;
91 wxPen *wxWHITE_PEN;
92 wxPen *wxTRANSPARENT_PEN;
93 wxPen *wxBLACK_DASHED_PEN;
94 wxPen *wxGREY_PEN;
95 wxPen *wxMEDIUM_GREY_PEN;
96 wxPen *wxLIGHT_GREY_PEN;
97
98 wxBrush *wxBLUE_BRUSH;
99 wxBrush *wxGREEN_BRUSH;
100 wxBrush *wxWHITE_BRUSH;
101 wxBrush *wxBLACK_BRUSH;
102 wxBrush *wxTRANSPARENT_BRUSH;
103 wxBrush *wxCYAN_BRUSH;
104 wxBrush *wxRED_BRUSH;
105 wxBrush *wxGREY_BRUSH;
106 wxBrush *wxMEDIUM_GREY_BRUSH;
107 wxBrush *wxLIGHT_GREY_BRUSH;
108
109 wxColour *wxBLACK;
110 wxColour *wxWHITE;
111 wxColour *wxGREY;
112 wxColour *wxRED;
113 wxColour *wxBLUE;
114 wxColour *wxGREEN;
115 wxColour *wxCYAN;
116 wxColour *wxLIGHT_GREY;
117
118 wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
119 wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
120 wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
121
122 /* 'Null' objects */
123 #if wxUSE_ACCEL
124 wxAcceleratorTable wxNullAcceleratorTable;
125 #endif // wxUSE_ACCEL
126
127 wxBitmap wxNullBitmap;
128 wxIcon wxNullIcon;
129 wxCursor wxNullCursor;
130 wxPen wxNullPen;
131 wxBrush wxNullBrush;
132 wxFont wxNullFont;
133 wxColour wxNullColour;
134 wxPalette wxNullPalette;
135
136 /* Default window names */
137 const wxChar *wxControlNameStr = wxT("control");
138 const wxChar *wxButtonNameStr = wxT("button");
139 const wxChar *wxCanvasNameStr = wxT("canvas");
140 const wxChar *wxCheckBoxNameStr = wxT("check");
141 const wxChar *wxChoiceNameStr = wxT("choice");
142 const wxChar *wxComboBoxNameStr = wxT("comboBox");
143 const wxChar *wxDialogNameStr = wxT("dialog");
144 const wxChar *wxFrameNameStr = wxT("frame");
145 const wxChar *wxGaugeNameStr = wxT("gauge");
146 const wxChar *wxStaticBoxNameStr = wxT("groupBox");
147 const wxChar *wxListBoxNameStr = wxT("listBox");
148 const wxChar *wxStaticTextNameStr = wxT("message");
149 const wxChar *wxStaticBitmapNameStr = wxT("message");
150 const wxChar *wxMultiTextNameStr = wxT("multitext");
151 const wxChar *wxPanelNameStr = wxT("panel");
152 const wxChar *wxRadioBoxNameStr = wxT("radioBox");
153 const wxChar *wxRadioButtonNameStr = wxT("radioButton");
154 const wxChar *wxBitmapRadioButtonNameStr = wxT("radioButton");
155 const wxChar *wxScrollBarNameStr = wxT("scrollBar");
156 const wxChar *wxSliderNameStr = wxT("slider");
157 const wxChar *wxStaticNameStr = wxT("static");
158 const wxChar *wxTextCtrlWindowNameStr = wxT("textWindow");
159 const wxChar *wxTextCtrlNameStr = wxT("text");
160 const wxChar *wxVirtListBoxNameStr = wxT("virtListBox");
161 const wxChar *wxButtonBarNameStr = wxT("buttonbar");
162 const wxChar *wxEnhDialogNameStr = wxT("Shell");
163 const wxChar *wxToolBarNameStr = wxT("toolbar");
164 const wxChar *wxStatusLineNameStr = wxT("status_line");
165 const wxChar *wxGetTextFromUserPromptStr = wxT("Input Text");
166 const wxChar *wxMessageBoxCaptionStr = wxT("Message");
167 const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
168 const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*");
169 const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
170 const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
171 const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
172 const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
173 const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
174
175 /* See wx/utils.h */
176 const wxChar *wxFloatToStringStr = wxT("%.2f");
177 const wxChar *wxDoubleToStringStr = wxT("%.2f");
178
179 /* Dafaults for wxWindow etc. */
180 const wxSize wxDefaultSize(-1, -1);
181 const wxPoint wxDefaultPosition(-1, -1);