implement out-of-line destructors where needed instead of using __DARWIN__
specific conditional compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0926b2fcc2
commit
799ea01170
@ -88,6 +88,7 @@ class WXDLLEXPORT wxAppBase : public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
wxAppBase();
|
||||
virtual ~wxAppBase();
|
||||
|
||||
// the virtual functions which may/must be overridden in the derived class
|
||||
// -----------------------------------------------------------------------
|
||||
@ -326,11 +327,6 @@ public:
|
||||
static wxAppInitializerFunction GetInitializerFunction()
|
||||
{ return m_appInitFn; }
|
||||
|
||||
// needed to avoid link errors
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxAppBase() { }
|
||||
#endif
|
||||
|
||||
// process all events in the wxPendingEvents list
|
||||
virtual void ProcessPendingEvents();
|
||||
|
||||
|
@ -38,9 +38,7 @@ class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
|
||||
{
|
||||
public:
|
||||
// all generic methods are in wxControlWithItems
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxChoiceBase() {}
|
||||
#endif
|
||||
virtual ~wxChoiceBase();
|
||||
|
||||
// single selection logic
|
||||
virtual void SetSelection(int n) = 0;
|
||||
@ -56,7 +54,6 @@ public:
|
||||
|
||||
// emulate selecting the item event.GetInt()
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -33,6 +33,8 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxControlNameStr;
|
||||
class WXDLLEXPORT wxControlBase : public wxWindow
|
||||
{
|
||||
public:
|
||||
virtual ~wxControlBase();
|
||||
|
||||
// Create() function adds the validator parameter
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@ -48,10 +50,6 @@ public:
|
||||
// get the control alignment (left/right/centre, top/bottom/centre)
|
||||
int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
|
||||
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxControlBase() { }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// creates the control (calls wxWindowBase::CreateBase inside) and adds it
|
||||
// to the list of parents children
|
||||
|
@ -32,6 +32,7 @@ class WXDLLEXPORT wxItemContainer
|
||||
{
|
||||
public:
|
||||
wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
|
||||
virtual ~wxItemContainer();
|
||||
|
||||
// adding items
|
||||
// ------------
|
||||
@ -86,10 +87,6 @@ public:
|
||||
int Number() const { return GetCount(); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_2
|
||||
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxItemContainer() { }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual int DoAppend(const wxString& item) = 0;
|
||||
|
||||
|
@ -78,9 +78,7 @@ class WXDLLEXPORT wxFontBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// creator function
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxFontBase() { }
|
||||
#endif
|
||||
virtual ~wxFontBase();
|
||||
|
||||
// from the font components
|
||||
static wxFont *New(
|
||||
|
@ -54,9 +54,7 @@ class WXDLLEXPORT wxFrameBase : public wxTopLevelWindow
|
||||
public:
|
||||
// construction
|
||||
wxFrameBase();
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxFrameBase() { }
|
||||
#endif
|
||||
virtual ~wxFrameBase();
|
||||
|
||||
wxFrame *New(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
|
@ -31,9 +31,8 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr;
|
||||
class WXDLLEXPORT wxGaugeBase : public wxControl
|
||||
{
|
||||
public:
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxGaugeBase() { }
|
||||
#endif
|
||||
virtual ~wxGaugeBase();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int range,
|
||||
|
@ -31,9 +31,7 @@
|
||||
#ifdef __WXMSW__
|
||||
#define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c )
|
||||
#elif defined( __WXMAC__ )
|
||||
#ifndef __DARWIN__
|
||||
#include "Math64.h"
|
||||
#endif
|
||||
#include "Math64.h"
|
||||
#define wxMulDivInt32( a , b , c ) S32Set( S64Div( S64Multiply( S64Set(a) , S64Set(b) ) , S64Set(c) ) )
|
||||
#else
|
||||
#define wxMulDivInt32( a , b , c ) ((wxInt32)((a)*(((wxDouble)b)/((wxDouble)c))))
|
||||
|
@ -493,9 +493,8 @@ class WXDLLEXPORT wxList : public wxObjectList
|
||||
{
|
||||
public:
|
||||
wxList(int key_type = wxKEY_NONE) : wxObjectList((wxKeyType)key_type) { }
|
||||
#ifdef __DARWIN__
|
||||
// this destructor is required for Darwin
|
||||
~wxList() { }
|
||||
#endif
|
||||
|
||||
wxList& operator=(const wxList& list)
|
||||
{ return (wxList&)wxListBase::operator=(list); }
|
||||
|
@ -45,9 +45,7 @@ class WXDLLEXPORT wxListBoxBase : public wxControlWithItems
|
||||
public:
|
||||
// all generic methods are in wxControlWithItems, except for the following
|
||||
// ones which are not yet implemented by wxChoice/wxCombobox
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxListBoxBase() { }
|
||||
#endif
|
||||
virtual ~wxListBoxBase();
|
||||
|
||||
void Insert(const wxString& item, int pos)
|
||||
{ DoInsert(item, pos); }
|
||||
|
@ -28,9 +28,7 @@ class WXDLLEXPORT wxPopupWindowBase : public wxWindow
|
||||
{
|
||||
public:
|
||||
wxPopupWindowBase() { }
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxPopupWindowBase() { }
|
||||
#endif
|
||||
virtual ~wxPopupWindowBase();
|
||||
|
||||
// create the popup window
|
||||
//
|
||||
|
@ -30,9 +30,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxStaticBitmapNameStr;
|
||||
class WXDLLEXPORT wxStaticBitmapBase : public wxControl
|
||||
{
|
||||
public:
|
||||
#ifdef __DARWIN__
|
||||
~wxStaticBitmapBase() { }
|
||||
#endif
|
||||
virtual ~wxStaticBitmapBase();
|
||||
|
||||
// our interface
|
||||
virtual void SetIcon(const wxIcon& icon) = 0;
|
||||
|
@ -49,9 +49,7 @@ public:
|
||||
void SetOwner(wxEvtHandler *owner, int id = -1)
|
||||
{ m_owner = owner; m_idTimer = id; }
|
||||
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxTimerBase() { }
|
||||
#endif
|
||||
virtual ~wxTimerBase();
|
||||
|
||||
// working with the timer
|
||||
// ----------------------
|
||||
|
@ -74,10 +74,7 @@ class WXDLLEXPORT wxTopLevelWindowBase : public wxWindow
|
||||
public:
|
||||
// construction
|
||||
wxTopLevelWindowBase();
|
||||
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxTopLevelWindowBase() {}
|
||||
#endif
|
||||
virtual ~wxTopLevelWindowBase();
|
||||
|
||||
// top level wnd state
|
||||
// --------------------
|
||||
|
@ -76,6 +76,11 @@ wxAppBase::wxAppBase()
|
||||
#endif // wxUSE_GUI
|
||||
}
|
||||
|
||||
wxAppBase::~wxAppBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
#if wxUSE_GUI
|
||||
bool wxAppBase::OnInitGui()
|
||||
{
|
||||
|
@ -109,8 +109,6 @@ void wxBitmapBase::CleanUpHandlers()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class wxBitmapBaseModule: public wxModule
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapBaseModule)
|
||||
|
@ -38,6 +38,11 @@
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
wxChoiceBase::~wxChoiceBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -45,6 +45,11 @@
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
wxControlBase::~wxControlBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
bool wxControlBase::Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint &pos,
|
||||
@ -125,6 +130,11 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
|
||||
|
||||
#if wxUSE_STATBMP
|
||||
|
||||
wxStaticBitmapBase::~wxStaticBitmapBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
wxSize wxStaticBitmapBase::DoGetBestClientSize() const
|
||||
{
|
||||
wxBitmap bmp = GetBitmap();
|
||||
|
@ -38,6 +38,11 @@
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
wxItemContainer::~wxItemContainer()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// selection
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -49,6 +49,11 @@
|
||||
|
||||
wxFontEncoding wxFontBase::ms_encodingDefault = wxFONTENCODING_SYSTEM;
|
||||
|
||||
wxFontBase::~wxFontBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxFont *wxFontBase::New(int size,
|
||||
int family,
|
||||
|
@ -78,6 +78,11 @@ wxFrameBase::wxFrameBase()
|
||||
#endif // wxUSE_STATUSBAR
|
||||
}
|
||||
|
||||
wxFrameBase::~wxFrameBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
wxFrame *wxFrameBase::New(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
|
@ -39,6 +39,11 @@
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
wxGaugeBase::~wxGaugeBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGauge creation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -623,7 +623,7 @@ wxBrushList::~wxBrushList ()
|
||||
{
|
||||
wxBrush *brush = (wxBrush *) node->Data ();
|
||||
wxNode *next = node->Next ();
|
||||
if (brush->GetVisible())
|
||||
if (brush && brush->GetVisible())
|
||||
delete brush;
|
||||
node = next;
|
||||
}
|
||||
|
@ -38,6 +38,11 @@
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
wxListBoxBase::~wxListBoxBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// adding items
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -108,6 +108,11 @@ END_EVENT_TABLE()
|
||||
// wxPopupWindowBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPopupWindowBase::~wxPopupWindowBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags))
|
||||
{
|
||||
return TRUE;
|
||||
|
@ -27,16 +27,16 @@
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxSizerItem, wxObject);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxSizer, wxObject);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxGridSizer, wxSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxFlexGridSizer, wxGridSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxSizerItem, wxObject)
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxSizer, wxObject)
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxGridSizer, wxSizer)
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxFlexGridSizer, wxGridSizer)
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer)
|
||||
#if wxUSE_STATBOX
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer)
|
||||
#endif
|
||||
#if wxUSE_NOTEBOOK
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer)
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -110,6 +110,11 @@
|
||||
|
||||
#if wxUSE_GUI && wxUSE_TIMER
|
||||
|
||||
wxTimerBase::~wxTimerBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
void wxTimerBase::Notify()
|
||||
{
|
||||
// the base class version generates an event if it has owner - which it
|
||||
|
@ -60,6 +60,11 @@ wxTopLevelWindowBase::wxTopLevelWindowBase()
|
||||
{
|
||||
}
|
||||
|
||||
wxTopLevelWindowBase::~wxTopLevelWindowBase()
|
||||
{
|
||||
// this destructor is required for Darwin
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowBase::Destroy()
|
||||
{
|
||||
// delayed destruction: the frame will be deleted during the next idle
|
||||
|
Loading…
Reference in New Issue
Block a user