Class: Wx::RTC::RichTextTable
- Inherits:
-
RichTextBox
- Object
- Object
- RichTextObject
- RichTextCompositeObject
- RichTextParagraphLayoutBox
- RichTextBox
- Wx::RTC::RichTextTable
- Defined in:
- lib/wx/doc/gen/rtc/rich_text_box.rb
Overview
This class is untracked and should not be derived from nor instances extended!
RichTextTable represents a table with arbitrary columns and rows.
Instance Method Summary collapse
-
#accepts_focus ⇒ Boolean
Returns true if objects of this class can accept the focus, i.e.
-
#add_columns(startCol, noCols = 1, attr = (Wx::RichTextAttr.new())) ⇒ Boolean
Adds columns from the given column position.
-
#add_rows(startRow, noRows = 1, attr = (Wx::RichTextAttr.new())) ⇒ Boolean
Adds rows from the given row position.
-
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
-
#can_edit_properties ⇒ Boolean
(also: #can_edit_properties?)
Returns true if we can edit the object’s properties via a GUI.
-
#clear_table ⇒ void
Clears the table.
-
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
- #copy(obj) ⇒ void
-
#create_table(rows, cols) ⇒ Boolean
Creates a table of the given dimensions.
-
#delete_columns(startCol, noCols = 1) ⇒ Boolean
Deletes columns from the given column position.
-
#delete_range(range) ⇒ Boolean
Deletes the given range.
-
#delete_rows(startRow, noRows = 1) ⇒ Boolean
Deletes rows from the given row position.
-
#draw(dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
-
#edit_properties(parent, buffer) ⇒ Boolean
Edits the object’s properties via a GUI.
-
#find_position(dc, context, index, pt, height, forceLineStart) ⇒ Boolean
Finds the absolute position and row height for the given character position.
- #get_cell(*args) ⇒ Object (also: #cell)
-
#get_cell_row_column_position(pos) ⇒ Array(Boolean,Integer,Integer)
(also: #cell_row_column_position)
Returns the row/column for a given character position.
-
#get_cells ⇒ Array<Array<Wx::RTC::RichTextObject>>
(also: #cells)
Returns the cells array.
-
#get_column_count ⇒ Integer
(also: #column_count)
Returns the column count.
-
#get_focused_cell ⇒ Array(Integer,Integer)
(also: #focused_cell)
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
-
#get_properties_menu_label ⇒ String
(also: #properties_menu_label)
Returns the label to be used for the properties context menu item.
-
#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_row_count ⇒ Integer
(also: #row_count)
Returns the row count.
-
#get_selection(start, end_) ⇒ Wx::RTC::RichTextSelection
(also: #selection)
Returns a selection object specifying the selections between start and end character positions.
-
#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.
-
#handles_child_selections ⇒ Boolean
Returns true if this object can handle the selections of its children, fOr example a table.
-
#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.
-
#initialize(*args) ⇒ RichTextTable
constructor
A new instance of RichTextTable.
-
#layout(dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
-
#set_cell_style(selection, style, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) ⇒ Boolean
Sets the attributes for the cells specified by the selection.
Methods inherited from RichTextParagraphLayoutBox
#add_image, #add_paragraph, #add_paragraphs, #apply_style_sheet, #clear, #clear_list_style, #collect_style, #copy_fragment, #delete_range_with_undo, #do_get_style, #do_invalidate, #do_number_list, #draw_floats, #find_next_paragraph_number, #get_basic_style, #get_default_style, #get_float_collector, #get_floating_object_count, #get_floating_objects, #get_invalid_range, #get_leaf_object_at_position, #get_line_at_position, #get_line_at_y_position, #get_line_count, #get_line_for_visible_line_number, #get_line_size_at_position, #get_paragraph_at_line, #get_paragraph_at_position, #get_paragraph_count, #get_paragraph_for_line, #get_paragraph_length, #get_paragraph_text, #get_partial_paragraph, #get_rich_text_ctrl, #get_style, #get_style_for_new_paragraph, #get_style_for_range, #get_style_sheet, #get_text, #get_uncombined_style, #get_visible_line_number, #has_character_attributes, #has_paragraph_attributes, #init, #insert_field_with_undo, #insert_fragment, #insert_image_with_undo, #insert_newline_with_undo, #insert_object_with_undo, #insert_paragraphs_with_undo, #insert_text_with_undo, #invalidate, #invalidate_hierarchy, #is_dirty, #is_top_level, #move_anchored_object_to_paragraph, #number_list, #position_to_xy, #prepare_content, #promote_list, #reset, #set_basic_style, #set_default_style, #set_list_style, #set_object_properties_with_undo, #set_partial_paragraph, #set_properties, #set_rich_text_ctrl, #set_style, #update_floating_objects, #update_ranges, #xy_to_position
Methods inherited from RichTextCompositeObject
#append_child, #defragment, #delete_children, #dump, #each_child, #get_child, #get_child_at_position, #get_child_count, #get_children, #insert_child, #invalidate, #is_atomic, #is_composite, #is_empty, #move, #remove_child
Methods inherited from RichTextObject
#adjust_attributes, adjust_available_space, #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, #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_range, #get_rect, #get_right_margin, #get_top_margin, get_total_margin, #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) ⇒ Wx::RTC::RichTextTable #initialize(obj) ⇒ Wx::RTC::RichTextTable
Returns a new instance of RichTextTable.
215 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 215 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).
349 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 349 def accepts_focus; end |
#add_columns(startCol, noCols = 1, attr = (Wx::RichTextAttr.new())) ⇒ Boolean
Adds columns from the given column position.
430 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 430 def add_columns(startCol, noCols=1, attr=(Wx::RichTextAttr.new())) end |
#add_rows(startRow, noRows = 1, attr = (Wx::RichTextAttr.new())) ⇒ Boolean
Adds rows from the given row position.
423 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 423 def add_rows(startRow, noRows=1, attr=(Wx::RichTextAttr.new())) end |
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
By default, guess that the object is 1 unit long.
312 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 312 def calculate_range(start, end_) end |
#can_edit_properties ⇒ Boolean Also known as: can_edit_properties?
Returns true if we can edit the object’s properties via a GUI.
331 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 331 def can_edit_properties; end |
#clear_table ⇒ void
This method returns an undefined value.
Clears the table.
391 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 391 def clear_table; end |
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
434 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 434 def clone; end |
#copy(obj) ⇒ void
This method returns an undefined value.
438 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 438 def copy(obj) end |
#create_table(rows, cols) ⇒ Boolean
Creates a table of the given dimensions.
397 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 397 def create_table(rows, cols) end |
#delete_columns(startCol, noCols = 1) ⇒ Boolean
Deletes columns from the given column position.
416 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 416 def delete_columns(startCol, noCols=1) end |
#delete_range(range) ⇒ Boolean
Deletes the given range.
280 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 280 def delete_range(range) end |
#delete_rows(startRow, noRows = 1) ⇒ Boolean
Deletes rows from the given row position.
410 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 410 def delete_rows(startRow, noRows=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)
228 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 228 def draw(dc, context, range, selection, rect, descent, style) end |
#edit_properties(parent, buffer) ⇒ Boolean
Edits the object’s properties via a GUI.
338 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 338 def edit_properties(parent, buffer) end |
#find_position(dc, context, index, pt, height, forceLineStart) ⇒ Boolean
Finds the absolute position and row height for the given character position.
304 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 304 def find_position(dc, context, index, pt, height, forceLineStart) end |
#get_cell(row, col) ⇒ Wx::RTC::RichTextCell #get_cell(pos) ⇒ Wx::RTC::RichTextCell Also known as: cell
375 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 375 def get_cell(*args) end |
#get_cell_row_column_position(pos) ⇒ Array(Boolean,Integer,Integer) Also known as: cell_row_column_position
Returns the row/column for a given character position.
381 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 381 def get_cell_row_column_position(pos) end |
#get_cells ⇒ Array<Array<Wx::RTC::RichTextObject>> Also known as: cells
Returns the cells array.
353 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 353 def get_cells; end |
#get_column_count ⇒ Integer Also known as: column_count
Returns the column count.
363 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 363 def get_column_count; end |
#get_focused_cell ⇒ Array(Integer,Integer) Also known as: focused_cell
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
386 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 386 def get_focused_cell; end |
#get_properties_menu_label ⇒ String Also known as:
Returns the label to be used for the properties context menu item.
342 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 342 def ; 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.
274 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 274 def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end |
#get_row_count ⇒ Integer Also known as: row_count
Returns the row count.
358 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 358 def get_row_count; end |
#get_selection(start, end_) ⇒ Wx::RTC::RichTextSelection Also known as: selection
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.
326 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 326 def get_selection(start, end_) end |
#get_text_for_range(range) ⇒ String Also known as: text_for_range
Returns any text in this object for the given range.
285 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 285 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.
247 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 247 def get_xml_node_name; end |
#handles_child_selections ⇒ Boolean
Returns true if this object can handle the selections of its children, fOr example a table.
Required for composite selection handling to work.
318 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 318 def handles_child_selections; 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.
241 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 241 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.
294 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 294 def import_from_xml(buffer, node, handler, recurse) 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).
259 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 259 def layout(dc, context, rect, parentRect, style) end |
#set_cell_style(selection, style, flags = Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) ⇒ Boolean
Sets the attributes for the cells specified by the selection.
404 |
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 404 def set_cell_style(selection, style, flags=Wx::RTC::RICHTEXT_SETSTYLE_WITH_UNDO) end |