X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e059e1bb3303f66ac28aeee1c32a903e37c15812..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/include/wx/richtext/richtextctrl.h diff --git a/include/wx/richtext/richtextctrl.h b/include/wx/richtext/richtextctrl.h index 0c572c6047..efd4959840 100644 --- a/include/wx/richtext/richtextctrl.h +++ b/include/wx/richtext/richtextctrl.h @@ -1007,12 +1007,6 @@ public: void SetSelection(const wxRichTextSelection& sel) { m_selection = sel; } //@} - - /** - Selects all the text in the buffer. - */ - virtual void SelectAll(); - /** Makes the control editable, or not. */ @@ -1060,6 +1054,21 @@ public: */ virtual wxRichTextBox* WriteTextBox(const wxRichTextAttr& textAttr = wxRichTextAttr()); + /** + Writes a field at the current insertion point. + + @param fieldType + The field type, matching an existing field type definition. + @param properties + Extra data for the field. + @param textAttr + Optional attributes. + + @see wxRichTextField, wxRichTextFieldType, wxRichTextFieldTypeStandard + */ + virtual wxRichTextField* WriteField(const wxString& fieldType, const wxRichTextProperties& properties, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + /** Write a table at the current insertion point, returning the table. You can then call SetFocusObject() to set the focus to the new object. @@ -1686,6 +1695,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 /** @@ -2064,6 +2138,17 @@ public: // 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. */ @@ -2210,6 +2295,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