]>
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 | /* Windows List */ |
e146b8c8 | 29 | wxWindowList wxTopLevelWindows; |
c801d85f | 30 | |
83624f79 | 31 | /* List of windows pending deletion */ |
c801d85f KB |
32 | wxList wxPendingDelete; |
33 | ||
83624f79 RR |
34 | /* Current cursor, in order to hang on to |
35 | * cursor handle when setting the cursor globally */ | |
238d735d | 36 | wxCursor g_globalCursor; |
c801d85f | 37 | |
83624f79 | 38 | /* Don't allow event propagation during drag */ |
c801d85f KB |
39 | bool g_blockEventsOnDrag = FALSE; |
40 | ||
83624f79 | 41 | /* Don't allow mouse event propagation during scroll */ |
76ed8f8d RR |
42 | bool g_blockEventsOnScroll = FALSE; |
43 | ||
2d68e1b4 RR |
44 | /* Don't allow window closing if there are open dialogs */ |
45 | int g_openDialogs = 0; | |
46 | ||
acfd422a RR |
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 | ||
83624f79 | 51 | /* Message Strings for Internationalization */ |
c801d85f KB |
52 | char **wx_msg_str = (char**)NULL; |
53 | ||
83624f79 | 54 | /* For printing several pages */ |
c801d85f | 55 | int wxPageNumber; |
2a47d3c1 JS |
56 | |
57 | // Now in prntbase.cpp | |
58 | // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; | |
c801d85f | 59 | |
83624f79 | 60 | /* GDI Object Lists */ |
c67daf87 UR |
61 | wxBrushList *wxTheBrushList = (wxBrushList *) NULL; |
62 | wxPenList *wxThePenList = (wxPenList *) NULL; | |
63 | wxFontList *wxTheFontList = (wxFontList *) NULL; | |
64 | wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; | |
83624f79 | 65 | wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; |
e146b8c8 | 66 | |
83624f79 | 67 | /* X only font names */ |
36b3b54a | 68 | /* |
a3622daa | 69 | wxFontNameDirectory *wxTheFontNameDirectory; |
36b3b54a | 70 | */ |
c801d85f | 71 | |
83624f79 | 72 | /* Stock objects */ |
c801d85f KB |
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; | |
e146b8c8 | 102 | wxColour *wxGREY; |
c801d85f KB |
103 | wxColour *wxRED; |
104 | wxColour *wxBLUE; | |
105 | wxColour *wxGREEN; | |
106 | wxColour *wxCYAN; | |
107 | wxColour *wxLIGHT_GREY; | |
108 | ||
c67daf87 UR |
109 | wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; |
110 | wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; | |
111 | wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; | |
c801d85f | 112 | |
83624f79 | 113 | /* 'Null' objects */ |
88ac883a VZ |
114 | #if wxUSE_ACCEL |
115 | wxAcceleratorTable wxNullAcceleratorTable; | |
116 | #endif // wxUSE_ACCEL | |
117 | ||
bcf1fa6b | 118 | wxBitmap wxNullBitmap; |
e146b8c8 | 119 | wxIcon wxNullIcon; |
bcf1fa6b RR |
120 | wxCursor wxNullCursor; |
121 | wxPen wxNullPen; | |
122 | wxBrush wxNullBrush; | |
123 | wxFont wxNullFont; | |
124 | wxColour wxNullColour; | |
e146b8c8 | 125 | wxPalette wxNullPalette; |
c801d85f | 126 | |
83624f79 | 127 | /* Default window names */ |
8d772832 | 128 | const wxChar *wxControlNameStr = wxT("control"); |
223d09f6 KB |
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 *wxInternalErrorStr = wxT("wxWindows Internal Error"); | |
161 | const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error"); | |
162 | const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl"); | |
163 | const wxChar *wxDirDialogDefaultFolderStr = wxT("/"); | |
9ec64fa7 | 164 | const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl"); |
c801d85f | 165 | |
83624f79 | 166 | /* See wx/utils.h */ |
223d09f6 KB |
167 | const wxChar *wxFloatToStringStr = wxT("%.2f"); |
168 | const wxChar *wxDoubleToStringStr = wxT("%.2f"); | |
c801d85f | 169 | |
83624f79 | 170 | /* Dafaults for wxWindow etc. */ |
c801d85f KB |
171 | const wxSize wxDefaultSize(-1, -1); |
172 | const wxPoint wxDefaultPosition(-1, -1); |