Class: Wx::RTC::RichTextFieldTypeStandard

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

Overview

A field type that can handle fields with text or bitmap labels, with a small range of styles for implementing rectangular fields and fields that can be used for start and end tags.

The border, text and background colours can be customised; the default is white text on a black background. The following display styles can be used.

Styles

This class supports the following styles:

Category: Rich Text

See Also:

Requires:

  • USE_RICHTEXT

Constant Summary collapse

RICHTEXT_FIELD_STYLE_COMPOSITE =
1
RICHTEXT_FIELD_STYLE_RECTANGLE =
2
RICHTEXT_FIELD_STYLE_NO_BORDER =
4
RICHTEXT_FIELD_STYLE_START_TAG =
8
RICHTEXT_FIELD_STYLE_END_TAG =
16

Instance Method Summary collapse

Methods inherited from RichTextFieldType

#can_edit_properties, #edit_properties, #get_name, #get_properties_menu_label, #set_name, #update_field

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(name, label, displayStyle = Wx::RTC::RichTextFieldTypeStandard::RICHTEXT_FIELD_STYLE_RECTANGLE) ⇒ Wx::RTC::RichTextFieldTypeStandard #initialize(name, bitmap, displayStyle = Wx::RTC::RichTextFieldTypeStandard::RICHTEXT_FIELD_STYLE_NO_BORDER) ⇒ Wx::RTC::RichTextFieldTypeStandard #initializeWx::RTC::RichTextFieldTypeStandard #initialize(field) ⇒ Wx::RTC::RichTextFieldTypeStandard

Returns a new instance of RichTextFieldTypeStandard.

Overloads:



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

def initialize(*args) end

Instance Method Details

#copy(field) ⇒ void

This method returns an undefined value.

Copies the object.



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

def copy(field) 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)


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

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

#get_background_colourWx::Colour, ... Also known as: background_colour

Gets the colour used for drawing the field background.

Returns:



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

def get_background_colour; end

#get_bitmapWx::Bitmap Also known as: bitmap

Gets the bitmap label for fields of this type.

Returns:



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

def get_bitmap; end

#get_border_colourWx::Colour, ... Also known as: border_colour

Gets the colour used for drawing the field border.

Returns:



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

def get_border_colour; end

#get_display_styleInteger Also known as: display_style

Gets the display style for fields of this type.

Returns:

  • (Integer)


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

def get_display_style; end

#get_fontWx::Font, Wx::FontInfo Also known as: font

Gets the font used for drawing the text label.

Returns:



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

def get_font; end

#get_horizontal_marginInteger Also known as: horizontal_margin

Gets the horizontal margin surrounding the field object.

Returns:

  • (Integer)


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

def get_horizontal_margin; end

#get_horizontal_paddingInteger Also known as: horizontal_padding

Sets the horizontal padding (the distance between the border and the text).

Returns:

  • (Integer)


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

def get_horizontal_padding; end

#get_labelWx::String Also known as: label

Returns the text label for fields of this type.

Returns:

  • (Wx::String)


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

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


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

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

#get_size(obj, dc, context, style) ⇒ Wx::Size Also known as: size

Get the size of the field, given the label, font size, and so on.

Parameters:

Returns:



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

def get_size(obj, dc, context, style) end

#get_text_colourWx::Colour, ... Also known as: text_colour

Gets the colour used for drawing the text label.

Returns:



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

def get_text_colour; end

#get_vertical_marginInteger Also known as: vertical_margin

Gets the vertical margin surrounding the field object.

Returns:

  • (Integer)


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

def get_vertical_margin; end

#get_vertical_paddingInteger Also known as: vertical_padding

Gets the vertical padding (the distance between the border and the text).

Returns:

  • (Integer)


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

def get_vertical_padding; end

#initvoid

This method returns an undefined value.

Initialises the object.



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

def init; end

#is_top_level(obj) ⇒ Boolean Also known as: top_level?

Returns true if the display type is RICHTEXT_FIELD_STYLE_COMPOSITE, false otherwise.

Parameters:

Returns:

  • (Boolean)


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

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)


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

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

#set_background_colour(colour) ⇒ void Also known as: background_colour=

This method returns an undefined value.

Sets the colour used for drawing the field background.

Parameters:



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

def set_background_colour(colour) end

#set_bitmap(bitmap) ⇒ void Also known as: bitmap=

This method returns an undefined value.

Sets the bitmap label for fields of this type.

Parameters:



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

def set_bitmap(bitmap) end

#set_border_colour(colour) ⇒ void Also known as: border_colour=

This method returns an undefined value.

Sets the colour used for drawing the field border.

Parameters:



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

def set_border_colour(colour) end

#set_display_style(displayStyle) ⇒ void Also known as: display_style=

This method returns an undefined value.

Sets the display style for fields of this type.

Parameters:

  • displayStyle (Integer)


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

def set_display_style(displayStyle) end

#set_font(font) ⇒ void Also known as: font=

This method returns an undefined value.

Sets the font used for drawing the text label.

Parameters:



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

def set_font(font) end

#set_horizontal_margin(margin) ⇒ void Also known as: horizontal_margin=

This method returns an undefined value.

Sets the horizontal margin surrounding the field object.

Parameters:

  • margin (Integer)


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

def set_horizontal_margin(margin) end

#set_horizontal_padding(padding) ⇒ void Also known as: horizontal_padding=

This method returns an undefined value.

Sets the horizontal padding (the distance between the border and the text).

Parameters:

  • padding (Integer)


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

def set_horizontal_padding(padding) end

#set_label(label) ⇒ void Also known as: label=

This method returns an undefined value.

Sets the text label for fields of this type.

Parameters:

  • label (String)


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

def set_label(label) end

#set_text_colour(colour) ⇒ void Also known as: text_colour=

This method returns an undefined value.

Sets the colour used for drawing the text label.

Parameters:



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

def set_text_colour(colour) end

#set_vertical_margin(margin) ⇒ void Also known as: vertical_margin=

This method returns an undefined value.

Sets the vertical margin surrounding the field object.

Parameters:

  • margin (Integer)


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

def set_vertical_margin(margin) end

#set_vertical_padding(padding) ⇒ void Also known as: vertical_padding=

This method returns an undefined value.

Sets the vertical padding (the distance between the border and the text).

Parameters:

  • padding (Integer)


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

def set_vertical_padding(padding) end