]> git.saurik.com Git - wxWidgets.git/blob - src/gtk/data.cpp
Unicode fixes
[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 #include "wx/accel.h"
19 #include "wx/dcps.h"
20 #include "wx/icon.h"
21
22 #define _MAXPATHLEN 500
23
24 /* Useful buffer, initialized in wxCommonInit */
25 wxChar *wxBuffer = (wxChar *) NULL;
26
27 /* Windows List */
28 wxWindowList wxTopLevelWindows;
29
30 /* List of windows pending deletion */
31 wxList wxPendingDelete;
32
33 /* Current cursor, in order to hang on to
34 * cursor handle when setting the cursor globally */
35 wxCursor g_globalCursor;
36
37 /* Don't allow event propagation during drag */
38 bool g_blockEventsOnDrag = FALSE;
39
40 /* Don't allow mouse event propagation during scroll */
41 bool g_blockEventsOnScroll = FALSE;
42
43 /* Don't allow window closing if there are open dialogs */
44 int g_openDialogs = 0;
45
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;
49
50 /* Message Strings for Internationalization */
51 char **wx_msg_str = (char**)NULL;
52
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;
58
59 /* For printing several pages */
60 int wxPageNumber;
61
62 // Now in prntbase.cpp
63 // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
64
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;
71
72 /* X only font names */
73 /*
74 wxFontNameDirectory *wxTheFontNameDirectory;
75 */
76
77 /* Stock objects */
78 wxFont *wxNORMAL_FONT;
79 wxFont *wxSMALL_FONT;
80 wxFont *wxITALIC_FONT;
81 wxFont *wxSWISS_FONT;
82
83 wxPen *wxRED_PEN;
84 wxPen *wxCYAN_PEN;
85 wxPen *wxGREEN_PEN;
86 wxPen *wxBLACK_PEN;
87 wxPen *wxWHITE_PEN;
88 wxPen *wxTRANSPARENT_PEN;
89 wxPen *wxBLACK_DASHED_PEN;
90 wxPen *wxGREY_PEN;
91 wxPen *wxMEDIUM_GREY_PEN;
92 wxPen *wxLIGHT_GREY_PEN;
93
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;
104
105 wxColour *wxBLACK;
106 wxColour *wxWHITE;
107 wxColour *wxGREY;
108 wxColour *wxRED;
109 wxColour *wxBLUE;
110 wxColour *wxGREEN;
111 wxColour *wxCYAN;
112 wxColour *wxLIGHT_GREY;
113
114 wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
115 wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
116 wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
117
118 /* 'Null' objects */
119 #if wxUSE_ACCEL
120 wxAcceleratorTable wxNullAcceleratorTable;
121 #endif // wxUSE_ACCEL
122
123 wxBitmap wxNullBitmap;
124 wxIcon wxNullIcon;
125 wxCursor wxNullCursor;
126 wxPen wxNullPen;
127 wxBrush wxNullBrush;
128 wxFont wxNullFont;
129 wxColour wxNullColour;
130 wxPalette wxNullPalette;
131
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");
170
171 /* See wx/utils.h */
172 const wxChar *wxFloatToStringStr = wxT("%.2f");
173 const wxChar *wxDoubleToStringStr = wxT("%.2f");
174
175 /* Dafaults for wxWindow etc. */
176 const wxSize wxDefaultSize(-1, -1);
177 const wxPoint wxDefaultPosition(-1, -1);