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