1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/icon.h
3 // Purpose: wxIcon implementation for ports where it's same as wxBitmap
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_ICON_H_
13 #define _WX_GENERIC_ICON_H_
15 #include "wx/bitmap.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 #ifndef wxICON_DEFAULT_BITMAP_TYPE
22 #define wxICON_DEFAULT_BITMAP_TYPE wxBITMAP_TYPE_XPM
25 class WXDLLIMPEXP_CORE wxIcon
: public wxBitmap
30 wxIcon(const char* const* bits
);
35 // For compatibility with wxMSW where desired size is sometimes required to
36 // distinguish between multiple icons in a resource.
37 wxIcon( const wxString
& filename
,
38 wxBitmapType type
= wxICON_DEFAULT_BITMAP_TYPE
,
39 int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) :
40 wxBitmap(filename
, type
)
44 wxIcon(const wxIconLocation
& loc
)
45 : wxBitmap(loc
.GetFileName(), wxBITMAP_TYPE_ANY
)
49 // create from bitmap (which should have a mask unless it's monochrome):
50 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
51 // ctors, assignment operators...), but it's ok to have such function
52 void CopyFromBitmap(const wxBitmap
& bmp
);
55 DECLARE_DYNAMIC_CLASS(wxIcon
)
58 #endif // _WX_GENERIC_ICON_H_