void SetSelection(const wxRichTextSelection& sel) { m_selection = sel; }
//@}
-
- /**
- Selects all the text in the buffer.
- */
- virtual void SelectAll();
-
/**
Makes the control editable, or not.
*/
*/
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
/**
// Implementation
+ /**
+ Processes the back key.
+ */
+ virtual bool ProcessBackKey(wxKeyEvent& event, int flags);
+
+ /**
+ Given a character position at which there is a list style, find the range
+ encompassing the same list style by looking backwards and forwards.
+ */
+ virtual wxRichTextRange FindRangeForList(long pos, bool& isNumberedList);
+
/**
Sets up the caret for the given position and container, after a mouse click.
*/
/// The object that currently has the editing focus
wxRichTextParagraphLayoutBox* m_focusObject;
+
+ /// An overall scale factor
+ double m_scale;
};
#if wxUSE_DRAG_AND_DROP