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 _WX_IMAGLISTG_H_
12 #define _WX_IMAGLISTG_H_
16 class WXDLLIMPEXP_FWD_CORE wxDC
;
17 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
18 class WXDLLIMPEXP_FWD_CORE wxIcon
;
19 class WXDLLIMPEXP_FWD_CORE wxColour
;
22 class WXDLLIMPEXP_CORE wxGenericImageList
: public wxObject
25 wxGenericImageList() { m_width
= m_height
= 0; }
26 wxGenericImageList( int width
, int height
, bool mask
= true, int initialCount
= 1 );
27 virtual ~wxGenericImageList();
28 bool Create( int width
, int height
, bool mask
= true, int initialCount
= 1 );
31 virtual int GetImageCount() const;
32 virtual bool GetSize( int index
, int &width
, int &height
) const;
34 int Add( const wxBitmap
& bitmap
);
35 int Add( const wxBitmap
& bitmap
, const wxBitmap
& mask
);
36 int Add( const wxBitmap
& bitmap
, const wxColour
& maskColour
);
37 wxBitmap
GetBitmap(int index
) const;
38 wxIcon
GetIcon(int index
) const;
39 bool Replace( int index
, const wxBitmap
&bitmap
);
40 bool Replace( int index
, const wxBitmap
&bitmap
, const wxBitmap
& mask
);
41 bool Remove( int index
);
44 virtual bool Draw(int index
, wxDC
& dc
, int x
, int y
,
45 int flags
= wxIMAGELIST_DRAW_NORMAL
,
46 bool solidBackground
= false);
49 const wxBitmap
*GetBitmapPtr(int index
) const;
51 wxObjectList m_images
;
56 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericImageList
)
59 #ifndef wxHAS_NATIVE_IMAGELIST
62 * wxImageList has to be a real class or we have problems with
63 * the run-time information.
66 class WXDLLIMPEXP_CORE wxImageList
: public wxGenericImageList
68 DECLARE_DYNAMIC_CLASS(wxImageList
)
73 wxImageList( int width
, int height
, bool mask
= true, int initialCount
= 1 )
74 : wxGenericImageList(width
, height
, mask
, initialCount
)
78 #endif // !wxHAS_NATIVE_IMAGELIST
80 #endif // _WX_IMAGLISTG_H_