]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/icon.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxIcon class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "icon.h"
19 #include "wx/bitmap.h"
22 class WXDLLEXPORT wxIcon
: public wxBitmap
24 DECLARE_DYNAMIC_CLASS(wxIcon
);
30 inline wxIcon(const wxIcon
& icon
) { Ref(icon
); }
32 // Initialize with XBM data
33 wxIcon(const char bits
[], int width
, int height
);
35 // Initialize with XPM data
36 wxIcon(const char **data
);
39 wxIcon(const wxString
& name
, wxBitmapType type
= wxBITMAP_TYPE_XPM
,
40 int desiredWidth
= -1, int desiredHeight
= -1);
43 bool LoadFile(const wxString
& name
, wxBitmapType type
= wxBITMAP_TYPE_XPM
,
44 int desiredWidth
= -1, int desiredHeight
= -1);
46 // create from bitmap (which should have a mask unless it's monochrome):
47 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
48 // ctors, assignment operators...), but it's ok to have such function
49 void CopyFromBitmap(const wxBitmap
& bmp
);
51 inline wxIcon
& operator = (const wxIcon
& icon
)
52 { if (*this == icon
) return (*this); Ref(icon
); return *this; }
53 inline bool operator == (const wxIcon
& icon
) const
54 { return m_refData
== icon
.m_refData
; }
55 inline bool operator != (const wxIcon
& icon
) const
56 { return m_refData
!= icon
.m_refData
; }