1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/imaglist.h
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling and Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __IMAGELISTH_G__
12 #define __IMAGELISTH_G__
18 class WXDLLIMPEXP_FWD_CORE wxDC
;
19 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
20 class WXDLLIMPEXP_FWD_CORE wxColour
;
23 class WXDLLEXPORT wxGenericImageList
: public wxObject
26 wxGenericImageList() { m_width
= m_height
= 0; }
27 wxGenericImageList( int width
, int height
, bool mask
= true, int initialCount
= 1 );
28 virtual ~wxGenericImageList();
29 bool Create( int width
, int height
, bool mask
= true, int initialCount
= 1 );
32 virtual int GetImageCount() const;
33 virtual bool GetSize( int index
, int &width
, int &height
) const;
35 int Add( const wxBitmap
& bitmap
);
36 int Add( const wxBitmap
& bitmap
, const wxBitmap
& mask
);
37 int Add( const wxBitmap
& bitmap
, const wxColour
& maskColour
);
38 wxBitmap
GetBitmap(int index
) const;
39 wxIcon
GetIcon(int index
) const;
40 bool Replace( int index
, const wxBitmap
&bitmap
);
41 bool Replace( int index
, const wxBitmap
&bitmap
, const wxBitmap
& mask
);
42 bool Remove( int index
);
45 virtual bool Draw(int index
, wxDC
& dc
, int x
, int y
,
46 int flags
= wxIMAGELIST_DRAW_NORMAL
,
47 bool solidBackground
= false);
50 const wxBitmap
*GetBitmapPtr(int index
) const;
57 DECLARE_DYNAMIC_CLASS(wxGenericImageList
)
60 #ifndef wxHAS_NATIVE_IMAGELIST
63 * wxImageList has to be a real class or we have problems with
64 * the run-time information.
67 class WXDLLEXPORT wxImageList
: public wxGenericImageList
69 DECLARE_DYNAMIC_CLASS(wxImageList
)
74 wxImageList( int width
, int height
, bool mask
= true, int initialCount
= 1 )
75 : wxGenericImageList(width
, height
, mask
, initialCount
)
79 #endif // !wxHAS_NATIVE_IMAGELIST
81 #endif // __IMAGELISTH_G__