1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/imaglist.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling and Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_IMAGLISTG_H_
11 #define _WX_IMAGLISTG_H_
15 class WXDLLIMPEXP_FWD_CORE wxDC
;
16 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
17 class WXDLLIMPEXP_FWD_CORE wxIcon
;
18 class WXDLLIMPEXP_FWD_CORE wxColour
;
21 class WXDLLIMPEXP_CORE wxGenericImageList
: public wxObject
24 wxGenericImageList() { m_width
= m_height
= 0; }
25 wxGenericImageList( int width
, int height
, bool mask
= true, int initialCount
= 1 );
26 virtual ~wxGenericImageList();
27 bool Create( int width
, int height
, bool mask
= true, int initialCount
= 1 );
30 virtual int GetImageCount() const;
31 virtual bool GetSize( int index
, int &width
, int &height
) const;
33 int Add( const wxBitmap
& bitmap
);
34 int Add( const wxBitmap
& bitmap
, const wxBitmap
& mask
);
35 int Add( const wxBitmap
& bitmap
, const wxColour
& maskColour
);
36 wxBitmap
GetBitmap(int index
) const;
37 wxIcon
GetIcon(int index
) const;
38 bool Replace( int index
, const wxBitmap
&bitmap
);
39 bool Replace( int index
, const wxBitmap
&bitmap
, const wxBitmap
& mask
);
40 bool Remove( int index
);
43 virtual bool Draw(int index
, wxDC
& dc
, int x
, int y
,
44 int flags
= wxIMAGELIST_DRAW_NORMAL
,
45 bool solidBackground
= false);
48 const wxBitmap
*GetBitmapPtr(int index
) const;
50 wxObjectList m_images
;
55 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericImageList
)
58 #ifndef wxHAS_NATIVE_IMAGELIST
61 * wxImageList has to be a real class or we have problems with
62 * the run-time information.
65 class WXDLLIMPEXP_CORE wxImageList
: public wxGenericImageList
67 DECLARE_DYNAMIC_CLASS(wxImageList
)
72 wxImageList( int width
, int height
, bool mask
= true, int initialCount
= 1 )
73 : wxGenericImageList(width
, height
, mask
, initialCount
)
77 #endif // !wxHAS_NATIVE_IMAGELIST
79 #endif // _WX_IMAGLISTG_H_