]>
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 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "icon.h"
19 #include "wx/bitmap.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 class wxIcon
: public wxBitmap
29 wxIcon( const wxIcon
& icon
);
30 wxIcon( const char **bits
, int width
=-1, int height
=-1 );
32 // For compatibility with wxMSW where desired size is sometimes required to
33 // distinguish between multiple icons in a resource.
34 wxIcon( const wxString
& filename
, int type
= wxBITMAP_TYPE_XPM
,
35 int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) :
36 wxBitmap(filename
, type
)
39 wxIcon( char **bits
, int width
=-1, int height
=-1 );
41 wxIcon
& operator = (const wxIcon
& icon
);
42 inline bool operator == (const wxIcon
& icon
) { return m_refData
== icon
.m_refData
; }
43 inline bool operator != (const wxIcon
& icon
) { return m_refData
!= icon
.m_refData
; }
45 // create from bitmap (which should have a mask unless it's monochrome):
46 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
47 // ctors, assignment operators...), but it's ok to have such function
48 void CopyFromBitmap(const wxBitmap
& bmp
);
51 DECLARE_DYNAMIC_CLASS(wxIcon
)