Class: Wx::RTC::RichTextStyleListBox
- Inherits:
-
HtmlListBox
- Object
- HtmlListBox
- Wx::RTC::RichTextStyleListBox
- Defined in:
- lib/wx/doc/gen/rtc/rich_text_style_list_box.rb
Overview
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.
Category: Rich Text
Defined Under Namespace
Classes: RichTextStyleType
Instance Method Summary collapse
-
#apply_style(i) ⇒ void
Applies the ith style to the associated rich text control.
-
#convert_tenths_mm_to_pixels(dc, units) ⇒ Integer
Converts units in tenths of a millimetre to device units.
-
#create(parent, id = Wx::StandardID::ID_ANY, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = 0) ⇒ Boolean
Creates the window.
-
#create_html(def_) ⇒ String
Creates a suitable HTML fragment for a definition.
-
#get_apply_on_selection ⇒ Boolean
(also: #apply_on_selection)
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.
-
#get_rich_text_ctrl ⇒ Wx::RTC::RichTextCtrl
(also: #rich_text_ctrl)
Returns the RichTextCtrl associated with this listbox.
-
#get_style(i) ⇒ Wx::RTC::RichTextStyleDefinition
(also: #style)
Gets a style for a listbox index.
-
#get_style_sheet ⇒ Wx::RTC::RichTextStyleSheet
(also: #style_sheet)
Returns the style sheet associated with this listbox.
-
#get_style_type ⇒ Wx::RichTextStyleListBox::RichTextStyleType
(also: #style_type)
Returns the type of style to show in the list box.
-
#initialize(*args) ⇒ RichTextStyleListBox
constructor
A new instance of RichTextStyleListBox.
-
#on_left_down(event) ⇒ void
Implements left click behaviour, applying the clicked style to the RichTextCtrl.
-
#set_apply_on_selection(applyOnSelection) ⇒ void
(also: #apply_on_selection=)
If applyOnSelection is true, clicking on a style name in the list will immediately apply the style to the associated rich text control.
-
#set_rich_text_ctrl(ctrl) ⇒ void
(also: #rich_text_ctrl=)
Associates the listbox with a RichTextCtrl.
-
#set_style_sheet(styleSheet) ⇒ void
(also: #style_sheet=)
Associates the control with a style sheet.
-
#set_style_type(styleType) ⇒ void
(also: #style_type=)
Sets the style type to display.
-
#update_styles ⇒ void
Updates the list from the associated style sheet.
Constructor Details
#initialize(parent, id = Wx::StandardID::ID_ANY, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = 0) ⇒ Wx::RTC::RichTextStyleListBox #initialize ⇒ Wx::RTC::RichTextStyleListBox
Returns a new instance of RichTextStyleListBox.
62 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 62 def initialize(*args) end |
Instance Method Details
#apply_style(i) ⇒ void
This method returns an undefined value.
Applies the ith style to the associated rich text control.
76 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 76 def apply_style(i) end |
#convert_tenths_mm_to_pixels(dc, units) ⇒ Integer
Converts units in tenths of a millimetre to device units.
82 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 82 def convert_tenths_mm_to_pixels(dc, units) end |
#create(parent, id = Wx::StandardID::ID_ANY, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = 0) ⇒ Boolean
Creates the window.
71 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 71 def create(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0) end |
#create_html(def_) ⇒ String
Creates a suitable HTML fragment for a definition.
87 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 87 def create_html(def_) end |
#get_apply_on_selection ⇒ Boolean Also known as: apply_on_selection
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.
91 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 91 def get_apply_on_selection; end |
#get_rich_text_ctrl ⇒ Wx::RTC::RichTextCtrl Also known as: rich_text_ctrl
Returns the Wx::RTC::RichTextCtrl associated with this listbox.
96 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 96 def get_rich_text_ctrl; end |
#get_style(i) ⇒ Wx::RTC::RichTextStyleDefinition Also known as: style
Gets a style for a listbox index.
102 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 102 def get_style(i) end |
#get_style_sheet ⇒ Wx::RTC::RichTextStyleSheet Also known as: style_sheet
Returns the style sheet associated with this listbox.
107 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 107 def get_style_sheet; end |
#get_style_type ⇒ Wx::RichTextStyleListBox::RichTextStyleType Also known as: style_type
Returns the type of style to show in the list box.
112 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 112 def get_style_type; end |
#on_left_down(event) ⇒ void
This method returns an undefined value.
Implements left click behaviour, applying the clicked style to the Wx::RTC::RichTextCtrl.
118 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 118 def on_left_down(event) end |
#set_apply_on_selection(applyOnSelection) ⇒ void Also known as: apply_on_selection=
This method returns an undefined value.
If applyOnSelection is true, clicking on a style name in the list will immediately apply the style to the associated rich text control.
123 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 123 def set_apply_on_selection(applyOnSelection) end |
#set_rich_text_ctrl(ctrl) ⇒ void Also known as: rich_text_ctrl=
This method returns an undefined value.
Associates the listbox with a Wx::RTC::RichTextCtrl.
129 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 129 def set_rich_text_ctrl(ctrl) end |
#set_style_sheet(styleSheet) ⇒ void Also known as: style_sheet=
This method returns an undefined value.
Associates the control with a style sheet.
135 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 135 def set_style_sheet(styleSheet) end |
#set_style_type(styleType) ⇒ void Also known as: style_type=
This method returns an undefined value.
Sets the style type to display.
One of
148 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 148 def set_style_type(styleType) end |
#update_styles ⇒ void
This method returns an undefined value.
Updates the list from the associated style sheet.
153 |
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 153 def update_styles; end |