]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/imaglist.h
Add wxRichMessageDialog class.
[wxWidgets.git] / include / wx / generic / imaglist.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
f6bcfd97 2// Name: wx/generic/imaglist.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
65391c8f 6// Id: $Id$
371a5b4e 7// Copyright: (c) 1998 Robert Roebling and Julian Smart
65571936 8// Licence: wxWindows licence
c801d85f
KB
9/////////////////////////////////////////////////////////////////////////////
10
65391c8f
PC
11#ifndef _WX_IMAGLISTG_H_
12#define _WX_IMAGLISTG_H_
c801d85f 13
00dd3b18
MB
14#include "wx/list.h"
15
b5dbe15d
VS
16class WXDLLIMPEXP_FWD_CORE wxDC;
17class WXDLLIMPEXP_FWD_CORE wxBitmap;
65391c8f 18class WXDLLIMPEXP_FWD_CORE wxIcon;
b5dbe15d 19class WXDLLIMPEXP_FWD_CORE wxColour;
c801d85f 20
3cd94a0d 21
53a2db12 22class WXDLLIMPEXP_CORE wxGenericImageList: public wxObject
c801d85f 23{
f6bcfd97 24public:
77bf4cef 25 wxGenericImageList() { m_width = m_height = 0; }
ca65c044 26 wxGenericImageList( int width, int height, bool mask = true, int initialCount = 1 );
d3c7fc99 27 virtual ~wxGenericImageList();
ca65c044 28 bool Create( int width, int height, bool mask = true, int initialCount = 1 );
0423b685 29 bool Create();
f6bcfd97 30
3cd94a0d
JS
31 virtual int GetImageCount() const;
32 virtual bool GetSize( int index, int &width, int &height ) const;
f6bcfd97 33
4d449473
VS
34 int Add( const wxBitmap& bitmap );
35 int Add( const wxBitmap& bitmap, const wxBitmap& mask );
36 int Add( const wxBitmap& bitmap, const wxColour& maskColour );
49bf4e3e
JS
37 wxBitmap GetBitmap(int index) const;
38 wxIcon GetIcon(int index) const;
0423b685 39 bool Replace( int index, const wxBitmap &bitmap );
f644bc11 40 bool Replace( int index, const wxBitmap &bitmap, const wxBitmap& mask );
0423b685
VZ
41 bool Remove( int index );
42 bool RemoveAll();
debe6624 43
3cd94a0d 44 virtual bool Draw(int index, wxDC& dc, int x, int y,
f6bcfd97 45 int flags = wxIMAGELIST_DRAW_NORMAL,
ca65c044 46 bool solidBackground = false);
c801d85f 47
49bf4e3e
JS
48 // Internal use only
49 const wxBitmap *GetBitmapPtr(int index) const;
f6bcfd97 50private:
a1abd1a9 51 wxObjectList m_images;
f6bcfd97 52
219f895a
RR
53 int m_width;
54 int m_height;
f6bcfd97 55
a1abd1a9 56 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericImageList)
c801d85f
KB
57};
58
1a27de88
VZ
59#ifndef wxHAS_NATIVE_IMAGELIST
60
b31989e2
JS
61/*
62 * wxImageList has to be a real class or we have problems with
63 * the run-time information.
64 */
65
53a2db12 66class WXDLLIMPEXP_CORE wxImageList: public wxGenericImageList
b31989e2
JS
67{
68 DECLARE_DYNAMIC_CLASS(wxImageList)
69
70public:
71 wxImageList() {}
72
ca65c044 73 wxImageList( int width, int height, bool mask = true, int initialCount = 1 )
b31989e2
JS
74 : wxGenericImageList(width, height, mask, initialCount)
75 {
76 }
77};
1a27de88 78#endif // !wxHAS_NATIVE_IMAGELIST
b31989e2 79
65391c8f 80#endif // _WX_IMAGLISTG_H_