Class: Wx::RTC::RichTextTable

Inherits:
RichTextBox show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_box.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

RichTextTable represents a table with arbitrary columns and rows.

Requires:

  • USE_RICHTEXT

Instance Method Summary collapse

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

#dup, #is_same_as, #un_share

Constructor Details

#initialize(parent = nil) ⇒ Wx::RTC::RichTextTable #initialize(obj) ⇒ Wx::RTC::RichTextTable

Returns a new instance of RichTextTable.

Overloads:



215
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 215

def initialize(*args) end

Instance Method Details

#accepts_focusBoolean

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).

Returns:

  • (Boolean)


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.

Parameters:

  • startCol (Integer)
  • noCols (Integer) (defaults to: 1)
  • attr (Wx::RTC::RichTextAttr) (defaults to: (Wx::RichTextAttr.new()))

Returns:

  • (Boolean)


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.

Parameters:

  • startRow (Integer)
  • noRows (Integer) (defaults to: 1)
  • attr (Wx::RTC::RichTextAttr) (defaults to: (Wx::RichTextAttr.new()))

Returns:

  • (Boolean)


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.

Parameters:

  • start (Integer)
  • end_ (Integer)

Returns:

  • (Integer)


312
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 312

def calculate_range(start, end_) end

#can_edit_propertiesBoolean Also known as: can_edit_properties?

Returns true if we can edit the object’s properties via a GUI.

Returns:

  • (Boolean)


331
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 331

def can_edit_properties; end

#clear_tablevoid

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

#cloneWx::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.

Parameters:



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.

Parameters:

  • rows (Integer)
  • cols (Integer)

Returns:

  • (Boolean)


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.

Parameters:

  • startCol (Integer)
  • noCols (Integer) (defaults to: 1)

Returns:

  • (Boolean)


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.

Parameters:

  • range (Range)

Returns:

  • (Boolean)


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.

Parameters:

  • startRow (Integer)
  • noRows (Integer) (defaults to: 1)

Returns:

  • (Boolean)


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)

Parameters:

Returns:

  • (Boolean)


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.

Parameters:

Returns:

  • (Boolean)


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.

Parameters:

Returns:

  • (Boolean)


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

Overloads:



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.

Parameters:

  • pos (Integer)

Returns:

  • (Array(Boolean,Integer,Integer))


381
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 381

def get_cell_row_column_position(pos) end

#get_cellsArray<Array<Wx::RTC::RichTextObject>> Also known as: cells

Returns the cells array.

Returns:



353
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 353

def get_cells; end

#get_column_countInteger Also known as: column_count

Returns the column count.

Returns:

  • (Integer)


363
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 363

def get_column_count; end

#get_focused_cellArray(Integer,Integer) Also known as: focused_cell

Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.

Returns:

  • (Array(Integer,Integer))


386
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 386

def get_focused_cell; end

#get_properties_menu_labelString Also known as: properties_menu_label

Returns the label to be used for the properties context menu item.

Returns:

  • (String)


342
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 342

def get_properties_menu_label; 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.

Parameters:

  • range (Range)
  • size (Array(Integer, Integer), Wx::Size)
  • descent (int)
  • dc (Wx::DC)
  • context (Wx::RTC::RichTextDrawingContext)
  • flags (Integer)
  • position (Array(Integer, Integer), Wx::Point) (defaults to: (Wx::Point.new(0, 0)))
  • parentSize (Array(Integer, Integer), Wx::Size) (defaults to: Wx::DEFAULT_SIZE)
  • partialExtents (Array, nil) (defaults to: nil)

Returns:

  • (Boolean)


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_countInteger Also known as: row_count

Returns the row count.

Returns:

  • (Integer)


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.

Parameters:

  • start (Integer)
  • end_ (Integer)

Returns:



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.

Parameters:

  • range (Range)

Returns:

  • (String)


285
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 285

def get_text_for_range(range) end

#get_xml_node_nameString 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.

Returns:

  • (String)


247
# File 'lib/wx/doc/gen/rtc/rich_text_box.rb', line 247

def get_xml_node_name; end

#handles_child_selectionsBoolean

Returns true if this object can handle the selections of its children, fOr example a table.

Required for composite selection handling to work.

Returns:

  • (Boolean)


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.

Parameters:

Returns:



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.

Parameters:

Returns:

  • (Array(Boolean,Boolean))


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).

Parameters:

Returns:

  • (Boolean)


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.

Parameters:

Returns:

  • (Boolean)


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