Class: Wx::RTC::RichTextCell

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!

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 RichTextTable. A cell’s appearance can be changed via its associated 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 #set_col_span and #set_row_span methods. Attempts to set too large a span are silently truncated to the table edge.

Requires:

  • USE_RICHTEXT

Instance Method Summary collapse

Methods inherited from RichTextParagraphLayoutBox

#accepts_focus, #add_image, #add_paragraph, #add_paragraphs, #apply_style_sheet, #clear, #clear_list_style, #collect_style, #copy_fragment, #delete_range, #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_range_size, #get_rich_text_ctrl, #get_style, #get_style_for_new_paragraph, #get_style_for_range, #get_style_sheet, #get_text, #get_text_for_range, #get_uncombined_style, #get_visible_line_number, #has_character_attributes, #has_paragraph_attributes, #import_from_xml, #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, #layout, #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, #calculate_range, #defragment, #delete_children, #delete_range, #dump, #each_child, #find_position, #get_child, #get_child_at_position, #get_child_count, #get_children, #get_range_size, #get_text_for_range, #insert_child, #invalidate, #is_atomic, #is_composite, #is_empty, #move, #remove_child

Methods inherited from RichTextObject

#accepts_focus, #adjust_attributes, adjust_available_space, #calculate_range, #can_merge, #can_split, #convert_pixels_to_tenths_mm, convert_pixels_to_tenths_mm, #convert_tenths_mm_to_pixels, convert_tenths_mm_to_pixels, #delete_range, #dereference, #do_split, draw_border, draw_box_attributes, #dump, #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_range, #get_range_size, #get_rect, #get_right_margin, #get_selection, #get_text_for_range, #get_top_margin, get_total_margin, #handles_child_selections, #import_from_xml, #invalidate, #is_atomic, #is_composite, #is_empty, #is_floatable, #is_floating, #is_shown, #is_top_level, #layout, #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::RichTextCell #initialize(obj) ⇒ Wx::RTC::RichTextCell

Returns a new instance of RichTextCell.

Overloads:



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

def initialize(*args) end

Instance Method Details

#can_edit_propertiesBoolean Also known as: can_edit_properties?

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

Returns:

  • (Boolean)


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

def can_edit_properties; end

#cloneWx::RTC::RichTextObject

Clones the object.



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

def clone; end

#copy(obj) ⇒ void

This method returns an undefined value.

Parameters:



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

def copy(obj) 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)


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

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)


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

def edit_properties(parent, buffer) end

#get_col_spanInteger Also known as: col_span

Returns the number of columns spanned by the cell.

By default a cell doesn’t span extra columns, so this function returns 1.

Returns:

  • (Integer)

See Also:



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

def get_col_span; 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)


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

def get_properties_menu_label; end

#get_row_spanInteger Also known as: row_span

Returns the number of rows spanned by the cell.

By default a cell doesn’t span extra rows, so this function returns 1.

Returns:

  • (Integer)

See Also:



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

def get_row_span; 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)


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

def get_xml_node_name; 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:



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

def hit_test(dc, context, pt, textPosition, flags=0) end

#set_col_span(span) ⇒ void Also known as: col_span=

This method returns an undefined value.

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.

Parameters:

  • span (Integer)

See Also:



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

def set_col_span(span) end

#set_row_span(span) ⇒ void Also known as: row_span=

This method returns an undefined value.

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.

Parameters:

  • span (Integer)

See Also:



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

def set_row_span(span) end