]>
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" | |
3d2d8da1 RR |
18 | |
19 | #if wxUSE_ACCEL | |
bcf1fa6b | 20 | #include "wx/accel.h" |
3d2d8da1 RR |
21 | #endif |
22 | ||
bf38cbff | 23 | #include "wx/dcps.h" |
88ac883a | 24 | #include "wx/icon.h" |
c801d85f KB |
25 | |
26 | #define _MAXPATHLEN 500 | |
27 | ||
83624f79 | 28 | /* Useful buffer, initialized in wxCommonInit */ |
7dd62924 | 29 | wxChar *wxBuffer = (wxChar *) NULL; |
c801d85f | 30 | |
83624f79 | 31 | /* Windows List */ |
e146b8c8 | 32 | wxWindowList wxTopLevelWindows; |
c801d85f | 33 | |
83624f79 | 34 | /* List of windows pending deletion */ |
c801d85f KB |
35 | wxList wxPendingDelete; |
36 | ||
83624f79 RR |
37 | /* Current cursor, in order to hang on to |
38 | * cursor handle when setting the cursor globally */ | |
238d735d | 39 | wxCursor g_globalCursor; |
c801d85f | 40 | |
83624f79 | 41 | /* Don't allow event propagation during drag */ |
c801d85f KB |
42 | bool g_blockEventsOnDrag = FALSE; |
43 | ||
83624f79 | 44 | /* Don't allow mouse event propagation during scroll */ |
76ed8f8d RR |
45 | bool g_blockEventsOnScroll = FALSE; |
46 | ||
2d68e1b4 RR |
47 | /* Don't allow window closing if there are open dialogs */ |
48 | int g_openDialogs = 0; | |
49 | ||
acfd422a RR |
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 | ||
83624f79 | 54 | /* Message Strings for Internationalization */ |
c801d85f KB |
55 | char **wx_msg_str = (char**)NULL; |
56 | ||
83624f79 | 57 | /* For printing several pages */ |
c801d85f | 58 | int wxPageNumber; |
2a47d3c1 JS |
59 | |
60 | // Now in prntbase.cpp | |
61 | // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; | |
c801d85f | 62 | |
83624f79 | 63 | /* GDI Object Lists */ |
c67daf87 UR |
64 | wxBrushList *wxTheBrushList = (wxBrushList *) NULL; |
65 | wxPenList *wxThePenList = (wxPenList *) NULL; | |
66 | wxFontList *wxTheFontList = (wxFontList *) NULL; | |
67 | wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; | |
83624f79 | 68 | wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; |
e146b8c8 | 69 | |
83624f79 | 70 | /* X only font names */ |
36b3b54a | 71 | /* |
a3622daa | 72 | wxFontNameDirectory *wxTheFontNameDirectory; |
36b3b54a | 73 | */ |
c801d85f | 74 | |
83624f79 | 75 | /* Stock objects */ |
c801d85f KB |
76 | wxFont *wxNORMAL_FONT; |
77 | wxFont *wxSMALL_FONT; | |
78 | wxFont *wxITALIC_FONT; | |
79 | wxFont *wxSWISS_FONT; | |
80 | ||
81 | wxPen *wxRED_PEN; | |
82 | wxPen *wxCYAN_PEN; | |
83 | wxPen *wxGREEN_PEN; | |
84 | wxPen *wxBLACK_PEN; | |
85 | wxPen *wxWHITE_PEN; | |
86 | wxPen *wxTRANSPARENT_PEN; | |
87 | wxPen *wxBLACK_DASHED_PEN; | |
88 | wxPen *wxGREY_PEN; | |
89 | wxPen *wxMEDIUM_GREY_PEN; | |
90 | wxPen *wxLIGHT_GREY_PEN; | |
91 | ||
92 | wxBrush *wxBLUE_BRUSH; | |
93 | wxBrush *wxGREEN_BRUSH; | |
94 | wxBrush *wxWHITE_BRUSH; | |
95 | wxBrush *wxBLACK_BRUSH; | |
96 | wxBrush *wxTRANSPARENT_BRUSH; | |
97 | wxBrush *wxCYAN_BRUSH; | |
98 | wxBrush *wxRED_BRUSH; | |
99 | wxBrush *wxGREY_BRUSH; | |
100 | wxBrush *wxMEDIUM_GREY_BRUSH; | |
101 | wxBrush *wxLIGHT_GREY_BRUSH; | |
102 | ||
103 | wxColour *wxBLACK; | |
104 | wxColour *wxWHITE; | |
e146b8c8 | 105 | wxColour *wxGREY; |
c801d85f KB |
106 | wxColour *wxRED; |
107 | wxColour *wxBLUE; | |
108 | wxColour *wxGREEN; | |
109 | wxColour *wxCYAN; | |
110 | wxColour *wxLIGHT_GREY; | |
111 | ||
c67daf87 UR |
112 | wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; |
113 | wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; | |
114 | wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; | |
c801d85f | 115 | |
83624f79 | 116 | /* 'Null' objects */ |
88ac883a VZ |
117 | #if wxUSE_ACCEL |
118 | wxAcceleratorTable wxNullAcceleratorTable; | |
119 | #endif // wxUSE_ACCEL | |
120 | ||
bcf1fa6b | 121 | wxBitmap wxNullBitmap; |
e146b8c8 | 122 | wxIcon wxNullIcon; |
bcf1fa6b RR |
123 | wxCursor wxNullCursor; |
124 | wxPen wxNullPen; | |
125 | wxBrush wxNullBrush; | |
126 | wxFont wxNullFont; | |
127 | wxColour wxNullColour; | |
e146b8c8 | 128 | wxPalette wxNullPalette; |
c801d85f | 129 | |
83624f79 | 130 | /* Default window names */ |
8d772832 | 131 | const wxChar *wxControlNameStr = wxT("control"); |
223d09f6 KB |
132 | const wxChar *wxButtonNameStr = wxT("button"); |
133 | const wxChar *wxCanvasNameStr = wxT("canvas"); | |
134 | const wxChar *wxCheckBoxNameStr = wxT("check"); | |
135 | const wxChar *wxChoiceNameStr = wxT("choice"); | |
136 | const wxChar *wxComboBoxNameStr = wxT("comboBox"); | |
137 | const wxChar *wxDialogNameStr = wxT("dialog"); | |
138 | const wxChar *wxFrameNameStr = wxT("frame"); | |
139 | const wxChar *wxGaugeNameStr = wxT("gauge"); | |
140 | const wxChar *wxStaticBoxNameStr = wxT("groupBox"); | |
141 | const wxChar *wxListBoxNameStr = wxT("listBox"); | |
142 | const wxChar *wxStaticTextNameStr = wxT("message"); | |
143 | const wxChar *wxStaticBitmapNameStr = wxT("message"); | |
144 | const wxChar *wxMultiTextNameStr = wxT("multitext"); | |
145 | const wxChar *wxPanelNameStr = wxT("panel"); | |
146 | const wxChar *wxRadioBoxNameStr = wxT("radioBox"); | |
147 | const wxChar *wxRadioButtonNameStr = wxT("radioButton"); | |
148 | const wxChar *wxBitmapRadioButtonNameStr = wxT("radioButton"); | |
149 | const wxChar *wxScrollBarNameStr = wxT("scrollBar"); | |
150 | const wxChar *wxSliderNameStr = wxT("slider"); | |
151 | const wxChar *wxStaticNameStr = wxT("static"); | |
152 | const wxChar *wxTextCtrlWindowNameStr = wxT("textWindow"); | |
153 | const wxChar *wxTextCtrlNameStr = wxT("text"); | |
154 | const wxChar *wxVirtListBoxNameStr = wxT("virtListBox"); | |
155 | const wxChar *wxButtonBarNameStr = wxT("buttonbar"); | |
156 | const wxChar *wxEnhDialogNameStr = wxT("Shell"); | |
157 | const wxChar *wxToolBarNameStr = wxT("toolbar"); | |
158 | const wxChar *wxStatusLineNameStr = wxT("status_line"); | |
159 | const wxChar *wxGetTextFromUserPromptStr = wxT("Input Text"); | |
160 | const wxChar *wxMessageBoxCaptionStr = wxT("Message"); | |
161 | const wxChar *wxFileSelectorPromptStr = wxT("Select a file"); | |
162 | const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*"); | |
163 | const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error"); | |
164 | const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error"); | |
165 | const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl"); | |
166 | const wxChar *wxDirDialogDefaultFolderStr = wxT("/"); | |
9ec64fa7 | 167 | const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl"); |
c801d85f | 168 | |
83624f79 | 169 | /* See wx/utils.h */ |
223d09f6 KB |
170 | const wxChar *wxFloatToStringStr = wxT("%.2f"); |
171 | const wxChar *wxDoubleToStringStr = wxT("%.2f"); | |
c801d85f | 172 | |
83624f79 | 173 | /* Dafaults for wxWindow etc. */ |
c801d85f KB |
174 | const wxSize wxDefaultSize(-1, -1); |
175 | const wxPoint wxDefaultPosition(-1, -1); |