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