Class: Wx::RTC::RichTextFieldTypeStandard
- Inherits:
-
RichTextFieldType
- Object
- Object
- RichTextFieldType
- Wx::RTC::RichTextFieldTypeStandard
- 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:
-
RICHTEXT_FIELD_STYLE_COMPOSITE: Creates a composite field; you will probably need to derive a new class to implement UpdateField.
-
RICHTEXT_FIELD_STYLE_RECTANGLE: Shows a rounded rectangle background.
-
RICHTEXT_FIELD_STYLE_NO_BORDER: Suppresses the background and border; mostly used with a bitmap label.
-
RICHTEXT_FIELD_STYLE_START_TAG: Shows a start tag background, with the pointy end facing right.
-
RICHTEXT_FIELD_STYLE_END_TAG: Shows an end tag background, with the pointy end facing left.
Category: Rich Text
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
-
#copy(field) ⇒ void
Copies the object.
-
#draw(obj, dc, context, range, selection, rect, descent, style) ⇒ Boolean
Draw the item, within the given range.
-
#get_background_colour ⇒ Wx::Colour, ...
(also: #background_colour)
Gets the colour used for drawing the field background.
-
#get_bitmap ⇒ Wx::Bitmap
(also: #bitmap)
Gets the bitmap label for fields of this type.
-
#get_border_colour ⇒ Wx::Colour, ...
(also: #border_colour)
Gets the colour used for drawing the field border.
-
#get_display_style ⇒ Integer
(also: #display_style)
Gets the display style for fields of this type.
-
#get_font ⇒ Wx::Font, Wx::FontInfo
(also: #font)
Gets the font used for drawing the text label.
-
#get_horizontal_margin ⇒ Integer
(also: #horizontal_margin)
Gets the horizontal margin surrounding the field object.
-
#get_horizontal_padding ⇒ Integer
(also: #horizontal_padding)
Sets the horizontal padding (the distance between the border and the text).
-
#get_label ⇒ Wx::String
(also: #label)
Returns the text label for fields of this type.
-
#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: #range_size)
Returns the object size for the given range.
-
#get_size(obj, dc, context, style) ⇒ Wx::Size
(also: #size)
Get the size of the field, given the label, font size, and so on.
-
#get_text_colour ⇒ Wx::Colour, ...
(also: #text_colour)
Gets the colour used for drawing the text label.
-
#get_vertical_margin ⇒ Integer
(also: #vertical_margin)
Gets the vertical margin surrounding the field object.
-
#get_vertical_padding ⇒ Integer
(also: #vertical_padding)
Gets the vertical padding (the distance between the border and the text).
-
#init ⇒ void
Initialises the object.
-
#initialize(*args) ⇒ RichTextFieldTypeStandard
constructor
A new instance of RichTextFieldTypeStandard.
-
#is_top_level(obj) ⇒ Boolean
(also: #top_level?)
Returns true if the display type is RICHTEXT_FIELD_STYLE_COMPOSITE, false otherwise.
-
#layout(obj, dc, context, rect, parentRect, style) ⇒ Boolean
Lay the item out at the specified position with the given size constraint.
-
#set_background_colour(colour) ⇒ void
(also: #background_colour=)
Sets the colour used for drawing the field background.
-
#set_bitmap(bitmap) ⇒ void
(also: #bitmap=)
Sets the bitmap label for fields of this type.
-
#set_border_colour(colour) ⇒ void
(also: #border_colour=)
Sets the colour used for drawing the field border.
-
#set_display_style(displayStyle) ⇒ void
(also: #display_style=)
Sets the display style for fields of this type.
-
#set_font(font) ⇒ void
(also: #font=)
Sets the font used for drawing the text label.
-
#set_horizontal_margin(margin) ⇒ void
(also: #horizontal_margin=)
Sets the horizontal margin surrounding the field object.
-
#set_horizontal_padding(padding) ⇒ void
(also: #horizontal_padding=)
Sets the horizontal padding (the distance between the border and the text).
-
#set_label(label) ⇒ void
(also: #label=)
Sets the text label for fields of this type.
-
#set_text_colour(colour) ⇒ void
(also: #text_colour=)
Sets the colour used for drawing the text label.
-
#set_vertical_margin(margin) ⇒ void
(also: #vertical_margin=)
Sets the vertical margin surrounding the field object.
-
#set_vertical_padding(padding) ⇒ void
(also: #vertical_padding=)
Sets the vertical padding (the distance between the border and the text).
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 #initialize ⇒ Wx::RTC::RichTextFieldTypeStandard #initialize(field) ⇒ Wx::RTC::RichTextFieldTypeStandard
Returns a new instance of RichTextFieldTypeStandard.
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)
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_colour ⇒ Wx::Colour, ... Also known as: background_colour
Gets the colour used for drawing the field background.
1052 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1052 def get_background_colour; end |
#get_bitmap ⇒ Wx::Bitmap Also known as: bitmap
Gets the bitmap label for fields of this type.
1003 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1003 def get_bitmap; end |
#get_border_colour ⇒ Wx::Colour, ... Also known as: border_colour
Gets the colour used for drawing the field border.
1041 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1041 def get_border_colour; end |
#get_display_style ⇒ Integer Also known as: display_style
Gets the display style for fields of this type.
1008 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1008 def get_display_style; end |
#get_font ⇒ Wx::Font, Wx::FontInfo Also known as: font
Gets the font used for drawing the text label.
1019 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1019 def get_font; end |
#get_horizontal_margin ⇒ Integer Also known as: horizontal_margin
Gets the horizontal margin surrounding the field object.
1091 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1091 def get_horizontal_margin; end |
#get_horizontal_padding ⇒ Integer Also known as: horizontal_padding
Sets the horizontal padding (the distance between the border and the text).
1080 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1080 def get_horizontal_padding; end |
#get_label ⇒ Wx::String Also known as: label
Returns the text label for fields of this type.
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.
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.
975 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 975 def get_size(obj, dc, context, style) end |
#get_text_colour ⇒ Wx::Colour, ... Also known as: text_colour
Gets the colour used for drawing the text label.
1030 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1030 def get_text_colour; end |
#get_vertical_margin ⇒ Integer Also known as: vertical_margin
Gets the vertical margin surrounding the field object.
1102 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1102 def get_vertical_margin; end |
#get_vertical_padding ⇒ Integer Also known as: vertical_padding
Gets the vertical padding (the distance between the border and the text).
1069 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1069 def get_vertical_padding; end |
#init ⇒ void
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.
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).
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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).
1064 |
# File 'lib/wx/doc/gen/rtc/rich_text_buffer.rb', line 1064 def set_vertical_padding(padding) end |