]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/gtk/data.cpp
wxDateTime progress: DST compuation, weekday computation, day-in-year and week
[wxWidgets.git] / src / gtk / 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
11#ifdef __GNUG__
12// #pragma implementation
13#endif
14
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"
20#include "wx/dcps.h"
21#include "wx/icon.h"
22
23#define _MAXPATHLEN 500
24
25/* Used for X resources */
26#include <X11/Xlib.h>
27#include <X11/Xutil.h>
28#include <X11/Xresource.h>
29
30wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
31XrmDatabase wxResourceDatabase;
32
33/* Useful buffer, initialized in wxCommonInit */
34wxChar *wxBuffer = (wxChar *) NULL;
35
36/* Windows List */
37wxWindowList wxTopLevelWindows;
38
39/* List of windows pending deletion */
40wxList wxPendingDelete;
41
42/* Current cursor, in order to hang on to
43 * cursor handle when setting the cursor globally */
44wxCursor g_globalCursor;
45
46/* Don't allow event propagation during drag */
47bool g_blockEventsOnDrag = FALSE;
48
49/* Don't allow mouse event propagation during scroll */
50bool g_blockEventsOnScroll = FALSE;
51
52/* Don't allow window closing if there are open dialogs */
53int g_openDialogs = 0;
54
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
59/* Message Strings for Internationalization */
60char **wx_msg_str = (char**)NULL;
61
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. */
66char *wxOsVersion = (char *) NULL;
67
68/* For printing several pages */
69int wxPageNumber;
70
71// Now in prntbase.cpp
72// wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
73
74/* GDI Object Lists */
75wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
76wxPenList *wxThePenList = (wxPenList *) NULL;
77wxFontList *wxTheFontList = (wxFontList *) NULL;
78wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
79wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
80
81/* X only font names */
82/*
83wxFontNameDirectory *wxTheFontNameDirectory;
84*/
85
86/* Stock objects */
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;
116wxColour *wxGREY;
117wxColour *wxRED;
118wxColour *wxBLUE;
119wxColour *wxGREEN;
120wxColour *wxCYAN;
121wxColour *wxLIGHT_GREY;
122
123wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
124wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
125wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
126
127/* 'Null' objects */
128#if wxUSE_ACCEL
129 wxAcceleratorTable wxNullAcceleratorTable;
130#endif // wxUSE_ACCEL
131
132wxBitmap wxNullBitmap;
133wxIcon wxNullIcon;
134wxCursor wxNullCursor;
135wxPen wxNullPen;
136wxBrush wxNullBrush;
137wxFont wxNullFont;
138wxColour wxNullColour;
139wxPalette wxNullPalette;
140
141/* Default window names */
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("/");
177const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
178
179/* See wx/utils.h */
180const wxChar *wxFloatToStringStr = wxT("%.2f");
181const wxChar *wxDoubleToStringStr = wxT("%.2f");
182
183/* Dafaults for wxWindow etc. */
184const wxSize wxDefaultSize(-1, -1);
185const wxPoint wxDefaultPosition(-1, -1);