wxRuby Documentation Home
Wx::RichTextStyleListBox
This is a listbox that can display the styles in a RichTextStyleSheet,
and apply the selection to an associated RichTextCtrl.
See samples/richtext
for an example of how to use it.
Derived from
HtmlListBox
See also
RichTextStyleComboCtrl, RichTextCtrl overview
RichTextStyleListBox.new
RichTextStyleListBox.new(%(arg-type)Window% parent,
Integer id = ID_ANY,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE, Integer style = 0)
Constructor.
destructor()
Destructor.
RichTextStyleListBox#apply_style
apply_style(%(arg-type)Integer% i)
Applies the _i_th style to the associated rich text control.
RichTextStyleListBox#convert_tenths_mm_to_pixels
Integer convert_tenths_mm_to_pixels(%(arg-type)DC% dc, Integer units)
Converts units in tenths of a millimetre to device units.
RichTextStyleListBox#create_html
String create_html(%(arg-type)RichTextStyleDefinition% def)
Creates a suitable HTML fragment for a definition.
RichTextStyleListBox#get_apply_on_selection
Boolean get_apply_on_selection()
If the return value is , clicking on a style name in the list will immediately
apply the style to the associated rich text control.
RichTextStyleListBox#get_rich_text_ctrl
RichTextCtrl get_rich_text_ctrl()
Returns the RichTextCtrl associated with this listbox.
RichTextStyleListBox#get_style
RichTextStyleDefinition get_style(%(arg-type)size_t% i)
Gets a style for a listbox index.
RichTextStyleListBox#get_style_sheet
RichTextStyleSheet get_style_sheet()
Returns the style sheet associated with this listbox.
RichTextStyleListBox#get_style_type
RichTextStyleListBox::RichTextStyleType get_style_type()
Returns the type of style to show in the list box.
RichTextStyleListBox#on_get_item
String on_get_item(%(arg-type)size_t% n)
Returns the HTML for this item.
RichTextStyleListBox#on_left_down
on_left_down(%(arg-type)MouseEvent% event)
Implements left click behaviour, applying the clicked style to the RichTextCtrl.
RichTextStyleListBox#on_select
on_select(%(arg-type)CommandEvent% event)
Reacts to selection.
RichTextStyleListBox#set_apply_on_selection
set_apply_on_selection(%(arg-type)Boolean% applyOnSelection)
If applyOnSelection is , clicking on a style name in the list will immediately
apply the style to the associated rich text control.
RichTextStyleListBox#set_rich_text_ctrl
set_rich_text_ctrl(%(arg-type)RichTextCtrl% ctrl)
Associates the listbox with a RichTextCtrl.
RichTextStyleListBox#set_style_sheet
set_style_sheet(%(arg-type)RichTextStyleSheet% styleSheet)
Associates the control with a style sheet.
RichTextStyleListBox#set_style_type
set_style_type(%(arg-type)RichTextStyleListBox::RichTextStyleType% styleType)
Sets the style type to display. One of RichTextStyleListBox::RICHTEXT_STYLE_ALL, RichTextStyleListBox::RICHTEXT_STYLE_PARAGRAPH,
RichTextStyleListBox::RICHTEXT_STYLE_CHARACTER and RichTextStyleListBox::RICHTEXT_STYLE_LIST.
RichTextStyleListBox#update_styles
update_styles()
Updates the list from the associated style sheet.
[This page automatically generated from the Textile source at 2023-06-09 00:45:28 +0000]