TextAttr represents the character and paragraph attributes, or style, for a range of text in a TextCtrl.
When setting up a TextAttr object, pass a bitlist mask to SetFlags 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.
No base class
TextPos
is the type containing the index of a position in a text
control. TextCoord
contains the index of a column or a row in the
control.
Note that although both of these types should probably have been unsigned, due
to backwards compatibility reasons, are defined as long
currently.
Their use (instead of plain long
) is still encouraged as it makes the
code more readable.
The following values can be passed to SetAlignment to determine
paragraph alignment.
These values are passed in a bitlist to SetFlags to determine
what attributes will be considered when setting the attributes
for a text control.
The values below are the possible return codes of the
hit_test method:
The constructors initialize one or more of the text foreground colour, background
colour, font, and alignment. The values not initialized in the constructor can be set
later, otherwise TextCtrl#set_style will use
the default values for them.
Returns the paragraph alignment.
Return the background colour specified by this attribute.
Return the text font specified by this attribute.
Returns the left indent in tenths of a millimetre.
Returns the left sub indent for all lines but the first line in a paragraph in
tenths of a millimetre.
Returns the right indent in tenths of a millimetre.
Returns the array of integers representing the tab stops. Each
array element specifies the tab stop in tenths of a millimetre.
Return the text colour specified by this attribute.
Returns true
if this style specifies the background colour to use.
Returns true
if this style specifies the font to use.
Returns true
if this style specifies the foreground colour to use.
Returns a bitlist indicating which attributes will be set.
Returns true
if this style specifies any non-default attributes.
Sets the paragraph alignment.
Sets the background colour.
Pass a bitlist indicating which attributes will be set.
Sets the text font.
Sets the left indent in tenths of a millimetre.
subIndent sets the indent for all lines but the first line in a paragraph
relative to the first line.
Sets the right indent in tenths of a millimetre.
Sets the array of integers representing the tab stops. Each
array element specifies the tab stop in tenths of a millimetre.
Sets the text colour.
[This page automatically generated from the Textile source at 2023-06-13 21:31:43 +0000]