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