Class: Wx::RTC::RichTextObject
- Defined in:
- lib/wx/doc/gen/rtc/rich_text_object.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This is the base for drawable rich text objects.
Category: Rich Text
Direct Known Subclasses
Class Method Summary collapse
-
.adjust_available_space(dc, buffer, parentAttr, childAttr, availableParentSpace, availableContainerSpace) ⇒ Wx::Rect
Returns the rectangle which the child has available to it given restrictions specified in the child attribute, e.g.
-
.convert_pixels_to_tenths_mm(ppi, pixels, scale = 1.0) ⇒ Integer
Convert units in pixels to tenths of a millimetre.
-
.convert_tenths_mm_to_pixels(ppi, units, scale = 1.0) ⇒ Integer
Converts units in tenths of a millimetre to device units.
-
.draw_border(dc, buffer, attr, borders, rect, flags = 0) ⇒ Boolean
Draws a border.
-
.draw_box_attributes(dc, buffer, attr, boxRect, flags = 0, obj = nil) ⇒ Boolean
Draws the borders and background for the given rectangle and attributes.
-
.get_box_rects(dc, buffer, attr, marginRect, borderRect, contentRect, paddingRect, outlineRect) ⇒ Boolean
Returns the various rectangles of the box model in pixels.
-
.get_total_margin(dc, buffer, attr) ⇒ Array(Boolean,Integer,Integer,Integer,Integer)
Returns the total margin for the object in pixels, taking into account margin, padding and border size.
Instance Method Summary collapse
-
#accepts_focus ⇒ Boolean
Returns true if objects of this class can accept the focus, i.e.
-
#adjust_attributes(attr, context) ⇒ Boolean
Adjusts the attributes for virtual attribute provision, collapsed borders, etc.
-
#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.
-
#can_merge(object, context) ⇒ Boolean
(also: #can_merge?)
Returns true if this object can merge itself with the given one.
-
#can_split(context) ⇒ Boolean
(also: #can_split?)
Returns true if this object can potentially be split, by virtue of having different virtual attributes for individual sub-objects.
-
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
-
#convert_pixels_to_tenths_mm(dc, pixels) ⇒ Integer
Convert units in pixels to tenths of a millimetre.
-
#convert_tenths_mm_to_pixels(dc, units) ⇒ Integer
Converts units in tenths of a millimetre to device units.
-
#copy(obj) ⇒ void
Copies the object.
-
#delete_range(range) ⇒ Boolean
Deletes the given range.
-
#dereference ⇒ void
Reference-counting allows us to use the same object in multiple lists (not yet used).
-
#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’.
-
#draw(dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
-
#dump(stream) ⇒ void
Dump object data to the given output stream for debugging.
-
#edit_properties(parent, buffer) ⇒ Boolean
Edits the object’s properties via a GUI.
-
#find_position(dc, context, index, pt, forceLineStart) ⇒ Array(Boolean,Integer)
Finds the absolute position and row height for the given character position.
-
#get_absolute_position ⇒ Wx::Point
(also: #absolute_position)
Returns the absolute object position, by traversing up the child/parent hierarchy.
-
#get_attributes ⇒ Wx::RTC::RichTextAttr
(also: #attributes)
Returns the object’s attributes.
-
#get_available_content_area(dc, context, outerRect) ⇒ Wx::Rect
(also: #available_content_area)
Calculates the available content space in the given rectangle, given the margins, border and padding specified in the object’s attributes.
-
#get_best_size ⇒ Wx::Size
(also: #best_size)
Returns the best size, i.e.
-
#get_bottom_margin ⇒ Integer
(also: #bottom_margin)
Returns the bottom margin of the object, in pixels.
-
#get_buffer ⇒ Wx::RTC::RichTextBuffer
(also: #buffer)
Returns the containing buffer.
-
#get_cached_size ⇒ Wx::Size
(also: #cached_size)
Gets the cached object size as calculated by Layout.
-
#get_container ⇒ Wx::RTC::RichTextParagraphLayoutBox
(also: #container)
Returns the top-level container of this object.
-
#get_descent ⇒ Integer
(also: #descent)
Returns the stored descent value.
-
#get_float_direction ⇒ Integer
(also: #float_direction)
Returns the floating direction.
-
#get_left_margin ⇒ Integer
(also: #left_margin)
Returns the left margin of the object, in pixels.
-
#get_max_size ⇒ Wx::Size
(also: #max_size)
Gets the maximum object size as calculated by Layout.
-
#get_min_size ⇒ Wx::Size
(also: #min_size)
Gets the minimum object size as calculated by Layout.
-
#get_name ⇒ String
(also: #name)
Returns the identifying name for this object from the properties, using the “name” key.
-
#get_natural_size ⇒ Wx::RTC::TextAttrSize
(also: #natural_size)
Gets the ‘natural’ size for an object.
-
#get_own_range ⇒ Range
(also: #own_range)
Returns the object’s own range (valid if top-level).
-
#get_own_range_if_top_level ⇒ Range
(also: #own_range_if_top_level)
Returns the object’s own range only if a top-level object.
-
#get_parent ⇒ Wx::RTC::RichTextObject
(also: #parent)
Returns a pointer to the parent object.
-
#get_parent_container ⇒ Wx::RTC::RichTextParagraphLayoutBox
(also: #parent_container)
Returns the top-level container of this object.
-
#get_position ⇒ Wx::Point
(also: #position)
Returns the object position in pixels.
-
#get_properties ⇒ Wx::RTC::RichTextProperties
(also: #properties)
Returns the object’s properties.
-
#get_properties_menu_label ⇒ String
(also: #properties_menu_label)
Returns the label to be used for the properties context menu item.
-
#get_range ⇒ Range
(also: #range)
Returns the object’s range.
-
#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: #range_size)
Returns the object size for the given range.
-
#get_rect ⇒ Wx::Rect
(also: #rect)
Returns the rectangle enclosing the object.
-
#get_right_margin ⇒ Integer
(also: #right_margin)
Returns the right margin of the object, in pixels.
-
#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_top_margin ⇒ Integer
(also: #top_margin)
Returns the top margin of the object, in pixels.
-
#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(parent = nil) ⇒ Wx::RTC::RichTextObject
constructor
Constructor, taking an optional parent pointer.
-
#invalidate(invalidRange = Wx::RICHTEXT_ALL) ⇒ void
Invalidates the object at the given range.
-
#is_atomic ⇒ Boolean
(also: #atomic?)
Returns true if no user editing can be done inside the object.
-
#is_composite ⇒ Boolean
(also: #composite?)
Returns true if this object is composite.
-
#is_empty ⇒ Boolean
(also: #empty?)
Returns true if the object is empty.
-
#is_floatable ⇒ Boolean
(also: #floatable?)
Returns true if this class of object is floatable.
-
#is_floating ⇒ Boolean
(also: #floating?)
Returns true if this object is currently floating.
-
#is_shown ⇒ Boolean
(also: #shown?)
Returns true if the object will be shown, false otherwise.
-
#is_top_level ⇒ Boolean
(also: #top_level?)
Returns true if this object is top-level, i.e.
-
#layout(dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
-
#layout_to_best_size(dc, context, buffer, parentAttr, attr, availableParentSpace, availableContainerSpace, style) ⇒ Boolean
Lays out the object first with a given amount of space, and then if no width was specified in attr, lays out the object again using the minimum size.
-
#merge(object, context) ⇒ Boolean
Returns true if this object merged itself with the given one.
-
#move(pt) ⇒ void
Moves the object recursively, by adding the offset from old to new.
-
#reference ⇒ void
Reference-counting allows us to use the same object in multiple lists (not yet used).
-
#set_attributes(attr) ⇒ void
(also: #attributes=)
Sets the object’s attributes.
-
#set_cached_size(sz) ⇒ void
(also: #cached_size=)
Sets the cached object size as calculated by Layout.
-
#set_descent(descent) ⇒ void
(also: #descent=)
Sets the stored descent value.
- #set_margins(*args) ⇒ Object (also: #margins=)
-
#set_max_size(sz) ⇒ void
(also: #max_size=)
Sets the maximum object size as calculated by Layout.
-
#set_min_size(sz) ⇒ void
(also: #min_size=)
Sets the minimum object size as calculated by Layout.
-
#set_name(name) ⇒ void
(also: #name=)
Sets the identifying name for this object as a property using the “name” key.
-
#set_own_range(range) ⇒ void
(also: #own_range=)
Set the object’s own range, for a top-level object with its own position space.
-
#set_parent(parent) ⇒ void
(also: #parent=)
Sets the pointer to the parent object.
-
#set_position(pos) ⇒ void
(also: #position=)
Sets the object position in pixels.
-
#set_properties(props) ⇒ void
(also: #properties=)
Sets the object’s properties.
-
#set_range(range) ⇒ void
(also: #range=)
Sets the object’s range within its container.
-
#show(show) ⇒ void
Call to show or hide this object.
-
#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.
-
#uses_paragraph_attributes ⇒ Boolean
Returns true if this object takes note of paragraph attributes (text and image objects don’t).
Methods inherited from Object
Constructor Details
#initialize(parent = nil) ⇒ Wx::RTC::RichTextObject
Constructor, taking an optional parent pointer.
573 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 573 def initialize(parent=nil) end |
Class Method Details
.adjust_available_space(dc, buffer, parentAttr, childAttr, availableParentSpace, availableContainerSpace) ⇒ Wx::Rect
Returns the rectangle which the child has available to it given restrictions specified in the child attribute, e.g.
50% width of the parent, 400 pixels, x position 20% of the parent, etc. availableContainerSpace might be a parent that the cell has to compute its width relative to. E.g. a cell that’s 50% of its parent.
1148 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1148 def self.adjust_available_space(dc, buffer, parentAttr, childAttr, availableParentSpace, availableContainerSpace) end |
.convert_pixels_to_tenths_mm(ppi, pixels, scale = 1.0) ⇒ Integer
Convert units in pixels to tenths of a millimetre.
1093 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1093 def self.convert_pixels_to_tenths_mm(ppi, pixels, scale=1.0) end |
.convert_tenths_mm_to_pixels(ppi, units, scale = 1.0) ⇒ Integer
Converts units in tenths of a millimetre to device units.
1080 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1080 def self.convert_tenths_mm_to_pixels(ppi, units, scale=1.0) end |
.draw_border(dc, buffer, attr, borders, rect, flags = 0) ⇒ Boolean
Draws a border.
1115 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1115 def self.draw_border(dc, buffer, attr, borders, rect, flags=0) end |
.draw_box_attributes(dc, buffer, attr, boxRect, flags = 0, obj = nil) ⇒ Boolean
Draws the borders and background for the given rectangle and attributes.
boxRect is taken to be the outer margin box, not the box around the content.
1105 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1105 def self.draw_box_attributes(dc, buffer, attr, boxRect, flags=0, obj=nil) end |
.get_box_rects(dc, buffer, attr, marginRect, borderRect, contentRect, paddingRect, outlineRect) ⇒ Boolean
Returns the various rectangles of the box model in pixels.
You can either specify contentRect (inner) or marginRect (outer), and the other must be the default rectangle (no width or height). Note that the outline doesn’t affect the position of the rectangle, it’s drawn in whatever space is available.
1129 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1129 def self.get_box_rects(dc, buffer, attr, marginRect, borderRect, contentRect, paddingRect, outlineRect) end |
.get_total_margin(dc, buffer, attr) ⇒ Array(Boolean,Integer,Integer,Integer,Integer)
Returns the total margin for the object in pixels, taking into account margin, padding and border size.
1136 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1136 def self.get_total_margin(dc, buffer, attr) 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).
741 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 741 def accepts_focus; end |
#adjust_attributes(attr, context) ⇒ Boolean
Adjusts the attributes for virtual attribute provision, collapsed borders, etc.
979 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 979 def adjust_attributes(attr, context) end |
#calculate_range(start, end_) ⇒ Integer
Calculates the range of the object.
By default, guess that the object is 1 unit long.
655 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 655 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.
723 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 723 def can_edit_properties; end |
#can_merge(object, context) ⇒ Boolean Also known as: can_merge?
Returns true if this object can merge itself with the given one.
692 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 692 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.
706 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 706 def can_split(context) end |
#clone ⇒ Wx::RTC::RichTextObject
Clones the object.
1049 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1049 def clone; end |
#convert_pixels_to_tenths_mm(dc, pixels) ⇒ Integer
Convert units in pixels to tenths of a millimetre.
1086 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1086 def convert_pixels_to_tenths_mm(dc, pixels) end |
#convert_tenths_mm_to_pixels(dc, units) ⇒ Integer
Converts units in tenths of a millimetre to device units.
1073 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1073 def convert_tenths_mm_to_pixels(dc, units) end |
#copy(obj) ⇒ void
This method returns an undefined value.
Copies the object.
1054 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1054 def copy(obj) end |
#delete_range(range) ⇒ Boolean
Deletes the given range.
660 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 660 def delete_range(range) end |
#dereference ⇒ void
This method returns an undefined value.
Reference-counting allows us to use the same object in multiple lists (not yet used).
1062 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1062 def dereference; 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’.
647 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 647 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)
586 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 586 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.
719 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 719 def dump(stream) end |
#edit_properties(parent, buffer) ⇒ Boolean
Edits the object’s properties via a GUI.
730 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 730 def edit_properties(parent, buffer) end |
#find_position(dc, context, index, pt, forceLineStart) ⇒ Array(Boolean,Integer)
Finds the absolute position and row height for the given character position.
619 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 619 def find_position(dc, context, index, pt, forceLineStart) end |
#get_absolute_position ⇒ Wx::Point Also known as: absolute_position
Returns the absolute object position, by traversing up the child/parent hierarchy.
TODO: may not be needed, if all object positions are in fact relative to the top of the coordinate space.
847 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 847 def get_absolute_position; end |
#get_attributes ⇒ Wx::RTC::RichTextAttr Also known as: attributes
Returns the object’s attributes.
989 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 989 def get_attributes; end |
#get_available_content_area(dc, context, outerRect) ⇒ Wx::Rect Also known as: available_content_area
Calculates the available content space in the given rectangle, given the margins, border and padding specified in the object’s attributes.
958 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 958 def get_available_content_area(dc, context, outerRect) end |
#get_best_size ⇒ Wx::Size Also known as: best_size
Returns the best size, i.e. the ideal starting size for this object irrespective of available space.
For a short text string, it will be the size that exactly encloses the text. For a longer string, it might use the parent width for example.
625 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 625 def get_best_size; end |
#get_bottom_margin ⇒ Integer Also known as: bottom_margin
Returns the bottom margin of the object, in pixels.
950 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 950 def get_bottom_margin; end |
#get_buffer ⇒ Wx::RTC::RichTextBuffer Also known as: buffer
Returns the containing buffer.
1016 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1016 def get_buffer; end |
#get_cached_size ⇒ Wx::Size Also known as: cached_size
Gets the cached object size as calculated by Layout.
786 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 786 def get_cached_size; end |
#get_container ⇒ Wx::RTC::RichTextParagraphLayoutBox Also known as: container
Returns the top-level container of this object.
May return itself if it’s a container; use GetParentContainer to return a different container.
909 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 909 def get_container; end |
#get_descent ⇒ Integer Also known as: descent
Returns the stored descent value.
1011 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1011 def get_descent; end |
#get_float_direction ⇒ Integer Also known as: float_direction
Returns the floating direction.
679 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 679 def get_float_direction; end |
#get_left_margin ⇒ Integer Also known as: left_margin
Returns the left margin of the object, in pixels.
935 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 935 def get_left_margin; end |
#get_max_size ⇒ Wx::Size Also known as: max_size
Gets the maximum object size as calculated by Layout.
This allows us to fit an object to its contents or allocate extra space if required.
799 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 799 def get_max_size; end |
#get_min_size ⇒ Wx::Size Also known as: min_size
Gets the minimum object size as calculated by Layout.
This allows us to constrain an object to its absolute minimum size if necessary.
814 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 814 def get_min_size; end |
#get_name ⇒ String Also known as: name
Returns the identifying name for this object from the properties, using the “name” key.
1027 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1027 def get_name; end |
#get_natural_size ⇒ Wx::RTC::TextAttrSize Also known as: natural_size
Gets the ‘natural’ size for an object.
For an image, it would be the image size.
829 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 829 def get_natural_size; end |
#get_own_range ⇒ Range Also known as: own_range
Returns the object’s own range (valid if top-level).
874 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 874 def get_own_range; end |
#get_own_range_if_top_level ⇒ Range Also known as: own_range_if_top_level
Returns the object’s own range only if a top-level object.
879 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 879 def get_own_range_if_top_level; end |
#get_parent ⇒ Wx::RTC::RichTextObject Also known as: parent
Returns a pointer to the parent object.
896 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 896 def get_parent; end |
#get_parent_container ⇒ Wx::RTC::RichTextParagraphLayoutBox Also known as: parent_container
Returns the top-level container of this object.
Returns a different container than itself, unless there’s no parent, in which case it will return NULL.
916 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 916 def get_parent_container; end |
#get_position ⇒ Wx::Point Also known as: position
Returns the object position in pixels.
834 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 834 def get_position; end |
#get_properties ⇒ Wx::RTC::RichTextProperties Also known as: properties
Returns the object’s properties.
994 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 994 def get_properties; end |
#get_properties_menu_label ⇒ String Also known as:
Returns the label to be used for the properties context menu item.
734 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 734 def ; end |
#get_range ⇒ Range Also known as: range
Returns the object’s range.
863 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 863 def get_range; 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.
641 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 641 def get_range_size(range, size, descent, dc, context, flags, position=(Wx::Point.new(0, 0)), parentSize=Wx::DEFAULT_SIZE, partialExtents=nil) end |
#get_rect ⇒ Wx::Rect Also known as: rect
Returns the rectangle enclosing the object.
852 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 852 def get_rect; end |
#get_right_margin ⇒ Integer Also known as: right_margin
Returns the right margin of the object, in pixels.
940 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 940 def get_right_margin; 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.
781 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 781 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.
685 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 685 def get_text_for_range(range) end |
#get_top_margin ⇒ Integer Also known as: top_margin
Returns the top margin of the object, in pixels.
945 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 945 def get_top_margin; 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.
759 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 759 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.
773 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 773 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.
610 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 610 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.
749 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 749 def import_from_xml(buffer, node, handler, recurse) end |
#invalidate(invalidRange = Wx::RICHTEXT_ALL) ⇒ void
This method returns an undefined value.
Invalidates the object at the given range.
With no argument, invalidates the whole object.
767 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 767 def invalidate(invalidRange=Wx::RICHTEXT_ALL) end |
#is_atomic ⇒ Boolean Also known as: atomic?
Returns true if no user editing can be done inside the object.
This returns true for simple objects, false for most composite objects, but true for fields, which if composite, should not be user-edited.
891 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 891 def is_atomic; end |
#is_composite ⇒ Boolean Also known as: composite?
Returns true if this object is composite.
884 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 884 def is_composite; end |
#is_empty ⇒ Boolean Also known as: empty?
Returns true if the object is empty.
664 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 664 def is_empty; end |
#is_floatable ⇒ Boolean Also known as: floatable?
Returns true if this class of object is floatable.
669 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 669 def is_floatable; end |
#is_floating ⇒ Boolean Also known as: floating?
Returns true if this object is currently floating.
674 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 674 def is_floating; end |
#is_shown ⇒ Boolean Also known as: shown?
Returns true if the object will be shown, false otherwise.
1037 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1037 def is_shown; end |
#is_top_level ⇒ Boolean Also known as: top_level?
Returns true if this object is top-level, i.e. contains its own paragraphs, such as a text box.
1032 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1032 def is_top_level; 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).
597 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 597 def layout(dc, context, rect, parentRect, style) end |
#layout_to_best_size(dc, context, buffer, parentAttr, attr, availableParentSpace, availableContainerSpace, style) ⇒ Boolean
Lays out the object first with a given amount of space, and then if no width was specified in attr, lays out the object again using the minimum size.
availableParentSpace is the maximum space for the object, whereas availableContainerSpace is the container with which relative positions and sizes should be computed. For example, a text box whose space has already been constrained in a previous layout pass to availableParentSpace, but should have a width of 50% of availableContainerSpace. (If these two rects were the same, a 2nd pass could see the object getting too small.)
973 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 973 def layout_to_best_size(dc, context, buffer, parentAttr, attr, availableParentSpace, availableContainerSpace, 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.
701 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 701 def merge(object, context) end |
#move(pt) ⇒ void
This method returns an undefined value.
Moves the object recursively, by adding the offset from old to new.
1067 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1067 def move(pt) end |
#reference ⇒ void
This method returns an undefined value.
Reference-counting allows us to use the same object in multiple lists (not yet used).
1058 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1058 def reference; end |
#set_attributes(attr) ⇒ void Also known as: attributes=
This method returns an undefined value.
Sets the object’s attributes.
984 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 984 def set_attributes(attr) end |
#set_cached_size(sz) ⇒ void Also known as: cached_size=
This method returns an undefined value.
Sets the cached object size as calculated by Layout.
792 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 792 def set_cached_size(sz) end |
#set_descent(descent) ⇒ void Also known as: descent=
This method returns an undefined value.
Sets the stored descent value.
1006 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1006 def set_descent(descent) end |
#set_margins(margin) ⇒ void #set_margins(leftMargin, rightMargin, topMargin, bottomMargin) ⇒ void Also known as: margins=
930 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 930 def set_margins(*args) end |
#set_max_size(sz) ⇒ void Also known as: max_size=
This method returns an undefined value.
Sets the maximum object size as calculated by Layout.
This allows us to fit an object to its contents or allocate extra space if required.
807 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 807 def set_max_size(sz) end |
#set_min_size(sz) ⇒ void Also known as: min_size=
This method returns an undefined value.
Sets the minimum object size as calculated by Layout.
This allows us to constrain an object to its absolute minimum size if necessary.
822 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 822 def set_min_size(sz) end |
#set_name(name) ⇒ void Also known as: name=
This method returns an undefined value.
Sets the identifying name for this object as a property using the “name” key.
1022 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1022 def set_name(name) end |
#set_own_range(range) ⇒ void Also known as: own_range=
This method returns an undefined value.
Set the object’s own range, for a top-level object with its own position space.
869 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 869 def set_own_range(range) end |
#set_parent(parent) ⇒ void Also known as: parent=
This method returns an undefined value.
Sets the pointer to the parent object.
902 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 902 def set_parent(parent) end |
#set_position(pos) ⇒ void Also known as: position=
This method returns an undefined value.
Sets the object position in pixels.
840 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 840 def set_position(pos) end |
#set_properties(props) ⇒ void Also known as: properties=
This method returns an undefined value.
Sets the object’s properties.
1000 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1000 def set_properties(props) end |
#set_range(range) ⇒ void Also known as: range=
This method returns an undefined value.
Sets the object’s range within its container.
858 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 858 def set_range(range) end |
#show(show) ⇒ void
This method returns an undefined value.
Call to show or hide this object.
This function does not cause the content to be laid out or redrawn.
1045 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 1045 def show(show) 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.
714 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 714 def split(context) end |
#uses_paragraph_attributes ⇒ Boolean
Returns true if this object takes note of paragraph attributes (text and image objects don’t).
753 |
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 753 def uses_paragraph_attributes; end |