From 8f12280af4ca6f028a4de7e849d7e072115d2c75 Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Mon, 16 Oct 2023 14:24:23 +0200 Subject: [PATCH] Add missing API docs for wxRichTextCtrl-related classes Document functions used in RichText sample code. Closes #23970. --- interface/wx/richtext/richtextformatdlg.h | 16 ++++++++++++++++ interface/wx/richtext/richtextstyles.h | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/interface/wx/richtext/richtextformatdlg.h b/interface/wx/richtext/richtextformatdlg.h index 6fc9e34089..6d729c041f 100644 --- a/interface/wx/richtext/richtextformatdlg.h +++ b/interface/wx/richtext/richtextformatdlg.h @@ -163,6 +163,11 @@ public: virtual bool ApplyStyle(wxRichTextCtrl* ctrl, const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO|wxRICHTEXT_SETSTYLE_OPTIMIZE); + /** + Apply attributes to the object being edited, if any. + */ + virtual bool ApplyStyle(wxRichTextCtrl* ctrl, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + /** Creation: see wxRichTextFormattingDialog() "the constructor" for details about the parameters. @@ -240,6 +245,17 @@ public: */ int GetOptions() const { return m_options; } + /** + If editing the attributes for a particular object, such as an image, + set the object so the code can initialize attributes such as size correctly. + */ + void SetObject(wxRichTextObject* obj) { m_object = obj; } + + /** + Returns the object of which the attributes are to edited (if any). + */ + wxRichTextObject* GetObject() const; + /** Returns @true if the given option is present. */ diff --git a/interface/wx/richtext/richtextstyles.h b/interface/wx/richtext/richtextstyles.h index c1a3f74e73..ec8ba3459e 100644 --- a/interface/wx/richtext/richtextstyles.h +++ b/interface/wx/richtext/richtextstyles.h @@ -557,6 +557,11 @@ public: form is for convenient setting of the most commonly-used attributes. */ void SetLevelAttributes(int level, const wxRichTextAttr& attr); + + /** + Convenience function for setting the major attributes for a list level specification. + */ + void SetAttributes(int i, int leftIndent, int leftSubIndent, int bulletStyle, const wxString& bulletSymbol = wxEmptyString); }; @@ -581,11 +586,21 @@ public: */ wxRichTextStyleSheet(); + /** + Copy constructor. + */ + wxRichTextStyleSheet(const wxRichTextStyleSheet& sheet); + /** Destructor. */ virtual ~wxRichTextStyleSheet(); + /** + Copies given style sheet. + */ + void Copy(const wxRichTextStyleSheet& sheet); + /** Adds a definition to the character style list. */