Back: BLOX.BText-position & lines Up: BLOX package Forward: BLOX.BTextAttributes class-instance-creation shortcuts   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.43 BLOX.BTextAttributes

Defined in namespace BLOX
Superclass: Object
Category: Graphics-Windows

I help you creating wonderful, colorful BTexts.

1.43.1 BLOX.BTextAttributes class: instance-creation shortcuts  (class)
1.43.2 BLOX.BTextAttributes: colors  (instance)
1.43.3 BLOX.BTextAttributes: setting attributes  (instance)


1.43.1 BLOX.BTextAttributes class: instance-creation shortcuts

backgroundColor: color
Create a new BTextAttributes object resulting in text with the given background color.

black
Create a new BTextAttributes object resulting in black text.

blue
Create a new BTextAttributes object resulting in blue text.

center
Create a new BTextAttributes object resulting in centered paragraphs.

cyan
Create a new BTextAttributes object resulting in cyan text.

darkCyan
Create a new BTextAttributes object resulting in dark cyan text.

darkGreen
Create a new BTextAttributes object resulting in dark green text.

darkMagenta
Create a new BTextAttributes object resulting in dark purple text.

events: aBTextBindings
Create a new BTextAttributes object for text that responds to events according to the callbacks established in aBTextBindings.

font: font
Create a new BTextAttributes object resulting in text with the given font. The font can be given as either an X font name or a Blox font description string.

X font names are given as many fields, each led by a minus, and each of which can be replaced by an * to indicate a default value is ok: foundry, family, weight, slant, setwidth, addstyle, pixel size, point size (the same as pixel size for historical reasons), horizontal resolution, vertical resolution, spacing, width, charset and character encoding.

Blox font description strings have three fields, which must be separated by a space and of which only the first is mandatory: the font family, the font size in points (or in pixels if a negative value is supplied), and a number of styles separated by a space (valid styles are normal, bold, italic, underline and overstrike). Examples of valid fonts are "Helvetica 10 Bold", "Times -14", "Futura Bold Underline". You must enclose the font family in braces if it is made of two or more words.

foregroundColor: color
Create a new BTextAttributes object resulting in text with the given foreground color.

green
Create a new BTextAttributes object resulting in green text.

magenta
Create a new BTextAttributes object resulting in magenta text.

red
Create a new BTextAttributes object resulting in red text.

strikeout
Create a new BTextAttributes object resulting in struck-out text.

underline
Create a new BTextAttributes object resulting in underlined text.

white
Create a new BTextAttributes object resulting in white text.

yellow
Create a new BTextAttributes object resulting in yellow text.


1.43.2 BLOX.BTextAttributes: colors

black
Set the receiver so that applying it results in black text.

blue
Set the receiver so that applying it results in blue text.

cyan
Set the receiver so that applying it results in cyan text.

darkCyan
Set the receiver so that applying it results in dark cyan text.

darkGreen
Set the receiver so that applying it results in dark green text.

darkMagenta
Set the receiver so that applying it results in dark magenta text.

green
Set the receiver so that applying it results in green text.

magenta
Set the receiver so that applying it results in magenta text.

red
Set the receiver so that applying it results in red text.

white
Set the receiver so that applying it results in white text.

yellow
Set the receiver so that applying it results in black text.


1.43.3 BLOX.BTextAttributes: setting attributes

backgroundColor
Answer the value of the backgroundColor option for the text.

Specifies the background color to use when displaying text with these attributes. nil indicates that the default value is not overridden.

backgroundColor: color
Set the value of the backgroundColor option for the text.

Specifies the background color to use when displaying text with these attributes. nil indicates that the default value is not overridden.

center
Center the text to which these attributes are applied

events
Answer the event bindings which apply to text subject to these attributes

events: aBTextBindings
Set the event bindings which apply to text subject to these attributes

font
Answer the value of the font option for the text. The font can be given as either an X font name or a Blox font description string, or nil if you want the widget's default font to apply.

X font names are given as many fields, each led by a minus, and each of which can be replaced by an * to indicate a default value is ok: foundry, family, weight, slant, setwidth, addstyle, pixel size, point size (the same as pixel size for historical reasons), horizontal resolution, vertical resolution, spacing, width, charset and character encoding.

Blox font description strings have three fields, which must be separated by a space and of which only the first is mandatory: the font family, the font size in points (or in pixels if a negative value is supplied), and a number of styles separated by a space (valid styles are normal, bold, italic, underline and overstrike). Examples of valid fonts are "Helvetica 10 Bold", "Times -14", "Futura Bold Underline". You must enclose the font family in braces if it is made of two or more words.

font: fontName
Set the value of the font option for the text. The font can be given as either an X font name or a Blox font description string, or nil if you want the widget's default font to apply.

X font names are given as many fields, each led by a minus, and each of which can be replaced by an * to indicate a default value is ok: foundry, family, weight, slant, setwidth, addstyle, pixel size, point size (the same as pixel size for historical reasons), horizontal resolution, vertical resolution, spacing, width, charset and character encoding.

Blox font description strings have three fields, which must be separated by a space and of which only the first is mandatory: the font family, the font size in points (or in pixels if a negative value is supplied), and a number of styles separated by a space (valid styles are normal, bold, italic, underline and overstrike). Examples of valid fonts are "Helvetica 10 Bold", "Times -14", "Futura Bold Underline". You must enclose the font family in braces if it is made of two or more words.

foregroundColor
Answer the value of the foregroundColor option for the text.

Specifies the foreground color to use when displaying text with these attributes. nil indicates that the default value is not overridden.

foregroundColor: color
Set the value of the foregroundColor option for the text.

Specifies the foreground color to use when displaying text with these attributes. nil indicates that the default value is not overridden.

isCentered
Answer whether the text to which these attributes are applied is centered

isStruckout
Answer whether the text to which these attributes are applied is struckout

isUnderlined
Answer whether the text to which these attributes are applied is underlined

strikeout
Strike out the text to which these attributes are applied

underline
Underline the text to which these attributes are applied



Back: BLOX.BTextAttributes-colors Up: BLOX.BTextAttributes Forward: BLOX.BTextBindings   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on April, 16 2013 using texi2html