# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # {Wx::TextAttr} represents the character and paragraph attributes, or style, for a range of text in a {Wx::TextCtrl} or {Wx::RTC::RichTextCtrl}. # When setting up a {Wx::TextAttr} object, pass a bitlist mask to {Wx::TextAttr#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 # @see Wx::TextCtrl # @see Wx::RTC::RichTextCtrl # # # # @note This class is untracked and should not be derived from nor instances extended! class TextAttr < ::Object # @overload initialize() # Constructors. # @return [Wx::TextAttr] # @overload initialize(colText, colBack=Wx::NULL_COLOUR, font=Wx::NULL_FONT, alignment=Wx::TextAttrAlignment::TEXT_ALIGNMENT_DEFAULT) # Constructors. # @param colText [Wx::Colour,String,Symbol] # @param colBack [Wx::Colour,String,Symbol] # @param font [Wx::Font,Wx::FontInfo] # @param alignment [Wx::TextAttrAlignment] # @return [Wx::TextAttr] # @overload initialize(attr) # Constructors. # @param attr [Wx::TextAttr] # @return [Wx::TextAttr] def initialize(*args) end # Returns the alignment flags. # See {Wx::TextAttrAlignment} for a list of available styles. # @return [Wx::TextAttrAlignment] def get_alignment; end alias_method :alignment, :get_alignment # Returns the background colour. # @return [Wx::Colour,String,Symbol] def get_background_colour; end alias_method :background_colour, :get_background_colour # Returns a string containing the name of the font associated with the bullet symbol. # Only valid for attributes with {Wx::TEXT_ATTR_BULLET_SYMBOL}. # @return [Wx::String] def get_bullet_font; end alias_method :bullet_font, :get_bullet_font # 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 {Wx::RTC::RichTextCtrl} users only: if you wish your rich text controls to support further bullet graphics, you can derive a class from {Wx::RichTextRenderer} or {Wx::RichTextStdRenderer}, override DrawStandardBullet and EnumerateStandardBulletNames, and set an instance of the class using {Wx::RTC::RichTextBuffer::SetRenderer}. # @return [Wx::String] def get_bullet_name; end alias_method :bullet_name, :get_bullet_name # Returns the bullet number. # @return [Integer] def get_bullet_number; end alias_method :bullet_number, :get_bullet_number # Returns the bullet style. # See {Wx::TextAttrBulletStyle} for a list of available styles. # @return [Integer] def get_bullet_style; end alias_method :bullet_style, :get_bullet_style # Returns the bullet text, which could be a symbol, or (for example) cached outline text. # @return [Wx::String] def get_bullet_text; end alias_method :bullet_text, :get_bullet_text # Returns the name of the character style. # @return [Wx::String] def get_character_style_name; end alias_method :character_style_name, :get_character_style_name # Returns flags indicating which attributes are applicable. # See {Wx::TextAttr#set_flags} for a list of available flags. # @return [Integer] def get_flags; end alias_method :flags, :get_flags # Creates and returns a font specified by the font attributes in the {Wx::TextAttr} object. # Note that {Wx::TextAttr} does not store a {Wx::Font} object, so this is only a temporary font. # For greater efficiency, access the font attributes directly. # @return [Wx::Font] def get_font; end alias_method :font, :get_font # Gets the font attributes from the given font, using only the attributes specified by flags. # @param font [Wx::Font,Wx::FontInfo] # @param flags [Integer] # @return [Boolean] def get_font_attributes(font, flags=Wx::TextAttrFlags::TEXT_ATTR_FONT) end alias_method :font_attributes, :get_font_attributes # Returns the font encoding. # @return [Wx::FontEncoding] def get_font_encoding; end alias_method :font_encoding, :get_font_encoding # Returns the font face name. # @return [Wx::String] def get_font_face_name; end alias_method :font_face_name, :get_font_face_name # Returns the font family. # @return [Wx::FontFamily] def get_font_family; end alias_method :font_family, :get_font_family # Returns the font size in points. # @return [Integer] def get_font_size; end alias_method :font_size, :get_font_size # Returns the font style. # @return [Wx::FontStyle] def get_font_style; end alias_method :font_style, :get_font_style # Returns true if the font is underlined. # @return [Boolean] def get_font_underlined; end alias_method :font_underlined, :get_font_underlined # Returns the underline type, which is one of the {Wx::TextAttrUnderlineType} values. # @return [Wx::TextAttrUnderlineType] def get_underline_type; end alias_method :underline_type, :get_underline_type # Returns the underline color used. # {Wx::NULL_COLOUR} when the text colour is used. # @return [Wx::Colour,String,Symbol] def get_underline_colour; end alias_method :underline_colour, :get_underline_colour # Returns the font weight. # @return [Wx::FontWeight] def get_font_weight; end alias_method :font_weight, :get_font_weight # Returns the left indent in tenths of a millimetre. # @return [Integer] def get_left_indent; end alias_method :left_indent, :get_left_indent # Returns the left sub-indent in tenths of a millimetre. # @return [Integer] def get_left_sub_indent; end alias_method :left_sub_indent, :get_left_sub_indent # Returns the line spacing value, one of {Wx::TextAttrLineSpacing} values. # @return [Integer] def get_line_spacing; end alias_method :line_spacing, :get_line_spacing # Returns the name of the list style. # @return [Wx::String] def get_list_style_name; end alias_method :list_style_name, :get_list_style_name # Returns the outline level. # @return [Integer] def get_outline_level; end alias_method :outline_level, :get_outline_level # Returns the space in tenths of a millimeter after the paragraph. # @return [Integer] def get_paragraph_spacing_after; end alias_method :paragraph_spacing_after, :get_paragraph_spacing_after # Returns the space in tenths of a millimeter before the paragraph. # @return [Integer] def get_paragraph_spacing_before; end alias_method :paragraph_spacing_before, :get_paragraph_spacing_before # Returns the name of the paragraph style. # @return [Wx::String] def get_paragraph_style_name; end alias_method :paragraph_style_name, :get_paragraph_style_name # Returns the right indent in tenths of a millimeter. # @return [Integer] def get_right_indent; end alias_method :right_indent, :get_right_indent # 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. # @return [Wx::ArrayInt] def get_tabs; end alias_method :tabs, :get_tabs # Returns the text foreground colour. # @return [Wx::Colour,String,Symbol] def get_text_colour; end alias_method :text_colour, :get_text_colour # Returns the text effect bits of interest. # See {Wx::TextAttr#set_flags} for further information. # @return [Integer] def get_text_effect_flags; end alias_method :text_effect_flags, :get_text_effect_flags # Returns the text effects, a bit list of styles. # See {Wx::TextAttr#set_text_effects} for details. # @return [Integer] def get_text_effects; end alias_method :text_effects, :get_text_effects # Returns the URL for the content. # Content with {Wx::TextAttrFlags::TEXT_ATTR_URL} style causes {Wx::RTC::RichTextCtrl} to show a hand cursor over it, and {Wx::RTC::RichTextCtrl} generates a {Wx::TextUrlEvent} when the content is clicked. # @return [Wx::String] def get_url; end alias_method :url, :get_url # Returns true if the attribute object specifies alignment. # @return [Boolean] def has_alignment; end alias_method :has_alignment?, :has_alignment # Returns true if the attribute object specifies a background colour. # @return [Boolean] def has_background_colour; end alias_method :has_background_colour?, :has_background_colour # Returns true if the attribute object specifies a standard bullet name. # @return [Boolean] def has_bullet_name; end alias_method :has_bullet_name?, :has_bullet_name # Returns true if the attribute object specifies a bullet number. # @return [Boolean] def has_bullet_number; end alias_method :has_bullet_number?, :has_bullet_number # Returns true if the attribute object specifies a bullet style. # @return [Boolean] def has_bullet_style; end alias_method :has_bullet_style?, :has_bullet_style # Returns true if the attribute object specifies bullet text (usually specifying a symbol). # @return [Boolean] def has_bullet_text; end alias_method :has_bullet_text?, :has_bullet_text # Returns true if the attribute object specifies a character style name. # @return [Boolean] def has_character_style_name; end alias_method :has_character_style_name?, :has_character_style_name # Returns true if the flag is present in the attribute object's flag bitlist. # @param flag [Integer] # @return [Boolean] def has_flag(flag) end alias_method :has_flag?, :has_flag # Returns true if the attribute object specifies any font attributes. # @return [Boolean] def has_font; end alias_method :has_font?, :has_font # Returns true if the attribute object specifies an encoding. # @return [Boolean] def has_font_encoding; end alias_method :has_font_encoding?, :has_font_encoding # Returns true if the attribute object specifies a font face name. # @return [Boolean] def has_font_face_name; end alias_method :has_font_face_name?, :has_font_face_name # Returns true if the attribute object specifies a font family. # @return [Boolean] def has_font_family; end alias_method :has_font_family?, :has_font_family # Returns true if the attribute object specifies italic style. # @return [Boolean] def has_font_italic; end alias_method :has_font_italic?, :has_font_italic # Returns true if the attribute object specifies a font point or pixel size. # @return [Boolean] def has_font_size; end alias_method :has_font_size?, :has_font_size # Returns true if the attribute object specifies a font point size. # @return [Boolean] def has_font_point_size; end alias_method :has_font_point_size?, :has_font_point_size # Returns true if the attribute object specifies a font pixel size. # @return [Boolean] def has_font_pixel_size; end alias_method :has_font_pixel_size?, :has_font_pixel_size # Returns true if the attribute object specifies either underlining or no underlining. # @return [Boolean] def has_font_underlined; end alias_method :has_font_underlined?, :has_font_underlined # Returns true if the attribute object specifies font weight (bold, light or normal). # @return [Boolean] def has_font_weight; end alias_method :has_font_weight?, :has_font_weight # Returns true if the attribute object specifies a left indent. # @return [Boolean] def has_left_indent; end alias_method :has_left_indent?, :has_left_indent # Returns true if the attribute object specifies line spacing. # @return [Boolean] def has_line_spacing; end alias_method :has_line_spacing?, :has_line_spacing # Returns true if the attribute object specifies a list style name. # @return [Boolean] def has_list_style_name; end alias_method :has_list_style_name?, :has_list_style_name # Returns true if the attribute object specifies an outline level. # @return [Boolean] def has_outline_level; end alias_method :has_outline_level?, :has_outline_level # Returns true if the attribute object specifies a page break before this paragraph. # @return [Boolean] def has_page_break; end alias_method :has_page_break?, :has_page_break # Returns true if the attribute object specifies spacing after a paragraph. # @return [Boolean] def has_paragraph_spacing_after; end alias_method :has_paragraph_spacing_after?, :has_paragraph_spacing_after # Returns true if the attribute object specifies spacing before a paragraph. # @return [Boolean] def has_paragraph_spacing_before; end alias_method :has_paragraph_spacing_before?, :has_paragraph_spacing_before # Returns true if the attribute object specifies a paragraph style name. # @return [Boolean] def has_paragraph_style_name; end alias_method :has_paragraph_style_name?, :has_paragraph_style_name # Returns true if the attribute object specifies a right indent. # @return [Boolean] def has_right_indent; end alias_method :has_right_indent?, :has_right_indent # Returns true if the attribute object specifies tab stops. # @return [Boolean] def has_tabs; end alias_method :has_tabs?, :has_tabs # Returns true if the attribute object specifies a text foreground colour. # @return [Boolean] def has_text_colour; end alias_method :has_text_colour?, :has_text_colour # Returns true if the attribute object specifies text effects. # @return [Boolean] def has_text_effects; end alias_method :has_text_effects?, :has_text_effects # Returns true if the attribute object specifies a URL. # @return [Boolean] def has_url; end alias_method :has_url?, :has_url # Returns true if the object represents a character style, that is, the flags specify a font or a text background or foreground colour. # @return [Boolean] def is_character_style; end alias_method :character_style?, :is_character_style # Returns false if we have any attributes set, true otherwise. # @return [Boolean] def is_default; end alias_method :default?, :is_default # Returns true if the object represents a paragraph style, that is, the flags specify alignment, indentation, tabs, paragraph spacing, or bullet style. # @return [Boolean] def is_paragraph_style; end alias_method :paragraph_style?, :is_paragraph_style # Sets the paragraph alignment. # See {Wx::TextAttrAlignment} enumeration values. # Of these, {Wx::TextAttrAlignment::TEXT_ALIGNMENT_JUSTIFIED} is unimplemented. In future justification may be supported when printing or previewing, only. # @param alignment [Wx::TextAttrAlignment] # @return [void] def set_alignment(alignment) end alias_method :alignment=, :set_alignment # Sets the background colour. # @param colBack [Wx::Colour,String,Symbol] # @return [void] def set_background_colour(colBack) end alias_method :background_colour=, :set_background_colour # Sets the name of the font associated with the bullet symbol. # Only valid for attributes with {Wx::TEXT_ATTR_BULLET_SYMBOL}. # @param font [String] # @return [void] def set_bullet_font(font) end alias_method :bullet_font=, :set_bullet_font # Sets the standard bullet name, applicable if the bullet style is {Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_STANDARD}. # See {Wx::TextAttr#get_bullet_name} for a list of supported names, and how to expand the range of supported types. # @param name [String] # @return [void] def set_bullet_name(name) end alias_method :bullet_name=, :set_bullet_name # Sets the bullet number. # @param n [Integer] # @return [void] def set_bullet_number(n) end alias_method :bullet_number=, :set_bullet_number # Sets the bullet style. # The {Wx::TextAttrBulletStyle} enumeration values are all supported, except for {Wx::TextAttrBulletStyle::TEXT_ATTR_BULLET_STYLE_BITMAP}. # @param style [Integer] # @return [void] def set_bullet_style(style) end alias_method :bullet_style=, :set_bullet_style # Sets the bullet text, which could be a symbol, or (for example) cached outline text. # @param text [String] # @return [void] def set_bullet_text(text) end alias_method :bullet_text=, :set_bullet_text # Sets the character style name. # @param name [String] # @return [void] def set_character_style_name(name) end alias_method :character_style_name=, :set_character_style_name # Sets the flags determining which styles are being specified. # The {Wx::TextAttrFlags} values can be passed in a bitlist. # @param flags [Integer] # @return [void] def set_flags(flags) end alias_method :flags=, :set_flags # Sets the attributes for the given font. # Note that {Wx::TextAttr} does not store an actual {Wx::Font} object. # @param font [Wx::Font,Wx::FontInfo] # @param flags [Integer] # @return [void] def set_font(font, flags=(Wx::TextAttrFlags::TEXT_ATTR_FONT &~Wx::TextAttrFlags::TEXT_ATTR_FONT_PIXEL_SIZE)) end alias_method :font=, :set_font # Sets the font encoding. # @param encoding [Wx::FontEncoding] # @return [void] def set_font_encoding(encoding) end alias_method :font_encoding=, :set_font_encoding # Sets the font face name. # @param faceName [String] # @return [void] def set_font_face_name(faceName) end alias_method :font_face_name=, :set_font_face_name # Sets the font family. # @param family [Wx::FontFamily] # @return [void] def set_font_family(family) end alias_method :font_family=, :set_font_family # Sets the font size in points. # @param pointSize [Integer] # @return [void] def set_font_size(pointSize) end alias_method :font_size=, :set_font_size # Sets the font size in points. # @param pointSize [Integer] # @return [void] def set_font_point_size(pointSize) end alias_method :font_point_size=, :set_font_point_size # Sets the font size in pixels. # @param pixelSize [Integer] # @return [void] def set_font_pixel_size(pixelSize) end alias_method :font_pixel_size=, :set_font_pixel_size # Sets the font style (normal, italic or slanted). # @param fontStyle [Wx::FontStyle] # @return [void] def set_font_style(fontStyle) end alias_method :font_style=, :set_font_style # @overload set_font_underlined(underlined) # Sets the font underlining (solid line, text colour). # @param underlined [Boolean] # @return [void] # @overload set_font_underlined(type, colour=Wx::NULL_COLOUR) # Sets the font underlining. # On wxMSW, {Wx::TextAttrUnderlineType::TEXT_ATTR_UNDERLINE_DOUBLE} is shown as {Wx::TextAttrUnderlineType::TEXT_ATTR_UNDERLINE_SOLID}. There is only a limited number of colours supported, the RGB values are listed here. {Wx::TextAttrUnderlineType::TEXT_ATTR_UNDERLINE_SPECIAL} is shown as a waved line. # # On wxGTK, underline colour is only supported by wxGTK3. {Wx::TextAttrUnderlineType::TEXT_ATTR_UNDERLINE_SPECIAL} is shown as a waved line. GTK might overrule the colour of {Wx::TextAttrUnderlineType::TEXT_ATTR_UNDERLINE_SPECIAL}. # # On wxOSX, {Wx::TextAttrUnderlineType::TEXT_ATTR_UNDERLINE_SPECIAL} is shown as a dotted line. # @param type [Wx::TextAttrUnderlineType] Type of underline. # @param colour [Wx::Colour,String,Symbol] Colour to use for underlining, text colour is used by default. # @return [void] def set_font_underlined(*args) end alias_method :font_underlined=, :set_font_underlined # Sets the font weight. # @param fontWeight [Wx::FontWeight] # @return [void] def set_font_weight(fontWeight) end alias_method :font_weight=, :set_font_weight # 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. # {Wx::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. # @param indent [Integer] # @param subIndent [Integer] # @return [void] def set_left_indent(indent, subIndent=0) end alias_method :left_indent=, :set_left_indent # 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. # @param spacing [Integer] # @return [void] def set_line_spacing(spacing) end alias_method :line_spacing=, :set_line_spacing # Sets the list style name. # @param name [String] # @return [void] def set_list_style_name(name) end alias_method :list_style_name=, :set_list_style_name # 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. # @param level [Integer] # @return [void] def set_outline_level(level) end alias_method :outline_level=, :set_outline_level # Specifies a page break before this paragraph. # @param pageBreak [Boolean] # @return [void] def set_page_break(pageBreak=true) end alias_method :page_break=, :set_page_break # Sets the spacing after a paragraph, in tenths of a millimetre. # @param spacing [Integer] # @return [void] def set_paragraph_spacing_after(spacing) end alias_method :paragraph_spacing_after=, :set_paragraph_spacing_after # Sets the spacing before a paragraph, in tenths of a millimetre. # @param spacing [Integer] # @return [void] def set_paragraph_spacing_before(spacing) end alias_method :paragraph_spacing_before=, :set_paragraph_spacing_before # Sets the name of the paragraph style. # @param name [String] # @return [void] def set_paragraph_style_name(name) end alias_method :paragraph_style_name=, :set_paragraph_style_name # Sets the right indent in tenths of a millimetre. # @param indent [Integer] # @return [void] def set_right_indent(indent) end alias_method :right_indent=, :set_right_indent # 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. # @param tabs [Array] # @return [void] def set_tabs(tabs) end alias_method :tabs=, :set_tabs # Sets the text foreground colour. # @param colText [Wx::Colour,String,Symbol] # @return [void] def set_text_colour(colText) end alias_method :text_colour=, :set_text_colour # Sets the text effect bits of interest. # You should also pass {Wx::TextAttrFlags::TEXT_ATTR_EFFECTS} to {Wx::TextAttr#set_flags}. See {Wx::TextAttr#set_flags} for further information. # @param flags [Integer] # @return [void] def set_text_effect_flags(flags) end alias_method :text_effect_flags=, :set_text_effect_flags # 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 {Wx::TextAttr#set_flags}, and call {Wx::TextAttr#set_text_effect_flags} with the styles (taken from the above set) that you are interested in setting. # @param effects [Integer] # @return [void] def set_text_effects(effects) end alias_method :text_effects=, :set_text_effects # Sets the URL for the content. # Sets the {Wx::TextAttrFlags::TEXT_ATTR_URL} style; content with this style causes {Wx::RTC::RichTextCtrl} to show a hand cursor over it, and {Wx::RTC::RichTextCtrl} generates a {Wx::TextUrlEvent} when the content is clicked. # @param url [String] # @return [void] def set_url(url) end alias_method :url=, :set_url # 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). # @param style [Wx::TextAttr] # @param compareWith [Wx::TextAttr] # @return [Boolean] def apply(style, compareWith=nil) end # Copies all defined/valid properties from overlay to current object. # @param overlay [Wx::TextAttr] # @return [void] def merge(overlay) end # 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. # @param attr [Wx::TextAttr] # @param weakTest [Boolean] # @return [Boolean] def eq_partial(attr, weakTest=true) end end # TextAttr end