Class: Wx::RTC::RichTextPlainText
- Inherits:
-
RichTextObject
- Object
- Object
- RichTextObject
- Wx::RTC::RichTextPlainText
- Defined in:
- lib/wx/doc/gen/rtc/rich_text_object.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This object represents a single piece of text.
Category: Rich Text
Instance Method Summary collapse
-
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
-
#can_merge(object, context) ⇒ Boolean
(also: #can_merge?)
Returns true if this object can merge itself with the given one.
-
#can_split(context) ⇒ Boolean
(also: #can_split?)
Returns true if this object can potentially be split, by virtue of having different virtual attributes for individual sub-objects.
-
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
- #copy(obj) ⇒ void
-
#delete_range(range) ⇒ Boolean
Deletes the given range.
-
#do_split(pos) ⇒ Wx::RTC::RichTextObject
Do a split from pos, returning an object containing the second part, and setting the first part in ‘this’.
-
#draw(dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
-
#dump(stream) ⇒ void
Dump object data to the given output stream for debugging.
-
#get_first_line_break_position(pos) ⇒ Integer
(also: #first_line_break_position)
Get the first position from pos that has a line break character.
-
#get_range_size(range, size, descent, dc, context, flags, position = (Wx::Point.new(0, 0)), parentSize = Wx::DEFAULT_SIZE, partialExtents = nil) ⇒ Array(Boolean,Integer)
(also: #range_size)
Returns the object size for the given range.
-
#get_text ⇒ Wx::String
(also: #text)
Returns the text.
-
#get_text_for_range(range) ⇒ String
(also: #text_for_range)
Returns any text in this object for the given range.
-
#get_xml_node_name ⇒ String
(also: #xml_node_name)
Returns the XML node name of this object.
-
#import_from_xml(buffer, node, handler, recurse) ⇒ Array(Boolean,Boolean)
Imports this object from XML.
-
#initialize(*args) ⇒ RichTextPlainText
constructor
A new instance of RichTextPlainText.
-
#is_empty ⇒ Boolean
(also: #empty?)
Returns true if the object is empty.
-
#layout(dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
-
#merge(object, context) ⇒ Boolean
Returns true if this object merged itself with the given one.
-
#set_text(text) ⇒ void
(also: #text=)
Sets the text.
-
#split(context) ⇒ Wx::RTC::RichTextObject
Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes.
-
#uses_paragraph_attributes ⇒ Boolean
Does this object take note of paragraph attributes? Text and image objects don’t.
Methods inherited from RichTextObject
#accepts_focus, #adjust_attributes, adjust_available_space, #can_edit_properties, #convert_pixels_to_tenths_mm, convert_pixels_to_tenths_mm, #convert_tenths_mm_to_pixels, convert_tenths_mm_to_pixels, #dereference, draw_border, draw_box_attributes, #edit_properties, #find_position, #get_absolute_position, #get_attributes, #get_available_content_area, #get_best_size, #get_bottom_margin, get_box_rects, #get_buffer, #get_cached_size, #get_container, #get_descent, #get_float_direction, #get_left_margin, #get_max_size, #get_min_size, #get_name, #get_natural_size, #get_own_range, #get_own_range_if_top_level, #get_parent, #get_parent_container, #get_position, #get_properties, #get_properties_menu_label, #get_range, #get_rect, #get_right_margin, #get_selection, #get_top_margin, get_total_margin, #handles_child_selections, #hit_test, #invalidate, #is_atomic, #is_composite, #is_floatable, #is_floating, #is_shown, #is_top_level, #layout_to_best_size, #move, #reference, #set_attributes, #set_cached_size, #set_descent, #set_margins, #set_max_size, #set_min_size, #set_name, #set_own_range, #set_parent, #set_position, #set_properties, #set_range, #show
Methods inherited from Object
Constructor Details
#initialize(text = (''), parent = nil, style = nil) ⇒ Wx::RTC::RichTextPlainText #initialize(obj) ⇒ Wx::RTC::RichTextPlainText
Returns a new instance of RichTextPlainText.
1174 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1174 def initialize(*args) end |
Instance Method Details
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
By default, guess that the object is 1 unit long.
1233 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1233 def calculate_range(start, end_) end |
#can_merge(object, context) ⇒ Boolean Also known as: can_merge?
Returns true if this object can merge itself with the given one.
1249 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1249 def can_merge(object, context) end |
#can_split(context) ⇒ Boolean Also known as: can_split?
Returns true if this object can potentially be split, by virtue of having different virtual attributes for individual sub-objects.
1263 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1263 def can_split(context) end |
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
1320 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1320 def clone; end |
#copy(obj) ⇒ void
This method returns an undefined value.
1316 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1316 def copy(obj) end |
#delete_range(range) ⇒ Boolean
Deletes the given range.
1238 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1238 def delete_range(range) end |
#do_split(pos) ⇒ Wx::RTC::RichTextObject
Do a split from pos, returning an object containing the second part, and setting the first part in ‘this’.
1225 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1225 def do_split(pos) end |
#draw(dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
Some objects may ignore the range (for example paragraphs) while others must obey it (lines, to implement wrapping)
1187 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1187 def draw(dc, context, range, selection, rect, descent, style) end |
#dump(stream) ⇒ void
This method returns an undefined value.
Dump object data to the given output stream for debugging.
1276 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1276 def dump(stream) end |
#get_first_line_break_position(pos) ⇒ Integer Also known as: first_line_break_position
Get the first position from pos that has a line break character.
1281 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1281 def get_first_line_break_position(pos) end |
#get_range_size(range, size, descent, dc, context, flags, position = (Wx::Point.new(0, 0)), parentSize = Wx::DEFAULT_SIZE, partialExtents = nil) ⇒ Array(Boolean,Integer) Also known as: range_size
Returns the object size for the given range.
Returns false if the range is invalid for this object.
1213 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1213 def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end |
#get_text ⇒ Wx::String Also known as: text
Returns the text.
1305 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1305 def get_text; end |
#get_text_for_range(range) ⇒ String Also known as: text_for_range
Returns any text in this object for the given range.
1219 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1219 def get_text_for_range(range) end |
#get_xml_node_name ⇒ String Also known as: xml_node_name
Returns the XML node name of this object.
This must be overridden for XmlNode-base XML export to work.
1300 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1300 def get_xml_node_name; end |
#import_from_xml(buffer, node, handler, recurse) ⇒ Array(Boolean,Boolean)
Imports this object from XML.
1294 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1294 def import_from_xml(buffer, node, handler, recurse) end |
#is_empty ⇒ Boolean Also known as: empty?
Returns true if the object is empty.
1242 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1242 def is_empty; end |
#layout(dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
Layout must set the cached size. rect is the available space for the object, and parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box).
1198 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1198 def layout(dc, context, rect, parentRect, style) end |
#merge(object, context) ⇒ Boolean
Returns true if this object merged itself with the given one.
The calling code will then delete the given object.
1258 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1258 def merge(object, context) end |
#set_text(text) ⇒ void Also known as: text=
This method returns an undefined value.
Sets the text.
1311 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1311 def set_text(text) end |
#split(context) ⇒ Wx::RTC::RichTextObject
Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes.
Returns itself if it was not split.
1271 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1271 def split(context) end |
#uses_paragraph_attributes ⇒ Boolean
Does this object take note of paragraph attributes? Text and image objects don’t.
1286 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1286 def uses_paragraph_attributes; end |