]> git.saurik.com Git - wxWidgets.git/commitdiff
make access for virtuals match base
authorPaul Cornett <paulcor@bullseye.com>
Fri, 26 Oct 2007 06:20:23 +0000 (06:20 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Fri, 26 Oct 2007 06:20:23 +0000 (06:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

16 files changed:
include/wx/frame.h
include/wx/generic/panelg.h
include/wx/gtk/choice.h
include/wx/gtk/combobox.h
include/wx/gtk/dcmemory.h
include/wx/gtk/listbox.h
include/wx/gtk/textctrl.h
include/wx/imagiff.h
include/wx/msw/choice.h
include/wx/msw/combobox.h
include/wx/msw/control.h
include/wx/msw/listbox.h
include/wx/msw/textctrl.h
include/wx/msw/window.h
include/wx/statusbr.h
include/wx/vlbox.h

index 15bbfd7c35dc1d8a95c53f2762e8f43fedfd2628..2889bbecaee34bf59ad782cdab6fa9876799b203 100644 (file)
@@ -180,6 +180,11 @@ public:
     virtual void DoGiveHelp(const wxString& text, bool show);
 #endif
 
+    virtual bool IsClientAreaChild(const wxWindow *child) const
+    {
+        return !IsOneOfBars(child) && wxTopLevelWindow::IsClientAreaChild(child);
+    }
+
 protected:
     // the frame main menu/status/tool bars
     // ------------------------------------
@@ -190,10 +195,6 @@ protected:
 
     // test whether this window makes part of the frame
     virtual bool IsOneOfBars(const wxWindow *win) const;
-    virtual bool IsClientAreaChild(const wxWindow *child) const
-    {
-        return !IsOneOfBars(child) && wxTopLevelWindow::IsClientAreaChild(child);
-    }
 
 #if wxUSE_MENUS
     // override to update menu bar position when the frame size changes
index cbda3af503ac047261f6b30a14884bece0dc8661..b41701eaa50dfdb06cee2bdfb7a5b6a68c6c7cd8 100644 (file)
@@ -79,16 +79,15 @@ public:
     virtual bool IsCanvasWindow() const { return true; }
 #endif
 
-    // choose the default border for this window
-    virtual wxBorder GetDefaultBorder() const { return wxWindowBase::GetDefaultBorder(); }
-
     WX_DECLARE_CONTROL_CONTAINER();
 
 protected:
     // common part of all ctors
     void Init();
 
-private:
+    // choose the default border for this window
+    virtual wxBorder GetDefaultBorder() const { return wxWindowBase::GetDefaultBorder(); }
+
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel)
     DECLARE_EVENT_TABLE()
 };
index 1606120b09f243f6e4c10a832bb5f4be882da412..4c24c8f52408ea00df61445ce9c15ca2335706c3 100644 (file)
@@ -7,8 +7,8 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __GTKCHOICEH__
-#define __GTKCHOICEH__
+#ifndef _WX_GTK_CHOICE_H_
+#define _WX_GTK_CHOICE_H_
 
 class WXDLLIMPEXP_FWD_BASE wxSortedArrayString;
 class WXDLLIMPEXP_FWD_BASE wxArrayString;
@@ -61,10 +61,6 @@ public:
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxChoiceNameStr );
 
-    // implement base class pure virtuals
-    void DoDeleteOneItem(unsigned int n);
-    void DoClear();
-
     int GetSelection() const;
     void SetSelection(int n);
 
@@ -77,6 +73,9 @@ public:
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
 protected:
+    void DoDeleteOneItem(unsigned int n);
+    void DoClear();
+
     wxArrayPtrVoid m_clientData; // contains the client data for the items
 
     virtual wxSize DoGetBestSize() const;
@@ -108,4 +107,4 @@ private:
 };
 
 
-#endif // __GTKCHOICEH__
+#endif // _WX_GTK_CHOICE_H_
index ba4320c130f579f176c4db0ba1d80c957b1b94bd..9cb4f9f1854f22d39c959a56b54bbabec31fdd6b 100644 (file)
@@ -127,6 +127,8 @@ public:
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
+    virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
+
 protected:
     // From wxWindowGTK:
     virtual void DoApplyWidgetStyle(GtkRcStyle *style);
@@ -138,13 +140,17 @@ protected:
                               void **clientData, wxClientDataType type);
     virtual void DoSetItemClientData(unsigned int n, void* clientData);
     virtual void* DoGetItemClientData(unsigned int n) const;
-    virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
     virtual void DoClear();
     virtual void DoDeleteOneItem(unsigned int n);
 
     // From wxControl:
     virtual wxSize DoGetBestSize() const;
 
+    // Widgets that use the style->base colour for the BG colour should
+    // override this and return true.
+    virtual bool UseGTKStyleBase() const { return true; }
+
+private:
     // From wxTextEntry:
     virtual const wxWindow *GetEditableWindow() const { return this; }
     virtual GtkEditable *GetEditable() const;
@@ -156,11 +162,6 @@ protected:
             DisableEvents();
     }
 
-    // Widgets that use the style->base colour for the BG colour should
-    // override this and return true.
-    virtual bool UseGTKStyleBase() const { return true; }
-
-private:
     // this array is only used for controls with wxCB_SORT style, so only
     // allocate it if it's needed (hence using pointer)
     wxSortedArrayString *m_strings;
index f9e4fcf6640789708511aba5f6b5da6fb88e5673..d165b6176837f79d6e17d2eb90adba2221269a31 100644 (file)
@@ -56,7 +56,6 @@ protected:
     virtual void DoGetSize( int *width, int *height ) const;
     virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
 
-public:    
     // overridden from wxMemoryImplDCBase
     virtual void DoSelect(const wxBitmap& bitmap);
     virtual const wxBitmap& DoGetSelectedBitmap() const;
index aa38ecd8954dd38763f961dec99936195d92466d..1c959e0ba6378ed2cc322d0ad31e7dc6da8f01f2 100644 (file)
@@ -64,10 +64,6 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
 
-    // implement base class pure virtuals
-    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);
@@ -102,6 +98,8 @@ public:
     void GtkSetSelection(int n, const bool select, const bool blockEvent);
 
 protected:
+    virtual void DoClear();
+    virtual void DoDeleteOneItem(unsigned int n);
     virtual wxSize DoGetBestSize() const;
     virtual void DoApplyWidgetStyle(GtkRcStyle *style);
     virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
index 8a4aac53eeee44844a4a0cc027297397f8bed363..57d52e3b80ae211a29e6fc84b85f224c287e0e43 100644 (file)
@@ -128,11 +128,6 @@ public:
 
     // implementation only from now on
 
-    // wxGTK-specific: called recursively by Enable,
-    // to give widgets an oppprtunity to correct their colours after they
-    // have been changed by Enable
-    virtual void OnEnabled( bool enable ) ;
-
     // tell the control to ignore next text changed signal
     void IgnoreNextTextUpdate(int n = 1) { m_countUpdatesToIgnore = n; }
 
@@ -157,16 +152,16 @@ public:
     bool IsFrozen() const { return m_freezeCount > 0; }
 
 protected:
+    // wxGTK-specific: called recursively by Enable,
+    // to give widgets an oppprtunity to correct their colours after they
+    // have been changed by Enable
+    virtual void OnEnabled(bool enable);
+
     // overridden wxWindow virtual methods
     virtual wxSize DoGetBestSize() const;
     virtual void DoApplyWidgetStyle(GtkRcStyle *style);
     virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
 
-    // overridden wxTextEntry virtual methods
-    virtual const wxWindow *GetEditableWindow() const { return this; }
-    virtual GtkEditable *GetEditable() const;
-    virtual void EnableTextChangedEvents(bool enable);
-
     // common part of all ctors
     void Init();
 
@@ -185,6 +180,11 @@ protected:
     void GTKSetJustification();
 
 private:
+    // overridden wxTextEntry virtual methods
+    virtual const wxWindow *GetEditableWindow() const { return this; }
+    virtual GtkEditable *GetEditable() const;
+    virtual void EnableTextChangedEvents(bool enable);
+
     // change the font for everything in this control
     void ChangeFontGlobally();
 
index 4d0e52c715a5d766586c823df016fd087de893dd..8097d8e65654f792ae6da54ed5903806d872b931 100644 (file)
@@ -32,10 +32,10 @@ public:
 #if wxUSE_STREAMS
     virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1);
     virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true);
+protected:
     virtual bool DoCanRead(wxInputStream& stream);
 #endif
 
-private:
     DECLARE_DYNAMIC_CLASS(wxIFFHandler)
 };
 
index cff06ed33edd9c1c6c617e038e8913e8ed9288a2..20d8edb5fd993ac078f00139b3ba5d2408c9472a 100644 (file)
@@ -66,9 +66,6 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
 
-    virtual void DoDeleteOneItem(unsigned int n);
-    virtual void DoClear();
-
     virtual unsigned int GetCount() const;
     virtual int GetSelection() const;
     virtual int GetCurrentSelection() const;
@@ -92,6 +89,9 @@ protected:
     // common part of all ctors
     void Init() { m_lastAcceptedSelection = wxID_NONE; }
 
+    virtual void DoDeleteOneItem(unsigned int n);
+    virtual void DoClear();
+
     virtual int DoInsertItems(const wxArrayStringsAdapter& items,
                               unsigned int pos,
                               void **clientData, wxClientDataType type);
index 6b53f6835e2e82b6371e3508d820720ef61db903..2b888f92079a649ede5e22ea24ee644b3c2348c5 100644 (file)
@@ -109,17 +109,13 @@ public:
     void OnUpdateDelete(wxUpdateUIEvent& event);
     void OnUpdateSelectAll(wxUpdateUIEvent& event);
 
-protected:
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
+protected:
 #if wxUSE_TOOLTIPS
     virtual void DoSetToolTip(wxToolTip *tip);
 #endif
 
-    // this is the overridden wxTextEntry method which should only be called
-    // when we do have an edit control so it asserts if this is not the case
-    virtual WXHWND GetEditHWND() const;
-
     // this is the implementation of GetEditHWND() which can also be used when
     // we don't have the edit control, it simply returns NULL then
     //
@@ -130,6 +126,10 @@ protected:
     WXHWND GetEditHWNDIfAvailable() const;
 
 private:
+    // this is the overridden wxTextEntry method which should only be called
+    // when we do have an edit control so it asserts if this is not the case
+    virtual WXHWND GetEditHWND() const;
+
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
     DECLARE_EVENT_TABLE()
 };
index 503d0db28c7b7c9fea332661d6272852fb8e29c4..a2e56f715996d1b49f0f34588d136561a7d914e5 100644 (file)
@@ -71,10 +71,10 @@ public:
     // default style for the control include WS_TABSTOP if it AcceptsFocus()
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
+protected:
     // choose the default border for this window
     virtual wxBorder GetDefaultBorder() const;
 
-protected:
     // return default best size (doesn't really make any sense, override this)
     virtual wxSize DoGetBestSize() const;
 
index 3c48ad4edf94ec4cdf7f9b20c5fe3e42720087ab..ec7eb2098164dda6bde5acb9bbdc283ad24bc904 100644 (file)
@@ -77,10 +77,6 @@ public:
 
     virtual ~wxListBox();
 
-    // implement base class pure virtuals
-    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);
@@ -137,6 +133,9 @@ public:
     virtual bool CanApplyThemeBorder() const { return false; }
 
 protected:
+    virtual void DoClear();
+    virtual void DoDeleteOneItem(unsigned int n);
+
     virtual void DoSetSelection(int n, bool select);
 
     virtual int DoInsertItems(const wxArrayStringsAdapter& items,
index bb89c204f592bb90da52f8da8695ca62043a0f6d..f4119aa3eb9b6afa9a70c957628ba1bed99af4b1 100644 (file)
@@ -71,8 +71,6 @@ public:
     // implement base class pure virtuals
     // ----------------------------------
 
-    virtual bool DoLoadFile(const wxString& file, int fileType);
-
     virtual bool IsModified() const;
     virtual void MarkDirty();
     virtual void DiscardEdits();
@@ -187,6 +185,8 @@ protected:
     // common part of all ctors
     void Init();
 
+    virtual bool DoLoadFile(const wxString& file, int fileType);
+
     // creates the control of appropriate class (plain or rich edit) with the
     // styles corresponding to m_windowStyle
     //
@@ -198,10 +198,6 @@ protected:
 
     virtual void DoSetValue(const wxString &value, int flags = 0);
 
-    // implement wxTextEntry pure virtual: it implements all the operations for
-    // the simple EDIT controls
-    virtual WXHWND GetEditHWND() const { return m_hWnd; }
-
     // return true if this control has a user-set limit on amount of text (i.e.
     // the limit is due to a previous call to SetMaxLength() and not built in)
     bool HasSpaceLimit(unsigned int *len) const;
@@ -250,12 +246,16 @@ protected:
     // text ourselves: we want this to be exactly 1
     int m_updatesCount;
 
+private:
     virtual void EnableTextChangedEvents(bool enable)
     {
         m_updatesCount = enable ? -1 : -2;
     }
 
-private:
+    // implement wxTextEntry pure virtual: it implements all the operations for
+    // the simple EDIT controls
+    virtual WXHWND GetEditHWND() const { return m_hWnd; }
+
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl)
 
index cd55625acd56b42b2d4fb2cff8550b605f6e5824..c88d22e299f540efcfa8f22b78e94ff6270397bb 100644 (file)
@@ -60,7 +60,6 @@ public:
     virtual void Lower();
 
     virtual bool Show( bool show = true );
-    virtual void DoEnable( bool enable );
 
     virtual void SetFocus();
     virtual void SetFocusFromKbd();
@@ -433,14 +432,6 @@ public:
     // check if a native double-buffering applies for this window
     virtual bool IsDoubleBuffered() const;
 
-    // this allows you to implement standard control borders without
-    // repeating the code in different classes that are not derived from
-    // wxControl
-    virtual wxBorder GetDefaultBorderForControl() const;
-
-    // choose the default border for this window
-    virtual wxBorder GetDefaultBorder() const;
-
     // synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false
     void GenerateMouseLeave();
 
@@ -449,6 +440,13 @@ public:
     virtual void OnInternalIdle();
 
 protected:
+    // this allows you to implement standard control borders without
+    // repeating the code in different classes that are not derived from
+    // wxControl
+    virtual wxBorder GetDefaultBorderForControl() const;
+
+    // choose the default border for this window
+    virtual wxBorder GetDefaultBorder() const;
 
 #if wxUSE_MENUS_NATIVE
     virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
@@ -482,6 +480,8 @@ protected:
     virtual void DoCaptureMouse();
     virtual void DoReleaseMouse();
 
+    virtual void DoEnable(bool enable);
+
     // this simply moves/resizes the given HWND which is supposed to be our
     // sibling (this is useful for controls which are composite at MSW level
     // and for which DoMoveWindow() is not enough)
index 1a136a0c62fb95a028daffe3db8410bbca94e6f1..be584f3c8948c9501c4040e86f70162aecd385f9 100644 (file)
@@ -97,10 +97,11 @@ public:
     // don't want status bars to accept the focus at all
     virtual bool AcceptsFocus() const { return false; }
 
-    virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
     virtual bool CanBeOutsideClientArea() const { return true; }
 
 protected:
+    virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
+
     // set the widths array to NULL
     void InitWidths();
 
index 2301f7c651b020ac61de115336a980f598409c2d..72c6170bc2aeb215c72a2311ee27e5d87bd8c4c0 100644 (file)
@@ -201,9 +201,9 @@ public:
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
+protected:
        virtual wxBorder GetDefaultBorder() const { return GetDefaultBorderForControl(); }
 
-protected:
     // the derived class must implement this function to actually draw the item
     // with the given index on the provided DC
     virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const = 0;