Class: Wx::RTC::RichTextFieldType

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_buffer.rb

Overview

The base class for custom field types.

Each type definition handles one field type. Override functions to provide drawing, layout, updating and property editing functionality for a field. Register field types on application initialisation with the static function Wx::RTC::RichTextBuffer.add_field_type. They will be deleted automatically on application exit.

Category: Rich Text

See Also:

Requires:

  • USE_RICHTEXT

Direct Known Subclasses

RichTextFieldTypeStandard

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(name = ('')) ⇒ Wx::RTC::RichTextFieldType #initialize(fieldType) ⇒ Wx::RTC::RichTextFieldType

Returns a new instance of RichTextFieldType.

Overloads:



751
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 751

def initialize(*args) end

Instance Method Details

#can_edit_properties(obj) ⇒ Boolean Also known as: can_edit_properties?

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

Parameters:

Returns:

  • (Boolean)


803
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 803

def can_edit_properties(obj) end

#copy(fieldType) ⇒ void

This method returns an undefined value.

Parameters:



755
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 755

def copy(fieldType) end

#draw(obj, 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)


769
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 769

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

#edit_properties(obj, parent, buffer) ⇒ Boolean

Edits the object's properties via a GUI.

Parameters:

Returns:

  • (Boolean)


811
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 811

def edit_properties(obj, parent, buffer) end

#get_nameString Also known as: name

Returns the field type name.

There should be a unique name per field type object.

Returns:

  • (String)


845
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 845

def get_name; end

#get_properties_menu_label(obj) ⇒ String Also known as: properties_menu_label

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

Parameters:

Returns:

  • (String)


816
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 816

def get_properties_menu_label(obj) end

#get_range_size(obj, 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:

Returns:

  • (Array(Boolean,Integer))


797
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 797

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

#is_top_level(obj) ⇒ 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.

Parameters:

Returns:

  • (Boolean)


830
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 830

def is_top_level(obj) end

#layout(obj, 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)


781
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 781

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

#set_name(name) ⇒ void Also known as: name=

This method returns an undefined value.

Sets the field type name.

There should be a unique name per field type object.

Parameters:

  • name (String)


838
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 838

def set_name(name) end

#update_field(buffer, obj) ⇒ Boolean

Update the field.

This would typically expand the field to its value, if this is a dynamically changing and/or composite field.

Parameters:

Returns:

  • (Boolean)


825
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 825

def update_field(buffer, obj) end