]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/imaglist.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __IMAGELISTH_G__
12 #define __IMAGELISTH_G__
19 #include "wx/gdicmn.h"
20 #include "wx/bitmap.h"
24 * wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to
25 * images for their items by an index into an image list.
26 * A wxImageList is capable of creating images with optional masks from
27 * a variety of sources - a single bitmap plus a colour to indicate the mask,
28 * two bitmaps, or an icon.
30 * Image lists can also create and draw images used for drag and drop functionality.
31 * This is not yet implemented in wxImageList. We need to discuss a generic API
32 * for doing drag and drop and see whether it ties in with the Win95 view of it.
33 * See below for candidate functions and an explanation of how they might be
38 #define wxIMAGELIST_DRAW_NORMAL 0x0001
39 #define wxIMAGELIST_DRAW_TRANSPARENT 0x0002
40 #define wxIMAGELIST_DRAW_SELECTED 0x0004
41 #define wxIMAGELIST_DRAW_FOCUSED 0x0008
43 class wxImageList
: public wxObject
45 DECLARE_DYNAMIC_CLASS(wxImageList
)
52 int GetImageCount(void) const;
53 int Add( const wxBitmap
&bitmap
);
54 bool Replace( const int index
, const wxBitmap
&bitmap
);
55 bool Remove( const int index
);
57 bool GetSize( const int index
, int &width
, int &height
) const;
58 bool Draw(const int index
, wxDC
& dc
, const int x
, const int y
,
59 const int flags
= wxIMAGELIST_DRAW_NORMAL
, const bool solidBackground
= FALSE
);
66 #endif // __IMAGELISTH_G__