X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c913512a4c9f36e11e07ea707002fab1608d324..838bfb19e02839b57778ef71963505b27a7ea758:/interface/richtext/richtextstyles.h diff --git a/interface/richtext/richtextstyles.h b/interface/richtext/richtextstyles.h index 22649713d4..a054d938cc 100644 --- a/interface/richtext/richtextstyles.h +++ b/interface/richtext/richtextstyles.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: richtext/richtextstyles.h -// Purpose: documentation for wxRichTextStyleListCtrl class +// Purpose: interface of wxRichTextStyleListCtrl // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -25,7 +25,7 @@ so that when a style is double-clicked, it is applied to the selection. @beginStyleTable - @style{wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR}: + @style{wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR} This style hides the category selection control. @endStyleTable @@ -58,27 +58,27 @@ public: /** Returns the associated rich text control, if any. */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Returns the wxChoice control used for selecting the style category. */ - wxChoice* GetStyleChoice(); + wxChoice* GetStyleChoice() const; /** Returns the wxListBox control used to view the style list. */ - wxRichTextStyleListBox* GetStyleListBox(); + wxRichTextStyleListBox* GetStyleListBox() const; /** Returns the associated style sheet, if any. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Returns the type of style to show in the list box. */ - wxRichTextStyleListBox::wxRichTextStyleType GetStyleType(); + wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const; /** Associates the control with a wxRichTextCtrl. @@ -105,6 +105,7 @@ public: }; + /** @class wxRichTextStyleDefinition @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -130,31 +131,31 @@ public: /** Returns the style on which this style is based. */ - const wxString GetBaseStyle(); + const wxString GetBaseStyle() const; /** Returns the style's description. */ - const wxString GetDescription(); + const wxString GetDescription() const; /** Returns the style name. */ - const wxString GetName(); + const wxString GetName() const; //@{ /** Returns the attributes associated with this style. */ - wxTextAttr GetStyle(); - const wxTextAttr GetStyle(); + wxTextAttr GetStyle() const; + const wxTextAttr GetStyle() const; //@} /** Returns the style attributes combined with the attributes of the specified base style, if any. This function works recursively. */ - wxTextAttr GetStyleMergedWithBase(wxRichTextStyleSheet* sheet); + wxTextAttr GetStyleMergedWithBase(wxRichTextStyleSheet* sheet) const; /** Sets the name of the style that this style is based on. @@ -178,6 +179,7 @@ public: }; + /** @class wxRichTextParagraphStyleDefinition @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -186,7 +188,7 @@ public: wxRichTextStyleSheet. @library{wxrichtext} - @category{FIXME} + @category{richtext} */ class wxRichTextParagraphStyleDefinition : public wxRichTextStyleDefinition { @@ -204,7 +206,7 @@ public: /** Returns the style that should normally follow this style. */ - const wxString GetNextStyle(); + const wxString GetNextStyle() const; /** Sets the style that should normally follow this style. @@ -213,6 +215,7 @@ public: }; + /** @class wxRichTextStyleListBox @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -223,11 +226,10 @@ public: See @c samples/richtext for an example of how to use it. @library{wxrichtext} - @category{FIXME} + @category{richtext} - @seealso - wxRichTextStyleComboCtrl, @ref overview_wxrichtextctrloverview "wxRichTextCtrl - overview" + @see wxRichTextStyleComboCtrl, @ref overview_wxrichtextctrloverview + "wxRichTextCtrl overview" */ class wxRichTextStyleListBox : public wxHtmlListBox { @@ -254,44 +256,44 @@ public: /** Converts units in tenths of a millimetre to device units. */ - int ConvertTenthsMMToPixels(wxDC& dc, int units); + int ConvertTenthsMMToPixels(wxDC& dc, int units) const; /** Creates a suitable HTML fragment for a definition. */ - wxString CreateHTML(wxRichTextStyleDefinition* def); + wxString CreateHTML(wxRichTextStyleDefinition* def) const; /** If the return value is @true, clicking on a style name in the list will immediately apply the style to the associated rich text control. */ - bool GetApplyOnSelection(); + bool GetApplyOnSelection() const; /** Returns the wxRichTextCtrl associated with this listbox. */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Gets a style for a listbox index. */ - wxRichTextStyleDefinition* GetStyle(size_t i); + wxRichTextStyleDefinition* GetStyle(size_t i) const; /** Returns the style sheet associated with this listbox. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Returns the type of style to show in the list box. */ - wxRichTextStyleListBox::wxRichTextStyleType GetStyleType(); + wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const; /** Returns the HTML for this item. */ - wxString OnGetItem(size_t n); + wxString OnGetItem(size_t n) const; /** Implements left click behaviour, applying the clicked style to the @@ -305,7 +307,7 @@ public: void OnSelect(wxCommandEvent& event); /** - If @e applyOnSelection is @true, clicking on a style name in the list will + If @a applyOnSelection is @true, clicking on a style name in the list will immediately apply the style to the associated rich text control. */ @@ -336,6 +338,7 @@ public: }; + /** @class wxRichTextStyleComboCtrl @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -346,11 +349,10 @@ public: See @c samples/richtext for an example of how to use it. @library{wxrichtext} - @category{FIXME} + @category{richtext} - @seealso - wxRichTextStyleListBox, @ref overview_wxrichtextctrloverview "wxRichTextCtrl - overview" + @see wxRichTextStyleListBox, @ref overview_wxrichtextctrloverview + "wxRichTextCtrl overview" */ class wxRichTextStyleComboCtrl : public wxComboCtrl { @@ -372,12 +374,12 @@ public: /** Returns the wxRichTextCtrl associated with this control. */ - wxRichTextCtrl* GetRichTextCtrl(); + wxRichTextCtrl* GetRichTextCtrl() const; /** Returns the style sheet associated with this control. */ - wxRichTextStyleSheet* GetStyleSheet(); + wxRichTextStyleSheet* GetStyleSheet() const; /** Associates the control with a wxRichTextCtrl. @@ -396,6 +398,7 @@ public: }; + /** @class wxRichTextCharacterStyleDefinition @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -404,7 +407,7 @@ public: wxRichTextStyleSheet. @library{wxrichtext} - @category{FIXME} + @category{richtext} */ class wxRichTextCharacterStyleDefinition : public wxRichTextStyleDefinition { @@ -421,6 +424,7 @@ public: }; + /** @class wxRichTextListStyleDefinition @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -443,7 +447,7 @@ public: so that you can apply them directly to a buffer without requiring a control. @library{wxrichtext} - @category{FIXME} + @category{richtext} */ class wxRichTextListStyleDefinition : public wxRichTextParagraphStyleDefinition { @@ -461,58 +465,56 @@ public: /** This function combines the given paragraph style with the list style's base attributes and level style matching the given indent, returning the combined attributes. - If @e styleSheet is specified, the base style for this definition will also be + If @a styleSheet is specified, the base style for this definition will also be included in the result. */ wxTextAttr CombineWithParagraphStyle(int indent, const wxTextAttr& paraStyle, - wxRichTextStyleSheet* styleSheet = @NULL); + wxRichTextStyleSheet* styleSheet = NULL); /** This function finds the level (from 0 to 9) whose indentation attribute mostly - closely matches @e indent (expressed in tenths of a millimetre). + closely matches @a indent (expressed in tenths of a millimetre). */ - int FindLevelForIndent(int indent); + int FindLevelForIndent(int indent) const; /** This function combines the list style's base attributes and the level style matching the given indent, returning the combined attributes. - If @e styleSheet is specified, the base style for this definition will also be + If @a styleSheet is specified, the base style for this definition will also be included in the result. */ wxTextAttr GetCombinedStyle(int indent, - wxRichTextStyleSheet* styleSheet = @NULL); + wxRichTextStyleSheet* styleSheet = NULL) const; /** This function combines the list style's base attributes and the style for the specified level, returning the combined attributes. - If @e styleSheet is specified, the base style for this definition will also be + If @a styleSheet is specified, the base style for this definition will also be included in the result. */ wxTextAttr GetCombinedStyleLevel(int level, - wxRichTextStyleSheet* styleSheet = @NULL); + wxRichTextStyleSheet* styleSheet = NULL) const; /** - Returns the style for the given level. @e level is a number between 0 and 9. + Returns the style for the given level. @a level is a number between 0 and 9. */ - const wxTextAttr* GetLevelAttributes(int level); + const wxTextAttr* GetLevelAttributes(int level) const; /** Returns the number of levels. This is hard-wired to 10. - Returns the style for the given level. @e level is a number between 0 and 9. */ - int GetLevelCount(); + int GetLevelCount() const; /** Returns @true if the given level has numbered list attributes. */ - int IsNumbered(int level); + int IsNumbered(int level) const; //@{ /** - Sets the style for the given level. @e level is a number between 0 and 9. - + Sets the style for the given level. @a level is a number between 0 and 9. The first and most flexible form uses a wxTextAttr object, while the second form is for convenient setting of the most commonly-used attributes. */ @@ -525,6 +527,7 @@ public: }; + /** @class wxRichTextStyleSheet @headerfile richtextstyles.h wx/richtext/richtextstyles.h @@ -537,7 +540,7 @@ public: of styles to the control. @library{wxrichtext} - @category{FIXME} + @category{richtext} */ class wxRichTextStyleSheet : public wxObject { @@ -580,86 +583,86 @@ public: /** Finds a character definition by name. */ - wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name); + wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const; /** Finds a list definition by name. */ - wxRichTextListStyleDefinition* FindListStyle(const wxString& name); + wxRichTextListStyleDefinition* FindListStyle(const wxString& name) const; /** Finds a paragraph definition by name. */ - wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name); + wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const; /** Finds a style definition by name. */ - wxRichTextStyleDefinition* FindStyle(const wxString& name); + wxRichTextStyleDefinition* FindStyle(const wxString& name) const; /** Returns the @e nth character style. */ - wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n); + wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n) const; /** Returns the number of character styles. */ - size_t GetCharacterStyleCount(); + size_t GetCharacterStyleCount() const; /** Returns the style sheet's description. */ - const wxString GetDescription(); + const wxString GetDescription() const; /** Returns the @e nth list style. */ - wxRichTextListStyleDefinition* GetListStyle(size_t n); + wxRichTextListStyleDefinition* GetListStyle(size_t n) const; /** Returns the number of list styles. */ - size_t GetListStyleCount(); + size_t GetListStyleCount() const; /** Returns the style sheet's name. */ - const wxString GetName(); + const wxString GetName() const; /** Returns the @e nth paragraph style. */ - wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n); + wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n) const; /** Returns the number of paragraph styles. */ - size_t GetParagraphStyleCount(); + size_t GetParagraphStyleCount() const; /** Removes a character style. */ bool RemoveCharacterStyle(wxRichTextStyleDefinition* def, - bool deleteStyle = @false); + bool deleteStyle = false); /** Removes a list style. */ bool RemoveListStyle(wxRichTextStyleDefinition* def, - bool deleteStyle = @false); + bool deleteStyle = false); /** Removes a paragraph style. */ bool RemoveParagraphStyle(wxRichTextStyleDefinition* def, - bool deleteStyle = @false); + bool deleteStyle = false); /** Removes a style. */ bool RemoveStyle(wxRichTextStyleDefinition* def, - bool deleteStyle = @false); + bool deleteStyle = false); /** Sets the style sheet's description. @@ -671,3 +674,4 @@ public: */ void SetName(const wxString& name); }; +