]>
Commit | Line | Data |
---|---|---|
8cf73271 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: imaglist.h | |
32c19f25 SC |
3 | // Purpose: |
4 | // Author: Robert Roebling, Stefan Csomor | |
5 | // Created: 01/02/97 | |
6 | // Id: | |
7 | // Copyright: (c) 1998 Robert Roebling and Julian Smart | |
65571936 | 8 | // Licence: wxWindows licence |
8cf73271 SC |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_IMAGLIST_H_ | |
12 | #define _WX_IMAGLIST_H_ | |
13 | ||
32c19f25 SC |
14 | #include "wx/defs.h" |
15 | #include "wx/list.h" | |
16 | #include "wx/icon.h" | |
17 | ||
18 | class WXDLLEXPORT wxDC; | |
19 | class WXDLLEXPORT wxBitmap; | |
20 | class WXDLLEXPORT wxColour; | |
8cf73271 | 21 | |
8cf73271 SC |
22 | class WXDLLEXPORT wxImageList: public wxObject |
23 | { | |
32c19f25 SC |
24 | public: |
25 | wxImageList() { m_width = m_height = 0; } | |
26 | wxImageList( int width, int height, bool mask = true, int initialCount = 1 ); | |
d3c7fc99 | 27 | virtual ~wxImageList(); |
32c19f25 SC |
28 | bool Create( int width, int height, bool mask = true, int initialCount = 1 ); |
29 | bool Create(); | |
30 | ||
31 | virtual int GetImageCount() const; | |
32 | virtual bool GetSize( int index, int &width, int &height ) const; | |
33 | ||
34 | int Add( const wxIcon& bitmap ); | |
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 wxIcon &bitmap ); | |
41 | bool Replace( int index, const wxBitmap &bitmap ); | |
5b9003ae | 42 | bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask ); |
32c19f25 SC |
43 | bool Remove( int index ); |
44 | bool RemoveAll(); | |
45 | ||
46 | virtual bool Draw(int index, wxDC& dc, int x, int y, | |
47 | int flags = wxIMAGELIST_DRAW_NORMAL, | |
48 | bool solidBackground = false); | |
49 | ||
50 | private: | |
51 | wxList m_images; | |
52 | ||
53 | int m_width; | |
54 | int m_height; | |
55 | ||
56 | DECLARE_DYNAMIC_CLASS(wxImageList) | |
8cf73271 SC |
57 | }; |
58 | ||
32c19f25 SC |
59 | #endif // _WX_IMAGLIST_H_ |
60 |