]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/richtext/richtextctrl.h
Avoid creating and immediately destroying a wxGraphicsContext for most uses of wxGCDC.
[wxWidgets.git] / include / wx / richtext / richtextctrl.h
index 2ced2cdb7bcdf93332574ee3fec29a4065fe0d0e..47130eff11bedace8704062e1aa7f93ff40aa838 100644 (file)
@@ -1701,6 +1701,71 @@ public:
     */
     virtual bool GetVerticalScrollbarEnabled() const { return m_verticalScrollbarEnabled; }
 
+    /**
+        Sets the scale factor for displaying fonts, for example for more comfortable
+        editing.
+    */
+    void SetFontScale(double fontScale, bool refresh = false);
+
+    /**
+        Returns the scale factor for displaying fonts, for example for more comfortable
+        editing.
+    */
+    double GetFontScale() const { return GetBuffer().GetFontScale(); }
+
+    /**
+        Sets the scale factor for displaying certain dimensions such as indentation and
+        inter-paragraph spacing. This can be useful when editing in a small control
+        where you still want legible text, but a minimum of wasted white space.
+    */
+    void SetDimensionScale(double dimScale, bool refresh = false);
+
+    /**
+        Returns the scale factor for displaying certain dimensions such as indentation
+        and inter-paragraph spacing.
+    */
+    double GetDimensionScale() const { return GetBuffer().GetDimensionScale(); }
+
+    /**
+        Sets an overall scale factor for displaying and editing the content.
+    */
+    void SetScale(double scale, bool refresh = false);
+
+    /**
+        Returns an overall scale factor for displaying and editing the content.
+    */
+    double GetScale() const { return m_scale; }
+
+    /**
+        Returns an unscaled point.
+    */
+    wxPoint GetUnscaledPoint(const wxPoint& pt) const;
+
+    /**
+        Returns a scaled point.
+    */
+    wxPoint GetScaledPoint(const wxPoint& pt) const;
+
+    /**
+        Returns an unscaled size.
+    */
+    wxSize GetUnscaledSize(const wxSize& sz) const;
+
+    /**
+        Returns a scaled size.
+    */
+    wxSize GetScaledSize(const wxSize& sz) const;
+
+    /**
+        Returns an unscaled rectangle.
+    */
+    wxRect GetUnscaledRect(const wxRect& rect) const;
+
+    /**
+        Returns a scaled rectangle.
+    */
+    wxRect GetScaledRect(const wxRect& rect) const;
+
 // Command handlers
 
     /**
@@ -2225,6 +2290,9 @@ protected:
 
     /// The object that currently has the editing focus
     wxRichTextParagraphLayoutBox* m_focusObject;
+
+    /// An overall scale factor
+    double                  m_scale;
 };
 
 #if wxUSE_DRAG_AND_DROP