wxTextAttr
Module
Module Summary
Description
wxTextAttr represents the character and paragraph attributes, or style, for a range of text in a wxTextCtrl or wxRichTextCtrl (not implemented in wx).
When setting up a wxTextAttr object, pass a bitlist mask to setFlags/2 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.
See: wxTextCtrl, wxRichTextCtrl (not implemented in wx)
wxWidgets docs: wxTextAttr
new() -> wxTextAttr()
|
Constructors.
new(ColText) -> wxTextAttr()
|
new(Attr) -> wxTextAttr()
|
Types
new(ColText, Options :: [Option]) -> wxTextAttr()
|
Types
{colBack, wx:wx_colour()} |
{font, wxFont:wxFont()} |
{alignment, wx:wx_enum()}
getAlignment(This) -> wx:wx_enum()
|
Types
Returns the alignment flags.
See ?wxTextAttrAlignment for a list of available styles.
getBackgroundColour(This) -> wx:wx_colour4()
|
Types
Returns the background colour.
getFont(This) -> wxFont:wxFont()
|
Types
Creates and returns a font specified by the font attributes in the wxTextAttr object.
Note that wxTextAttr does not store a wxFont object, so this is only a temporary font.
For greater efficiency, access the font attributes directly.
getFontEncoding(This) -> wx:wx_enum()
|
Types
Returns the font encoding.
getFontFaceName(This) -> unicode:charlist()
|
Types
Returns the font face name.
Types
Returns the font size in points.
getFontStyle(This) -> wx:wx_enum()
|
Types
Returns the font style.
Types
Returns true if the font is underlined.
getFontWeight(This) -> wx:wx_enum()
|
Types
Returns the font weight.
Types
Returns the left indent in tenths of a millimetre.
Types
Returns the left sub-indent in tenths of a millimetre.
Types
Returns the right indent in tenths of a millimeter.
Types
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.
getTextColour(This) -> wx:wx_colour4()
|
Types
Returns the text foreground colour.
Types
Returns true if the attribute object specifies a background colour.
Types
Returns true if the attribute object specifies any font attributes.
Types
Returns true if the attribute object specifies a text foreground colour.
Types
Returns flags indicating which attributes are applicable.
See setFlags/2 for a list of available flags.
Types
Returns false if we have any attributes set, true otherwise.
Sets the paragraph alignment.
See ?wxTextAttrAlignment enumeration values.
Of these, wxTEXT_ALIGNMENT_JUSTIFIED is unimplemented. In future justification may be supported when printing or previewing, only.
Sets the background colour.
Sets the flags determining which styles are being specified.
The ?wxTextAttrFlags values can be passed in a bitlist.
Sets the attributes for the given font.
Note that wxTextAttr does not store an actual wxFont object.
Sets the font encoding.
Sets the font face name.
Sets the font family.
Sets the font size in points.
Sets the font size in points.
Sets the font size in pixels.
Sets the font style (normal, italic or slanted).
Sets the font underlining (solid line, text colour).
Sets the 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.
wxRichTextBuffer (not implemented in wx) 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.
Sets the right indent in tenths of a millimetre.
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.
Sets the text foreground colour.
destroy(This :: wxTextAttr()) -> ok |
Destroys the object.