Class: Wx::RTC::RichTextParagraph

Inherits:
RichTextCompositeObject show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_composite_object.rb,
lib/wx/doc/rtc/rich_text_paragraph.rb

Overview

Note:

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

This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects.

Category: Rich Text

See Also:

Requires:

  • USE_RICHTEXT

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RichTextCompositeObject

#append_child, #defragment, #delete_children, #delete_range, #dump, #each_child, #get_child, #get_child_at_position, #get_child_count, #get_children, #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, #can_edit_properties, #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, #edit_properties, #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_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_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, style = nil) ⇒ Wx::RTC::RichTextParagraph #initialize(text, parent = nil, paraStyle = nil, charStyle = nil) ⇒ Wx::RTC::RichTextParagraph #initialize(obj) ⇒ Wx::RTC::RichTextParagraph

Returns a new instance of RichTextParagraph.

Overloads:



202
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 202

def initialize(*args) end

Class Method Details

.clear_default_tabsvoid

This method returns an undefined value.

Clears the default tabstop array.



422
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 422

def self.clear_default_tabs; end

.get_default_tabsWx::ArrayInt

Returns the default tabstop array.

Returns:

  • (Wx::ArrayInt)


426
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 426

def self.get_default_tabs; end

.init_default_tabsvoid

This method returns an undefined value.

Creates a default tabstop array.



418
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 418

def self.init_default_tabs; end

Instance Method Details

#allocate_line(pos) ⇒ Wx::RTC::RichTextLine

Allocates or reuses a line object.

Parameters:

  • pos (Integer)

Returns:



368
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 368

def allocate_line(pos) end

#apply_paragraph_style(line, attr, rect, dc) ⇒ void

This method returns an undefined value.

Applies paragraph styles such as centering to the wrapped lines.

Parameters:



309
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 309

def apply_paragraph_style(line, attr, rect, dc) 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)


276
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 276

def calculate_range(start, end_) end

#clear_linesvoid

This method returns an undefined value.

Clears the cached lines.



301
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 301

def clear_lines; end

#clear_unused_lines(lineCount) ⇒ Boolean

Clears remaining unused line objects, if any.

Parameters:

  • lineCount (Integer)

Returns:

  • (Boolean)


373
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 373

def clear_unused_lines(lineCount) end

#cloneWx::RTC::RichTextObject

Clones the object.



297
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 297

def clone; end

#copy(obj) ⇒ void

This method returns an undefined value.

Copies the object.

Parameters:



293
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 293

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)


218
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 218

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

#each_line {|line| ... } ⇒ Object, Enumerator

Yield each line to the given block. Returns an Enumerator if no block given.

Yield Parameters:

Returns:

  • (Object, Enumerator)

    last result of block or Enumerator if no block given.



18
# File 'lib/wx/doc/rtc/rich_text_paragraph.rb', line 18

def each_line; end

#find_object_at_position(position) ⇒ Wx::RTC::RichTextObject

Finds the object at the given position.

Parameters:

  • position (Integer)

Returns:



358
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 358

def find_object_at_position(position) 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)


255
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 255

def find_position(dc, context, index, pt, height, forceLineStart) end

#find_wrap_position(range, dc, context, availableSpace, wrapPosition, partialExtents) ⇒ Array(Boolean,Integer)

Finds a suitable wrap position.

wrapPosition is the last position in the line to the left of the split.

Parameters:

Returns:

  • (Array(Boolean,Integer))


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

def find_wrap_position(range, dc, context, availableSpace, wrapPosition, partialExtents) end

#get_bullet_textString Also known as: bullet_text

Returns the bullet text for this paragraph.

Returns:

  • (String)


362
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 362

def get_bullet_text; end

#get_combined_attributes(contentStyle, includingBoxAttr = false) ⇒ Wx::RTC::RichTextAttr #get_combined_attributes(includingBoxAttr = false) ⇒ Wx::RTC::RichTextAttr Also known as: combined_attributes

Overloads:

  • #get_combined_attributes(contentStyle, includingBoxAttr = false) ⇒ Wx::RTC::RichTextAttr

    Returns combined attributes of the base style, paragraph style and character style.

    We use this to dynamically retrieve the actual style.

    Parameters:

    Returns:

  • #get_combined_attributes(includingBoxAttr = false) ⇒ Wx::RTC::RichTextAttr

    Returns the combined attributes of the base style and paragraph style.

    Parameters:

    • includingBoxAttr (Boolean) (defaults to: false)

    Returns:



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

def get_combined_attributes(*args) end

#get_contiguous_plain_text(text, range, fromStart = true) ⇒ Boolean Also known as: contiguous_plain_text

Returns the plain text searching from the start or end of the range.

The resulting string may be shorter than the range given.

Parameters:

  • text (String)
  • range (Range)
  • fromStart (Boolean) (defaults to: true)

Returns:

  • (Boolean)


340
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 340

def get_contiguous_plain_text(text, range, fromStart=true) end

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

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

Parameters:

  • pos (Integer)

Returns:

  • (Integer)


392
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 392

def get_first_line_break_position(pos) end

#get_impacted_by_floating_objectsInteger Also known as: impacted_by_floating_objects

Whether the paragraph is impacted by floating objects from above.

Returns:

  • (Integer)


407
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 407

def get_impacted_by_floating_objects; end

#get_linesArray<Wx::RTC::RichTextLine] Also known as: lines

Returns the cached lines.

Returns:



287
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 287

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


244
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 244

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


282
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 282

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:



268
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 268

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

#initvoid

This method returns an undefined value.



205
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 205

def init; end

#insert_text(pos, text) ⇒ Boolean

Inserts text at the given position.

Parameters:

  • pos (Integer)
  • text (String)

Returns:

  • (Boolean)


315
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 315

def insert_text(pos, text) 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)


229
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 229

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

#layout_float(dc, context, rect, parentRect, style, floatCollector) ⇒ void

This method returns an undefined value.

Lays out the floating objects.

Parameters:



403
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 403

def layout_float(dc, context, rect, parentRect, style, floatCollector) end

#move_from_list(list) ⇒ void

This method returns an undefined value.

Adds content back from a list.

Parameters:



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

def move_from_list(list) end

#move_to_list(obj, list) ⇒ void

This method returns an undefined value.

Moves content to a list from this point.

Parameters:



326
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 326

def move_to_list(obj, list) end

#set_impacted_by_floating_objects(i) ⇒ void Also known as: impacted_by_floating_objects=

This method returns an undefined value.

Sets whether the paragraph is impacted by floating objects from above.

Parameters:

  • i (Integer)


413
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 413

def set_impacted_by_floating_objects(i) end

#split_at(pos) ⇒ Array(Wx::RTC::RichTextObject,Wx::RTC::RichTextObject)

Splits an object at this position if necessary, and returns the previous object, or NULL if inserting at the beginning.

Parameters:

  • pos (Integer)

Returns:



320
# File 'lib/wx/doc/gen/rtc/rich_text_composite_object.rb', line 320

def split_at(pos) end