]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/icon.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/icon.h
3 // Purpose: wxIcon implementation for ports where it's same as wxBitmap
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GENERIC_ICON_H_
12 #define _WX_GENERIC_ICON_H_
14 #include "wx/bitmap.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxIcon
: public wxBitmap
25 wxIcon(const char* const* bits
);
30 // For compatibility with wxMSW where desired size is sometimes required to
31 // distinguish between multiple icons in a resource.
32 wxIcon( const wxString
& filename
,
33 wxBitmapType type
= wxICON_DEFAULT_TYPE
,
34 int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) :
35 wxBitmap(filename
, type
)
39 wxIcon(const wxIconLocation
& loc
)
40 : wxBitmap(loc
.GetFileName(), wxBITMAP_TYPE_ANY
)
44 bool LoadFile(const wxString
& name
, wxBitmapType flags
,
45 int WXUNUSED(desiredWidth
), int WXUNUSED(desiredHeight
))
46 { return wxBitmap::LoadFile(name
, flags
); }
48 // unhide the base class version
49 virtual bool LoadFile(const wxString
& name
,
50 wxBitmapType flags
= wxICON_DEFAULT_TYPE
)
51 { return wxBitmap::LoadFile(name
, flags
); }
53 // create from bitmap (which should have a mask unless it's monochrome):
54 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
55 // ctors, assignment operators...), but it's ok to have such function
56 void CopyFromBitmap(const wxBitmap
& bmp
);
59 DECLARE_DYNAMIC_CLASS(wxIcon
)
62 #endif // _WX_GENERIC_ICON_H_