Class: Wx::TextAttr
- Inherits:
-
Object
- Object
- Wx::TextAttr
- Defined in:
- lib/wx/doc/gen/text_attr.rb
Overview
This class is untracked and should not be derived from nor instances extended!
TextAttr represents the character and paragraph attributes, or style, for a range of text in a TextCtrl or RTC::RichTextCtrl.
Unless explicitly mentioned, the attributes are only implemented in RTC::RichTextCtrl, and not TextCtrl. When setting up a TextAttr object, pass a bitlist mask to #set_flags to indicate which style elements should be changed. As a convenience, when you call a setter such as SetFont, the relevant bit will be set.
Category: Rich Text
Direct Known Subclasses
Instance Method Summary collapse
-
#apply(style, compareWith = nil) ⇒ Boolean
Applies the attributes in style to the original object, but not those attributes from style that are the same as those in compareWith (if passed).
-
#eq_partial(attr, weakTest = true) ⇒ Boolean
Partial equality test.
-
#get_alignment ⇒ Wx::TextAttrAlignment
(also: #alignment)
Returns the alignment flags.
-
#get_background_colour ⇒ Wx::Colour, ...
(also: #background_colour)
Returns the background colour.
-
#get_bullet_font ⇒ Wx::String
(also: #bullet_font)
Returns a string containing the name of the font associated with the bullet symbol.
-
#get_bullet_name ⇒ Wx::String
(also: #bullet_name)
Returns the standard bullet name, applicable if the bullet style is Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_STANDARD.
-
#get_bullet_number ⇒ Integer
(also: #bullet_number)
Returns the bullet number.
-
#get_bullet_style ⇒ Integer
(also: #bullet_style)
Returns the bullet style.
-
#get_bullet_text ⇒ Wx::String
(also: #bullet_text)
Returns the bullet text, which could be a symbol, or (for example) cached outline text.
-
#get_character_style_name ⇒ Wx::String
(also: #character_style_name)
Returns the name of the character style.
-
#get_flags ⇒ Integer
(also: #flags)
Returns flags indicating which attributes are applicable.
-
#get_font ⇒ Wx::Font
(also: #font)
Creates and returns a font specified by the font attributes in the TextAttr object.
-
#get_font_attributes(font, flags = Wx::TextAttrFlags::TEXT_ATTR_FONT) ⇒ Boolean
(also: #font_attributes)
Gets the font attributes from the given font, using only the attributes specified by flags.
-
#get_font_encoding ⇒ Wx::FontEncoding
(also: #font_encoding)
Returns the font encoding.
-
#get_font_face_name ⇒ Wx::String
(also: #font_face_name)
Returns the font face name.
-
#get_font_family ⇒ Wx::FontFamily
(also: #font_family)
Returns the font family.
-
#get_font_size ⇒ Integer
(also: #font_size)
Returns the font size in points.
-
#get_font_style ⇒ Wx::FontStyle
(also: #font_style)
Returns the font style.
-
#get_font_underlined ⇒ Boolean
(also: #font_underlined)
Returns true if the font is underlined.
-
#get_font_weight ⇒ Wx::FontWeight
(also: #font_weight)
Returns the font weight.
-
#get_left_indent ⇒ Integer
(also: #left_indent)
Returns the left indent in tenths of a millimetre.
-
#get_left_sub_indent ⇒ Integer
(also: #left_sub_indent)
Returns the left sub-indent in tenths of a millimetre.
-
#get_line_spacing ⇒ Integer
(also: #line_spacing)
Returns the line spacing value, one of TextAttrLineSpacing values.
-
#get_list_style_name ⇒ Wx::String
(also: #list_style_name)
Returns the name of the list style.
-
#get_outline_level ⇒ Integer
(also: #outline_level)
Returns the outline level.
-
#get_paragraph_spacing_after ⇒ Integer
(also: #paragraph_spacing_after)
Returns the space in tenths of a millimeter after the paragraph.
-
#get_paragraph_spacing_before ⇒ Integer
(also: #paragraph_spacing_before)
Returns the space in tenths of a millimeter before the paragraph.
-
#get_paragraph_style_name ⇒ Wx::String
(also: #paragraph_style_name)
Returns the name of the paragraph style.
-
#get_right_indent ⇒ Integer
(also: #right_indent)
Returns the right indent in tenths of a millimeter.
-
#get_tabs ⇒ Wx::ArrayInt
(also: #tabs)
Returns an array of tab stops, each expressed in tenths of a millimeter.
-
#get_text_colour ⇒ Wx::Colour, ...
(also: #text_colour)
Returns the text foreground colour.
-
#get_text_effect_flags ⇒ Integer
(also: #text_effect_flags)
Returns the text effect bits of interest.
-
#get_text_effects ⇒ Integer
(also: #text_effects)
Returns the text effects, a bit list of styles.
-
#get_underline_colour ⇒ Wx::Colour, ...
(also: #underline_colour)
Returns the underline color used.
-
#get_underline_type ⇒ Wx::TextAttrUnderlineType
(also: #underline_type)
Returns the underline type, which is one of the TextAttrUnderlineType values.
-
#get_url ⇒ Wx::String
(also: #url)
Returns the URL for the content.
-
#has_alignment ⇒ Boolean
(also: #has_alignment?)
Returns true if the attribute object specifies alignment.
-
#has_background_colour ⇒ Boolean
(also: #has_background_colour?)
Returns true if the attribute object specifies a background colour.
-
#has_bullet_name ⇒ Boolean
(also: #has_bullet_name?)
Returns true if the attribute object specifies a standard bullet name.
-
#has_bullet_number ⇒ Boolean
(also: #has_bullet_number?)
Returns true if the attribute object specifies a bullet number.
-
#has_bullet_style ⇒ Boolean
(also: #has_bullet_style?)
Returns true if the attribute object specifies a bullet style.
-
#has_bullet_text ⇒ Boolean
(also: #has_bullet_text?)
Returns true if the attribute object specifies bullet text (usually specifying a symbol).
-
#has_character_style_name ⇒ Boolean
(also: #has_character_style_name?)
Returns true if the attribute object specifies a character style name.
-
#has_flag(flag) ⇒ Boolean
(also: #has_flag?)
Returns true if the flag is present in the attribute object’s flag bitlist.
-
#has_font ⇒ Boolean
(also: #has_font?)
Returns true if the attribute object specifies any font attributes.
-
#has_font_encoding ⇒ Boolean
(also: #has_font_encoding?)
Returns true if the attribute object specifies an encoding.
-
#has_font_face_name ⇒ Boolean
(also: #has_font_face_name?)
Returns true if the attribute object specifies a font face name.
-
#has_font_family ⇒ Boolean
(also: #has_font_family?)
Returns true if the attribute object specifies a font family.
-
#has_font_italic ⇒ Boolean
(also: #has_font_italic?)
Returns true if the attribute object specifies italic style.
-
#has_font_pixel_size ⇒ Boolean
(also: #has_font_pixel_size?)
Returns true if the attribute object specifies a font pixel size.
-
#has_font_point_size ⇒ Boolean
(also: #has_font_point_size?)
Returns true if the attribute object specifies a font point size.
-
#has_font_size ⇒ Boolean
(also: #has_font_size?)
Returns true if the attribute object specifies a font point or pixel size.
-
#has_font_underlined ⇒ Boolean
(also: #has_font_underlined?)
Returns true if the attribute object specifies either underlining or no underlining.
-
#has_font_weight ⇒ Boolean
(also: #has_font_weight?)
Returns true if the attribute object specifies font weight (bold, light or normal).
-
#has_left_indent ⇒ Boolean
(also: #has_left_indent?)
Returns true if the attribute object specifies a left indent.
-
#has_line_spacing ⇒ Boolean
(also: #has_line_spacing?)
Returns true if the attribute object specifies line spacing.
-
#has_list_style_name ⇒ Boolean
(also: #has_list_style_name?)
Returns true if the attribute object specifies a list style name.
-
#has_outline_level ⇒ Boolean
(also: #has_outline_level?)
Returns true if the attribute object specifies an outline level.
-
#has_page_break ⇒ Boolean
(also: #has_page_break?)
Returns true if the attribute object specifies a page break before this paragraph.
-
#has_paragraph_spacing_after ⇒ Boolean
(also: #has_paragraph_spacing_after?)
Returns true if the attribute object specifies spacing after a paragraph.
-
#has_paragraph_spacing_before ⇒ Boolean
(also: #has_paragraph_spacing_before?)
Returns true if the attribute object specifies spacing before a paragraph.
-
#has_paragraph_style_name ⇒ Boolean
(also: #has_paragraph_style_name?)
Returns true if the attribute object specifies a paragraph style name.
-
#has_right_indent ⇒ Boolean
(also: #has_right_indent?)
Returns true if the attribute object specifies a right indent.
-
#has_tabs ⇒ Boolean
(also: #has_tabs?)
Returns true if the attribute object specifies tab stops.
-
#has_text_colour ⇒ Boolean
(also: #has_text_colour?)
Returns true if the attribute object specifies a text foreground colour.
-
#has_text_effects ⇒ Boolean
(also: #has_text_effects?)
Returns true if the attribute object specifies text effects.
-
#has_url ⇒ Boolean
(also: #has_url?)
Returns true if the attribute object specifies a URL.
-
#initialize(*args) ⇒ TextAttr
constructor
A new instance of TextAttr.
-
#is_character_style ⇒ Boolean
(also: #character_style?)
Returns true if the object represents a character style, that is, the flags specify a font or a text background or foreground colour.
-
#is_default ⇒ Boolean
(also: #default?)
Returns false if we have any attributes set, true otherwise.
-
#is_paragraph_style ⇒ Boolean
(also: #paragraph_style?)
Returns true if the object represents a paragraph style, that is, the flags specify alignment, indentation, tabs, paragraph spacing, or bullet style.
-
#merge(overlay) ⇒ void
Copies all defined/valid properties from overlay to current object.
-
#set_alignment(alignment) ⇒ void
(also: #alignment=)
Sets the paragraph alignment.
-
#set_background_colour(colBack) ⇒ void
(also: #background_colour=)
Sets the background colour.
-
#set_bullet_font(font) ⇒ void
(also: #bullet_font=)
Sets the name of the font associated with the bullet symbol.
-
#set_bullet_name(name) ⇒ void
(also: #bullet_name=)
Sets the standard bullet name, applicable if the bullet style is Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_STANDARD.
-
#set_bullet_number(n) ⇒ void
(also: #bullet_number=)
Sets the bullet number.
-
#set_bullet_style(style) ⇒ void
(also: #bullet_style=)
Sets the bullet style.
-
#set_bullet_text(text) ⇒ void
(also: #bullet_text=)
Sets the bullet text, which could be a symbol, or (for example) cached outline text.
-
#set_character_style_name(name) ⇒ void
(also: #character_style_name=)
Sets the character style name.
-
#set_flags(flags) ⇒ void
(also: #flags=)
Sets the flags determining which styles are being specified.
-
#set_font(font, flags = (Wx::TextAttrFlags::TEXT_ATTR_FONT &~Wx::TextAttrFlags::TEXT_ATTR_FONT_PIXEL_SIZE)) ⇒ void
(also: #font=)
Sets the attributes for the given font.
-
#set_font_encoding(encoding) ⇒ void
(also: #font_encoding=)
Sets the font encoding.
-
#set_font_face_name(faceName) ⇒ void
(also: #font_face_name=)
Sets the font face name.
-
#set_font_family(family) ⇒ void
(also: #font_family=)
Sets the font family.
-
#set_font_pixel_size(pixelSize) ⇒ void
(also: #font_pixel_size=)
Sets the font size in pixels.
-
#set_font_point_size(pointSize) ⇒ void
(also: #font_point_size=)
Sets the font size in points.
-
#set_font_size(pointSize) ⇒ void
(also: #font_size=)
Sets the font size in points.
-
#set_font_style(fontStyle) ⇒ void
(also: #font_style=)
Sets the font style (normal, italic or slanted).
- #set_font_underlined(*args) ⇒ Object (also: #font_underlined=)
-
#set_font_weight(fontWeight) ⇒ void
(also: #font_weight=)
Sets the font weight.
-
#set_left_indent(indent, subIndent = 0) ⇒ void
(also: #left_indent=)
Sets the left indent and left subindent in tenths of a millimetre.
-
#set_line_spacing(spacing) ⇒ void
(also: #line_spacing=)
Sets the line spacing.
-
#set_list_style_name(name) ⇒ void
(also: #list_style_name=)
Sets the list style name.
-
#set_outline_level(level) ⇒ void
(also: #outline_level=)
Specifies the outline level.
-
#set_page_break(pageBreak = true) ⇒ void
(also: #page_break=)
Specifies a page break before this paragraph.
-
#set_paragraph_spacing_after(spacing) ⇒ void
(also: #paragraph_spacing_after=)
Sets the spacing after a paragraph, in tenths of a millimetre.
-
#set_paragraph_spacing_before(spacing) ⇒ void
(also: #paragraph_spacing_before=)
Sets the spacing before a paragraph, in tenths of a millimetre.
-
#set_paragraph_style_name(name) ⇒ void
(also: #paragraph_style_name=)
Sets the name of the paragraph style.
-
#set_right_indent(indent) ⇒ void
(also: #right_indent=)
Sets the right indent in tenths of a millimetre.
-
#set_tabs(tabs) ⇒ void
(also: #tabs=)
Sets the tab stops, expressed in tenths of a millimetre.
-
#set_text_colour(colText) ⇒ void
(also: #text_colour=)
Sets the text foreground colour.
-
#set_text_effect_flags(flags) ⇒ void
(also: #text_effect_flags=)
Sets the text effect bits of interest.
-
#set_text_effects(effects) ⇒ void
(also: #text_effects=)
Sets the text effects, a bit list of styles.
-
#set_url(url) ⇒ void
(also: #url=)
Sets the URL for the content.
Constructor Details
#initialize ⇒ Wx::TextAttr #initialize(colText, colBack = Wx::NULL_COLOUR, font = Wx::NULL_FONT, alignment = Wx::TextAttrAlignment::TEXT_ALIGNMENT_DEFAULT) ⇒ Wx::TextAttr #initialize(attr) ⇒ Wx::TextAttr
Returns a new instance of TextAttr.
37 |
# File 'lib/wx/doc/gen/text_attr.rb', line 37 def initialize(*args) end |
Instance Method Details
#apply(style, compareWith = nil) ⇒ Boolean
Applies the attributes in style to the original object, but not those attributes from style that are the same as those in compareWith (if passed).
738 |
# File 'lib/wx/doc/gen/text_attr.rb', line 738 def apply(style, compareWith=nil) end |
#eq_partial(attr, weakTest = true) ⇒ Boolean
Partial equality test.
If weakTest is true, attributes of this object do not have to be present if those attributes of attr are present. If weakTest is false, the function will fail if an attribute is present in attr but not in this object.
751 |
# File 'lib/wx/doc/gen/text_attr.rb', line 751 def eq_partial(attr, weakTest=true) end |
#get_alignment ⇒ Wx::TextAttrAlignment Also known as: alignment
Returns the alignment flags.
See Wx::TextAttrAlignment for a list of available styles. For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
44 |
# File 'lib/wx/doc/gen/text_attr.rb', line 44 def get_alignment; end |
#get_background_colour ⇒ Wx::Colour, ... Also known as: background_colour
Returns the background colour.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
51 |
# File 'lib/wx/doc/gen/text_attr.rb', line 51 def get_background_colour; end |
#get_bullet_font ⇒ Wx::String Also known as: bullet_font
Returns a string containing the name of the font associated with the bullet symbol.
Only valid for attributes with Wx::TEXT_ATTR_BULLET_SYMBOL.
58 |
# File 'lib/wx/doc/gen/text_attr.rb', line 58 def get_bullet_font; end |
#get_bullet_name ⇒ Wx::String Also known as: bullet_name
Returns the standard bullet name, applicable if the bullet style is Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_STANDARD.
Currently the following standard bullet names are supported:
-
standard/circle
-
standard/square
-
standard/diamond
-
standard/triangle
For RTC::RichTextCtrl users only: if you wish your rich text controls to support further bullet graphics, you can derive a class from RichTextRenderer or RichTextStdRenderer, override DrawStandardBullet and EnumerateStandardBulletNames, and set an instance of the class using RTC::RichTextBuffer.set_renderer.
76 |
# File 'lib/wx/doc/gen/text_attr.rb', line 76 def get_bullet_name; end |
#get_bullet_number ⇒ Integer Also known as: bullet_number
Returns the bullet number.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
83 |
# File 'lib/wx/doc/gen/text_attr.rb', line 83 def get_bullet_number; end |
#get_bullet_style ⇒ Integer Also known as: bullet_style
Returns the bullet style.
See Wx::TextAttrBulletStyle for a list of available styles. For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
91 |
# File 'lib/wx/doc/gen/text_attr.rb', line 91 def get_bullet_style; end |
#get_bullet_text ⇒ Wx::String Also known as: bullet_text
Returns the bullet text, which could be a symbol, or (for example) cached outline text.
96 |
# File 'lib/wx/doc/gen/text_attr.rb', line 96 def get_bullet_text; end |
#get_character_style_name ⇒ Wx::String Also known as: character_style_name
Returns the name of the character style.
101 |
# File 'lib/wx/doc/gen/text_attr.rb', line 101 def get_character_style_name; end |
#get_flags ⇒ Integer Also known as: flags
Returns flags indicating which attributes are applicable.
See #set_flags for a list of available flags.
108 |
# File 'lib/wx/doc/gen/text_attr.rb', line 108 def get_flags; end |
#get_font ⇒ Wx::Font Also known as: font
Creates and returns a font specified by the font attributes in the Wx::TextAttr object.
Note that Wx::TextAttr does not store a Font object, so this is only a temporary font. For greater efficiency, access the font attributes directly. For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
117 |
# File 'lib/wx/doc/gen/text_attr.rb', line 117 def get_font; end |
#get_font_attributes(font, flags = Wx::TextAttrFlags::TEXT_ATTR_FONT) ⇒ Boolean Also known as: font_attributes
Gets the font attributes from the given font, using only the attributes specified by flags.
124 |
# File 'lib/wx/doc/gen/text_attr.rb', line 124 def get_font_attributes(font, flags=Wx::TextAttrFlags::TEXT_ATTR_FONT) end |
#get_font_encoding ⇒ Wx::FontEncoding Also known as: font_encoding
Returns the font encoding.
129 |
# File 'lib/wx/doc/gen/text_attr.rb', line 129 def get_font_encoding; end |
#get_font_face_name ⇒ Wx::String Also known as: font_face_name
Returns the font face name.
134 |
# File 'lib/wx/doc/gen/text_attr.rb', line 134 def get_font_face_name; end |
#get_font_family ⇒ Wx::FontFamily Also known as: font_family
Returns the font family.
139 |
# File 'lib/wx/doc/gen/text_attr.rb', line 139 def get_font_family; end |
#get_font_size ⇒ Integer Also known as: font_size
Returns the font size in points.
144 |
# File 'lib/wx/doc/gen/text_attr.rb', line 144 def get_font_size; end |
#get_font_style ⇒ Wx::FontStyle Also known as: font_style
Returns the font style.
149 |
# File 'lib/wx/doc/gen/text_attr.rb', line 149 def get_font_style; end |
#get_font_underlined ⇒ Boolean Also known as: font_underlined
Returns true if the font is underlined.
154 |
# File 'lib/wx/doc/gen/text_attr.rb', line 154 def get_font_underlined; end |
#get_font_weight ⇒ Wx::FontWeight Also known as: font_weight
Returns the font weight.
174 |
# File 'lib/wx/doc/gen/text_attr.rb', line 174 def get_font_weight; end |
#get_left_indent ⇒ Integer Also known as: left_indent
Returns the left indent in tenths of a millimetre.
For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
181 |
# File 'lib/wx/doc/gen/text_attr.rb', line 181 def get_left_indent; end |
#get_left_sub_indent ⇒ Integer Also known as: left_sub_indent
Returns the left sub-indent in tenths of a millimetre.
For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
188 |
# File 'lib/wx/doc/gen/text_attr.rb', line 188 def get_left_sub_indent; end |
#get_line_spacing ⇒ Integer Also known as: line_spacing
Returns the line spacing value, one of Wx::TextAttrLineSpacing values.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
195 |
# File 'lib/wx/doc/gen/text_attr.rb', line 195 def get_line_spacing; end |
#get_list_style_name ⇒ Wx::String Also known as: list_style_name
Returns the name of the list style.
200 |
# File 'lib/wx/doc/gen/text_attr.rb', line 200 def get_list_style_name; end |
#get_outline_level ⇒ Integer Also known as: outline_level
Returns the outline level.
205 |
# File 'lib/wx/doc/gen/text_attr.rb', line 205 def get_outline_level; end |
#get_paragraph_spacing_after ⇒ Integer Also known as: paragraph_spacing_after
Returns the space in tenths of a millimeter after the paragraph.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
212 |
# File 'lib/wx/doc/gen/text_attr.rb', line 212 def get_paragraph_spacing_after; end |
#get_paragraph_spacing_before ⇒ Integer Also known as: paragraph_spacing_before
Returns the space in tenths of a millimeter before the paragraph.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
219 |
# File 'lib/wx/doc/gen/text_attr.rb', line 219 def get_paragraph_spacing_before; end |
#get_paragraph_style_name ⇒ Wx::String Also known as: paragraph_style_name
Returns the name of the paragraph style.
224 |
# File 'lib/wx/doc/gen/text_attr.rb', line 224 def get_paragraph_style_name; end |
#get_right_indent ⇒ Integer Also known as: right_indent
Returns the right indent in tenths of a millimeter.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
231 |
# File 'lib/wx/doc/gen/text_attr.rb', line 231 def get_right_indent; end |
#get_tabs ⇒ Wx::ArrayInt Also known as: tabs
Returns an array of tab stops, each expressed in tenths of a millimeter.
Each stop is measured from the left margin and therefore each value must be larger than the last. For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
239 |
# File 'lib/wx/doc/gen/text_attr.rb', line 239 def get_tabs; end |
#get_text_colour ⇒ Wx::Colour, ... Also known as: text_colour
Returns the text foreground colour.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
246 |
# File 'lib/wx/doc/gen/text_attr.rb', line 246 def get_text_colour; end |
#get_text_effect_flags ⇒ Integer Also known as: text_effect_flags
Returns the text effect bits of interest.
See #set_flags for further information.
253 |
# File 'lib/wx/doc/gen/text_attr.rb', line 253 def get_text_effect_flags; end |
#get_text_effects ⇒ Integer Also known as: text_effects
Returns the text effects, a bit list of styles.
See #set_text_effects for details.
260 |
# File 'lib/wx/doc/gen/text_attr.rb', line 260 def get_text_effects; end |
#get_underline_colour ⇒ Wx::Colour, ... Also known as: underline_colour
Returns the underline color used.
NULL_COLOUR when the text colour is used. For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
169 |
# File 'lib/wx/doc/gen/text_attr.rb', line 169 def get_underline_colour; end |
#get_underline_type ⇒ Wx::TextAttrUnderlineType Also known as: underline_type
Returns the underline type, which is one of the Wx::TextAttrUnderlineType values.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
161 |
# File 'lib/wx/doc/gen/text_attr.rb', line 161 def get_underline_type; end |
#get_url ⇒ Wx::String Also known as: url
Returns the URL for the content.
Content with Wx::TextAttrFlags::TEXT_ATTR_URL style causes RTC::RichTextCtrl to show a hand cursor over it, and RTC::RichTextCtrl generates a Wx::TextUrlEvent when the content is clicked.
267 |
# File 'lib/wx/doc/gen/text_attr.rb', line 267 def get_url; end |
#has_alignment ⇒ Boolean Also known as: has_alignment?
Returns true if the attribute object specifies alignment.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
274 |
# File 'lib/wx/doc/gen/text_attr.rb', line 274 def has_alignment; end |
#has_background_colour ⇒ Boolean Also known as: has_background_colour?
Returns true if the attribute object specifies a background colour.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
281 |
# File 'lib/wx/doc/gen/text_attr.rb', line 281 def has_background_colour; end |
#has_bullet_name ⇒ Boolean Also known as: has_bullet_name?
Returns true if the attribute object specifies a standard bullet name.
286 |
# File 'lib/wx/doc/gen/text_attr.rb', line 286 def has_bullet_name; end |
#has_bullet_number ⇒ Boolean Also known as: has_bullet_number?
Returns true if the attribute object specifies a bullet number.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
293 |
# File 'lib/wx/doc/gen/text_attr.rb', line 293 def has_bullet_number; end |
#has_bullet_style ⇒ Boolean Also known as: has_bullet_style?
Returns true if the attribute object specifies a bullet style.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
300 |
# File 'lib/wx/doc/gen/text_attr.rb', line 300 def has_bullet_style; end |
#has_bullet_text ⇒ Boolean Also known as: has_bullet_text?
Returns true if the attribute object specifies bullet text (usually specifying a symbol).
305 |
# File 'lib/wx/doc/gen/text_attr.rb', line 305 def has_bullet_text; end |
#has_character_style_name ⇒ Boolean Also known as: has_character_style_name?
Returns true if the attribute object specifies a character style name.
310 |
# File 'lib/wx/doc/gen/text_attr.rb', line 310 def has_character_style_name; end |
#has_flag(flag) ⇒ Boolean Also known as: has_flag?
Returns true if the flag is present in the attribute object’s flag bitlist.
316 |
# File 'lib/wx/doc/gen/text_attr.rb', line 316 def has_flag(flag) end |
#has_font ⇒ Boolean Also known as: has_font?
Returns true if the attribute object specifies any font attributes.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
323 |
# File 'lib/wx/doc/gen/text_attr.rb', line 323 def has_font; end |
#has_font_encoding ⇒ Boolean Also known as: has_font_encoding?
Returns true if the attribute object specifies an encoding.
328 |
# File 'lib/wx/doc/gen/text_attr.rb', line 328 def has_font_encoding; end |
#has_font_face_name ⇒ Boolean Also known as: has_font_face_name?
Returns true if the attribute object specifies a font face name.
333 |
# File 'lib/wx/doc/gen/text_attr.rb', line 333 def has_font_face_name; end |
#has_font_family ⇒ Boolean Also known as: has_font_family?
Returns true if the attribute object specifies a font family.
338 |
# File 'lib/wx/doc/gen/text_attr.rb', line 338 def has_font_family; end |
#has_font_italic ⇒ Boolean Also known as: has_font_italic?
Returns true if the attribute object specifies italic style.
343 |
# File 'lib/wx/doc/gen/text_attr.rb', line 343 def has_font_italic; end |
#has_font_pixel_size ⇒ Boolean Also known as: has_font_pixel_size?
Returns true if the attribute object specifies a font pixel size.
358 |
# File 'lib/wx/doc/gen/text_attr.rb', line 358 def has_font_pixel_size; end |
#has_font_point_size ⇒ Boolean Also known as: has_font_point_size?
Returns true if the attribute object specifies a font point size.
353 |
# File 'lib/wx/doc/gen/text_attr.rb', line 353 def has_font_point_size; end |
#has_font_size ⇒ Boolean Also known as: has_font_size?
Returns true if the attribute object specifies a font point or pixel size.
348 |
# File 'lib/wx/doc/gen/text_attr.rb', line 348 def has_font_size; end |
#has_font_underlined ⇒ Boolean Also known as: has_font_underlined?
Returns true if the attribute object specifies either underlining or no underlining.
363 |
# File 'lib/wx/doc/gen/text_attr.rb', line 363 def has_font_underlined; end |
#has_font_weight ⇒ Boolean Also known as: has_font_weight?
Returns true if the attribute object specifies font weight (bold, light or normal).
368 |
# File 'lib/wx/doc/gen/text_attr.rb', line 368 def has_font_weight; end |
#has_left_indent ⇒ Boolean Also known as: has_left_indent?
Returns true if the attribute object specifies a left indent.
For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
375 |
# File 'lib/wx/doc/gen/text_attr.rb', line 375 def has_left_indent; end |
#has_line_spacing ⇒ Boolean Also known as: has_line_spacing?
Returns true if the attribute object specifies line spacing.
For Wx::TextCtrl, is implemented under WXMSW and WXOSX. Also implemented in RTC::RichTextCtrl.
382 |
# File 'lib/wx/doc/gen/text_attr.rb', line 382 def has_line_spacing; end |
#has_list_style_name ⇒ Boolean Also known as: has_list_style_name?
Returns true if the attribute object specifies a list style name.
387 |
# File 'lib/wx/doc/gen/text_attr.rb', line 387 def has_list_style_name; end |
#has_outline_level ⇒ Boolean Also known as: has_outline_level?
Returns true if the attribute object specifies an outline level.
392 |
# File 'lib/wx/doc/gen/text_attr.rb', line 392 def has_outline_level; end |
#has_page_break ⇒ Boolean Also known as: has_page_break?
Returns true if the attribute object specifies a page break before this paragraph.
397 |
# File 'lib/wx/doc/gen/text_attr.rb', line 397 def has_page_break; end |
#has_paragraph_spacing_after ⇒ Boolean Also known as: has_paragraph_spacing_after?
Returns true if the attribute object specifies spacing after a paragraph.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
404 |
# File 'lib/wx/doc/gen/text_attr.rb', line 404 def has_paragraph_spacing_after; end |
#has_paragraph_spacing_before ⇒ Boolean Also known as: has_paragraph_spacing_before?
Returns true if the attribute object specifies spacing before a paragraph.
For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
411 |
# File 'lib/wx/doc/gen/text_attr.rb', line 411 def has_paragraph_spacing_before; end |
#has_paragraph_style_name ⇒ Boolean Also known as: has_paragraph_style_name?
Returns true if the attribute object specifies a paragraph style name.
416 |
# File 'lib/wx/doc/gen/text_attr.rb', line 416 def has_paragraph_style_name; end |
#has_right_indent ⇒ Boolean Also known as: has_right_indent?
Returns true if the attribute object specifies a right indent.
421 |
# File 'lib/wx/doc/gen/text_attr.rb', line 421 def has_right_indent; end |
#has_tabs ⇒ Boolean Also known as: has_tabs?
Returns true if the attribute object specifies tab stops.
For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
428 |
# File 'lib/wx/doc/gen/text_attr.rb', line 428 def has_tabs; end |
#has_text_colour ⇒ Boolean Also known as: has_text_colour?
Returns true if the attribute object specifies a text foreground colour.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
435 |
# File 'lib/wx/doc/gen/text_attr.rb', line 435 def has_text_colour; end |
#has_text_effects ⇒ Boolean Also known as: has_text_effects?
Returns true if the attribute object specifies text effects.
440 |
# File 'lib/wx/doc/gen/text_attr.rb', line 440 def has_text_effects; end |
#has_url ⇒ Boolean Also known as: has_url?
Returns true if the attribute object specifies a URL.
445 |
# File 'lib/wx/doc/gen/text_attr.rb', line 445 def has_url; end |
#is_character_style ⇒ Boolean Also known as: character_style?
Returns true if the object represents a character style, that is, the flags specify a font or a text background or foreground colour.
450 |
# File 'lib/wx/doc/gen/text_attr.rb', line 450 def is_character_style; end |
#is_default ⇒ Boolean Also known as: default?
Returns false if we have any attributes set, true otherwise.
455 |
# File 'lib/wx/doc/gen/text_attr.rb', line 455 def is_default; end |
#is_paragraph_style ⇒ Boolean Also known as: paragraph_style?
Returns true if the object represents a paragraph style, that is, the flags specify alignment, indentation, tabs, paragraph spacing, or bullet style.
460 |
# File 'lib/wx/doc/gen/text_attr.rb', line 460 def is_paragraph_style; end |
#merge(overlay) ⇒ void
This method returns an undefined value.
Copies all defined/valid properties from overlay to current object.
743 |
# File 'lib/wx/doc/gen/text_attr.rb', line 743 def merge() end |
#set_alignment(alignment) ⇒ void Also known as: alignment=
This method returns an undefined value.
Sets the paragraph alignment.
See Wx::TextAttrAlignment enumeration values. Wx::TextAttrAlignment::TEXT_ALIGNMENT_JUSTIFIED is not implemented for RTC::RichTextCtrl. In the future, RTC::RichTextCtrl justification may be supported when printing or previewing only. For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
470 |
# File 'lib/wx/doc/gen/text_attr.rb', line 470 def set_alignment(alignment) end |
#set_background_colour(colBack) ⇒ void Also known as: background_colour=
This method returns an undefined value.
Sets the background colour.
For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
478 |
# File 'lib/wx/doc/gen/text_attr.rb', line 478 def set_background_colour(colBack) end |
#set_bullet_font(font) ⇒ void Also known as: bullet_font=
This method returns an undefined value.
Sets the name of the font associated with the bullet symbol.
Only valid for attributes with Wx::TEXT_ATTR_BULLET_SYMBOL.
486 |
# File 'lib/wx/doc/gen/text_attr.rb', line 486 def set_bullet_font(font) end |
#set_bullet_name(name) ⇒ void Also known as: bullet_name=
This method returns an undefined value.
Sets the standard bullet name, applicable if the bullet style is Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_STANDARD.
See #get_bullet_name for a list of supported names, and how to expand the range of supported types.
494 |
# File 'lib/wx/doc/gen/text_attr.rb', line 494 def set_bullet_name(name) end |
#set_bullet_number(n) ⇒ void Also known as: bullet_number=
This method returns an undefined value.
Sets the bullet number.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
502 |
# File 'lib/wx/doc/gen/text_attr.rb', line 502 def set_bullet_number(n) end |
#set_bullet_style(style) ⇒ void Also known as: bullet_style=
This method returns an undefined value.
Sets the bullet style.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl. For RTC::RichTextCtrl, the Wx::TextAttrBulletStyle enumeration values are all supported, except for Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_BITMAP. For Wx::TextCtrl under WXMSW, the Wx::TextAttrBulletStyle enumeration values are all supported, except for Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_BITMAP, Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_OUTLINE, Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_ALIGN_LEFT, Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT, Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE, and Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_CONTINUATION.
512 |
# File 'lib/wx/doc/gen/text_attr.rb', line 512 def set_bullet_style(style) end |
#set_bullet_text(text) ⇒ void Also known as: bullet_text=
This method returns an undefined value.
Sets the bullet text, which could be a symbol, or (for example) cached outline text.
518 |
# File 'lib/wx/doc/gen/text_attr.rb', line 518 def set_bullet_text(text) end |
#set_character_style_name(name) ⇒ void Also known as: character_style_name=
This method returns an undefined value.
Sets the character style name.
524 |
# File 'lib/wx/doc/gen/text_attr.rb', line 524 def set_character_style_name(name) end |
#set_flags(flags) ⇒ void Also known as: flags=
This method returns an undefined value.
Sets the flags determining which styles are being specified.
The Wx::TextAttrFlags values can be passed in a bitlist.
532 |
# File 'lib/wx/doc/gen/text_attr.rb', line 532 def set_flags(flags) end |
#set_font(font, flags = (Wx::TextAttrFlags::TEXT_ATTR_FONT &~Wx::TextAttrFlags::TEXT_ATTR_FONT_PIXEL_SIZE)) ⇒ void Also known as: font=
This method returns an undefined value.
Sets the attributes for the given font.
Note that Wx::TextAttr does not store an actual Font object. For Wx::TextCtrl, is implemented under WXMSW, WXOSX and WXGTK. Also implemented in RTC::RichTextCtrl.
542 |
# File 'lib/wx/doc/gen/text_attr.rb', line 542 def set_font(font, flags=(Wx::TextAttrFlags::TEXT_ATTR_FONT &~Wx::TextAttrFlags::TEXT_ATTR_FONT_PIXEL_SIZE)) end |
#set_font_encoding(encoding) ⇒ void Also known as: font_encoding=
This method returns an undefined value.
Sets the font encoding.
548 |
# File 'lib/wx/doc/gen/text_attr.rb', line 548 def set_font_encoding(encoding) end |
#set_font_face_name(faceName) ⇒ void Also known as: font_face_name=
This method returns an undefined value.
Sets the font face name.
554 |
# File 'lib/wx/doc/gen/text_attr.rb', line 554 def set_font_face_name(faceName) end |
#set_font_family(family) ⇒ void Also known as: font_family=
This method returns an undefined value.
Sets the font family.
560 |
# File 'lib/wx/doc/gen/text_attr.rb', line 560 def set_font_family(family) end |
#set_font_pixel_size(pixelSize) ⇒ void Also known as: font_pixel_size=
This method returns an undefined value.
Sets the font size in pixels.
578 |
# File 'lib/wx/doc/gen/text_attr.rb', line 578 def set_font_pixel_size(pixelSize) end |
#set_font_point_size(pointSize) ⇒ void Also known as: font_point_size=
This method returns an undefined value.
Sets the font size in points.
572 |
# File 'lib/wx/doc/gen/text_attr.rb', line 572 def set_font_point_size(pointSize) end |
#set_font_size(pointSize) ⇒ void Also known as: font_size=
This method returns an undefined value.
Sets the font size in points.
566 |
# File 'lib/wx/doc/gen/text_attr.rb', line 566 def set_font_size(pointSize) end |
#set_font_style(fontStyle) ⇒ void Also known as: font_style=
This method returns an undefined value.
Sets the font style (normal, italic or slanted).
584 |
# File 'lib/wx/doc/gen/text_attr.rb', line 584 def set_font_style(fontStyle) end |
#set_font_underlined(underlined) ⇒ void #set_font_underlined(type, colour = Wx::NULL_COLOUR) ⇒ void Also known as: font_underlined=
614 |
# File 'lib/wx/doc/gen/text_attr.rb', line 614 def set_font_underlined(*args) end |
#set_font_weight(fontWeight) ⇒ void Also known as: font_weight=
This method returns an undefined value.
Sets the font weight.
620 |
# File 'lib/wx/doc/gen/text_attr.rb', line 620 def set_font_weight(fontWeight) end |
#set_left_indent(indent, subIndent = 0) ⇒ void Also known as: left_indent=
This method returns an undefined value.
Sets the left indent and left subindent in tenths of a millimetre.
The sub-indent is an offset from the left of the paragraph, and is used for all but the first line in a paragraph. A positive value will cause the first line to appear to the left of the subsequent lines, and a negative value will cause the first line to be indented relative to the subsequent lines. RTC::RichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the left of the actual paragraph is leftSubIndent. For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
632 |
# File 'lib/wx/doc/gen/text_attr.rb', line 632 def set_left_indent(indent, subIndent=0) end |
#set_line_spacing(spacing) ⇒ void Also known as: line_spacing=
This method returns an undefined value.
Sets the line spacing.
spacing is a multiple, where 10 means single-spacing, 15 means 1.5 spacing, and 20 means double spacing. The Wx::TextAttrLineSpacing values are defined for convenience. For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
641 |
# File 'lib/wx/doc/gen/text_attr.rb', line 641 def set_line_spacing(spacing) end |
#set_list_style_name(name) ⇒ void Also known as: list_style_name=
This method returns an undefined value.
Sets the list style name.
647 |
# File 'lib/wx/doc/gen/text_attr.rb', line 647 def set_list_style_name(name) end |
#set_outline_level(level) ⇒ void Also known as: outline_level=
This method returns an undefined value.
Specifies the outline level.
Zero represents normal text. At present, the outline level is not used, but may be used in future for determining list levels and for applications that need to store document structure information.
655 |
# File 'lib/wx/doc/gen/text_attr.rb', line 655 def set_outline_level(level) end |
#set_page_break(pageBreak = true) ⇒ void Also known as: page_break=
This method returns an undefined value.
Specifies a page break before this paragraph.
661 |
# File 'lib/wx/doc/gen/text_attr.rb', line 661 def set_page_break(pageBreak=true) end |
#set_paragraph_spacing_after(spacing) ⇒ void Also known as: paragraph_spacing_after=
This method returns an undefined value.
Sets the spacing after a paragraph, in tenths of a millimetre.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
669 |
# File 'lib/wx/doc/gen/text_attr.rb', line 669 def set_paragraph_spacing_after(spacing) end |
#set_paragraph_spacing_before(spacing) ⇒ void Also known as: paragraph_spacing_before=
This method returns an undefined value.
Sets the spacing before a paragraph, in tenths of a millimetre.
For Wx::TextCtrl, is implemented under WXMSW. Also implemented in RTC::RichTextCtrl.
677 |
# File 'lib/wx/doc/gen/text_attr.rb', line 677 def set_paragraph_spacing_before(spacing) end |
#set_paragraph_style_name(name) ⇒ void Also known as: paragraph_style_name=
This method returns an undefined value.
Sets the name of the paragraph style.
683 |
# File 'lib/wx/doc/gen/text_attr.rb', line 683 def set_paragraph_style_name(name) end |
#set_right_indent(indent) ⇒ void Also known as: right_indent=
This method returns an undefined value.
Sets the right indent in tenths of a millimetre.
689 |
# File 'lib/wx/doc/gen/text_attr.rb', line 689 def set_right_indent(indent) end |
#set_tabs(tabs) ⇒ void Also known as: tabs=
This method returns an undefined value.
Sets the tab stops, expressed in tenths of a millimetre.
Each stop is measured from the left margin and therefore each value must be larger than the last. For Wx::TextCtrl, is implemented under WXMSW and WXGTK. Also implemented in RTC::RichTextCtrl.
698 |
# File 'lib/wx/doc/gen/text_attr.rb', line 698 def set_tabs(tabs) end |
#set_text_colour(colText) ⇒ void Also known as: text_colour=
This method returns an undefined value.
Sets the text foreground colour.
704 |
# File 'lib/wx/doc/gen/text_attr.rb', line 704 def set_text_colour(colText) end |
#set_text_effect_flags(flags) ⇒ void Also known as: text_effect_flags=
This method returns an undefined value.
Sets the text effect bits of interest.
You should also pass Wx::TextAttrFlags::TEXT_ATTR_EFFECTS to #set_flags. See #set_flags for further information.
712 |
# File 'lib/wx/doc/gen/text_attr.rb', line 712 def set_text_effect_flags(flags) end |
#set_text_effects(effects) ⇒ void Also known as: text_effects=
This method returns an undefined value.
Sets the text effects, a bit list of styles.
The Wx::TextAttrEffects enumeration values can be used. Of these, only Wx::TextAttrEffects::TEXT_ATTR_EFFECT_CAPITALS, Wx::TextAttrEffects::TEXT_ATTR_EFFECT_STRIKETHROUGH, Wx::TextAttrEffects::TEXT_ATTR_EFFECT_SUPERSCRIPT and Wx::TextAttrEffects::TEXT_ATTR_EFFECT_SUBSCRIPT are implemented. Wx::TextAttrEffects::TEXT_ATTR_EFFECT_CAPITALS capitalises text when displayed (leaving the case of the actual buffer text unchanged), and Wx::TextAttrEffects::TEXT_ATTR_EFFECT_STRIKETHROUGH draws a line through text. To set effects, you should also pass Wx::TextAttrFlags::TEXT_ATTR_EFFECTS to #set_flags, and call #set_text_effect_flags with the styles (taken from the above set) that you are interested in setting.
723 |
# File 'lib/wx/doc/gen/text_attr.rb', line 723 def set_text_effects(effects) end |
#set_url(url) ⇒ void Also known as: url=
This method returns an undefined value.
Sets the URL for the content.
Sets the Wx::TextAttrFlags::TEXT_ATTR_URL style; content with this style causes RTC::RichTextCtrl to show a hand cursor over it, and RTC::RichTextCtrl generates a Wx::TextUrlEvent when the content is clicked.
731 |
# File 'lib/wx/doc/gen/text_attr.rb', line 731 def set_url(url) end |