]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: data.cpp | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
dbf858b5 RR |
5 | // Id: $Id$ |
6 | // Copyright: (c) 1998 Robert Roebling | |
a3622daa | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
c801d85f KB |
10 | #ifdef __GNUG__ |
11 | // #pragma implementation | |
12 | #endif | |
13 | ||
bcf1fa6b RR |
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" | |
bf38cbff | 19 | #include "wx/dcps.h" |
88ac883a | 20 | #include "wx/icon.h" |
c801d85f KB |
21 | |
22 | #define _MAXPATHLEN 500 | |
23 | ||
83624f79 | 24 | /* Useful buffer, initialized in wxCommonInit */ |
7dd62924 | 25 | wxChar *wxBuffer = (wxChar *) NULL; |
c801d85f | 26 | |
83624f79 | 27 | /* Windows List */ |
e146b8c8 | 28 | wxWindowList wxTopLevelWindows; |
c801d85f | 29 | |
83624f79 | 30 | /* List of windows pending deletion */ |
c801d85f KB |
31 | wxList wxPendingDelete; |
32 | ||
83624f79 RR |
33 | /* Current cursor, in order to hang on to |
34 | * cursor handle when setting the cursor globally */ | |
238d735d | 35 | wxCursor g_globalCursor; |
c801d85f | 36 | |
83624f79 | 37 | /* Don't allow event propagation during drag */ |
c801d85f KB |
38 | bool g_blockEventsOnDrag = FALSE; |
39 | ||
83624f79 | 40 | /* Don't allow mouse event propagation during scroll */ |
76ed8f8d RR |
41 | bool g_blockEventsOnScroll = FALSE; |
42 | ||
2d68e1b4 RR |
43 | /* Don't allow window closing if there are open dialogs */ |
44 | int g_openDialogs = 0; | |
45 | ||
acfd422a RR |
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 | ||
83624f79 | 50 | /* Message Strings for Internationalization */ |
c801d85f KB |
51 | char **wx_msg_str = (char**)NULL; |
52 | ||
83624f79 RR |
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. */ | |
c67daf87 | 57 | char *wxOsVersion = (char *) NULL; |
c801d85f | 58 | |
83624f79 | 59 | /* For printing several pages */ |
c801d85f | 60 | int wxPageNumber; |
2a47d3c1 JS |
61 | |
62 | // Now in prntbase.cpp | |
63 | // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; | |
c801d85f | 64 | |
83624f79 | 65 | /* GDI Object Lists */ |
c67daf87 UR |
66 | wxBrushList *wxTheBrushList = (wxBrushList *) NULL; |
67 | wxPenList *wxThePenList = (wxPenList *) NULL; | |
68 | wxFontList *wxTheFontList = (wxFontList *) NULL; | |
69 | wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; | |
83624f79 | 70 | wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; |
e146b8c8 | 71 | |
83624f79 | 72 | /* X only font names */ |
36b3b54a | 73 | /* |
a3622daa | 74 | wxFontNameDirectory *wxTheFontNameDirectory; |
36b3b54a | 75 | */ |
c801d85f | 76 | |
83624f79 | 77 | /* Stock objects */ |
c801d85f KB |
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; | |
e146b8c8 | 107 | wxColour *wxGREY; |
c801d85f KB |
108 | wxColour *wxRED; |
109 | wxColour *wxBLUE; | |
110 | wxColour *wxGREEN; | |
111 | wxColour *wxCYAN; | |
112 | wxColour *wxLIGHT_GREY; | |
113 | ||
c67daf87 UR |
114 | wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; |
115 | wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; | |
116 | wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; | |
c801d85f | 117 | |
83624f79 | 118 | /* 'Null' objects */ |
88ac883a VZ |
119 | #if wxUSE_ACCEL |
120 | wxAcceleratorTable wxNullAcceleratorTable; | |
121 | #endif // wxUSE_ACCEL | |
122 | ||
bcf1fa6b | 123 | wxBitmap wxNullBitmap; |
e146b8c8 | 124 | wxIcon wxNullIcon; |
bcf1fa6b RR |
125 | wxCursor wxNullCursor; |
126 | wxPen wxNullPen; | |
127 | wxBrush wxNullBrush; | |
128 | wxFont wxNullFont; | |
129 | wxColour wxNullColour; | |
e146b8c8 | 130 | wxPalette wxNullPalette; |
c801d85f | 131 | |
83624f79 | 132 | /* Default window names */ |
8d772832 | 133 | const wxChar *wxControlNameStr = wxT("control"); |
223d09f6 KB |
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("/"); | |
9ec64fa7 | 169 | const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl"); |
c801d85f | 170 | |
83624f79 | 171 | /* See wx/utils.h */ |
223d09f6 KB |
172 | const wxChar *wxFloatToStringStr = wxT("%.2f"); |
173 | const wxChar *wxDoubleToStringStr = wxT("%.2f"); | |
c801d85f | 174 | |
83624f79 | 175 | /* Dafaults for wxWindow etc. */ |
c801d85f KB |
176 | const wxSize wxDefaultSize(-1, -1); |
177 | const wxPoint wxDefaultPosition(-1, -1); |