]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't override DoGetBestSize() in wxGenericStaticText, it's unnecessary.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Dec 2009 15:56:21 +0000 (15:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Dec 2009 15:56:21 +0000 (15:56 +0000)
The base class already does exactly the same thing -- except that it also
accounts for the borders properly.

Also fix access for a couple of DoXXX() member functions which should be
protected and an event handler which can be private.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/stattextg.h
src/generic/stattextg.cpp

index ef225e12b2c8145e4a99e6740be7f14a2cbfeb5d..02860ea951102e49533f5b79f0136cc06cb766b2 100644 (file)
@@ -44,8 +44,8 @@ public:
                 const wxString& name = wxStaticTextNameStr);
 
 
+protected:
     virtual wxSize DoGetBestClientSize() const;
-    virtual wxSize DoGetBestSize() const;
 
     virtual void SetLabel(const wxString& label);
     virtual bool SetFont(const wxFont &font);
@@ -53,11 +53,11 @@ public:
     virtual wxString DoGetLabel() const { return m_label; }
     virtual void DoSetLabel(const wxString& label);
 
-protected:
-    void OnPaint(wxPaintEvent& event);
     void DoSetSize(int x, int y, int width, int height, int sizeFlags);
 
 private:
+    void OnPaint(wxPaintEvent& event);
+
     wxString m_label;
     int m_mnemonic;
 
index 2047f27d0ed2fc083976250e15f0067e3697beff..d4cd0c364a32edf2a0f56ab762df76ca41cba63b 100644 (file)
@@ -82,14 +82,6 @@ wxSize wxGenericStaticText::DoGetBestClientSize() const
     return wxSize(width, height);
 }
 
-wxSize wxGenericStaticText::DoGetBestSize() const
-{
-    wxSize ret = DoGetBestClientSize();
-    CacheBestSize(ret);
-    return ret;
-}
-
-
 void wxGenericStaticText::SetLabel(const wxString& label)
 {
     wxControl::SetLabel(label);