wxrichtextliststyledefinitionthis class represents a list style definition, usually added to a wxrichtextstylesheet. the class inherits paragraph attributes from wxrichtextstyleparagraphdefinition, and adds 10 further attribute objects, one for each level of a list. when applying a list style to a paragraph, the list style's base and appropriate level attributes are merged with the paragraph's existing attributes. you can apply a list style to one or more paragraphs using wxrichtextctrl::setliststyle. you can also use the functions wxrichtextctrl::numberlist, wxrichtextctrl::promotelist and wxrichtextctrl::clearliststyle. as usual, there are wxrichtextbuffer versions of these functions so that you can apply them directly to a buffer without requiring a control. derived from wxrichtextparagraphstyledefinition include files <wx/richtext/richtextstyles.h> data structures members
wxrichtextliststyledefinition::wxrichtextliststyledefinition
wxrichtextliststyledefinition::wxrichtextliststyledefinitionwxrichtextliststyledefinition(const wxstring& name = wxemptystring) constructor.
wxrichtextliststyledefinition::~wxrichtextliststyledefinition~wxrichtextliststyledefinition() destructor.
wxrichtextliststyledefinition::combinewithparagraphstylewxrichtextattr combinewithparagraphstyle(int indent, const wxrichtextattr& parastyle, wxrichtextstylesheet* stylesheet = null) 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 stylesheet is specified, the base style for this definition will also be included in the result.
wxrichtextliststyledefinition::findlevelforindentint findlevelforindent(int indent) const this function finds the level (from 0 to 9) whose indentation attribute mostly closely matches indent (expressed in tenths of a millimetre).
wxrichtextliststyledefinition::getcombinedstylewxrichtextattr getcombinedstyle(int indent, wxrichtextstylesheet* stylesheet = null) const this function combines the list style's base attributes and the level style matching the given indent, returning the combined attributes. if stylesheet is specified, the base style for this definition will also be included in the result.
wxrichtextliststyledefinition::getcombinedstyleforlevelwxrichtextattr getcombinedstylelevel(int level, 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 stylesheet is specified, the base style for this definition will also be included in the result.
wxrichtextliststyledefinition::getlevelattributesconst wxrichtextattr* getlevelattributes(int level) const returns the style for the given level. level is a number between 0 and 9.
wxrichtextliststyledefinition::getlevelcountint getlevelcount() const returns the number of levels. this is hard-wired to 10. returns the style for the given level. level is a number between 0 and 9.
wxrichtextliststyledefinition::isnumberedint isnumbered(int level) const returns true if the given level has numbered list attributes.
wxrichtextliststyledefinition::setlevelattributesvoid setlevelattributes(int level, const wxrichtextattr& attr) void setlevelattributes(int level, int leftindent, int leftsubindent, int bulletstyle, const wxstring& bulletsymbol = wxemptystring) sets the style for the given level. level is a number between 0 and 9. the first and most flexible form uses a wxrichtextattr object, while the second form is for convenient setting of the most commonly-used attributes.
|