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