Class: Wx::RTC::RichTextPlainText

Inherits:
RichTextObject show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_object.rb

Overview

Note:

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

This object represents a single piece of text.

Category: Rich Text

See Also:

Requires:

  • USE_RICHTEXT

Instance Method Summary collapse

Methods inherited from RichTextObject

#accepts_focus, #adjust_attributes, adjust_available_space, #can_edit_properties, #convert_pixels_to_tenths_mm, convert_pixels_to_tenths_mm, #convert_tenths_mm_to_pixels, convert_tenths_mm_to_pixels, #dereference, draw_border, draw_box_attributes, #edit_properties, #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_properties_menu_label, #get_range, #get_rect, #get_right_margin, #get_selection, #get_top_margin, get_total_margin, #handles_child_selections, #hit_test, #invalidate, #is_atomic, #is_composite, #is_floatable, #is_floating, #is_shown, #is_top_level, #layout_to_best_size, #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

Methods inherited from Object

#dup, #is_same_as, #un_share

Constructor Details

#initialize(text = (''), parent = nil, style = nil) ⇒ Wx::RTC::RichTextPlainText #initialize(obj) ⇒ Wx::RTC::RichTextPlainText

Returns a new instance of RichTextPlainText.

Overloads:



1174
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1174

def initialize(*args) end

Instance Method Details

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


1233
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1233

def calculate_range(start, end_) end

#can_merge(object, context) ⇒ Boolean Also known as: can_merge?

Returns true if this object can merge itself with the given one.

Parameters:

Returns:

  • (Boolean)


1249
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1249

def can_merge(object, context) end

#can_split(context) ⇒ Boolean Also known as: can_split?

Returns true if this object can potentially be split, by virtue of having different virtual attributes for individual sub-objects.

Parameters:

Returns:

  • (Boolean)


1263
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1263

def can_split(context) end

#cloneWx::RTC::RichTextObject

Clones the object.



1320
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1320

def clone; end

#copy(obj) ⇒ void

This method returns an undefined value.

Parameters:



1316
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1316

def copy(obj) end

#delete_range(range) ⇒ Boolean

Deletes the given range.

Parameters:

  • range (Range)

Returns:

  • (Boolean)


1238
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1238

def delete_range(range) end

#do_split(pos) ⇒ Wx::RTC::RichTextObject

Do a split from pos, returning an object containing the second part, and setting the first part in ‘this’.

Parameters:

  • pos (Integer)

Returns:



1225
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1225

def do_split(pos) 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)


1187
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1187

def draw(dc, context, range, selection, rect, descent, style) end

#dump(stream) ⇒ void

This method returns an undefined value.

Dump object data to the given output stream for debugging.

Parameters:



1276
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1276

def dump(stream) end

#get_first_line_break_position(pos) ⇒ Integer Also known as: first_line_break_position

Get the first position from pos that has a line break character.

Parameters:

  • pos (Integer)

Returns:

  • (Integer)


1281
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1281

def get_first_line_break_position(pos) end

#get_range_size(range, size, descent, dc, context, flags, position = (Wx::Point.new(0, 0)), parentSize = Wx::DEFAULT_SIZE, partialExtents = nil) ⇒ Array(Boolean,Integer) 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 (Integer)
  • 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:

  • (Array(Boolean,Integer))


1213
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1213

def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end

#get_textWx::String Also known as: text

Returns the text.

Returns:

  • (Wx::String)


1305
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1305

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


1219
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1219

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)


1300
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1300

def get_xml_node_name; end

#import_from_xml(buffer, node, handler, recurse) ⇒ Array(Boolean,Boolean)

Imports this object from XML.

Parameters:

Returns:

  • (Array(Boolean,Boolean))


1294
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1294

def import_from_xml(buffer, node, handler, recurse) end

#is_emptyBoolean Also known as: empty?

Returns true if the object is empty.

Returns:

  • (Boolean)


1242
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1242

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


1198
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1198

def layout(dc, context, rect, parentRect, style) end

#merge(object, context) ⇒ Boolean

Returns true if this object merged itself with the given one.

The calling code will then delete the given object.

Parameters:

Returns:

  • (Boolean)


1258
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1258

def merge(object, context) end

#set_text(text) ⇒ void Also known as: text=

This method returns an undefined value.

Sets the text.

Parameters:

  • text (String)


1311
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1311

def set_text(text) end

#split(context) ⇒ Wx::RTC::RichTextObject

Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes.

Returns itself if it was not split.

Parameters:

Returns:



1271
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1271

def split(context) end

#uses_paragraph_attributesBoolean

Does this object take note of paragraph attributes? Text and image objects don’t.

Returns:

  • (Boolean)


1286
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1286

def uses_paragraph_attributes; end