Class: Wx::RTC::RichTextListStyleDefinition

Inherits:
RichTextParagraphStyleDefinition show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb

Overview

This class represents a list style definition, usually added to a RichTextStyleSheet.

The class inherits paragraph attributes from Wx::RichTextStyleParagraphDefinition, 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 Wx::RTC::RichTextCtrl#set_list_style. You can also use the functions Wx::RTC::RichTextCtrl#number_list, Wx::RTC::RichTextCtrl#promote_list and Wx::RTC::RichTextCtrl#clear_list_style. As usual, there are RichTextBuffer versions of these functions so that you can apply them directly to a buffer without requiring a control.

Category: Rich Text

Requires:

  • USE_RICHTEXT

Instance Method Summary collapse

Methods inherited from RichTextParagraphStyleDefinition

#get_next_style, #set_next_style

Methods inherited from RichTextStyleDefinition

#get_base_style, #get_description, #get_name, #get_properties, #get_style_merged_with_base, #set_base_style, #set_description, #set_name, #set_properties, #set_style

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(name = ('')) ⇒ Wx::RTC::RichTextListStyleDefinition

Constructor.

Parameters:

  • name (String) (defaults to: (''))


1153
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1153

def initialize(name=('')) end

Instance Method Details

#combine_with_paragraph_style(indent, paraStyle, styleSheet = nil) ⇒ Wx::RTC::RichTextAttr

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.

Parameters:

Returns:



1162
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1162

def combine_with_paragraph_style(indent, paraStyle, styleSheet=nil) end

#find_level_for_indent(indent) ⇒ Integer

This function finds the level (from 0 to 9) whose indentation attribute mostly closely matches indent (expressed in tenths of a millimetre).

Parameters:

  • indent (Integer)

Returns:

  • (Integer)


1167
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1167

def find_level_for_indent(indent) end

#get_combined_style(indent, styleSheet = nil) ⇒ Wx::RTC::RichTextAttr Also known as: combined_style

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.

Parameters:

Returns:



1175
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1175

def get_combined_style(indent, styleSheet=nil) end

#get_combined_style_for_level(level, styleSheet = nil) ⇒ Wx::RTC::RichTextAttr Also known as: combined_style_for_level

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.

Parameters:

Returns:



1184
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1184

def get_combined_style_for_level(level, styleSheet=nil) end

#get_level_attributes(level) ⇒ Wx::RTC::RichTextAttr Also known as: level_attributes

Returns the style for the given level.

level is a number between 0 and 9.

Parameters:

  • level (Integer)

Returns:



1192
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1192

def get_level_attributes(level) end

#get_level_countInteger Also known as: level_count

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.

Returns:

  • (Integer)


1199
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1199

def get_level_count; end

#is_numbered(level) ⇒ Boolean Also known as: numbered?

Returns true if the given level has numbered list attributes.

Parameters:

  • level (Integer)

Returns:

  • (Boolean)


1205
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1205

def is_numbered(level) end

#set_level_attributes(level, attr) ⇒ void

This method returns an undefined value.

Sets the style for the given level.

level is a number between 0 and 9. The first and most flexible form uses a TextAttr object, while the second form is for convenient setting of the most commonly-used attributes.

Parameters:



1214
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 1214

def set_level_attributes(level, attr) end