]> git.saurik.com Git - wxWidgets.git/blob - src/gtk1/data.cpp
Update with recent changes.
[wxWidgets.git] / src / gtk1 / 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 /* Windows List */
29 wxWindowList wxTopLevelWindows;
30
31 /* List of windows pending deletion */
32 wxList wxPendingDelete;
33
34 /* Current cursor, in order to hang on to
35 * cursor handle when setting the cursor globally */
36 wxCursor g_globalCursor;
37
38 /* Don't allow event propagation during drag */
39 bool g_blockEventsOnDrag = FALSE;
40
41 /* Don't allow mouse event propagation during scroll */
42 bool g_blockEventsOnScroll = FALSE;
43
44 /* Don't allow window closing if there are open dialogs */
45 int g_openDialogs = 0;
46
47 /* TRUE when the message queue is empty. this gets set to
48 FALSE by all event callbacks before anything else is done */
49 bool g_isIdle = FALSE;
50
51 /* Message Strings for Internationalization */
52 char **wx_msg_str = (char**)NULL;
53
54 /* For printing several pages */
55 int wxPageNumber;
56
57 // Now in prntbase.cpp
58 // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
59
60 /* GDI Object Lists */
61 wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
62 wxPenList *wxThePenList = (wxPenList *) NULL;
63 wxFontList *wxTheFontList = (wxFontList *) NULL;
64 wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
65 wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
66
67 /* X only font names */
68 /*
69 wxFontNameDirectory *wxTheFontNameDirectory;
70 */
71
72 /* Stock objects */
73 wxFont *wxNORMAL_FONT;
74 wxFont *wxSMALL_FONT;
75 wxFont *wxITALIC_FONT;
76 wxFont *wxSWISS_FONT;
77
78 wxPen *wxRED_PEN;
79 wxPen *wxCYAN_PEN;
80 wxPen *wxGREEN_PEN;
81 wxPen *wxBLACK_PEN;
82 wxPen *wxWHITE_PEN;
83 wxPen *wxTRANSPARENT_PEN;
84 wxPen *wxBLACK_DASHED_PEN;
85 wxPen *wxGREY_PEN;
86 wxPen *wxMEDIUM_GREY_PEN;
87 wxPen *wxLIGHT_GREY_PEN;
88
89 wxBrush *wxBLUE_BRUSH;
90 wxBrush *wxGREEN_BRUSH;
91 wxBrush *wxWHITE_BRUSH;
92 wxBrush *wxBLACK_BRUSH;
93 wxBrush *wxTRANSPARENT_BRUSH;
94 wxBrush *wxCYAN_BRUSH;
95 wxBrush *wxRED_BRUSH;
96 wxBrush *wxGREY_BRUSH;
97 wxBrush *wxMEDIUM_GREY_BRUSH;
98 wxBrush *wxLIGHT_GREY_BRUSH;
99
100 wxColour *wxBLACK;
101 wxColour *wxWHITE;
102 wxColour *wxGREY;
103 wxColour *wxRED;
104 wxColour *wxBLUE;
105 wxColour *wxGREEN;
106 wxColour *wxCYAN;
107 wxColour *wxLIGHT_GREY;
108
109 wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
110 wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
111 wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
112
113 /* 'Null' objects */
114 #if wxUSE_ACCEL
115 wxAcceleratorTable wxNullAcceleratorTable;
116 #endif // wxUSE_ACCEL
117
118 wxBitmap wxNullBitmap;
119 wxIcon wxNullIcon;
120 wxCursor wxNullCursor;
121 wxPen wxNullPen;
122 wxBrush wxNullBrush;
123 wxFont wxNullFont;
124 wxColour wxNullColour;
125 wxPalette wxNullPalette;
126
127 /* Default window names */
128 const wxChar *wxControlNameStr = wxT("control");
129 const wxChar *wxButtonNameStr = wxT("button");
130 const wxChar *wxCanvasNameStr = wxT("canvas");
131 const wxChar *wxCheckBoxNameStr = wxT("check");
132 const wxChar *wxChoiceNameStr = wxT("choice");
133 const wxChar *wxComboBoxNameStr = wxT("comboBox");
134 const wxChar *wxDialogNameStr = wxT("dialog");
135 const wxChar *wxFrameNameStr = wxT("frame");
136 const wxChar *wxGaugeNameStr = wxT("gauge");
137 const wxChar *wxStaticBoxNameStr = wxT("groupBox");
138 const wxChar *wxListBoxNameStr = wxT("listBox");
139 const wxChar *wxStaticTextNameStr = wxT("message");
140 const wxChar *wxStaticBitmapNameStr = wxT("message");
141 const wxChar *wxMultiTextNameStr = wxT("multitext");
142 const wxChar *wxPanelNameStr = wxT("panel");
143 const wxChar *wxRadioBoxNameStr = wxT("radioBox");
144 const wxChar *wxRadioButtonNameStr = wxT("radioButton");
145 const wxChar *wxBitmapRadioButtonNameStr = wxT("radioButton");
146 const wxChar *wxScrollBarNameStr = wxT("scrollBar");
147 const wxChar *wxSliderNameStr = wxT("slider");
148 const wxChar *wxStaticNameStr = wxT("static");
149 const wxChar *wxTextCtrlWindowNameStr = wxT("textWindow");
150 const wxChar *wxTextCtrlNameStr = wxT("text");
151 const wxChar *wxVirtListBoxNameStr = wxT("virtListBox");
152 const wxChar *wxButtonBarNameStr = wxT("buttonbar");
153 const wxChar *wxEnhDialogNameStr = wxT("Shell");
154 const wxChar *wxToolBarNameStr = wxT("toolbar");
155 const wxChar *wxStatusLineNameStr = wxT("status_line");
156 const wxChar *wxGetTextFromUserPromptStr = wxT("Input Text");
157 const wxChar *wxMessageBoxCaptionStr = wxT("Message");
158 const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
159 const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*");
160 const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
161 const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
162 const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
163
164 /* See wx/utils.h */
165 const wxChar *wxFloatToStringStr = wxT("%.2f");
166 const wxChar *wxDoubleToStringStr = wxT("%.2f");
167
168 /* Dafaults for wxWindow etc. */
169 const wxSize wxDefaultSize(-1, -1);
170 const wxPoint wxDefaultPosition(-1, -1);