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