Class: Wx::RTC::RichTextParagraph
- Inherits:
-
RichTextCompositeObject
- Object
- Object
- RichTextObject
- RichTextCompositeObject
- Wx::RTC::RichTextParagraph
- Defined in:
- lib/wx/doc/gen/rtc/rich_text_composite_object.rb,
lib/wx/doc/rtc/rich_text_paragraph.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects.
Category: Rich Text
Class Method Summary collapse
-
.clear_default_tabs ⇒ void
Clears the default tabstop array.
-
.get_default_tabs ⇒ Wx::ArrayInt
Returns the default tabstop array.
-
.init_default_tabs ⇒ void
Creates a default tabstop array.
Instance Method Summary collapse
-
#allocate_line(pos) ⇒ Wx::RTC::RichTextLine
Allocates or reuses a line object.
-
#apply_paragraph_style(line, attr, rect, dc) ⇒ void
Applies paragraph styles such as centering to the wrapped lines.
-
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
-
#clear_lines ⇒ void
Clears the cached lines.
-
#clear_unused_lines(lineCount) ⇒ Boolean
Clears remaining unused line objects, if any.
-
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
-
#copy(obj) ⇒ void
Copies the object.
-
#draw(dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
-
#each_line {|line| ... } ⇒ Object, Enumerator
Yield each line to the given block.
-
#find_object_at_position(position) ⇒ Wx::RTC::RichTextObject
Finds the object at the given position.
-
#find_position(dc, context, index, pt, height, forceLineStart) ⇒ Boolean
Finds the absolute position and row height for the given character position.
-
#find_wrap_position(range, dc, context, availableSpace, wrapPosition, partialExtents) ⇒ Array(Boolean,Integer)
Finds a suitable wrap position.
-
#get_bullet_text ⇒ String
(also: #bullet_text)
Returns the bullet text for this paragraph.
- #get_combined_attributes(*args) ⇒ Object (also: #combined_attributes)
-
#get_contiguous_plain_text(text, range, fromStart = true) ⇒ Boolean
(also: #contiguous_plain_text)
Returns the plain text searching from the start or end of the range.
-
#get_first_line_break_position(pos) ⇒ Integer
(also: #first_line_break_position)
Returns the first position from pos that has a line break character.
-
#get_impacted_by_floating_objects ⇒ Integer
(also: #impacted_by_floating_objects)
Whether the paragraph is impacted by floating objects from above.
-
#get_lines ⇒ Array<Wx::RTC::RichTextLine]
(also: #lines)
Returns the cached lines.
-
#get_range_size(range, size, descent, dc, context, flags, position = (Wx::Point.new(0, 0)), parentSize = Wx::DEFAULT_SIZE, partialExtents = nil) ⇒ Boolean
(also: #range_size)
Returns the object size for the given range.
-
#get_xml_node_name ⇒ String
(also: #xml_node_name)
Returns the XML node name of this object.
-
#hit_test(dc, context, pt, textPosition, flags = 0) ⇒ Array(Integer,Integer,Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)
Hit-testing: returns a flag indicating hit test details, plus information about position.
- #init ⇒ void
-
#initialize(*args) ⇒ RichTextParagraph
constructor
A new instance of RichTextParagraph.
-
#insert_text(pos, text) ⇒ Boolean
Inserts text at the given position.
-
#layout(dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
-
#layout_float(dc, context, rect, parentRect, style, floatCollector) ⇒ void
Lays out the floating objects.
-
#move_from_list(list) ⇒ void
Adds content back from a list.
-
#move_to_list(obj, list) ⇒ void
Moves content to a list from this point.
-
#set_impacted_by_floating_objects(i) ⇒ void
(also: #impacted_by_floating_objects=)
Sets whether the paragraph is impacted by floating objects from above.
-
#split_at(pos) ⇒ Array(Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)
Splits an object at this position if necessary, and returns the previous object, or NULL if inserting at the beginning.
Methods inherited from RichTextCompositeObject
#append_child, #defragment, #delete_children, #delete_range, #dump, #each_child, #get_child, #get_child_at_position, #get_child_count, #get_children, #get_text_for_range, #insert_child, #invalidate, #is_atomic, #is_composite, #is_empty, #move, #remove_child
Methods inherited from RichTextObject
#accepts_focus, #adjust_attributes, adjust_available_space, #can_edit_properties, #can_merge, #can_split, #convert_pixels_to_tenths_mm, convert_pixels_to_tenths_mm, #convert_tenths_mm_to_pixels, convert_tenths_mm_to_pixels, #delete_range, #dereference, #do_split, draw_border, draw_box_attributes, #dump, #edit_properties, #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_text_for_range, #get_top_margin, get_total_margin, #handles_child_selections, #import_from_xml, #invalidate, #is_atomic, #is_composite, #is_empty, #is_floatable, #is_floating, #is_shown, #is_top_level, #layout_to_best_size, #merge, #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, #split, #uses_paragraph_attributes
Methods inherited from Object
Constructor Details
#initialize(parent = nil, style = nil) ⇒ Wx::RTC::RichTextParagraph #initialize(text, parent = nil, paraStyle = nil, charStyle = nil) ⇒ Wx::RTC::RichTextParagraph #initialize(obj) ⇒ Wx::RTC::RichTextParagraph
Returns a new instance of RichTextParagraph.
202 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 202 def initialize(*args) end |
Class Method Details
.clear_default_tabs ⇒ void
This method returns an undefined value.
Clears the default tabstop array.
422 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 422 def self.clear_default_tabs; end |
.get_default_tabs ⇒ Wx::ArrayInt
Returns the default tabstop array.
426 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 426 def self.get_default_tabs; end |
.init_default_tabs ⇒ void
This method returns an undefined value.
Creates a default tabstop array.
418 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 418 def self.init_default_tabs; end |
Instance Method Details
#allocate_line(pos) ⇒ Wx::RTC::RichTextLine
Allocates or reuses a line object.
368 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 368 def allocate_line(pos) end |
#apply_paragraph_style(line, attr, rect, dc) ⇒ void
This method returns an undefined value.
Applies paragraph styles such as centering to the wrapped lines.
309 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 309 def apply_paragraph_style(line, attr, rect, dc) end |
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
By default, guess that the object is 1 unit long.
276 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 276 def calculate_range(start, end_) end |
#clear_lines ⇒ void
This method returns an undefined value.
Clears the cached lines.
301 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 301 def clear_lines; end |
#clear_unused_lines(lineCount) ⇒ Boolean
Clears remaining unused line objects, if any.
373 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 373 def clear_unused_lines(lineCount) end |
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
297 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 297 def clone; end |
#copy(obj) ⇒ void
This method returns an undefined value.
Copies the object.
293 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 293 def copy(obj) 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)
218 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 218 def draw(dc, context, range, selection, rect, descent, style) end |
#each_line {|line| ... } ⇒ Object, Enumerator
Yield each line to the given block. Returns an Enumerator if no block given.
18 |
# File 'lib/wx/doc/rtc/rich_text_paragraph.rb', line 18 def each_line; end |
#find_object_at_position(position) ⇒ Wx::RTC::RichTextObject
Finds the object at the given position.
358 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 358 def find_object_at_position(position) end |
#find_position(dc, context, index, pt, height, forceLineStart) ⇒ Boolean
Finds the absolute position and row height for the given character position.
255 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 255 def find_position(dc, context, index, pt, height, forceLineStart) end |
#find_wrap_position(range, dc, context, availableSpace, wrapPosition, partialExtents) ⇒ Array(Boolean,Integer)
Finds a suitable wrap position.
wrapPosition is the last position in the line to the left of the split.
353 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 353 def find_wrap_position(range, dc, context, availableSpace, wrapPosition, partialExtents) end |
#get_bullet_text ⇒ String Also known as: bullet_text
Returns the bullet text for this paragraph.
362 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 362 def get_bullet_text; end |
#get_combined_attributes(contentStyle, includingBoxAttr = false) ⇒ Wx::RTC::RichTextAttr #get_combined_attributes(includingBoxAttr = false) ⇒ Wx::RTC::RichTextAttr Also known as: combined_attributes
386 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 386 def get_combined_attributes(*args) end |
#get_contiguous_plain_text(text, range, fromStart = true) ⇒ Boolean Also known as: contiguous_plain_text
Returns the plain text searching from the start or end of the range.
The resulting string may be shorter than the range given.
340 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 340 def get_contiguous_plain_text(text, range, fromStart=true) end |
#get_first_line_break_position(pos) ⇒ Integer Also known as: first_line_break_position
Returns the first position from pos that has a line break character.
392 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 392 def get_first_line_break_position(pos) end |
#get_impacted_by_floating_objects ⇒ Integer Also known as: impacted_by_floating_objects
Whether the paragraph is impacted by floating objects from above.
407 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 407 def get_impacted_by_floating_objects; end |
#get_lines ⇒ Array<Wx::RTC::RichTextLine] Also known as: lines
Returns the cached lines.
287 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 287 def get_lines; end |
#get_range_size(range, size, descent, dc, context, flags, position = (Wx::Point.new(0, 0)), parentSize = Wx::DEFAULT_SIZE, partialExtents = nil) ⇒ Boolean Also known as: range_size
Returns the object size for the given range.
Returns false if the range is invalid for this object.
244 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 244 def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) 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.
282 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 282 def get_xml_node_name; end |
#hit_test(dc, context, pt, textPosition, flags = 0) ⇒ Array(Integer,Integer,Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)
Hit-testing: returns a flag indicating hit test details, plus information about position.
contextObj is returned to specify what object position is relevant to, since otherwise there’s an ambiguity. @ obj might not be a child of contextObj, since we may be referring to the container itself if we have no hit on a child - for example if we click outside an object. The function puts the position in textPosition if one is found. pt is in logical units (a zero y position is at the beginning of the buffer). One of the Wx::RTC::RichTextHitTestFlags values.
268 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 268 def hit_test(dc, context, pt, textPosition, flags=0) end |
#init ⇒ void
This method returns an undefined value.
205 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 205 def init; end |
#insert_text(pos, text) ⇒ Boolean
Inserts text at the given position.
315 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 315 def insert_text(pos, text) 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).
229 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 229 def layout(dc, context, rect, parentRect, style) end |
#layout_float(dc, context, rect, parentRect, style, floatCollector) ⇒ void
This method returns an undefined value.
Lays out the floating objects.
403 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 403 def layout_float(dc, context, rect, parentRect, style, floatCollector) end |
#move_from_list(list) ⇒ void
This method returns an undefined value.
Adds content back from a list.
331 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 331 def move_from_list(list) end |
#move_to_list(obj, list) ⇒ void
This method returns an undefined value.
Moves content to a list from this point.
326 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 326 def move_to_list(obj, list) end |
#set_impacted_by_floating_objects(i) ⇒ void Also known as: impacted_by_floating_objects=
This method returns an undefined value.
Sets whether the paragraph is impacted by floating objects from above.
413 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 413 def set_impacted_by_floating_objects(i) end |
#split_at(pos) ⇒ Array(Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)
Splits an object at this position if necessary, and returns the previous object, or NULL if inserting at the beginning.
320 |
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 320 def split_at(pos) end |