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:



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

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)


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

def can_edit_properties(obj) end

#copy(fieldType) ⇒ void

This method returns an undefined value.

Parameters:



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

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)


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

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)


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

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)


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

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)


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

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


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

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)


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

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)


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

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)


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

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)


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

def update_field(buffer, obj) end