25 #ifndef ICONPAINTER_H_
26 #define ICONPAINTER_H_
28 #include "redrawlistener.h"
49 std::string _validation;
IconPainter & text_left_sprite_right()
text at left, sprite at right, text and sprite vertically centred for text and sprite icons.
Definition: iconpainter.h:177
IconPainter & validation(std::string val)
Set the validation string for the icon.
Definition: iconpainter.cc:68
virtual ~IconPainter()
Icon painter destructor.
Definition: iconpainter.cc:46
IconPainter & border(bool f)
Add a border to the icon.
Definition: iconpainter.h:99
A SpriteArea holds zero or more user sprites.
Definition: sprite.h:232
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
IconPainter & half_sprite(bool f)
Set show sprite at half size flag.
Definition: iconpainter.h:129
IconPainter & filled(bool f)
Set filled flag.
Definition: iconpainter.h:117
IconPainter()
Construct an icon painter.
Definition: iconpainter.cc:39
IconPainter & text_and_sprite_right()
Text and sprite right justified, text at bottom, sprite at top for text and sprite icons.
Definition: iconpainter.h:165
IconPainter & on_top_text_and_sprite_centred()
text and sprite centred (text on top) text and sprite centred for text and sprite icons.
Definition: iconpainter.h:192
IconPainter & sprite_area(SpriteArea *sprite_area)
Set the sprite area to use for the icon.
Definition: iconpainter.cc:96
IconPainter & vcentred(bool f)
Set vertically centred flag.
Definition: iconpainter.h:111
IconPainter & foreground(unsigned int col)
Set foreground colour of sprite.
Definition: iconpainter.h:147
BBox & bounds()
Reference to the bounds of the icon.
Definition: iconpainter.h:61
IconPainter & top_text_and_sprite_centred()
text and sprite centred text at top, sprite at bottom for text and sprite icons.
Definition: iconpainter.h:187
bool sprite_icon() const
Check if this is a sprite icon.
Definition: iconpainter.h:94
Class to draw an icon in a redraw listener.
Definition: iconpainter.h:44
IconPainter & shaded(bool f)
Set shaded flag.
Definition: iconpainter.h:141
IconPainter & text(std::string text)
Set the text for the icon painter.
Definition: iconpainter.cc:54
IconPainter & text_and_sprite_left()
Text and sprite left justified, text at bottom, sprite at top for text and sprite icons.
Definition: iconpainter.h:159
virtual void redraw(const RedrawEvent &event)
Redraw the icon.
Definition: iconpainter.cc:134
IconPainter & text_and_sprite_centred()
text and sprite centred, text at bottom, sprite at top for text and sprite icons.
Definition: iconpainter.h:182
Class to represent a two dimensional bounding box.
Definition: bbox.h:38
IconPainter & text_12_sprite_left()
Sprite at left, text +12 units right of it, text and sprite vertically centred for text and sprite ic...
Definition: iconpainter.h:171
IconPainter & text_right_sprite_left()
text at right, sprite at left text and sprite centred for text and sprite icons.
Definition: iconpainter.h:198
IconPainter & rjust(bool f)
Set right justified flag.
Definition: iconpainter.h:123
IconPainter & sprite_icon(bool s)
Set icon as a sprite icon.
Definition: iconpainter.h:90
bool text_icon() const
Check if this is a text icon.
Definition: iconpainter.h:85
IconPainter & background(unsigned int col)
Set background colour of sprite.
Definition: iconpainter.h:153
IconPainter & use_wimp_sprite_area()
Use sprite from WIMP sprite pool.
Definition: iconpainter.cc:109
IconPainter & text_icon(bool t)
Set icon as a text icon.
Definition: iconpainter.h:80
Redraw event listener.
Definition: redrawlistener.h:76
const BBox & bounds() const
return the bounds of the icon in work area coordinates
Definition: iconpainter.h:66
IconPainter & use_client_sprite_area()
Use application client area for the sprite.
Definition: iconpainter.cc:122
IconPainter & hcentred(bool f)
Set horizontally centred flag.
Definition: iconpainter.h:105
Event passed to redraw listener to give details on the area that needs a redraw.
Definition: redrawlistener.h:44
IconPainter & sprite(std::string sprite)
Set the sprite for the icon.
Definition: iconpainter.cc:80
IconPainter & inverted(bool f)
Set inverted flag.
Definition: iconpainter.h:135