1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
15 #pragma interface "icon.h"
19 #include "wx/object.h"
20 #include "wx/bitmap.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
26 class WXDLLEXPORT wxIcon
;
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 class WXDLLEXPORT wxIcon
: public wxBitmap
35 wxIcon() : wxBitmap() {}
36 wxIcon(const wxIcon
& icon
);
37 wxIcon(const char **bits
, int width
=-1, int height
=-1);
38 wxIcon(char **bits
, int width
=-1, int height
=-1);
40 // For compatibility with wxMSW where desired size is sometimes required to
41 // distinguish between multiple icons in a resource.
42 wxIcon(const wxString
& filename
, int type
= wxBITMAP_TYPE_ICO_RESOURCE
,
43 int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) :
44 wxBitmap(filename
, (wxBitmapType
)type
) {}
46 wxIcon
& operator = (const wxIcon
& icon
);
47 inline bool operator == (const wxIcon
& icon
) { return m_refData
== icon
.m_refData
; }
48 inline bool operator != (const wxIcon
& icon
) { return m_refData
!= icon
.m_refData
; }
50 // create from bitmap (which should have a mask unless it's monochrome):
51 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
52 // ctors, assignment operators...), but it's ok to have such function
53 void CopyFromBitmap(const wxBitmap
& bmp
);
56 DECLARE_DYNAMIC_CLASS(wxIcon
)
60 #endif // __WX_ICON_H__