# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx::RTC
# This class implements a floating or inline text box, containing paragraphs.
#
# Category: Rich Text
# @see Wx::RTC::RichTextParagraphLayoutBox
# @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 RichTextBox < RichTextParagraphLayoutBox
# @overload initialize(parent=nil)
# Default constructor; optionally pass the parent object.
# @param parent [Wx::RTC::RichTextObject]
# @return [Wx::RTC::RichTextBox]
# @overload initialize(obj)
# Copy constructor.
# @param obj [Wx::RTC::RichTextBox]
# @return [Wx::RTC::RichTextBox]
def initialize(*args) 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
# 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 true if we can edit the object's properties via a GUI.
# @return [Boolean]
def can_edit_properties; end
alias_method :can_edit_properties?, :can_edit_properties
# Edits the object's properties via a GUI.
# @param parent [Wx::Window]
# @param buffer [Wx::RTC::RichTextBuffer]
# @return [Boolean]
def edit_properties(parent, buffer) end
# Returns the label to be used for the properties context menu item.
# @return [String]
def get_properties_menu_label; end
alias_method :properties_menu_label, :get_properties_menu_label
# Clones the object.
# @return [Wx::RTC::RichTextObject]
def clone; end
# @param obj [Wx::RTC::RichTextBox]
# @return [void]
def copy(obj) end
end # RichTextBox
# {Wx::RTC::RichTextCell} is the cell in a table, in which the user can type.
#
# As well as text, it can also contain objects e.g. an image, or even another {Wx::RTC::RichTextTable}.
# A cell's appearance can be changed via its associated {Wx::RTC::RichTextAttr}; for example its size altered or its background colour set. It also has the properties of column- and row-span. By default these are 1, meaning that the cell only spans itself, but can be increased using the {Wx::RTC::RichTextCell#set_col_span} and {Wx::RTC::RichTextCell#set_row_span} methods. Attempts to set too large a span are silently truncated to the table edge.
#
#
# @note This class is untracked and should not be derived from nor instances extended!
# @wxrb_require USE_RICHTEXT
class RichTextCell < RichTextBox
# @overload initialize(parent=nil)
# Default constructor; optionally pass the parent object.
# @param parent [Wx::RTC::RichTextObject]
# @return [Wx::RTC::RichTextCell]
# @overload initialize(obj)
# Copy constructor.
# @param obj [Wx::RTC::RichTextCell]
# @return [Wx::RTC::RichTextCell]
def initialize(*args) 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
# 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
# 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 true if we can edit the object's properties via a GUI.
# @return [Boolean]
def can_edit_properties; end
alias_method :can_edit_properties?, :can_edit_properties
# Edits the object's properties via a GUI.
# @param parent [Wx::Window]
# @param buffer [Wx::RTC::RichTextBuffer]
# @return [Boolean]
def edit_properties(parent, buffer) end
# Returns the label to be used for the properties context menu item.
# @return [String]
def get_properties_menu_label; end
alias_method :properties_menu_label, :get_properties_menu_label
# Returns the number of columns spanned by the cell.
#
# By default a cell doesn't span extra columns, so this function returns 1.
# @see Wx::RTC::RichTextCell#set_col_span
# @see Wx::RTC::RichTextCell#get_row_span
# @return [Integer]
def get_col_span; end
alias_method :col_span, :get_col_span
# Set the number of columns spanned by the cell.
#
# By default colspan is 1 i.e. a cell doesn't span extra columns. Pass a value >1 to change this. Attempting to set a colspan <1 will assert and be ignored.
# @see Wx::RTC::RichTextCell#get_col_span
# @see Wx::RTC::RichTextCell#set_row_span
# @param span [Integer]
# @return [void]
def set_col_span(span) end
alias_method :col_span=, :set_col_span
# Returns the number of rows spanned by the cell.
#
# By default a cell doesn't span extra rows, so this function returns 1.
# @see Wx::RTC::RichTextCell#set_row_span
# @see Wx::RTC::RichTextCell#get_col_span
# @return [Integer]
def get_row_span; end
alias_method :row_span, :get_row_span
# Set the number of rows spanned by the cell.
#
# By default colspan is 1 i.e. a cell doesn't span extra rows. Pass a value >1 to change this. Attempting to set a rowspan <1 will assert and be ignored.
# @see Wx::RTC::RichTextCell#get_row_span
# @see Wx::RTC::RichTextCell#set_col_span
# @param span [Integer]
# @return [void]
def set_row_span(span) end
alias_method :row_span=, :set_row_span
# Clones the object.
# @return [Wx::RTC::RichTextObject]
def clone; end
# @param obj [Wx::RTC::RichTextCell]
# @return [void]
def copy(obj) end
end # RichTextCell
# {Wx::RTC::RichTextTable} represents a table with arbitrary columns and rows.
#
#
#
#
# @note This class is untracked and should not be derived from nor instances extended!
# @wxrb_require USE_RICHTEXT
class RichTextTable < RichTextBox
# @overload initialize(parent=nil)
# Default constructor; optionally pass the parent object.
# @param parent [Wx::RTC::RichTextObject]
# @return [Wx::RTC::RichTextTable]
# @overload initialize(obj)
# Copy constructor.
# @param obj [Wx::RTC::RichTextTable]
# @return [Wx::RTC::RichTextTable]
def initialize(*args) 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
# 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
# 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
# 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
# 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
# Imports this object from XML.
# @param buffer [Wx::RTC::RichTextBuffer]
# @param node [Wx::XmlNode]
# @param handler [Wx::RTC::RichTextXMLHandler]
# @param recurse [Boolean]
# @return [Array(Boolean,Boolean)]
def import_from_xml(buffer, node, handler, recurse) 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
# Returns true if this object can handle the selections of its children, fOr example a table.
#
# Required for composite selection handling to work.
# @return [Boolean]
def handles_child_selections; end
# Returns a selection object specifying the selections between start and end character positions.
#
# For example, a table would deduce what cells (of range length 1) are selected when dragging across the table.
# @param start [Integer]
# @param end_ [Integer]
# @return [Wx::RTC::RichTextSelection]
def get_selection(start, end_) end
alias_method :selection, :get_selection
# Returns true if we can edit the object's properties via a GUI.
# @return [Boolean]
def can_edit_properties; end
alias_method :can_edit_properties?, :can_edit_properties
# Edits the object's properties via a GUI.
# @param parent [Wx::Window]
# @param buffer [Wx::RTC::RichTextBuffer]
# @return [Boolean]
def edit_properties(parent, buffer) end
# Returns the label to be used for the properties context menu item.
# @return [String]
def get_properties_menu_label; end
alias_method :properties_menu_label, :get_properties_menu_label
# 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).
# @return [Boolean]
def accepts_focus; end
# Returns the cells array.
# @return [Array>]
def get_cells; end
alias_method :cells, :get_cells
# Returns the row count.
# @return [Integer]
def get_row_count; end
alias_method :row_count, :get_row_count
# Returns the column count.
# @return [Integer]
def get_column_count; end
alias_method :column_count, :get_column_count
# @overload get_cell(row, col)
# Returns the cell at the given row/column position.
# @param row [Integer]
# @param col [Integer]
# @return [Wx::RTC::RichTextCell]
# @overload get_cell(pos)
# Returns the cell at the given character position (in the range of the table).
# @param pos [Integer]
# @return [Wx::RTC::RichTextCell]
def get_cell(*args) end
alias_method :cell, :get_cell
# Returns the row/column for a given character position.
# @param pos [Integer]
# @return [Array(Boolean,Integer,Integer)]
def get_cell_row_column_position(pos) end
alias_method :cell_row_column_position, :get_cell_row_column_position
# Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
# @return [Array(Integer,Integer)]
def get_focused_cell; end
alias_method :focused_cell, :get_focused_cell
# Clears the table.
# @return [void]
def clear_table; end
# Creates a table of the given dimensions.
# @param rows [Integer]
# @param cols [Integer]
# @return [Boolean]
def create_table(rows, cols) end
# Sets the attributes for the cells specified by the selection.
# @param selection [Wx::RTC::RichTextSelection]
# @param style [Wx::RTC::RichTextAttr]
# @param flags [Integer]
# @return [Boolean]
def set_cell_style(selection, style, flags=Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) end
# Deletes rows from the given row position.
# @param startRow [Integer]
# @param noRows [Integer]
# @return [Boolean]
def delete_rows(startRow, noRows=1) end
# Deletes columns from the given column position.
# @param startCol [Integer]
# @param noCols [Integer]
# @return [Boolean]
def delete_columns(startCol, noCols=1) end
# Adds rows from the given row position.
# @param startRow [Integer]
# @param noRows [Integer]
# @param attr [Wx::RTC::RichTextAttr]
# @return [Boolean]
def add_rows(startRow, noRows=1, attr=(Wx::RichTextAttr.new())) end
# Adds columns from the given column position.
# @param startCol [Integer]
# @param noCols [Integer]
# @param attr [Wx::RTC::RichTextAttr]
# @return [Boolean]
def add_columns(startCol, noCols=1, attr=(Wx::RichTextAttr.new())) end
# Clones the object.
# @return [Wx::RTC::RichTextObject]
def clone; end
# @param obj [Wx::RTC::RichTextTable]
# @return [void]
def copy(obj) end
end # RichTextTable
end