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:



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

def initialize(*args) end

Instance Method Details

#copy(field) ⇒ void

This method returns an undefined value.

Copies the object.



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

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)


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

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:



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

def get_background_colour; end

#get_bitmapWx::Bitmap Also known as: bitmap

Gets the bitmap label for fields of this type.

Returns:



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

def get_bitmap; end

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

Gets the colour used for drawing the field border.

Returns:



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

def get_border_colour; end

#get_display_styleInteger Also known as: display_style

Gets the display style for fields of this type.

Returns:

  • (Integer)


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

def get_display_style; end

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

Gets the font used for drawing the text label.

Returns:



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

def get_font; end

#get_horizontal_marginInteger Also known as: horizontal_margin

Gets the horizontal margin surrounding the field object.

Returns:

  • (Integer)


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

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)


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

def get_horizontal_padding; end

#get_labelWx::String Also known as: label

Returns the text label for fields of this type.

Returns:

  • (Wx::String)


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

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


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

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:



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

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:



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

def get_text_colour; end

#get_vertical_marginInteger Also known as: vertical_margin

Gets the vertical margin surrounding the field object.

Returns:

  • (Integer)


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

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)


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

def get_vertical_padding; end

#initvoid

This method returns an undefined value.

Initialises the object.



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

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)


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

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)


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

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:



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

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:



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

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:



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

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)


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

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:



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

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)


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

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)


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

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)


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

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:



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

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)


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

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)


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

def set_vertical_padding(padding) end