# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::RTC # Objects of this class can contain other objects. # # Category: Rich Text # @see Wx::RTC::RichTextObject # @see Wx::RTC::RichTextBuffer # @see Wx::RTC::RichTextCtrl # # # # @note This class is untracked and should not be derived from nor instances extended! # @wxrb_require USE_RICHTEXT class RichTextCompositeObject < RichTextObject # @param parent [Wx::RTC::RichTextObject] # @return [Wx::RTC::RichTextCompositeObject] def initialize(parent=nil) end # 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. # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param pt [Array(Integer, Integer), Wx::Point] # @param textPosition [Integer] # @param flags [Integer] # @return [Array(Integer,Integer,Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)] def hit_test(dc, context, pt, textPosition, flags=0) end # Finds the absolute position and row height for the given character position. # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param index [Integer] # @param pt [Array(Integer, Integer), Wx::Point] # @param height [int] # @param forceLineStart [Boolean] # @return [Boolean] def find_position(dc, context, index, pt, height, forceLineStart) end # Calculates the range of the object. # # By default, guess that the object is 1 unit long. # @param start [Integer] # @param end_ [Integer] # @return [Integer] def calculate_range(start, end_) end # Deletes the given range. # @param range [Range] # @return [Boolean] def delete_range(range) end # Returns any text in this object for the given range. # @param range [Range] # @return [String] def get_text_for_range(range) end alias_method :text_for_range, :get_text_for_range # Returns the object size for the given range. # # Returns false if the range is invalid for this object. # @param range [Range] # @param size [Array(Integer, Integer), Wx::Size] # @param descent [int] # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param flags [Integer] # @param position [Array(Integer, Integer), Wx::Point] # @param parentSize [Array(Integer, Integer), Wx::Size] # @param partialExtents [Array,nil] # @return [Boolean] def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end alias_method :range_size, :get_range_size # Dump object data to the given output stream for debugging. # @param stream [Wx::TextOutputStream] # @return [void] def dump(stream) end # Invalidates the object at the given range. # # With no argument, invalidates the whole object. # @param invalidRange [Range] # @return [void] def invalidate(invalidRange=Wx::RICHTEXT_ALL) end # Returns the children. # @return [Array] def get_children; end alias_method :children, :get_children # Returns the number of children. # @return [Integer] def get_child_count; end alias_method :child_count, :get_child_count # Returns the nth child. # @param n [Integer] # @return [Wx::RTC::RichTextObject] def get_child(n) end alias_method :child, :get_child # Returns true if this object is composite. # @return [Boolean] def is_composite; end alias_method :composite?, :is_composite # Returns true if no user editing can be done inside the object. # # This returns true for simple objects, false for most composite objects, but true for fields, which if composite, should not be user-edited. # @return [Boolean] def is_atomic; end alias_method :atomic?, :is_atomic # Returns true if the buffer is empty. # @return [Boolean] def is_empty; end alias_method :empty?, :is_empty # Returns the child object at the given character position. # @param pos [Integer] # @return [Wx::RTC::RichTextObject] def get_child_at_position(pos) end alias_method :child_at_position, :get_child_at_position # @param obj [Wx::RTC::RichTextCompositeObject] # @return [void] def copy(obj) end # Appends a child, returning the position. # @param child [Wx::RTC::RichTextObject] # @return [Integer] def append_child(child) end # Inserts the child in front of the given object, or at the beginning. # @param child [Wx::RTC::RichTextObject] # @param inFrontOf [Wx::RTC::RichTextObject] # @return [Boolean] def insert_child(child, inFrontOf) end # Removes and optionally deletes the specified child. # @param child [Wx::RTC::RichTextObject] # @param deleteChild [Boolean] # @return [Boolean] def remove_child(child, deleteChild=false) end # Deletes all the children. # @return [Boolean] def delete_children; end # Recursively merges all pieces that can be merged. # @param context [Wx::RTC::RichTextDrawingContext] # @param range [Range] # @return [Boolean] def defragment(context, range=Wx::RICHTEXT_ALL) end # Moves the object recursively, by adding the offset from old to new. # @param pt [Array(Integer, Integer), Wx::Point] # @return [void] def move(pt) end end # RichTextCompositeObject # This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects. # # Category: Rich Text # @see Wx::RTC::RichTextBuffer # @see Wx::RTC::RichTextCtrl # # # # @note This class is untracked and should not be derived from nor instances extended! # @wxrb_require USE_RICHTEXT class RichTextParagraph < RichTextCompositeObject # @overload initialize(parent=nil, style=nil) # Constructor taking a parent and style. # @param parent [Wx::RTC::RichTextObject] # @param style [Wx::RTC::RichTextAttr] # @return [Wx::RTC::RichTextParagraph] # @overload initialize(text, parent=nil, paraStyle=nil, charStyle=nil) # Constructor taking a text string, a parent and paragraph and character attributes. # @param text [String] # @param parent [Wx::RTC::RichTextObject] # @param paraStyle [Wx::RTC::RichTextAttr] # @param charStyle [Wx::RTC::RichTextAttr] # @return [Wx::RTC::RichTextParagraph] # @overload initialize(obj) # @param obj [Wx::RTC::RichTextParagraph] # @return [Wx::RTC::RichTextParagraph] def initialize(*args) end # @return [void] def init; end # 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) # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param range [Range] # @param selection [Wx::RTC::RichTextSelection] # @param rect [Wx::Rect] # @param descent [Integer] # @param style [Integer] # @return [Boolean] def draw(dc, context, range, selection, rect, descent, style) end # 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). # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param rect [Wx::Rect] # @param parentRect [Wx::Rect] # @param style [Integer] # @return [Boolean] def layout(dc, context, rect, parentRect, style) end # Returns the object size for the given range. # # Returns false if the range is invalid for this object. # @param range [Range] # @param size [Array(Integer, Integer), Wx::Size] # @param descent [int] # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param flags [Integer] # @param position [Array(Integer, Integer), Wx::Point] # @param parentSize [Array(Integer, Integer), Wx::Size] # @param partialExtents [Array,nil] # @return [Boolean] def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end alias_method :range_size, :get_range_size # Finds the absolute position and row height for the given character position. # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param index [Integer] # @param pt [Array(Integer, Integer), Wx::Point] # @param height [int] # @param forceLineStart [Boolean] # @return [Boolean] def find_position(dc, context, index, pt, height, forceLineStart) end # 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. # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param pt [Array(Integer, Integer), Wx::Point] # @param textPosition [Integer] # @param flags [Integer] # @return [Array(Integer,Integer,Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)] def hit_test(dc, context, pt, textPosition, flags=0) end # Calculates the range of the object. # # By default, guess that the object is 1 unit long. # @param start [Integer] # @param end_ [Integer] # @return [Integer] def calculate_range(start, end_) end # Returns the XML node name of this object. # # This must be overridden for {Wx::XmlNode}-base XML export to work. # @return [String] def get_xml_node_name; end alias_method :xml_node_name, :get_xml_node_name # Returns the cached lines. # @return [Array] # @return [void] def move_to_list(obj, list) end # Adds content back from a list. # @param list [Array] # @return [void] def move_from_list(list) end # Returns the plain text searching from the start or end of the range. # # The resulting string may be shorter than the range given. # @param text [String] # @param range [Range] # @param fromStart [Boolean] # @return [Boolean] def get_contiguous_plain_text(text, range, fromStart=true) end alias_method :contiguous_plain_text, :get_contiguous_plain_text # Finds a suitable wrap position. # # wrapPosition is the last position in the line to the left of the split. # @param range [Range] # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param availableSpace [Integer] # @param wrapPosition [Integer] # @param partialExtents [Array,nil] # @return [Array(Boolean,Integer)] def find_wrap_position(range, dc, context, availableSpace, wrapPosition, partialExtents) end # Finds the object at the given position. # @param position [Integer] # @return [Wx::RTC::RichTextObject] def find_object_at_position(position) end # Returns the bullet text for this paragraph. # @return [String] def get_bullet_text; end alias_method :bullet_text, :get_bullet_text # Allocates or reuses a line object. # @param pos [Integer] # @return [Wx::RTC::RichTextLine] def allocate_line(pos) end # Clears remaining unused line objects, if any. # @param lineCount [Integer] # @return [Boolean] def clear_unused_lines(lineCount) end # @overload get_combined_attributes(contentStyle, includingBoxAttr=false) # Returns combined attributes of the base style, paragraph style and character style. # # We use this to dynamically retrieve the actual style. # @param contentStyle [Wx::RTC::RichTextAttr] # @param includingBoxAttr [Boolean] # @return [Wx::RTC::RichTextAttr] # @overload get_combined_attributes(includingBoxAttr=false) # Returns the combined attributes of the base style and paragraph style. # @param includingBoxAttr [Boolean] # @return [Wx::RTC::RichTextAttr] def get_combined_attributes(*args) end alias_method :combined_attributes, :get_combined_attributes # Returns the first position from pos that has a line break character. # @param pos [Integer] # @return [Integer] def get_first_line_break_position(pos) end alias_method :first_line_break_position, :get_first_line_break_position # Lays out the floating objects. # @param dc [Wx::DC] # @param context [Wx::RTC::RichTextDrawingContext] # @param rect [Wx::Rect] # @param parentRect [Wx::Rect] # @param style [Integer] # @param floatCollector [Wx::RTC::RichTextFloatCollector] # @return [void] def layout_float(dc, context, rect, parentRect, style, floatCollector) end # Whether the paragraph is impacted by floating objects from above. # @return [Integer] def get_impacted_by_floating_objects; end alias_method :impacted_by_floating_objects, :get_impacted_by_floating_objects # Sets whether the paragraph is impacted by floating objects from above. # @param i [Integer] # @return [void] def set_impacted_by_floating_objects(i) end alias_method :impacted_by_floating_objects=, :set_impacted_by_floating_objects # Creates a default tabstop array. # @return [void] def self.init_default_tabs; end # Clears the default tabstop array. # @return [void] def self.clear_default_tabs; end # Returns the default tabstop array. # @return [Wx::ArrayInt] def self.get_default_tabs; end end # RichTextParagraph # This object represents a line in a paragraph, and stores offsets from the start of the paragraph representing the start and end positions of the line. # # Category: Rich Text # @see Wx::RTC::RichTextBuffer # @see Wx::RTC::RichTextCtrl # # # # @note This class is untracked and should not be derived from nor instances extended! # @wxrb_require USE_RICHTEXT class RichTextLine < ::Object # @overload initialize(parent) # @param parent [Wx::RTC::RichTextParagraph] # @return [Wx::RTC::RichTextLine] # @overload initialize(obj) # @param obj [Wx::RTC::RichTextLine] # @return [Wx::RTC::RichTextLine] def initialize(*args) end # @overload set_range(range) # Sets the range associated with this line. # @param range [Range] # @return [void] # @overload set_range(from, to) # Sets the range associated with this line. # @param from [Integer] # @param to [Integer] # @return [void] def set_range(*args) end alias_method :range=, :set_range # Returns the parent paragraph. # @return [Wx::RTC::RichTextParagraph] def get_parent; end alias_method :parent, :get_parent # Returns the range. # @return [Wx::RichTextRange] def get_range; end alias_method :range, :get_range # Returns the absolute range. # @return [Range] def get_absolute_range; end alias_method :absolute_range, :get_absolute_range # Returns the line size as calculated by Layout. # @return [Wx::Size] def get_size; end alias_method :size, :get_size # Sets the line size as calculated by Layout. # @param sz [Array(Integer, Integer), Wx::Size] # @return [void] def set_size(sz) end alias_method :size=, :set_size # Returns the object position relative to the parent. # @return [Wx::Point] def get_position; end alias_method :position, :get_position # Sets the object position relative to the parent. # @param pos [Array(Integer, Integer), Wx::Point] # @return [void] def set_position(pos) end alias_method :position=, :set_position # Returns the absolute object position. # @return [Wx::Point] def get_absolute_position; end alias_method :absolute_position, :get_absolute_position # Returns the rectangle enclosing the line. # @return [Wx::Rect] def get_rect; end alias_method :rect, :get_rect # Sets the stored descent. # @param descent [Integer] # @return [void] def set_descent(descent) end alias_method :descent=, :set_descent # Returns the stored descent. # @return [Integer] def get_descent; end alias_method :descent, :get_descent # Initialises the object. # @param parent [Wx::RTC::RichTextParagraph] # @return [void] def init(parent) end # Copies from obj. # @param obj [Wx::RTC::RichTextLine] # @return [void] def copy(obj) end # @return [Wx::RTC::RichTextLine] def clone; end end # RichTextLine end