![]() ![]() ![]() ![]() wxrichtextstylelistboxthis is a listbox that can display the styles in a wxrichtextstylesheet, and apply the selection to an associated wxrichtextctrl. see samples/richtext for an example of how to use it. derived from include files <wx/richtext/richtextstyles.h> see also wxrichtextstylecomboctrl, wxrichtextctrl overview members
wxrichtextstylelistbox::wxrichtextstylelistbox
wxrichtextstylelistbox::wxrichtextstylelistboxwxrichtextstylelistbox(wxwindow* parent, wxwindowid id = wxid_any, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = 0) constructor.
wxrichtextstylelistbox::~wxrichtextstylelistbox~wxrichtextstylelistbox() destructor.
wxrichtextstylelistbox::applystylevoid applystyle(int i) applies the ith style to the associated rich text control.
wxrichtextstylelistbox::converttenthsmmtopixelsint converttenthsmmtopixels(wxdc& dc, int units) const converts units in tenths of a millimetre to device units.
wxrichtextstylelistbox::createhtmlwxstring createhtml(wxrichtextstyledefinition* def) const creates a suitable html fragment for a definition.
wxrichtextstylelistbox::getapplyonselectionbool getapplyonselection() 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.
wxrichtextstylelistbox::getrichtextctrlwxrichtextctrl* getrichtextctrl() const returns the wxrichtextctrl associated with this listbox.
wxrichtextstylelistbox::getstylewxrichtextstyledefinition* getstyle(size_t i) const gets a style for a listbox index.
wxrichtextstylelistbox::getstylesheetwxrichtextstylesheet* getstylesheet() const returns the style sheet associated with this listbox.
wxrichtextstylelistbox::getstyletypewxrichtextstylelistbox::wxrichtextstyletype getstyletype() const returns the type of style to show in the list box.
wxrichtextstylelistbox::ongetitemwxstring ongetitem(size_t n) const returns the html for this item.
wxrichtextstylelistbox::onleftdownvoid onleftdown(wxmouseevent& event) implements left click behaviour, applying the clicked style to the wxrichtextctrl.
wxrichtextstylelistbox::onselectvoid onselect(wxcommandevent& event) reacts to selection.
wxrichtextstylelistbox::setapplyonselectionvoid setapplyonselection(bool applyonselection) if applyonselection is true, clicking on a style name in the list will immediately apply the style to the associated rich text control.
wxrichtextstylelistbox::setrichtextctrlvoid setrichtextctrl(wxrichtextctrl* ctrl) associates the listbox with a wxrichtextctrl.
wxrichtextstylelistbox::setstylesheetvoid setstylesheet(wxrichtextstylesheet* stylesheet) associates the control with a style sheet.
wxrichtextstylelistbox::setstyletypevoid setstyletype(wxrichtextstylelistbox::wxrichtextstyletype styletype) sets the style type to display. one of wxrichtextstylelistbox::wxrichtext_style_all, wxrichtextstylelistbox::wxrichtext_style_paragraph, wxrichtextstylelistbox::wxrichtext_style_character and wxrichtextstylelistbox::wxrichtext_style_list.
wxrichtextstylelistbox::updatestylesvoid updatestyles() updates the list from the associated style sheet.
|