X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..4f4684d77da239a84e339c0f58eaa01f5da487d2:/interface/richtext/richtextformatdlg.h diff --git a/interface/richtext/richtextformatdlg.h b/interface/richtext/richtextformatdlg.h index c602462ec3..c5d00abc7a 100644 --- a/interface/richtext/richtextformatdlg.h +++ b/interface/richtext/richtextformatdlg.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: richtext/richtextformatdlg.h -// Purpose: documentation for wxRichTextFormattingDialogFactory class +// Purpose: interface of wxRichTextFormattingDialogFactory // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -9,7 +9,7 @@ /** @class wxRichTextFormattingDialogFactory @headerfile richtextformatdlg.h wx/richtext/richtextformatdlg.h - + This class provides pages for wxRichTextFormattingDialog, and allows other customization of the dialog. A default instance of this class is provided automatically. If you wish to @@ -18,7 +18,7 @@ class, override one or more functions, and call the static function wxRichTextFormattingDialog::SetFormattingDialogFactory. - + @library{wxrichtext} @category{FIXME} */ @@ -55,17 +55,17 @@ public: /** Enumerate all available page identifiers. */ - virtual int GetPageId(int i); + virtual int GetPageId(int i) const; /** Gets the number of available page identifiers. */ - virtual int GetPageIdCount(); + virtual int GetPageIdCount() const; /** Gets the image index for the given page identifier. */ - virtual int GetPageImage(int id); + virtual int GetPageImage(int id) const; /** Set the property sheet style, called at the start of @@ -81,37 +81,38 @@ public: }; + /** @class wxRichTextFormattingDialog @headerfile richtextformatdlg.h wx/richtext/richtextformatdlg.h - + This dialog allows the user to edit a character and/or paragraph style. - + In the constructor, specify the pages that will be created. Use GetStyle to retrieve the common style for a given range, and then use ApplyStyle to apply the user-selected formatting to a control. For example: - + @code wxRichTextRange range; if (m_richTextCtrl-HasSelection()) range = m_richTextCtrl-GetSelectionRange(); else range = wxRichTextRange(0, m_richTextCtrl-GetLastPosition()+1); - + int pages = wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS; - + wxRichTextFormattingDialog formatDlg(pages, this); formatDlg.GetStyle(m_richTextCtrl, range); - + if (formatDlg.ShowModal() == wxID_OK) { formatDlg.ApplyStyle(m_richTextCtrl, range); } @endcode - + @library{wxrichtext} - @category{cmndlg} + @category{richtext} */ class wxRichTextFormattingDialog : public wxPropertySheetDialog { @@ -120,30 +121,24 @@ public: /** Constructors. - @param flags - The pages to show. - - @param parent - The dialog's parent. - - @param id - The dialog's identifier. - - @param title - The dialog's caption. - - @param pos - The dialog's position. - - @param size - The dialog's size. - - @param style - The dialog's window style. + @param flags + The pages to show. + @param parent + The dialog's parent. + @param id + The dialog's identifier. + @param title + The dialog's caption. + @param pos + The dialog's position. + @param size + The dialog's size. + @param style + The dialog's window style. */ wxRichTextFormattingDialog(long flags, wxWindow* parent); - const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE) - wxRichTextFormattingDialog(); + const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE) + wxRichTextFormattingDialog(); //@} /** @@ -166,15 +161,15 @@ public: bool Create(long flags, wxWindow* parent, const wxString& title, wxWindowID id, const wxPoint& pos = wxDefaultPosition, - const wxSize& sz = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE); + const wxSize& sz = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); //@{ /** Gets the attributes being edited. */ const wxTextAttr GetAttributes(); - wxTextAttr GetAttributes(); + const wxTextAttr& GetAttributes(); //@} /** @@ -201,7 +196,7 @@ public: Returns the image list associated with the dialog, used for example if showing the dialog as a toolbook. */ - wxImageList* GetImageList(); + wxImageList* GetImageList() const; /** Gets common attributes from the given range and calls SetAttributes. Attributes @@ -213,12 +208,12 @@ public: /** Gets the associated style definition, if any. */ - wxRichTextStyleDefinition* GetStyleDefinition(); + wxRichTextStyleDefinition* GetStyleDefinition() const; /** Gets the associated style sheet, if any. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Sets the attributes to be edited. @@ -238,20 +233,21 @@ public: void SetImageList(wxImageList* imageList); /** - Sets the attributes and optionally updates the display, if @e update is @true. + Sets the attributes and optionally updates the display, if @a update is @true. */ - bool SetStyle(const wxTextAttr& style, bool update = @true); + bool SetStyle(const wxTextAttr& style, bool update = true); /** - Sets the style definition and optionally update the display, if @e update is @c + Sets the style definition and optionally update the display, if @a update is @c @true. */ bool SetStyleDefinition(const wxRichTextStyleDefinition& styleDef, wxRichTextStyleSheet* sheet, - bool update = @true); + bool update = true); /** Updates the display. */ bool UpdateDisplay(); }; +