]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/icon.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/object.h"
15 #include "wx/bitmap.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxIcon
;
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
27 class WXDLLIMPEXP_CORE wxIcon
: public wxBitmap
31 wxIcon( const char **bits
, int width
=-1, int height
=-1 );
33 // For compatibility with wxMSW where desired size is sometimes required to
34 // distinguish between multiple icons in a resource.
35 wxIcon( const wxString
& filename
, wxBitmapType type
= wxBITMAP_TYPE_XPM
,
36 int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) :
37 wxBitmap(filename
, type
)
40 wxIcon( char **bits
, int width
=-1, int height
=-1 );
42 wxIcon(const wxIconLocation
& loc
)
43 : wxBitmap(loc
.GetFileName(), wxBITMAP_TYPE_ANY
)
47 bool operator==(const wxIcon
& icon
) const { return m_refData
== icon
.m_refData
; }
48 bool operator!=(const wxIcon
& icon
) const { return !(*this == icon
); }
50 // create from bitmap (which should have a mask unless it's monochrome):
51 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
52 // ctors, assignment operators...), but it's ok to have such function
53 void CopyFromBitmap(const wxBitmap
& bmp
);
56 DECLARE_DYNAMIC_CLASS(wxIcon
)
60 #endif // __GTKICONH__