Reference for the Mosaic class Graphics::AttrSet

Graphics::AttrSet
Bitmap0
Bitmap1
Bitmap2
Bitmap3
Bitmap4
Bitmap5
Bitmap6
Bitmap7
Bitmap8
Bitmap9
Color0
Color1
Color2
Color3
Color4
Color5
Color6
Color7
Color8
Color9
Font0
Font1
Font2
Font3
GetBitmap()
GetColor()
GetFont()
GetMaxNoOfBitmaps()
GetMaxNoOfColors()
GetMaxNoOfFonts()
SetBitmap()
SetColor()
SetFont()
SetMaxNoOfBitmaps()
SetMaxNoOfColors()
SetMaxNoOfFonts()

SEE ALSO

Using the Attributed Text view to display complex formatted text blocks.

The class Graphics::AttrSet provides a container for attributed text operands. It is intended to store the colors, bitmap and font objects needed when the attributed text is drawn. Its function is similar to the of an array of colors, bitmaps and fonts. The class provides properties and methods to access and manage these arrays.

Primarily, the properties Color0 .. Color9, Bitmap0 .. Bitmap9, Font0 .. Font3 are available for the direct access to the corresponding array entries. Thus the set can be initialized by simply assigning values to these properties. In the case, the attributed text expects more colors, fonts or bitmaps, the desired maximum capacity has to be determined explicitly by the method SetMaxNoOfColors(), SetMaxNoOfFonts() and SetMaxNoOfBitmaps(). These methods resize the set accordingly. The additional entries can be modified only via methods SetColor(), SetFont and SetBitmap(). To query the entries the methods GetColor(), GetFont and GetBitmap() are available.

property Resources::Bitmap Bitmap0 = Resources::DefaultBitmap;

The property 'Bitmap0' stores the first bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap1 = null;

The property 'Bitmap1' stores the second bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap2 = null;

The property 'Bitmap2' stores the third bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap3 = null;

The property 'Bitmap3' stores the fourth bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap4 = null;

The property 'Bitmap4' stores the fifth bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap5 = null;

The property 'Bitmap5' stores the sixth bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap6 = null;

The property 'Bitmap6' stores the seventh bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap7 = null;

The property 'Bitmap7' stores the eighth bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap8 = null;

The property 'Bitmap8' stores the ninth bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Bitmap Bitmap9 = null;

The property 'Bitmap9' stores the tenth bitmap object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color0 = #000000FF;

The property 'Color0' stores the first color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color1 = #00000000;

The property 'Color1' stores the second color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color2 = #00000000;

The property 'Color2' stores the third color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color3 = #00000000;

The property 'Color3' stores the fourth color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color4 = #00000000;

The property 'Color4' stores the fifth color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color5 = #00000000;

The property 'Color5' stores the sixth color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color6 = #00000000;

The property 'Color6' stores the seventh color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color7 = #00000000;

The property 'Color7' stores the eighth color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color8 = #00000000;

The property 'Color8' stores the ninth color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property color Color9 = #00000000;

The property 'Color9' stores the tenth color. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Font Font0 = Resources::DefaultFont;

The property 'Font0' stores the first font object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Font Font1 = null;

The property 'Font1' stores the second font object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Font Font2 = null;

The property 'Font2' stores the third font object. A modification of this property can cause all associated Views::AttrText views to update themselves.

property Resources::Font Font3 = null;

The property 'Font3' stores the fourth font object. A modification of this property can cause all associated Views::AttrText views to update themselves.

method Resources::Bitmap GetBitmap
(
arg int32 aBitmapNo
);

The method GetBitmap() returns the bitmap stored in the entry aBitmapNo of this set. The first entry has the number 0, the second 1, and so far. If there is no bitmap stored in the given entry, 'null' is returned.

method color GetColor
(
arg int32 aColorNo
);

The method GetColor() returns the color stored in the entry aColorNo of this set. The first entry has the number 0, the second 1, and so far. If there is no color stored in the given entry, #00000000 is returned.

method Resources::Font GetFont
(
arg int32 aFontNo
);

The method GetFont() returns the font stored in the entry aFontNo of this set. The first entry has the number 0, the second 1, and so far. If there is no font stored in the given entry, 'null' is returned.

method int32 GetMaxNoOfBitmaps();

The method GetMaxNoOfBitmaps() returns the maximum bitmap array capacity of this set. To change the capacity, the method SetMaxNoOfBitmaps() should be used.

method int32 GetMaxNoOfColors();

The method GetMaxNoOfColors() returns the maximum color array capacity of this set. To change the capacity, the method SetMaxNoOfColors() should be used.

method int32 GetMaxNoOfFonts();

The method GetMaxNoOfFonts() returns the maximum font array capacity of this set. To change the capacity, the method SetMaxNoOfFonts() should be used.

method void SetBitmap
(
arg int32 aBitmapNo,
arg Resources::Bitmap aBitmap
);

The method SetBitmap() assigns the given bitmap object aBitmap to the entry aBitmapNo within this set. The first entry has the number 0, the second 1, and so far. Passing 'null' in aBitmap parameter causes the set to forget the bitmap currently stored in this entry. If there is no bitmap entry with the number aBitmapNo in the set, the operation is ignored. The number of available entries can be determined by method SetMaxNoOfBitmaps(). This modification can cause all associated Views::AttrText views to update themselves.

method void SetColor
(
arg int32 aColorNo,
arg color aColor
);

The method SetColor() assigns the given color aColor to the entry aColorNo within this set. The first entry has the number 0, the second 1, and so far. If there is no color entry with the number aColorNo in the set, the operation is ignored. The number of available entries can be determined by the method SetMaxNoOfColors(). This modification can cause all associated Views::AttrText views to update themselves.

method void SetFont
(
arg int32 aFontNo,
arg Resources::Font aFont
);

The method SetFont() assigns the given font object aFont to the entry aFontNo within this set. The first entry has the number 0, the second 1, and so far. Passing 'null' in aFont parameter causes the set to forget the font currently stored in this entry. If there is no font entry with the number aFontNo in the set, the operation is ignored. The number of available entries can be determined by method SetMaxNoOfFonts(). This modification can cause all associated Views::AttrText views to update themselves.

method void SetMaxNoOfBitmaps
(
arg int32 aMaxNoOfBitmaps
);

The method SetMaxNoOfBitmaps() changes the maximum bitmap array capacity of this set to the new value aMaxNoOfBitmaps. To query the current capacity the method GetMaxNoOfBitmaps() can be used. This modification can cause all associated Views::AttrText views to update themselves. Please note, the maximum number of bitmaps managed by the set is limited to 256.

method void SetMaxNoOfColors
(
arg int32 aMaxNoOfColors
);

The method SetMaxNoOfColors() changes the maximum color array capacity of this set to the new value aMaxNoOfColors. To query the current capacity the method GetMaxNoOfColors() can be used. This modification can cause all associated Views::AttrText views to update themselves. Please note, the maximum number of colors managed by the set is limited to 256.

method void SetMaxNoOfFonts
(
arg int32 aMaxNoOfFonts
);

The method SetMaxNoOfFonts() changes the maximum font array capacity of this set to the new value aMaxNoOfFonts. To query the current capacity the method GetMaxNoOfFonts() can be used. This modification can cause all associated Views::AttrText views to update themselves. Please note, the maximum number of fonts managed by the set is limited to 256.