interface revisions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,10 +9,9 @@
|
||||
/**
|
||||
@class wxImageList
|
||||
|
||||
A wxImageList contains a list of images, which are stored in
|
||||
an unspecified form. Images can have masks for transparent
|
||||
drawing, and can be made from a variety of sources including bitmaps
|
||||
and icons.
|
||||
A wxImageList contains a list of images, which are stored in an unspecified
|
||||
form. Images can have masks for transparent drawing, and can be made from a
|
||||
variety of sources including bitmaps and icons.
|
||||
|
||||
wxImageList is used principally in conjunction with wxTreeCtrl and
|
||||
wxListCtrl classes.
|
||||
@@ -25,7 +24,11 @@
|
||||
class wxImageList : public wxObject
|
||||
{
|
||||
public:
|
||||
//@{
|
||||
/**
|
||||
Default ctor.
|
||||
*/
|
||||
wxImageList();
|
||||
|
||||
/**
|
||||
Constructor specifying the image size, whether image masks should be created,
|
||||
and the initial size of the list.
|
||||
@@ -41,34 +44,64 @@ public:
|
||||
|
||||
@see Create()
|
||||
*/
|
||||
wxImageList();
|
||||
wxImageList(int width, int height, bool mask = true,
|
||||
int initialCount = 1);
|
||||
//@}
|
||||
|
||||
//@{
|
||||
/**
|
||||
Adds a new image using an icon.
|
||||
Adds a new image or images using a bitmap and optional mask bitmap.
|
||||
|
||||
@param bitmap
|
||||
Bitmap representing the opaque areas of the image.
|
||||
@param mask
|
||||
Monochrome mask bitmap, representing the transparent areas of the image.
|
||||
|
||||
@return The new zero-based image index.
|
||||
|
||||
@remarks The original bitmap or icon is not affected by the Add()
|
||||
operation, and can be deleted afterwards.
|
||||
If the bitmap is wider than the images in the list, then the
|
||||
bitmap will automatically be split into smaller images, each
|
||||
matching the dimensions of the image list.
|
||||
This does not apply when adding icons.
|
||||
*/
|
||||
int Add(const wxBitmap& bitmap,
|
||||
const wxBitmap& mask = wxNullBitmap);
|
||||
|
||||
/**
|
||||
Adds a new image or images using a bitmap and mask colour.
|
||||
|
||||
@param bitmap
|
||||
Bitmap representing the opaque areas of the image.
|
||||
@param maskColour
|
||||
Colour indicating which parts of the image are transparent.
|
||||
|
||||
@return The new zero-based image index.
|
||||
|
||||
@remarks The original bitmap or icon is not affected by the Add()
|
||||
operation, and can be deleted afterwards.
|
||||
If the bitmap is wider than the images in the list, then the
|
||||
bitmap will automatically be split into smaller images, each
|
||||
matching the dimensions of the image list.
|
||||
This does not apply when adding icons.
|
||||
*/
|
||||
int Add(const wxBitmap& bitmap, const wxColour& maskColour);
|
||||
|
||||
/**
|
||||
Adds a new image using an icon.
|
||||
|
||||
@param icon
|
||||
Icon to use as the image.
|
||||
|
||||
@return The new zero-based image index.
|
||||
|
||||
@remarks The original bitmap or icon is not affected by the Add
|
||||
@remarks The original bitmap or icon is not affected by the Add()
|
||||
operation, and can be deleted afterwards.
|
||||
If the bitmap is wider than the images in the list, then the
|
||||
bitmap will automatically be split into smaller images, each
|
||||
matching the dimensions of the image list.
|
||||
This does not apply when adding icons.
|
||||
*/
|
||||
int Add(const wxBitmap& bitmap,
|
||||
const wxBitmap& mask = wxNullBitmap);
|
||||
int Add(const wxBitmap& bitmap, const wxColour& maskColour);
|
||||
int Add(const wxIcon& icon);
|
||||
//@}
|
||||
|
||||
/**
|
||||
Initializes the list. See wxImageList() for details.
|
||||
@@ -89,51 +122,10 @@ public:
|
||||
Y position on the device context.
|
||||
@param flags
|
||||
How to draw the image. A bitlist of a selection of the following:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxIMAGELIST_DRAW_NORMAL
|
||||
|
||||
|
||||
|
||||
|
||||
Draw the image normally.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxIMAGELIST_DRAW_TRANSPARENT
|
||||
|
||||
|
||||
|
||||
|
||||
Draw the image with transparency.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxIMAGELIST_DRAW_SELECTED
|
||||
|
||||
|
||||
|
||||
|
||||
Draw the image in selected state.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxIMAGELIST_DRAW_FOCUSED
|
||||
|
||||
|
||||
|
||||
|
||||
Draw the image in a focused state.
|
||||
- wxIMAGELIST_DRAW_NORMAL: Draw the image normally.
|
||||
- wxIMAGELIST_DRAW_TRANSPARENT: Draw the image with transparency.
|
||||
- wxIMAGELIST_DRAW_SELECTED: Draw the image in selected state.
|
||||
- wxIMAGELIST_DRAW_FOCUSED: Draw the image in a focused state.
|
||||
@param solidBackground
|
||||
For optimisation - drawing can be faster if the function is told
|
||||
that the background is solid.
|
||||
@@ -168,8 +160,8 @@ public:
|
||||
@param height
|
||||
receives the height of the images in the list
|
||||
|
||||
@return @true if the function succeeded, @false if it failed (for example,
|
||||
if the image list was not yet initialized).
|
||||
@return @true if the function succeeded, @false if it failed
|
||||
(for example, if the image list was not yet initialized).
|
||||
*/
|
||||
virtual bool GetSize(int index, int& width, int& height) const;
|
||||
|
||||
@@ -183,25 +175,38 @@ public:
|
||||
*/
|
||||
bool RemoveAll();
|
||||
|
||||
//@{
|
||||
/**
|
||||
Replaces the existing image with the new image.
|
||||
Windows only.
|
||||
|
||||
@param index
|
||||
The index of the bitmap to be replaced.
|
||||
@param bitmap
|
||||
Bitmap representing the opaque areas of the image.
|
||||
@param mask
|
||||
Monochrome mask bitmap, representing the transparent areas of the image.
|
||||
|
||||
@return @true if the replacement was successful, @false otherwise.
|
||||
|
||||
@remarks The original bitmap or icon is not affected by the Replace()
|
||||
operation, and can be deleted afterwards.
|
||||
*/
|
||||
bool Replace(int index, const wxBitmap& bitmap,
|
||||
const wxBitmap& mask = wxNullBitmap);
|
||||
|
||||
/**
|
||||
Replaces the existing image with the new image.
|
||||
|
||||
@param index
|
||||
The index of the bitmap to be replaced.
|
||||
@param icon
|
||||
Icon to use as the image.
|
||||
|
||||
@return @true if the replacement was successful, @false otherwise.
|
||||
|
||||
@remarks The original bitmap or icon is not affected by the Replace
|
||||
@remarks The original bitmap or icon is not affected by the Replace()
|
||||
operation, and can be deleted afterwards.
|
||||
*/
|
||||
bool Replace(int index, const wxBitmap& bitmap,
|
||||
const wxBitmap& mask = wxNullBitmap);
|
||||
bool Replace(int index, const wxIcon& icon);
|
||||
//@}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user