Public Member Functions | |
void | add (const ImageListPtr imageList) |
Add all the images in "imageList" to this image list. | |
void | add (const Icon &icon) |
Add an icon to the list. | |
void | add (const Bitmap &bitmap, const Bitmap &mask) |
Add a masked bitmap to the list. | |
void | add (const Bitmap &bitmap) |
Add a bitmap to the list. | |
unsigned int | addMultiple (const Bitmap &bitmap, const Bitmap &mask) |
Add a multiple masked images to the list. | |
unsigned int | addMultiple (const Bitmap &bitmap) |
Add multiple images to the list. | |
int | getImageCount () const |
Returns the number of images in list. | |
HIMAGELIST | getImageList () const |
Getter for the underlying HIMAGELIST. | |
Point | getImageSize () const |
Returns the image size. | |
ImageList (int width, int height, unsigned flags) | |
RAII Constructor. | |
ImageList (HIMAGELIST imageList, bool own=true) | |
RAII Constructor taking a HIMAGELIST. | |
~ImageList () | |
Frees the contained HIMAGELIST. |
Use this class if you need RAII semantics encapsulating an HIMAGELIST.
You can use an ImageList on e.g. a Data Grid.
ImageList | ( | HIMAGELIST | imageList, | |
bool | own = true | |||
) | [explicit] |
RAII Constructor taking a HIMAGELIST.
Note!
The "own" parameter specifies if the class takes "control" of HIMAGELIST meaning it will automatically free the contained HIMAGELIST upon destruction
ImageList | ( | int | width, | |
int | height, | |||
unsigned | flags | |||
) |
RAII Constructor.
Creates a new ImageList
The width and height refer to the image size of the image list elements.
The flags parameter specifies the bit depth and if there is a mask for the images on the list. e.g. (ILC_COLOR32 | ILC_MASK) [32 bits with mask]; (ILC_COLOR16) [16 bits, no mask].
~ImageList | ( | ) |
Frees the contained HIMAGELIST.
Frees the contained HIMAGELIST meaning it will no longer be accessible or it will be destroyed
void add | ( | const Icon & | icon | ) |
Add an icon to the list.
Note, you need to set the flag ILC_MASK on the constructor to support transparency.
If the icon has multiple sizes, it will choose the size specified in the constructor.
Add a masked bitmap to the list.
Note, you need to set the flag ILC_MASK on the constructor for this to work.
The mask is a black and white image; where it's black, the shown image will be transparent.
Add a multiple masked images to the list.
Note, you need to set the flag ILC_MASK on the constructor for this to work.
The mask is a black and white image; where it's black, the shown image will be transparent.
The bitmap and mask parameters specify bitmaps with several images. The number of images is calculated by the bitmap width, e.g. if the image list is 32x32 and you add a 128x32 bitmap, it will add four 32x32 bitmaps (note, the height must be the same of the image list) Returns the number of images added.
unsigned int addMultiple | ( | const Bitmap & | bitmap | ) |
Add multiple images to the list.
The bitmap parameter specifies a bitmap with several images.
The number of images is calculated by the bitmap width, e.g. if the image list is 32x32 and you add a 128x32 bitmap, it will add four 32x32 bitmaps (note, the height must be the same of the image list)
Returns the number of images added.
HIMAGELIST getImageList | ( | ) | const |
Getter for the underlying HIMAGELIST.
Use when you need to access the underlying HIMAGELIST
Point getImageSize | ( | ) | const |
Returns the image size.
Returns the size of the images in the Image List (all images in the Image List have the same size)