Class: Wx::RTC::RichTextParagraphLayoutBox
- Inherits:
-
RichTextCompositeObject
- Object
- Object
- RichTextObject
- RichTextCompositeObject
- Wx::RTC::RichTextParagraphLayoutBox
- Defined in:
- lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This class knows how to lay out paragraphs.
Category: Rich Text
Direct Known Subclasses
Instance Method Summary collapse
-
#accepts_focus ⇒ Boolean
Returns true if objects of this class can accept the focus, i.e.
-
#add_image(image, paraStyle = nil) ⇒ Range
Convenience function to add an image.
-
#add_paragraph(text, paraStyle = nil) ⇒ Range
Convenience function to add a paragraph of text.
-
#add_paragraphs(text, paraStyle = nil) ⇒ Range
Adds multiple paragraphs, based on newlines.
-
#apply_style_sheet(styleSheet) ⇒ Boolean
Apply the style sheet to the buffer, for example if the styles have changed.
-
#clear ⇒ void
Clears all the children.
-
#clear_list_style(range, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) ⇒ Boolean
Clears the list style from the given range, clearing list-related attributes and applying any named paragraph style associated with each paragraph.
-
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
-
#collect_style(currentStyle, style, clashingAttr, absentAttr) ⇒ Boolean
Combines style with currentStyle for the purpose of summarising the attributes of a range of content.
- #copy(obj) ⇒ void
-
#copy_fragment(range, fragment) ⇒ Boolean
Make a copy of the fragment corresponding to the given range, putting it in fragment.
-
#delete_range(range) ⇒ Boolean
Deletes the given range.
-
#delete_range_with_undo(range, ctrl, buffer) ⇒ Boolean
Submits a command to delete this range.
-
#do_get_style(position, style, combineStyles = true) ⇒ Boolean
Implementation helper for GetStyle.
-
#do_invalidate(invalidRange) ⇒ void
Do the (in)validation for this object only.
-
#do_number_list(range, promotionRange, promoteBy, def_, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom = 1, specifiedLevel = -1)) ⇒ Boolean
Helper for NumberList and PromoteList, that does renumbering and promotion simultaneously def can be NULL/empty to indicate that the existing list style should be used.
-
#draw(dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
-
#draw_floats(dc, context, range, selection, rect, descent, style) ⇒ void
Draws the floating objects in this buffer.
-
#find_next_paragraph_number(previousParagraph, attr) ⇒ Boolean
Fills in the attributes for numbering a paragraph after previousParagraph.
-
#get_basic_style ⇒ Wx::RTC::RichTextAttr
(also: #basic_style)
Returns the basic (overall) style.
-
#get_default_style ⇒ Wx::RTC::RichTextAttr
(also: #default_style)
Returns the current default style, affecting the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
-
#get_float_collector ⇒ Wx::RTC::RichTextFloatCollector
(also: #float_collector)
Returns the RichTextFloatCollector of this object.
-
#get_floating_object_count ⇒ Integer
(also: #floating_object_count)
Returns the number of floating objects at this level.
-
#get_floating_objects(objects) ⇒ Boolean
(also: #floating_objects)
Returns a list of floating objects.
-
#get_invalid_range(wholeParagraphs = false) ⇒ Range
(also: #invalid_range)
Get invalid range, rounding to entire paragraphs if argument is true.
-
#get_leaf_object_at_position(position) ⇒ Wx::RTC::RichTextObject
(also: #leaf_object_at_position)
Returns the leaf object in a paragraph at this position.
-
#get_line_at_position(pos, caretPosition = false) ⇒ Wx::RTC::RichTextLine
(also: #line_at_position)
Returns the line at the given position.
-
#get_line_at_y_position(y) ⇒ Wx::RTC::RichTextLine
(also: #line_at_y_position)
Returns the line at the given y pixel position, or the last line.
-
#get_line_count ⇒ Integer
(also: #line_count)
Returns the number of visible lines.
-
#get_line_for_visible_line_number(lineNumber) ⇒ Wx::RTC::RichTextLine
(also: #line_for_visible_line_number)
Given a line number, returns the corresponding RichTextLine object.
-
#get_line_size_at_position(pos, caretPosition = false) ⇒ Wx::Size
(also: #line_size_at_position)
Returns the line size at the given position.
-
#get_paragraph_at_line(paragraphNumber) ⇒ Wx::RTC::RichTextParagraph
(also: #paragraph_at_line)
Returns the paragraph by number.
-
#get_paragraph_at_position(pos, caretPosition = false) ⇒ Wx::RTC::RichTextParagraph
(also: #paragraph_at_position)
Returns the paragraph at the given character or caret position.
-
#get_paragraph_count ⇒ Integer
(also: #paragraph_count)
Returns the number of paragraphs.
-
#get_paragraph_for_line(line) ⇒ Wx::RTC::RichTextParagraph
(also: #paragraph_for_line)
Returns the paragraph for a given line.
-
#get_paragraph_length(paragraphNumber) ⇒ Integer
(also: #paragraph_length)
Returns the length of the paragraph.
-
#get_paragraph_text(paragraphNumber) ⇒ String
(also: #paragraph_text)
Returns the text of the paragraph.
-
#get_partial_paragraph ⇒ Boolean
(also: #partial_paragraph)
Returns a flag indicating whether the last paragraph is partial or complete.
-
#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_rich_text_ctrl ⇒ Wx::RTC::RichTextCtrl
(also: #rich_text_ctrl)
Returns the associated control.
-
#get_style(position, style) ⇒ Boolean
(also: #style)
Returns the combined text attributes for this position.
-
#get_style_for_new_paragraph(buffer, pos, caretPosition = false, lookUpNewParaStyle = false) ⇒ Wx::RTC::RichTextAttr
(also: #style_for_new_paragraph)
Returns the style that is appropriate for a new paragraph at this position.
-
#get_style_for_range(range, style) ⇒ Boolean
(also: #style_for_range)
This function gets a style representing the common, combined attributes in the given range.
-
#get_style_sheet ⇒ Wx::RTC::RichTextStyleSheet
(also: #style_sheet)
Returns the style sheet associated with the overall buffer.
-
#get_text ⇒ String
(also: #text)
Get all the text.
-
#get_text_for_range(range) ⇒ String
(also: #text_for_range)
Returns any text in this object for the given range.
-
#get_uncombined_style(position, style) ⇒ Boolean
(also: #uncombined_style)
Returns the content (uncombined) attributes for this position.
-
#get_visible_line_number(pos, caretPosition = false, startOfLine = false) ⇒ Integer
(also: #visible_line_number)
Given a position, returns the number of the visible line (potentially many to a paragraph), starting from zero at the start of the buffer.
-
#get_xml_node_name ⇒ String
(also: #xml_node_name)
Returns the XML node name of this object.
-
#has_character_attributes(range, style) ⇒ Boolean
(also: #has_character_attributes?)
Test if this whole range has character attributes of the specified kind.
-
#has_paragraph_attributes(range, style) ⇒ Boolean
(also: #has_paragraph_attributes?)
Test if this whole range has paragraph attributes of the specified kind.
-
#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.
-
#import_from_xml(buffer, node, handler, recurse) ⇒ Array(Boolean,Boolean)
Imports this object from XML.
-
#init ⇒ void
Initializes the object.
-
#initialize(*args) ⇒ RichTextParagraphLayoutBox
constructor
A new instance of RichTextParagraphLayoutBox.
-
#insert_field_with_undo(buffer, pos, fieldType, properties, ctrl, flags, textAttr) ⇒ Wx::RTC::RichTextField
Submits a command to insert the given field.
-
#insert_fragment(position, fragment) ⇒ Boolean
Insert fragment into this box at the given position.
-
#insert_image_with_undo(buffer, pos, imageBlock, ctrl, flags, textAttr) ⇒ Boolean
Submits a command to insert the given image.
-
#insert_newline_with_undo(buffer, pos, ctrl, flags = 0) ⇒ Boolean
Submits a command to insert the given text.
-
#insert_object_with_undo(buffer, pos, object, ctrl, flags = 0) ⇒ Wx::RTC::RichTextObject
Inserts an object.
-
#insert_paragraphs_with_undo(buffer, pos, paragraphs, ctrl, flags = 0) ⇒ Boolean
Submits a command to insert paragraphs.
-
#insert_text_with_undo(buffer, pos, text, ctrl, flags = 0) ⇒ Boolean
Submits a command to insert the given text.
-
#invalidate(invalidRange = Wx::RICHTEXT_ALL) ⇒ void
Invalidates the buffer.
-
#invalidate_hierarchy(invalidRange = Wx::RICHTEXT_ALL) ⇒ void
Do the (in)validation both up and down the hierarchy.
-
#is_dirty ⇒ Boolean
(also: #dirty?)
Returns true if this object needs layout.
-
#is_top_level ⇒ Boolean
(also: #top_level?)
Returns true if this object is top-level, i.e.
-
#layout(dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
-
#move_anchored_object_to_paragraph(from, to, obj) ⇒ void
Moves an anchored object to another paragraph.
- #number_list(*args) ⇒ Object
-
#position_to_xy(pos) ⇒ Array(Boolean,Integer,Integer)
Converts a zero-based position to line column and paragraph number.
-
#prepare_content(container) ⇒ void
Prepares the content just before insertion (or after buffer reset).
- #promote_list(*args) ⇒ Object
-
#reset ⇒ void
Clears and initializes with one blank paragraph.
-
#set_basic_style(style) ⇒ void
(also: #basic_style=)
Sets the basic (overall) style.
-
#set_default_style(style) ⇒ Boolean
(also: #default_style=)
Sets the default style, affecting the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
- #set_list_style(*args) ⇒ Object
-
#set_object_properties_with_undo(obj, properties, objToSet = nil) ⇒ Boolean
Sets with undo the properties for the given object.
-
#set_partial_paragraph(partialPara) ⇒ void
(also: #partial_paragraph=)
Sets a flag indicating whether the last paragraph is partial or complete.
-
#set_properties(range, properties, flags = Wx::RTC::RICHTEXT_SETPROPERTIES_WITH_UNDO) ⇒ Boolean
Sets the properties for the given range, passing flags to determine how the attributes are set.
-
#set_rich_text_ctrl(ctrl) ⇒ void
(also: #rich_text_ctrl=)
Associates a control with the buffer, for operations that for example require refreshing the window.
- #set_style(*args) ⇒ Object
-
#update_floating_objects(availableRect, untilObj = nil) ⇒ Boolean
Gather information about floating objects.
-
#update_ranges ⇒ void
Calculate ranges.
-
#xy_to_position(x, y) ⇒ Integer
Converts zero-based line column and paragraph number to a position.
Methods inherited from RichTextCompositeObject
#append_child, #calculate_range, #defragment, #delete_children, #dump, #each_child, #find_position, #get_child, #get_child_at_position, #get_child_count, #get_children, #insert_child, #is_atomic, #is_composite, #is_empty, #move, #remove_child
Methods inherited from RichTextObject
#adjust_attributes, adjust_available_space, #calculate_range, #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, #dereference, #do_split, draw_border, draw_box_attributes, #dump, #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, #is_atomic, #is_composite, #is_empty, #is_floatable, #is_floating, #is_shown, #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_range, #show, #split, #uses_paragraph_attributes
Methods inherited from Object
Constructor Details
#initialize(parent = nil) ⇒ Wx::RTC::RichTextParagraphLayoutBox #initialize(obj) ⇒ Wx::RTC::RichTextParagraphLayoutBox
Returns a new instance of RichTextParagraphLayoutBox.
31 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 31 def initialize(*args) end |
Instance Method Details
#accepts_focus ⇒ Boolean
Returns true if objects of this class can accept the focus, i.e. a call to SetFocusObject is possible.
For example, containers supporting text, such as a text box object, can accept the focus, but a table can’t (set the focus to individual cells instead).
116 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 116 def accepts_focus; end |
#add_image(image, paraStyle = nil) ⇒ Range
Convenience function to add an image.
269 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 269 def add_image(image, paraStyle=nil) end |
#add_paragraph(text, paraStyle = nil) ⇒ Range
Convenience function to add a paragraph of text.
263 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 263 def add_paragraph(text, paraStyle=nil) end |
#add_paragraphs(text, paraStyle = nil) ⇒ Range
Adds multiple paragraphs, based on newlines.
275 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 275 def add_paragraphs(text, paraStyle=nil) end |
#apply_style_sheet(styleSheet) ⇒ Boolean
Apply the style sheet to the buffer, for example if the styles have changed.
627 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 627 def apply_style_sheet(styleSheet) end |
#clear ⇒ void
This method returns an undefined value.
Clears all the children.
253 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 253 def clear; end |
#clear_list_style(range, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) ⇒ Boolean
Clears the list style from the given range, clearing list-related attributes and applying any named paragraph style associated with each paragraph.
flags is a bit list of the following:
-
Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable.
481 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 481 def clear_list_style(range, flags=Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) end |
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
601 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 601 def clone; end |
#collect_style(currentStyle, style, clashingAttr, absentAttr) ⇒ Boolean
Combines style with currentStyle for the purpose of summarising the attributes of a range of content.
441 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 441 def collect_style(currentStyle, style, clashingAttr, absentAttr) end |
#copy(obj) ⇒ void
This method returns an undefined value.
631 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 631 def copy(obj) end |
#copy_fragment(range, fragment) ⇒ Boolean
Make a copy of the fragment corresponding to the given range, putting it in fragment.
622 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 622 def copy_fragment(range, fragment) end |
#delete_range(range) ⇒ Boolean
Deletes the given range.
89 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 89 def delete_range(range) end |
#delete_range_with_undo(range, ctrl, buffer) ⇒ Boolean
Submits a command to delete this range.
227 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 227 def delete_range_with_undo(range, ctrl, buffer) end |
#do_get_style(position, style, combineStyles = true) ⇒ Boolean
Implementation helper for GetStyle.
If combineStyles is true, combine base, paragraph and context attributes.
422 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 422 def do_get_style(position, style, combineStyles=true) end |
#do_invalidate(invalidRange) ⇒ void
This method returns an undefined value.
Do the (in)validation for this object only.
681 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 681 def do_invalidate(invalidRange) end |
#do_number_list(range, promotionRange, promoteBy, def_, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom = 1, specifiedLevel = -1)) ⇒ Boolean
Helper for NumberList and PromoteList, that does renumbering and promotion simultaneously def can be NULL/empty to indicate that the existing list style should be used.
548 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 548 def do_number_list(range, promotionRange, promoteBy, def_, flags=Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom=1, specifiedLevel=-1) 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)
57 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 57 def draw(dc, context, range, selection, rect, descent, style) end |
#draw_floats(dc, context, range, selection, rect, descent, style) ⇒ void
This method returns an undefined value.
Draws the floating objects in this buffer.
238 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 238 def draw_floats(dc, context, range, selection, rect, descent, style) end |
#find_next_paragraph_number(previousParagraph, attr) ⇒ Boolean
Fills in the attributes for numbering a paragraph after previousParagraph.
554 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 554 def find_next_paragraph_number(previousParagraph, attr) end |
#get_basic_style ⇒ Wx::RTC::RichTextAttr Also known as: basic_style
Returns the basic (overall) style.
This is the style of the whole buffer before further styles are applied, unlike the default style, which only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
668 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 668 def get_basic_style; end |
#get_default_style ⇒ Wx::RTC::RichTextAttr Also known as: default_style
Returns the current default style, affecting the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
653 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 653 def get_default_style; end |
#get_float_collector ⇒ Wx::RTC::RichTextFloatCollector Also known as: float_collector
Returns the Wx::RTC::RichTextFloatCollector of this object.
709 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 709 def get_float_collector; end |
#get_floating_object_count ⇒ Integer Also known as: floating_object_count
Returns the number of floating objects at this level.
714 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 714 def get_floating_object_count; end |
#get_floating_objects(objects) ⇒ Boolean Also known as: floating_objects
Returns a list of floating objects.
720 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 720 def get_floating_objects(objects) end |
#get_invalid_range(wholeParagraphs = false) ⇒ Range Also known as: invalid_range
Get invalid range, rounding to entire paragraphs if argument is true.
699 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 699 def get_invalid_range(wholeParagraphs=false) end |
#get_leaf_object_at_position(position) ⇒ Wx::RTC::RichTextObject Also known as: leaf_object_at_position
Returns the leaf object in a paragraph at this position.
325 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 325 def get_leaf_object_at_position(position) end |
#get_line_at_position(pos, caretPosition = false) ⇒ Wx::RTC::RichTextLine Also known as: line_at_position
Returns the line at the given position.
If caretPosition is true, the position is a caret position, which is normally a smaller number.
283 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 283 def get_line_at_position(pos, caretPosition=false) end |
#get_line_at_y_position(y) ⇒ Wx::RTC::RichTextLine Also known as: line_at_y_position
Returns the line at the given y pixel position, or the last line.
289 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 289 def get_line_at_y_position(y) end |
#get_line_count ⇒ Integer Also known as: line_count
Returns the number of visible lines.
353 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 353 def get_line_count; end |
#get_line_for_visible_line_number(lineNumber) ⇒ Wx::RTC::RichTextLine Also known as: line_for_visible_line_number
Given a line number, returns the corresponding Wx::RTC::RichTextLine object.
319 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 319 def get_line_for_visible_line_number(lineNumber) end |
#get_line_size_at_position(pos, caretPosition = false) ⇒ Wx::Size Also known as: line_size_at_position
Returns the line size at the given position.
303 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 303 def get_line_size_at_position(pos, caretPosition=false) end |
#get_paragraph_at_line(paragraphNumber) ⇒ Wx::RTC::RichTextParagraph Also known as: paragraph_at_line
Returns the paragraph by number.
331 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 331 def get_paragraph_at_line(paragraphNumber) end |
#get_paragraph_at_position(pos, caretPosition = false) ⇒ Wx::RTC::RichTextParagraph Also known as: paragraph_at_position
Returns the paragraph at the given character or caret position.
296 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 296 def get_paragraph_at_position(pos, caretPosition=false) end |
#get_paragraph_count ⇒ Integer Also known as: paragraph_count
Returns the number of paragraphs.
348 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 348 def get_paragraph_count; end |
#get_paragraph_for_line(line) ⇒ Wx::RTC::RichTextParagraph Also known as: paragraph_for_line
Returns the paragraph for a given line.
337 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 337 def get_paragraph_for_line(line) end |
#get_paragraph_length(paragraphNumber) ⇒ Integer Also known as: paragraph_length
Returns the length of the paragraph.
343 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 343 def get_paragraph_length(paragraphNumber) end |
#get_paragraph_text(paragraphNumber) ⇒ String Also known as: paragraph_text
Returns the text of the paragraph.
359 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 359 def get_paragraph_text(paragraphNumber) end |
#get_partial_paragraph ⇒ Boolean Also known as: partial_paragraph
Returns a flag indicating whether the last paragraph is partial or complete.
137 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 137 def get_partial_paragraph; 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.
83 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 83 def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end |
#get_rich_text_ctrl ⇒ Wx::RTC::RichTextCtrl Also known as: rich_text_ctrl
Returns the associated control.
126 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 126 def get_rich_text_ctrl; end |
#get_style(position, style) ⇒ Boolean Also known as: style
Returns the combined text attributes for this position.
This function gets the uncombined style - that is, the attributes associated with the paragraph or character content, and not necessarily the combined attributes you see on the screen. To get the combined attributes, use #get_style. If you specify (any) paragraph attribute in style’s flags, this function will fetch the paragraph attributes. Otherwise, it will return the character attributes.
405 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 405 def get_style(position, style) end |
#get_style_for_new_paragraph(buffer, pos, caretPosition = false, lookUpNewParaStyle = false) ⇒ Wx::RTC::RichTextAttr Also known as: style_for_new_paragraph
Returns the style that is appropriate for a new paragraph at this position.
If the previous paragraph has a paragraph style name, looks up the next-paragraph style.
210 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 210 def get_style_for_new_paragraph(buffer, pos, caretPosition=false, lookUpNewParaStyle=false) end |
#get_style_for_range(range, style) ⇒ Boolean Also known as: style_for_range
This function gets a style representing the common, combined attributes in the given range.
Attributes which have different values within the specified range will not be included the style flags. The function is used to get the attributes to display in the formatting dialog: the user can edit the attributes common to the selection, and optionally specify the values of further attributes to be applied uniformly. To apply the edited attributes, you can use #set_style specifying the Wx::RTC::RICHTEXT_SETSTYLE_OPTIMIZE flag, which will only apply attributes that are different from the combined attributes within the range. So, the user edits the effective, displayed attributes for the range, but his choice won’t be applied unnecessarily to content. As an example, say the style for a paragraph specifies bold, but the paragraph text doesn’t specify a weight. The combined style is bold, and this is what the user will see on-screen and in the formatting dialog. The user now specifies red text, in addition to bold. When applying with #set_style, the content font weight attributes won’t be changed to bold because this is already specified by the paragraph. However the text colour attributes will be changed to show red.
432 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 432 def get_style_for_range(range, style) end |
#get_style_sheet ⇒ Wx::RTC::RichTextStyleSheet Also known as: style_sheet
Returns the style sheet associated with the overall buffer.
142 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 142 def get_style_sheet; end |
#get_text ⇒ String Also known as: text
Get all the text.
639 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 639 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.
94 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 94 def get_text_for_range(range) end |
#get_uncombined_style(position, style) ⇒ Boolean Also known as: uncombined_style
Returns the content (uncombined) attributes for this position.
412 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 412 def get_uncombined_style(position, style) end |
#get_visible_line_number(pos, caretPosition = false, startOfLine = false) ⇒ Integer Also known as: visible_line_number
Given a position, returns the number of the visible line (potentially many to a paragraph), starting from zero at the start of the buffer.
We also have to pass a bool (startOfLine) that indicates whether the caret is being shown at the end of the previous line or at the start of the next, since the caret can be shown at two visible positions for the same underlying position.
313 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 313 def get_visible_line_number(pos, caretPosition=false, startOfLine=false) 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.
109 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 109 def get_xml_node_name; end |
#has_character_attributes(range, style) ⇒ Boolean Also known as: has_character_attributes?
Test if this whole range has character attributes of the specified kind.
If any of the attributes are different within the range, the test fails. You can use this to implement, for example, bold button updating. style must have flags indicating which attributes are of interest.
587 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 587 def has_character_attributes(range, style) end |
#has_paragraph_attributes(range, style) ⇒ Boolean Also known as: has_paragraph_attributes?
Test if this whole range has paragraph attributes of the specified kind.
If any of the attributes are different within the range, the test fails. You can use this to implement, for example, centering button updating. style must have flags indicating which attributes are of interest.
596 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 596 def has_paragraph_attributes(range, style) 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.
44 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 44 def hit_test(dc, context, pt, textPosition, flags=0) end |
#import_from_xml(buffer, node, handler, recurse) ⇒ Array(Boolean,Boolean)
Imports this object from XML.
103 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 103 def import_from_xml(buffer, node, handler, recurse) end |
#init ⇒ void
This method returns an undefined value.
Initializes the object.
249 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 249 def init; end |
#insert_field_with_undo(buffer, pos, fieldType, properties, ctrl, flags, textAttr) ⇒ Wx::RTC::RichTextField
Submits a command to insert the given field.
Field data can be included in properties.
200 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 200 def insert_field_with_undo(buffer, pos, fieldType, properties, ctrl, flags, textAttr) end |
#insert_fragment(position, fragment) ⇒ Boolean
Insert fragment into this box at the given position.
If partialParagraph is true, it is assumed that the last (or only) paragraph is just a piece of data with no paragraph marker.
616 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 616 def insert_fragment(position, fragment) end |
#insert_image_with_undo(buffer, pos, imageBlock, ctrl, flags, textAttr) ⇒ Boolean
Submits a command to insert the given image.
184 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 184 def insert_image_with_undo(buffer, pos, imageBlock, ctrl, flags, textAttr) end |
#insert_newline_with_undo(buffer, pos, ctrl, flags = 0) ⇒ Boolean
Submits a command to insert the given text.
174 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 174 def insert_newline_with_undo(buffer, pos, ctrl, flags=0) end |
#insert_object_with_undo(buffer, pos, object, ctrl, flags = 0) ⇒ Wx::RTC::RichTextObject
Inserts an object.
220 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 220 def insert_object_with_undo(buffer, pos, object, ctrl, flags=0) end |
#insert_paragraphs_with_undo(buffer, pos, paragraphs, ctrl, flags = 0) ⇒ Boolean
Submits a command to insert paragraphs.
157 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 157 def insert_paragraphs_with_undo(buffer, pos, paragraphs, ctrl, flags=0) end |
#insert_text_with_undo(buffer, pos, text, ctrl, flags = 0) ⇒ Boolean
Submits a command to insert the given text.
166 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 166 def insert_text_with_undo(buffer, pos, text, ctrl, flags=0) end |
#invalidate(invalidRange = Wx::RICHTEXT_ALL) ⇒ void
This method returns an undefined value.
Invalidates the buffer.
With no argument, invalidates whole buffer.
676 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 676 def invalidate(invalidRange=Wx::RICHTEXT_ALL) end |
#invalidate_hierarchy(invalidRange = Wx::RICHTEXT_ALL) ⇒ void
This method returns an undefined value.
Do the (in)validation both up and down the hierarchy.
686 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 686 def invalidate_hierarchy(invalidRange=Wx::RICHTEXT_ALL) end |
#is_dirty ⇒ Boolean Also known as: dirty?
Returns true if this object needs layout.
704 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 704 def is_dirty; end |
#is_top_level ⇒ Boolean Also known as: top_level?
Returns true if this object is top-level, i.e. contains its own paragraphs, such as a text box.
147 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 147 def is_top_level; 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).
68 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 68 def layout(dc, context, rect, parentRect, style) end |
#move_anchored_object_to_paragraph(from, to, obj) ⇒ void
This method returns an undefined value.
Moves an anchored object to another paragraph.
245 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 245 def move_anchored_object_to_paragraph(from, to, obj) end |
#number_list(range, def_ = nil, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom = 1, specifiedLevel = -1) ⇒ Boolean #number_list(range, defName, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom = 1, specifiedLevel = -1) ⇒ Boolean
510 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 510 def number_list(*args) end |
#position_to_xy(pos) ⇒ Array(Boolean,Integer,Integer)
Converts a zero-based position to line column and paragraph number.
371 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 371 def position_to_xy(pos) end |
#prepare_content(container) ⇒ void
This method returns an undefined value.
Prepares the content just before insertion (or after buffer reset).
Currently is only called if undo mode is on.
608 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 608 def prepare_content(container) end |
#promote_list(promoteBy, range, def_ = nil, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, specifiedLevel = -1) ⇒ Boolean #promote_list(promoteBy, range, defName, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, specifiedLevel = -1) ⇒ Boolean
537 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 537 def promote_list(*args) end |
#reset ⇒ void
This method returns an undefined value.
Clears and initializes with one blank paragraph.
257 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 257 def reset; end |
#set_basic_style(style) ⇒ void Also known as: basic_style=
This method returns an undefined value.
Sets the basic (overall) style.
This is the style of the whole buffer before further styles are applied, unlike the default style, which only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
661 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 661 def set_basic_style(style) end |
#set_default_style(style) ⇒ Boolean Also known as: default_style=
Sets the default style, affecting the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
This is not cumulative - setting the default style will replace the previous default style. Setting it to a default attribute object makes new content take on the ‘basic’ style.
648 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 648 def set_default_style(style) end |
#set_list_style(range, def_, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom = 1, specifiedLevel = -1) ⇒ Boolean #set_list_style(range, defName, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO, startFrom = 1, specifiedLevel = -1) ⇒ Boolean
468 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 468 def set_list_style(*args) end |
#set_object_properties_with_undo(obj, properties, objToSet = nil) ⇒ Boolean
Sets with undo the properties for the given object.
579 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 579 def set_object_properties_with_undo(obj, properties, objToSet=nil) end |
#set_partial_paragraph(partialPara) ⇒ void Also known as: partial_paragraph=
This method returns an undefined value.
Sets a flag indicating whether the last paragraph is partial or complete.
132 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 132 def set_partial_paragraph(partialPara) end |
#set_properties(range, properties, flags = Wx::RTC::RICHTEXT_SETPROPERTIES_WITH_UNDO) ⇒ Boolean
Sets the properties for the given range, passing flags to determine how the attributes are set.
You can merge properties or replace them. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the properties for a character at position 5, use the range (5,6). flags may contain a bit list of the following values:
-
Wx::RTC::RICHTEXT_SETPROPERTIES_NONE: no flag.
-
Wx::RTC::RICHTEXT_SETPROPERTIES_WITH_UNDO: specifies that this operation should be undoable.
-
Wx::RTC::RICHTEXT_SETPROPERTIES_PARAGRAPHS_ONLY: specifies that the properties should only be applied to paragraphs, and not the content.
-
Wx::RTC::RICHTEXT_SETPROPERTIES_CHARACTERS_ONLY: specifies that the properties should only be applied to characters, and not the paragraph.
-
Wx::RTC::RICHTEXT_SETPROPERTIES_RESET: resets (clears) the existing properties before applying the new properties.
-
Wx::RTC::RICHTEXT_SETPROPERTIES_REMOVE: removes the specified properties.
572 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 572 def set_properties(range, properties, flags=Wx::RTC::RICHTEXT_SETPROPERTIES_WITH_UNDO) end |
#set_rich_text_ctrl(ctrl) ⇒ void Also known as: rich_text_ctrl=
This method returns an undefined value.
Associates a control with the buffer, for operations that for example require refreshing the window.
121 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 121 def set_rich_text_ctrl(ctrl) end |
#set_style(range, style, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) ⇒ Boolean #set_style(obj, textAttr, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) ⇒ void
397 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 397 def set_style(*args) end |
#update_floating_objects(availableRect, untilObj = nil) ⇒ Boolean
Gather information about floating objects.
If untilObj is non-NULL, will stop getting information if the current object is this, since we will collect the rest later.
694 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 694 def update_floating_objects(availableRect, untilObj=nil) end |
#update_ranges ⇒ void
This method returns an undefined value.
Calculate ranges.
635 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 635 def update_ranges; end |
#xy_to_position(x, y) ⇒ Integer
Converts zero-based line column and paragraph number to a position.
366 |
# File 'lib/wx/doc/gen/rtc/rich_text_paragraph_layout_box.rb', line 366 def xy_to_position(x, y) end |