From 470f357fd209a79a4a7c5d5e7bed9bed455229c7 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 16 Nov 2008 18:20:21 +0000 Subject: [PATCH] make access for virtuals match base git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/bmpcbox.h | 4 ++-- include/wx/gtk/msgdlg.h | 5 ++-- include/wx/odcombo.h | 4 ++-- include/wx/propgrid/manager.h | 10 ++++---- include/wx/propgrid/propgrid.h | 8 +++---- include/wx/propgrid/props.h | 2 +- include/wx/weakref.h | 44 +++++++++++++++++----------------- 7 files changed, 38 insertions(+), 39 deletions(-) diff --git a/include/wx/gtk/bmpcbox.h b/include/wx/gtk/bmpcbox.h index b0555904f7..f146577248 100644 --- a/include/wx/gtk/bmpcbox.h +++ b/include/wx/gtk/bmpcbox.h @@ -125,9 +125,9 @@ public: virtual bool IsEditable() const; virtual void SetEditable(bool editable); -protected: - virtual GtkWidget* GetConnectWidget(); + +protected: virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; virtual void GTKCreateComboBoxWidget(); diff --git a/include/wx/gtk/msgdlg.h b/include/wx/gtk/msgdlg.h index cb3c49c772..785a0b18e2 100644 --- a/include/wx/gtk/msgdlg.h +++ b/include/wx/gtk/msgdlg.h @@ -31,6 +31,8 @@ protected: int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height)) {} + // override to convert wx mnemonics to GTK+ ones and handle stock ids + virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label); private: // override to use stock GTK+ defaults instead of just string ones @@ -39,9 +41,6 @@ private: virtual wxString GetDefaultOKLabel() const; virtual wxString GetDefaultCancelLabel() const; - // override to convert wx mnemonics to GTK+ ones and handle stock ids - virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label); - // create the real GTK+ dialog: this is done from ShowModal() to allow // changing the message between constructing the dialog and showing it void GTKCreateMsgDialog(); diff --git a/include/wx/odcombo.h b/include/wx/odcombo.h index f5fd36a871..1c803aa5a2 100644 --- a/include/wx/odcombo.h +++ b/include/wx/odcombo.h @@ -307,8 +307,6 @@ public: } // wxControlWithItems methods - virtual void DoClear(); - virtual void DoDeleteOneItem(unsigned int n); virtual unsigned int GetCount() const; virtual wxString GetString(unsigned int n) const; virtual void SetString(unsigned int n, const wxString& s); @@ -335,6 +333,8 @@ public: wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST protected: + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); // Callback for drawing. Font, background and text colour have been // prepared according to selection, focus and such. diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index c3768ab07a..6910682a83 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -442,10 +442,12 @@ public: */ int GetPageByState( const wxPropertyGridPageState* pstate ) const; +protected: /** Returns wxPropertyGridPageState of given page, current page's for -1. */ virtual wxPropertyGridPageState* GetPageState( int page ) const; +public: /** Returns number of managed pages. */ size_t GetPageCount() const; @@ -610,15 +612,13 @@ protected: */ virtual wxPropertyGrid* CreatePropertyGrid() const; - virtual void RefreshProperty( wxPGProperty* p ); - public: + virtual void RefreshProperty( wxPGProperty* p ); // // Overridden functions - no documentation required. // - virtual wxSize DoGetBestSize() const; void SetId( wxWindowID winid ); virtual void Freeze(); @@ -628,11 +628,13 @@ public: virtual void SetWindowStyleFlag ( long style ); protected: + virtual wxSize DoGetBestSize() const; public: #ifndef SWIG + virtual bool ProcessEvent( wxEvent& event ); // // Event handlers // @@ -727,8 +729,6 @@ protected: virtual bool SetEditableStateItem( const wxString& name, wxVariant value ); virtual wxVariant GetEditableStateItem( const wxString& name ) const; - virtual bool ProcessEvent( wxEvent& event ); - private: DECLARE_EVENT_TABLE() #endif // #ifndef SWIG diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index a35360ccce..277d5852d1 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1327,6 +1327,9 @@ public: */ bool UnfocusEditor(); + virtual bool ProcessEvent(wxEvent& event); + virtual void SetWindowStyleFlag( long style ); + protected: /** @@ -1375,7 +1378,6 @@ public: // Overridden functions. virtual bool Destroy(); - virtual wxSize DoGetBestSize() const; // Returns property at given y coordinate (relative to grid's top left). wxPGProperty* GetItemAtY( int y ) const { return DoGetItemAtY(y); } @@ -1391,6 +1393,7 @@ public: protected: + virtual wxSize DoGetBestSize() const; #ifndef wxPG_ICON_WIDTH wxBitmap *m_expandbmp, *m_collbmp; @@ -1792,9 +1795,6 @@ protected: void CustomSetCursor( int type, bool override = false ); - virtual bool ProcessEvent(wxEvent& event); - virtual void SetWindowStyleFlag( long style ); - /** Repositions scrollbar and underlying panel according to changed virtual size. diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index b096bb24e1..d0f4d31950 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -302,10 +302,10 @@ public: wxPGValidationInfo* pValidationInfo, int mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); + virtual wxValidator* DoGetValidator () const; protected: int m_precision; - virtual wxValidator* DoGetValidator () const; }; // ----------------------------------------------------------------------- diff --git a/include/wx/weakref.h b/include/wx/weakref.h index 74b590d627..e0bd1f90dd 100644 --- a/include/wx/weakref.h +++ b/include/wx/weakref.h @@ -59,6 +59,13 @@ public: } } + virtual void OnObjectDestroy() + { + // Tracked object itself removes us from list of trackers + wxASSERT(m_pobj != NULL); + m_pobj = NULL; + } + protected: void Assign(T* pobj) { @@ -82,13 +89,6 @@ protected: Assign( wr.m_pobj ); } - virtual void OnObjectDestroy() - { - // Tracked object itself removes us from list of trackers - wxASSERT( m_pobj!=NULL ); - m_pobj = NULL; - } - T *m_pobj; }; @@ -122,6 +122,14 @@ struct wxWeakRefImpl : public wxTrackerNode } } + virtual void OnObjectDestroy() + { + // Tracked object itself removes us from list of trackers + wxASSERT(m_pobj != NULL); + m_pobj = NULL; + m_ptbase = NULL; + } + protected: wxWeakRefImpl() : m_pobj(NULL), m_ptbase(NULL) { } @@ -177,14 +185,6 @@ protected: } } - virtual void OnObjectDestroy() - { - // Tracked object itself removes us from list of trackers - wxASSERT( m_pobj!=NULL ); - m_pobj = NULL; - m_ptbase = NULL; - } - T *m_pobj; wxTrackable *m_ptbase; }; @@ -293,6 +293,13 @@ public: } } + virtual void OnObjectDestroy() + { + wxASSERT_MSG(m_pobj, "tracked object should have removed us itself"); + + m_pobj = NULL; + } + protected: void Assign(T *pobj) { @@ -320,13 +327,6 @@ protected: } } - virtual void OnObjectDestroy() - { - wxASSERT_MSG( m_pobj, "tracked object should have removed us itself" ); - - m_pobj = NULL; - } - T *m_pobj; }; -- 2.45.2