Public Member Functions | |
void | _measure (int &, int &) const |
void | _draw (const Rectangle &) const |
const Symbol * | current_image () const |
void | inset (Rectangle &) const |
bool | fills_rectangle () const |
bool | is_frame () const |
MultiImage () | |
MultiImage (unsigned count, const Symbol *img0, va_list ap) | |
void | set (unsigned count, const Symbol *img0,...) |
void | add (Flags flags, const Symbol &image) |
void | release () |
MultiImage (const Symbol &img0) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1, Flags f2, const Symbol &img2) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1, Flags f2, const Symbol &img2, Flags f3, const Symbol &img3) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1, Flags f2, const Symbol &img2, Flags f3, const Symbol &img3, Flags f4, const Symbol &img4) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1, Flags f2, const Symbol &img2, Flags f3, const Symbol &img3, Flags f4, const Symbol &img4, Flags f5, const Symbol &img5) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1, Flags f2, const Symbol &img2, Flags f3, const Symbol &img3, Flags f4, const Symbol &img4, Flags f5, const Symbol &img5, Flags f6, const Symbol &img6) | |
MultiImage (const Symbol &img0, Flags f1, const Symbol &img1, Flags f2, const Symbol &img2, Flags f3, const Symbol &img3, Flags f4, const Symbol &img4, Flags f5, const Symbol &img5, Flags f6, const Symbol &img6, Flags f7, const Symbol &img7) |
The basic constructor takes the "image0" which is the image that is drawn if no other image is used. You can then use add() or replace() to add pairs of images and flags. These are searched and the last one where all it's flags are turned on is used. There are also inline constructors so that a fully-populated MultiImage with up to 8 images can be declared inline.
Typical example:
MultiImage buttonImage(OffImage, HIGHLIGHT, BrightOffImage, STATE, OnImage, HIGHLIGHT|STATE, BrightOnImage, INACTIVE_R, DimOffImage, INACTIVE_R|VALUE, DimOnImage);
Useful flags are:
|
for MultiImage arrays construction using set() for post initialization
|
|
constructor for unlimited images state affectation
|
|
Constructor where only the "image0" is provided. Unless you call add(), this will always just draw image0. |
|
If all of flags1 are on in drawimage(), then image1 will be drawn, otherwise image0 will be drawn. |
|
If all of flags2 are on in drawimage(), then image2 will be drawn, else if all of flags1 are on then image1 will be drawn, otherwise image0 will be drawn. This pattern continues for the other inline constructors. The last image and flags are checked first, and then backwards. |
|
Select one of the images and draw it. The last image with all the flags specified for it turned on will be drawn. If none of them match then Image0 is drawn. Implements Symbol. |
|
It probably is useless for the images to be different sizes. However if they are, Image0 (the first one passed to the constructor) is used to figure out the size. Reimplemented from Symbol. |
|
Makes it draw image if all of the flags are turned on in drawflags(). If flags is zero, this replaces the image0 that was provided to the constructor. Otherwise, if any image with flags has already been specified, it is replaced with this image. Otherwise a new pair of flags and image is added to the end of the list. |
|
Return the image that will be drawn according to the current value of drawflags(). The last image with all the flags specified for it turned on will be drawn. If none of them match then image0 (the first one passed to the constructor) is returned. |
|
Returns the info from the first image given to the constructor. Reimplemented from Symbol. |
|
Calls the same image that _draw() will call to get the inset. Reimplemented from Symbol. |
|
Returns the info from the first image given to the constructor. Reimplemented from Symbol. |
|
Destroys everything except image0.
|
|
Innards of the inline constructors. |