Class: Wx::RTC::RichTextStyleListBox

Inherits:
HtmlListBox
  • Object
show all
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

See Also:

Requires:

  • USE_RICHTEXT

Defined Under Namespace

Classes: RichTextStyleType

Instance Method Summary collapse

Constructor Details

#initialize(parent, id = Wx::StandardID::ID_ANY, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = 0) ⇒ Wx::RTC::RichTextStyleListBox #initializeWx::RTC::RichTextStyleListBox

Returns a new instance of RichTextStyleListBox.

Overloads:

  • #initialize(parent, id = Wx::StandardID::ID_ANY, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = 0) ⇒ Wx::RTC::RichTextStyleListBox

    Constructor.

    Parameters:

    • parent (Wx::Window)
    • id (Integer) (defaults to: Wx::StandardID::ID_ANY)
    • pos (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)
    • size (Array(Integer, Integer), Wx::Size) (defaults to: Wx::DEFAULT_SIZE)
    • style (Integer) (defaults to: 0)
  • #initializeWx::RTC::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.

Parameters:

  • i (Integer)


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.

Parameters:

Returns:

  • (Integer)


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.

Parameters:

  • parent (Wx::Window)
  • id (Integer) (defaults to: Wx::StandardID::ID_ANY)
  • pos (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)
  • size (Array(Integer, Integer), Wx::Size) (defaults to: Wx::DEFAULT_SIZE)
  • style (Integer) (defaults to: 0)

Returns:

  • (Boolean)


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.

Parameters:

Returns:

  • (String)


87
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 87

def create_html(def_) end

#get_apply_on_selectionBoolean 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.

Returns:

  • (Boolean)


91
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 91

def get_apply_on_selection; end

#get_rich_text_ctrlWx::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.

Parameters:

  • i (Integer)

Returns:



102
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 102

def get_style(i) end

#get_style_sheetWx::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_typeWx::RichTextStyleListBox::RichTextStyleType Also known as: style_type

Returns the type of style to show in the list box.

Returns:

  • (Wx::RichTextStyleListBox::RichTextStyleType)


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.

Parameters:



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.

Parameters:

  • applyOnSelection (Boolean)


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.

Parameters:



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.

Parameters:



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=

Parameters:

  • styleType (Wx::RichTextStyleListBox::RichTextStyleType)


148
# File 'lib/wx/doc/gen/rtc/rich_text_style_list_box.rb', line 148

def set_style_type(styleType) end

#update_stylesvoid

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