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