move some data definitions to more appropriate places

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2006-05-26 16:12:31 +00:00
parent b4446c2447
commit e7445ff8ee
40 changed files with 50 additions and 123 deletions

View File

@ -93,8 +93,6 @@ protected:
// global variables
// ---------------------------------------------------------------------------
extern WXDLLEXPORT_DATA(int) wxPageNumber;
// ---------------------------------------------------------------------------
// wxDC is the device context - object on which any drawing is done
// ---------------------------------------------------------------------------

View File

@ -676,9 +676,6 @@ extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[];
extern WXDLLEXPORT_DATA(const wxSize) wxDefaultSize;
extern WXDLLEXPORT_DATA(const wxPoint) wxDefaultPosition;
// The list of objects which should be deleted
extern WXDLLEXPORT_DATA(wxList) wxPendingDelete;
// ---------------------------------------------------------------------------
// global functions
// ---------------------------------------------------------------------------

View File

@ -11,16 +11,19 @@
#ifndef _WX_DCPSG_H_
#define _WX_DCPSG_H_
#include "wx/dc.h"
#include "wx/defs.h"
#if wxUSE_PRINTING_ARCHITECTURE
#if wxUSE_POSTSCRIPT
#include "wx/dc.h"
#include "wx/dialog.h"
#include "wx/module.h"
#include "wx/cmndata.h"
extern WXDLLIMPEXP_DATA_CORE(int) wxPageNumber;
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------

View File

@ -34,9 +34,6 @@
#endif
extern int wxPageNumber;
class wxMacPortStateHelper;
class WXDLLEXPORT wxGraphicPath

View File

@ -37,8 +37,6 @@
// global variables
//-----------------------------------------------------------------------------
extern int wxPageNumber;
class wxMacPortStateHelper ;
//-----------------------------------------------------------------------------
// wxDC

View File

@ -111,7 +111,6 @@ WXDLLEXPORT_DATA(extern const wxChar) wxBitmapRadioButtonNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxScrollBarNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxSliderNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxTextCtrlNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxEnhDialogNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxToolBarNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxStatusLineNameStr[];
WXDLLEXPORT_DATA(extern const wxChar) wxGetTextFromUserPromptStr[];

View File

@ -113,6 +113,7 @@ WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode, class
// ----------------------------------------------------------------------------
extern WXDLLEXPORT_DATA(wxWindowList) wxTopLevelWindows;
extern WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete;
// ----------------------------------------------------------------------------
// wxWindowBase is the base class for all GUI controls/widgets, this is the public

View File

@ -55,6 +55,7 @@
#include "wx/build.h"
WX_CHECK_BUILD_OPTIONS("wxCore")
WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete;
// ----------------------------------------------------------------------------
// wxEventLoopPtr

View File

@ -30,6 +30,8 @@
#include "wx/choice.h"
#endif
WXDLLIMPEXP_DATA_CORE(const wxChar) wxChoiceNameStr[] = wxT("choice");
// ============================================================================
// implementation
// ============================================================================

View File

@ -38,6 +38,8 @@
#include "wx/statbmp.h"
#endif // wxUSE_STATBMP
WXDLLIMPEXP_DATA_CORE(const wxChar) wxControlNameStr[] = wxT("control");
// ============================================================================
// implementation
// ============================================================================

View File

@ -25,56 +25,25 @@
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#include "wx/treectrl.h"
#endif // WX_PRECOMP
#include "wx/accel.h"
// ============================================================================
// implementation
// ============================================================================
// Useful buffer, initialized in wxCommonInit
wxChar *wxBuffer = NULL;
// Windows List
wxWindowList wxTopLevelWindows;
// List of windows pending deletion
wxList WXDLLEXPORT wxPendingDelete;
int wxPageNumber;
// GDI Object Lists
wxFontList *wxTheFontList = NULL;
wxPenList *wxThePenList = NULL;
wxBrushList *wxTheBrushList = NULL;
wxColourDatabase *wxTheColourDatabase = NULL;
// 'Null' objects
#if wxUSE_ACCEL
wxAcceleratorTable wxNullAcceleratorTable;
#endif // wxUSE_ACCEL
wxBitmap wxNullBitmap;
wxIcon wxNullIcon;
wxCursor wxNullCursor;
wxPen wxNullPen;
wxBrush wxNullBrush;
#if wxUSE_PALETTE
wxPalette wxNullPalette;
#endif // wxUSE_PALETTE
wxFont wxNullFont;
wxColour wxNullColour;
// Default window names
extern WXDLLEXPORT_DATA(const wxChar) wxControlNameStr[] = wxT("control");
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[] = wxT("button");
extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[] = wxT("check");
extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[] = wxT("choice");
extern WXDLLEXPORT_DATA(const wxChar) wxComboBoxNameStr[] = wxT("comboBox");
extern WXDLLEXPORT_DATA(const wxChar) wxDialogNameStr[] = wxT("dialog");
extern WXDLLEXPORT_DATA(const wxChar) wxFrameNameStr[] = wxT("frame");
extern WXDLLEXPORT_DATA(const wxChar) wxGaugeNameStr[] = wxT("gauge");
extern WXDLLEXPORT_DATA(const wxChar) wxStaticBoxNameStr[] = wxT("groupBox");
extern WXDLLEXPORT_DATA(const wxChar) wxListBoxNameStr[] = wxT("listBox");
extern WXDLLEXPORT_DATA(const wxChar) wxListCtrlNameStr[] = wxT("listCtrl");
@ -90,13 +59,9 @@ extern WXDLLEXPORT_DATA(const wxChar) wxSliderNameStr[] = wxT("slider");
extern WXDLLEXPORT_DATA(const wxChar) wxStatusLineNameStr[] = wxT("status_line");
extern WXDLLEXPORT_DATA(const wxChar) wxTextCtrlNameStr[] = wxT("text");
extern WXDLLEXPORT_DATA(const wxChar) wxTreeCtrlNameStr[] = wxT("treeCtrl");
extern WXDLLEXPORT_DATA(const wxChar) wxEnhDialogNameStr[] = wxT("Shell");
extern WXDLLEXPORT_DATA(const wxChar) wxToolBarNameStr[] = wxT("toolbar");
extern WXDLLEXPORT_DATA(const wxChar) wxDataViewCtrlNameStr[] = wxT("dataviewCtrl");
// Default messages
extern WXDLLEXPORT_DATA(const wxChar) wxGetTextFromUserPromptStr[] = wxT("Input Text");
extern WXDLLEXPORT_DATA(const wxChar) wxGetPasswordFromUserPromptStr[] = wxT("Enter Password");
extern WXDLLEXPORT_DATA(const wxChar) wxMessageBoxCaptionStr[] = wxT("Message");
extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorPromptStr[] = wxT("Select a file");
@ -114,8 +79,3 @@ extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogDefaultFolderStr[] = wxT("/");
#if defined(__WXMSW__) || defined(__OS2__)
WXDLLEXPORT_DATA(const wxChar *) wxUserResourceStr = wxT("TEXT");
#endif
const wxSize wxDefaultSize(wxDefaultCoord, wxDefaultCoord);
const wxPoint wxDefaultPosition(wxDefaultCoord, wxDefaultCoord);

View File

@ -17,13 +17,13 @@
#if wxUSE_DATAVIEWCTRL
#include "wx/dataview.h"
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/log.h"
#endif
#include "wx/image.h"
#include "wx/dataview.h"
WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[] = wxT("dataviewCtrl");
// ---------------------------------------------------------
// wxDataViewModel

View File

@ -29,6 +29,8 @@
// bool wxDCBase::sm_cacheing = false;
IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
// ============================================================================
// implementation
// ============================================================================

View File

@ -27,9 +27,11 @@
#ifndef WX_PRECOMP
#endif //WX_PRECOMP
#if wxUSE_GAUGE
#include "wx/gauge.h"
#if wxUSE_GAUGE
WXDLLIMPEXP_DATA_CORE(const wxChar) wxGaugeNameStr[] = wxT("gauge");
// ============================================================================
// implementation

View File

@ -9,10 +9,6 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __VMS
#define XtDisplay XTDISPLAY
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@ -24,10 +20,6 @@
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/event.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dc.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/palette.h"
@ -36,25 +28,32 @@
#include "wx/settings.h"
#endif
#include "wx/colour.h"
#include "wx/bitmap.h"
#include "wx/font.h"
#include "wx/hashmap.h"
#include <string.h>
WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList;
WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList;
WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList;
#ifdef __WXMOTIF__
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include <Xm/Xm.h>
#ifdef __VMS__
#pragma message enable nosimpint
#endif
WXDLLIMPEXP_DATA_CORE(wxColourDatabase*) wxTheColourDatabase;
WXDLLIMPEXP_DATA_CORE(wxBitmap) wxNullBitmap;
WXDLLIMPEXP_DATA_CORE(wxBrush) wxNullBrush;
WXDLLIMPEXP_DATA_CORE(wxColour) wxNullColour;
WXDLLIMPEXP_DATA_CORE(wxCursor) wxNullCursor;
WXDLLIMPEXP_DATA_CORE(wxFont) wxNullFont;
WXDLLIMPEXP_DATA_CORE(wxIcon) wxNullIcon;
WXDLLIMPEXP_DATA_CORE(wxPen) wxNullPen;
#if wxUSE_PALETTE
WXDLLIMPEXP_DATA_CORE(wxPalette) wxNullPalette;
#endif
#ifdef __WXX11__
#include "X11/Xlib.h"
#endif
WX_DECLARE_STRING_HASH_MAP(wxColour*, wxStringToColourHashMap);
const wxSize wxDefaultSize(wxDefaultCoord, wxDefaultCoord);
const wxPoint wxDefaultPosition(wxDefaultCoord, wxDefaultCoord);
#if wxUSE_EXTENDED_RTTI
@ -86,8 +85,6 @@ wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter<wxSize> , wxFromStringConverter<w
#endif
IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
wxRect::wxRect(const wxPoint& point1, const wxPoint& point2)
{
x = point1.x;

View File

@ -80,16 +80,15 @@
// For reporting compile- and runtime version of GTK+ in the ctrl+alt+mclick dialog.
// The gtk includes don't pull any other headers in, at least not on my system - MR
#ifdef __WXGTK__
#ifdef __WXGTK20__
#include <gtk/gtkversion.h>
#else
#include <gtk/gtkfeatures.h>
#endif
#include <gtk/gtkversion.h>
extern const unsigned int gtk_major_version;
extern const unsigned int gtk_minor_version;
extern const unsigned int gtk_micro_version;
#endif
// Windows List
WXDLLIMPEXP_DATA_CORE(wxWindowList) wxTopLevelWindows;
// ----------------------------------------------------------------------------
// static data
// ----------------------------------------------------------------------------

View File

@ -35,6 +35,8 @@
#include "wx/math.h"
#include "wx/stdpaths.h"
WXDLLIMPEXP_DATA_CORE(int) wxPageNumber;
#ifdef __WXMSW__
#ifdef DrawText

View File

@ -26,6 +26,8 @@
#if wxUSE_TEXTDLG
#include "wx/generic/textdlgg.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/dialog.h"
@ -40,7 +42,8 @@
#include "wx/statline.h"
#endif
#include "wx/generic/textdlgg.h"
WXDLLIMPEXP_DATA_CORE(const wxChar) wxGetTextFromUserPromptStr[] = wxT("Input Text");
WXDLLIMPEXP_DATA_CORE(const wxChar) wxGetPasswordFromUserPromptStr[] = wxT("Enter Password");
// ----------------------------------------------------------------------------
// constants

View File

@ -11,9 +11,6 @@
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/cursor.h"
#endif

View File

@ -38,8 +38,6 @@ const int wxMENU_HEIGHT = 27;
// globals
//-----------------------------------------------------------------------------
extern wxList wxPendingDelete;
//-----------------------------------------------------------------------------
// "switch_page"
//-----------------------------------------------------------------------------

View File

@ -54,8 +54,6 @@
// data
// ----------------------------------------------------------------------------
extern wxList wxPendingDelete;
extern int g_openDialogs;
extern wxWindowGTK *g_delayedFocus;

View File

@ -221,7 +221,6 @@ extern GtkContainerClass *pizza_parent_class;
// data
//-----------------------------------------------------------------------------
extern wxList wxPendingDelete;
extern bool g_blockEventsOnDrag;
extern bool g_blockEventsOnScroll;
extern wxCursor g_globalCursor;

View File

@ -45,8 +45,6 @@ extern bool g_isIdle;
// globals
//-----------------------------------------------------------------------------
extern wxList wxPendingDelete;
//-----------------------------------------------------------------------------
// "switch_page"
//-----------------------------------------------------------------------------

View File

@ -61,8 +61,6 @@ extern bool g_isIdle;
// data
// ----------------------------------------------------------------------------
extern wxList wxPendingDelete;
extern int g_openDialogs;
extern wxWindowGTK *g_delayedFocus;

View File

@ -203,7 +203,6 @@
// data
//-----------------------------------------------------------------------------
extern wxList wxPendingDelete;
extern bool g_blockEventsOnDrag;
extern bool g_blockEventsOnScroll;
extern wxCursor g_globalCursor;

View File

@ -67,8 +67,6 @@
# include <Devices.h>
#endif
extern wxList wxPendingDelete;
#if wxUSE_THREADS
extern size_t g_numberOfThreads;
#endif

View File

@ -27,8 +27,6 @@
// for modal dialogs
wxList wxModalDialogs;
extern wxList wxPendingDelete;
IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow)
BEGIN_EVENT_TABLE(wxDialog, wxDialogBase)

View File

@ -28,7 +28,6 @@
#include "wx/mac/uma.h"
extern wxWindowList wxModelessWindows;
//extern wxList wxPendingDelete;
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
EVT_ACTIVATE(wxFrame::OnActivate)

View File

@ -68,8 +68,6 @@
#include <string.h>
extern wxList wxPendingDelete;
#ifdef __WXUNIVERSAL__
IMPLEMENT_ABSTRACT_CLASS(wxWindowMac, wxWindowBase)
#else

View File

@ -25,8 +25,6 @@
// Lists to keep track of windows, so we can disable/enable them
// for modal dialogs
wxList wxModalDialogs;
//wxList wxModelessWindows; // Frames and modeless dialogs
extern wxList wxPendingDelete;
IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow)

View File

@ -28,7 +28,6 @@
#include "wx/mac/uma.h"
extern wxWindowList wxModelessWindows;
extern wxList wxPendingDelete;
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
EVT_ACTIVATE(wxFrame::OnActivate)

View File

@ -60,7 +60,6 @@
#include <string.h>
extern wxList wxPendingDelete;
wxWindowMac* gFocusWindow = NULL ;
#ifdef __WXUNIVERSAL__

View File

@ -67,7 +67,6 @@ static void wxTLWidgetDestroyCallback(Widget w, XtPointer clientData,
XtPointer ptr);
static WXWidget wxCreateTopLevelWidget( WXDisplay* display );
extern wxList wxPendingDelete;
extern bool wxAddIdleCallback();
wxHashTable *wxWidgetHashTable = NULL;

View File

@ -66,7 +66,6 @@
// for modal dialogs
wxList wxModalDialogs;
extern wxList wxModelessWindows; // Frames and modeless dialogs
extern wxList wxPendingDelete;
#define wxUSE_INVISIBLE_RESIZE 1

View File

@ -88,7 +88,6 @@ static void wxFrameMapProc(Widget frameShell, XtPointer clientData,
// ----------------------------------------------------------------------------
extern wxList wxModelessWindows;
extern wxList wxPendingDelete;
// ----------------------------------------------------------------------------
// wxWin macros

View File

@ -109,8 +109,6 @@
// global variables
// ---------------------------------------------------------------------------
extern wxList WXDLLEXPORT wxPendingDelete;
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
extern void wxSetKeyboardHook(bool doIt);
#endif

View File

@ -81,8 +81,7 @@ extern "C" int _System bsdselect(int,
// global variables
// ---------------------------------------------------------------------------
extern wxChar* wxBuffer;
extern wxList WXDLLEXPORT wxPendingDelete;
WXDLLEXPORT_DATA(wxChar*) wxBuffer;
extern wxCursor* g_globalCursor;
HAB vHabmain = NULLHANDLE;

View File

@ -48,8 +48,6 @@
// globals
// ----------------------------------------------------------------------------
extern wxList WXDLLEXPORT wxPendingDelete;
#if wxUSE_MENUS_NATIVE
extern wxMenu *wxCurrentPopupMenu;
#endif

View File

@ -63,8 +63,6 @@
// global variables
// ---------------------------------------------------------------------------
extern wxList WXDLLEXPORT wxPendingDelete;
// NB: all "NoRedraw" classes must have the same names as the "normal" classes
// with NR suffix - wxWindow::MSWCreate() supposes this
const wxChar *wxCanvasClassName = wxT("wxWindowClass");

View File

@ -46,8 +46,6 @@
// global data
//------------------------------------------------------------------------
extern wxList wxPendingDelete;
wxWindowHash *wxWidgetHashTable = NULL;
wxWindowHash *wxClientWidgetHashTable = NULL;