]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dc.h
don't add extra GetCharHeight() pixels to the top border if our label is empty (patch...
[wxWidgets.git] / include / wx / dc.h
index da5bc5fde03d00568d3d3cea7260d849c16434ea..67fd8f48c84d76d8f517440af87adde7c7b18c4d 100644 (file)
@@ -441,13 +441,27 @@ public:
                        wxFont *theFont = NULL) const
         { DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
 
+    wxSize GetTextExtent(const wxString& string) const
+    {
+        wxCoord w, h;
+        DoGetTextExtent(string, &w, &h);
+        return wxSize(w, h);
+    }
+
     // works for single as well as multi-line strings
-    virtual void GetMultiLineTextExtent(const wxString& text,
+    virtual void GetMultiLineTextExtent(const wxString& string,
                                         wxCoord *width,
                                         wxCoord *height,
                                         wxCoord *heightLine = NULL,
                                         wxFont *font = NULL) const;
 
+    wxSize GetMultiLineTextExtent(const wxString& string) const
+    {
+        wxCoord w, h;
+        GetMultiLineTextExtent(string, &w, &h);
+        return wxSize(w, h);
+    }
+
     // Measure cumulative width of text after each character
     bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
         { return DoGetPartialTextExtents(text, widths); }
@@ -563,11 +577,6 @@ public:
     virtual int GetLogicalFunction() const { return m_logicalFunction; }
     virtual void SetLogicalFunction(int function) = 0;
 
-#if WXWIN_COMPATIBILITY_2_4
-    virtual void SetOptimization(bool WXUNUSED(opt)) { }
-    virtual bool GetOptimization() { return false; }
-#endif
-
     // bounding box
     // ------------
 
@@ -735,13 +744,6 @@ protected:
     virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
                                      wxCoord width, wxCoord height) = 0;
 
-#if WXWIN_COMPATIBILITY_2_4
-    // this was only for confusing people, use DoGetClippingBox only
-    virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y,
-                                     wxCoord *w, wxCoord *h)
-        { DoGetClippingBox(x, y, w, h); }
-#endif
-
     virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
                                   wxCoord *w, wxCoord *h) const
     {