]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/icon.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxIcon class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/bitmap.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxIcon
: public wxBitmap
25 wxIcon( const char **bits
, int width
=-1, int height
=-1 );
27 // For compatibility with wxMSW where desired size is sometimes required to
28 // distinguish between multiple icons in a resource.
29 wxIcon( const wxString
& filename
, wxBitmapType type
= wxBITMAP_TYPE_XPM
,
30 int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) :
31 wxBitmap(filename
, type
)
34 wxIcon( char **bits
, int width
=-1, int height
=-1 );
36 wxIcon(const wxIconLocation
& loc
)
37 : wxBitmap(loc
.GetFileName(), wxBITMAP_TYPE_ANY
)
41 bool operator==(const wxIcon
& icon
) const { return m_refData
== icon
.m_refData
; }
42 bool operator!=(const wxIcon
& icon
) const { return !(*this == icon
); }
44 // create from bitmap (which should have a mask unless it's monochrome):
45 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
46 // ctors, assignment operators...), but it's ok to have such function
47 void CopyFromBitmap(const wxBitmap
& bmp
);
50 DECLARE_DYNAMIC_CLASS(wxIcon
)