specific conditional compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13447
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
28 files changed:
// the virtual functions which may/must be overridden in the derived class
// -----------------------------------------------------------------------
// the virtual functions which may/must be overridden in the derived class
// -----------------------------------------------------------------------
static wxAppInitializerFunction GetInitializerFunction()
{ return m_appInitFn; }
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();
// process all events in the wxPendingEvents list
virtual void ProcessPendingEvents();
{
public:
// all generic methods are in wxControlWithItems
{
public:
// all generic methods are in wxControlWithItems
-#ifdef __DARWIN__
- virtual ~wxChoiceBase() {}
-#endif
+ virtual ~wxChoiceBase();
// single selection logic
virtual void SetSelection(int n) = 0;
// single selection logic
virtual void SetSelection(int n) = 0;
// emulate selecting the item event.GetInt()
void Command(wxCommandEvent& event);
// emulate selecting the item event.GetInt()
void Command(wxCommandEvent& event);
};
// ----------------------------------------------------------------------------
};
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxControlBase : public wxWindow
{
public:
class WXDLLEXPORT wxControlBase : public wxWindow
{
public:
+ virtual ~wxControlBase();
+
// Create() function adds the validator parameter
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
// Create() function adds the validator parameter
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
// get the control alignment (left/right/centre, top/bottom/centre)
int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
// 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
protected:
// creates the control (calls wxWindowBase::CreateBase inside) and adds it
// to the list of parents children
{
public:
wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
{
public:
wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
+ virtual ~wxItemContainer();
// adding items
// ------------
// adding items
// ------------
int Number() const { return GetCount(); }
#endif // WXWIN_COMPATIBILITY_2_2
int Number() const { return GetCount(); }
#endif // WXWIN_COMPATIBILITY_2_2
-#ifdef __DARWIN__
- virtual ~wxItemContainer() { }
-#endif
-
protected:
virtual int DoAppend(const wxString& item) = 0;
protected:
virtual int DoAppend(const wxString& item) = 0;
{
public:
// creator function
{
public:
// creator function
-#ifdef __DARWIN__
- virtual ~wxFontBase() { }
-#endif
// from the font components
static wxFont *New(
// from the font components
static wxFont *New(
public:
// construction
wxFrameBase();
public:
// construction
wxFrameBase();
-#ifdef __DARWIN__
- virtual ~wxFrameBase() { }
-#endif
+ virtual ~wxFrameBase();
wxFrame *New(wxWindow *parent,
wxWindowID id,
wxFrame *New(wxWindow *parent,
wxWindowID id,
class WXDLLEXPORT wxGaugeBase : public wxControl
{
public:
class WXDLLEXPORT wxGaugeBase : public wxControl
{
public:
-#ifdef __DARWIN__
- virtual ~wxGaugeBase() { }
-#endif
+ virtual ~wxGaugeBase();
+
bool Create(wxWindow *parent,
wxWindowID id,
int range,
bool Create(wxWindow *parent,
wxWindowID id,
int range,
#ifdef __WXMSW__
#define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c )
#elif defined( __WXMAC__ )
#ifdef __WXMSW__
#define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c )
#elif defined( __WXMAC__ )
- #ifndef __DARWIN__
- #include "Math64.h"
- #endif
#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))))
#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))))
{
public:
wxList(int key_type = wxKEY_NONE) : wxObjectList((wxKeyType)key_type) { }
{
public:
wxList(int key_type = wxKEY_NONE) : wxObjectList((wxKeyType)key_type) { }
+ // this destructor is required for Darwin
wxList& operator=(const wxList& list)
{ return (wxList&)wxListBase::operator=(list); }
wxList& operator=(const wxList& list)
{ return (wxList&)wxListBase::operator=(list); }
public:
// all generic methods are in wxControlWithItems, except for the following
// ones which are not yet implemented by wxChoice/wxCombobox
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); }
void Insert(const wxString& item, int pos)
{ DoInsert(item, pos); }
{
public:
wxPopupWindowBase() { }
{
public:
wxPopupWindowBase() { }
-#ifdef __DARWIN__
- virtual ~wxPopupWindowBase() { }
-#endif
+ virtual ~wxPopupWindowBase();
// create the popup window
//
// create the popup window
//
class WXDLLEXPORT wxStaticBitmapBase : public wxControl
{
public:
class WXDLLEXPORT wxStaticBitmapBase : public wxControl
{
public:
-#ifdef __DARWIN__
- ~wxStaticBitmapBase() { }
-#endif
+ virtual ~wxStaticBitmapBase();
// our interface
virtual void SetIcon(const wxIcon& icon) = 0;
// our interface
virtual void SetIcon(const wxIcon& icon) = 0;
void SetOwner(wxEvtHandler *owner, int id = -1)
{ m_owner = owner; m_idTimer = id; }
void SetOwner(wxEvtHandler *owner, int id = -1)
{ m_owner = owner; m_idTimer = id; }
-#ifdef __DARWIN__
- virtual ~wxTimerBase() { }
-#endif
+ virtual ~wxTimerBase();
// working with the timer
// ----------------------
// working with the timer
// ----------------------
public:
// construction
wxTopLevelWindowBase();
public:
// construction
wxTopLevelWindowBase();
-
-#ifdef __DARWIN__
- virtual ~wxTopLevelWindowBase() {}
-#endif
+ virtual ~wxTopLevelWindowBase();
// top level wnd state
// --------------------
// top level wnd state
// --------------------
+wxAppBase::~wxAppBase()
+{
+ // this destructor is required for Darwin
+}
+
#if wxUSE_GUI
bool wxAppBase::OnInitGui()
{
#if wxUSE_GUI
bool wxAppBase::OnInitGui()
{
class wxBitmapBaseModule: public wxModule
{
DECLARE_DYNAMIC_CLASS(wxBitmapBaseModule)
class wxBitmapBaseModule: public wxModule
{
DECLARE_DYNAMIC_CLASS(wxBitmapBaseModule)
// implementation
// ============================================================================
// implementation
// ============================================================================
+wxChoiceBase::~wxChoiceBase()
+{
+ // this destructor is required for Darwin
+}
+
// ----------------------------------------------------------------------------
// selection
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// selection
// ----------------------------------------------------------------------------
// implementation
// ============================================================================
// implementation
// ============================================================================
+wxControlBase::~wxControlBase()
+{
+ // this destructor is required for Darwin
+}
+
bool wxControlBase::Create(wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
bool wxControlBase::Create(wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
+wxStaticBitmapBase::~wxStaticBitmapBase()
+{
+ // this destructor is required for Darwin
+}
+
wxSize wxStaticBitmapBase::DoGetBestClientSize() const
{
wxBitmap bmp = GetBitmap();
wxSize wxStaticBitmapBase::DoGetBestClientSize() const
{
wxBitmap bmp = GetBitmap();
// implementation
// ============================================================================
// implementation
// ============================================================================
+wxItemContainer::~wxItemContainer()
+{
+ // this destructor is required for Darwin
+}
+
// ----------------------------------------------------------------------------
// selection
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// selection
// ----------------------------------------------------------------------------
wxFontEncoding wxFontBase::ms_encodingDefault = wxFONTENCODING_SYSTEM;
wxFontEncoding wxFontBase::ms_encodingDefault = wxFONTENCODING_SYSTEM;
+wxFontBase::~wxFontBase()
+{
+ // this destructor is required for Darwin
+}
+
/* static */
wxFont *wxFontBase::New(int size,
int family,
/* static */
wxFont *wxFontBase::New(int size,
int family,
#endif // wxUSE_STATUSBAR
}
#endif // wxUSE_STATUSBAR
}
+wxFrameBase::~wxFrameBase()
+{
+ // this destructor is required for Darwin
+}
+
wxFrame *wxFrameBase::New(wxWindow *parent,
wxWindowID id,
const wxString& title,
wxFrame *wxFrameBase::New(wxWindow *parent,
wxWindowID id,
const wxString& title,
// implementation
// ============================================================================
// implementation
// ============================================================================
+wxGaugeBase::~wxGaugeBase()
+{
+ // this destructor is required for Darwin
+}
+
// ----------------------------------------------------------------------------
// wxGauge creation
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxGauge creation
// ----------------------------------------------------------------------------
{
wxBrush *brush = (wxBrush *) node->Data ();
wxNode *next = node->Next ();
{
wxBrush *brush = (wxBrush *) node->Data ();
wxNode *next = node->Next ();
- if (brush->GetVisible())
+ if (brush && brush->GetVisible())
delete brush;
node = next;
}
delete brush;
node = next;
}
// implementation
// ============================================================================
// implementation
// ============================================================================
+wxListBoxBase::~wxListBoxBase()
+{
+ // this destructor is required for Darwin
+}
+
// ----------------------------------------------------------------------------
// adding items
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// adding items
// ----------------------------------------------------------------------------
// wxPopupWindowBase
// ----------------------------------------------------------------------------
// wxPopupWindowBase
// ----------------------------------------------------------------------------
+wxPopupWindowBase::~wxPopupWindowBase()
+{
+ // this destructor is required for Darwin
+}
+
bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags))
{
return TRUE;
bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags))
{
return TRUE;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
-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)
-IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer);
+IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer)
#endif
#if wxUSE_NOTEBOOK
#endif
#if wxUSE_NOTEBOOK
-IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer);
+IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer)
#endif
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#if wxUSE_GUI && wxUSE_TIMER
#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
void wxTimerBase::Notify()
{
// the base class version generates an event if it has owner - which it
+wxTopLevelWindowBase::~wxTopLevelWindowBase()
+{
+ // this destructor is required for Darwin
+}
+
bool wxTopLevelWindowBase::Destroy()
{
// delayed destruction: the frame will be deleted during the next idle
bool wxTopLevelWindowBase::Destroy()
{
// delayed destruction: the frame will be deleted during the next idle