// now, the app must take care of ownership issues. That is, the
// image lists must be explicitly deleted after the control(s) that uses them
// is (are) deleted, or when the app exits.
// now, the app must take care of ownership issues. That is, the
// image lists must be explicitly deleted after the control(s) that uses them
// is (are) deleted, or when the app exits.
// Creates an image list.
// Specify the width and height of the images in the list,
// whether there are masks associated with them (e.g. if creating images
// from icons), and the initial size of the list.
// Creates an image list.
// Specify the width and height of the images in the list,
// whether there are masks associated with them (e.g. if creating images
// from icons), and the initial size of the list.
- inline wxImageList(const int width, const int height, const bool mask = TRUE, const int initialCount = 1)
+ wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1)
{
Create(width, height, mask, initialCount);
}
{
Create(width, height, mask, initialCount);
}
// Attributes
////////////////////////////////////////////////////////////////////////////
// Returns the number of images in the image list.
// Attributes
////////////////////////////////////////////////////////////////////////////
// Returns the number of images in the image list.
- int GetImageCount(void) const;
+ int GetImageCount() const;
+
+ // Returns the size (same for all images) of the images in the list
+ bool GetSize(int index, int &width, int &height) const;
// width, height specify the size of the images in the list (all the same).
// mask specifies whether the images have masks or not.
// initialNumber is the initial number of images to reserve.
// width, height specify the size of the images in the list (all the same).
// mask specifies whether the images have masks or not.
// initialNumber is the initial number of images to reserve.
- bool Create(const int width, const int height, const bool mask = TRUE, const int initialNumber = 1);
+ bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1);
// Adds a bitmap, and optionally a mask bitmap.
// Note that wxImageList creates *new* bitmaps, so you may delete
// Adds a bitmap, and optionally a mask bitmap.
// Note that wxImageList creates *new* bitmaps, so you may delete
// Replaces a bitmap, optionally passing a mask bitmap.
// Note that wxImageList creates new bitmaps, so you may delete
// 'bitmap' and 'mask' after calling Replace.
// Replaces a bitmap, optionally passing a mask bitmap.
// Note that wxImageList creates new bitmaps, so you may delete
// 'bitmap' and 'mask' after calling Replace.
/* Not supported by Win95
// Replacing a bitmap, using the specified colour to create the mask bitmap
// Note that wxImageList creates new bitmaps, so you may delete
// 'bitmap'.
/* Not supported by Win95
// Replacing a bitmap, using the specified colour to create the mask bitmap
// Note that wxImageList creates new bitmaps, so you may delete
// 'bitmap'.
// Draws the given image on a dc at the specified position.
// If 'solidBackground' is TRUE, Draw sets the image list background
// colour to the background colour of the wxDC, to speed up
// drawing by eliminating masked drawing where possible.
// Draws the given image on a dc at the specified position.
// If 'solidBackground' is TRUE, Draw sets the image list background
// colour to the background colour of the wxDC, to speed up
// drawing by eliminating masked drawing where possible.
- bool Draw(const int index, wxDC& dc, const int x, const int y,
- const int flags = wxIMAGELIST_DRAW_NORMAL, const bool solidBackground = FALSE);
+ bool Draw(int index, wxDC& dc, int x, int y,
+ int flags = wxIMAGELIST_DRAW_NORMAL,
+ bool solidBackground = FALSE);
- wxIcon *MakeIcon(const int index);
- bool SetOverlayImage(const int index, const int overlayMask);
+ wxIcon *MakeIcon(int index);
+ bool SetOverlayImage(int index, int overlayMask);
#if 0
// Creates a new drag image by combining the given image (typically a mouse cursor image)
// with the current drag image.
#if 0
// Creates a new drag image by combining the given image (typically a mouse cursor image)
// with the current drag image.
// current cursor. In response to subsequent mouse move messages, you can move the drag image
// by using the DragMove member function. To end the drag operation, you can use the EndDrag
// member function.
// current cursor. In response to subsequent mouse move messages, you can move the drag image
// by using the DragMove member function. To end the drag operation, you can use the EndDrag
// member function.
// Call this function to move the image that is being dragged during a drag-and-drop operation.
// This function is typically called in response to a mouse move message. To begin a drag
// Call this function to move the image that is being dragged during a drag-and-drop operation.
// This function is typically called in response to a mouse move message. To begin a drag
////////////////////////////////////////////////////////////////////////////
// Returns the native image list handle
////////////////////////////////////////////////////////////////////////////
// Returns the native image list handle