]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
don't draw borders for bitmap buttons with wxBORDER_NONE style
[wxWidgets.git] / include / wx / window.h
index 7e2470214ae92c8aa029d9d766dc6e92de807fa7..913cd7d0aad0fdfae1295fa84a31ddfdc96b9c38 100644 (file)
@@ -1032,9 +1032,10 @@ public:
     wxColour GetForegroundColour() const;
 
         // Set/get the background style.
-        // Pass one of wxBG_STYLE_SYSTEM, wxBG_STYLE_COLOUR, wxBG_STYLE_CUSTOM
-    virtual bool SetBackgroundStyle(wxBackgroundStyle style) { m_backgroundStyle = style; return true; }
-    virtual wxBackgroundStyle GetBackgroundStyle() const { return m_backgroundStyle; }
+    virtual bool SetBackgroundStyle(wxBackgroundStyle style)
+        { m_backgroundStyle = style; return true; }
+    wxBackgroundStyle GetBackgroundStyle() const
+        { return m_backgroundStyle; }
 
         // returns true if the control has "transparent" areas such as a
         // wxStaticText and wxCheckBox and the background should be adapted
@@ -1069,12 +1070,14 @@ public:
 
         // get the width/height/... of the text using current or specified
         // font
-    virtual void GetTextExtent(const wxString& string,
-                               int *x, int *y,
-                               int *descent = NULL,
-                               int *externalLeading = NULL,
-                               const wxFont *theFont = (const wxFont *) NULL)
-                               const = 0;
+    void GetTextExtent(const wxString& string,
+                       int *x, int *y,
+                       int *descent = NULL,
+                       int *externalLeading = NULL,
+                       const wxFont *font = NULL) const
+    {
+        DoGetTextExtent(string, x, y, descent, externalLeading, font);
+    }
 
     wxSize GetTextExtent(const wxString& string) const
     {
@@ -1602,6 +1605,13 @@ protected:
     //     overloaded Something()s in terms of DoSomething() which will be the
     //     only one to be virtual.
 
+    // text extent
+    virtual void DoGetTextExtent(const wxString& string,
+                                 int *x, int *y,
+                                 int *descent = NULL,
+                                 int *externalLeading = NULL,
+                                 const wxFont *font = NULL) const = 0;
+
     // coordinates translation
     virtual void DoClientToScreen( int *x, int *y ) const = 0;
     virtual void DoScreenToClient( int *x, int *y ) const = 0;