]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/icon.h
Applied Patch #1424869: Implement wxListCtrl::SetItemColumnImage
[wxWidgets.git] / include / wx / gtk1 / icon.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/icon.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKICONH__
11#define __GTKICONH__
12
c801d85f
KB
13#include "wx/defs.h"
14#include "wx/object.h"
15#include "wx/bitmap.h"
16
17//-----------------------------------------------------------------------------
18// classes
19//-----------------------------------------------------------------------------
20
20123d49 21class WXDLLIMPEXP_CORE wxIcon;
c801d85f
KB
22
23//-----------------------------------------------------------------------------
24// wxIcon
25//-----------------------------------------------------------------------------
26
20123d49 27class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
c801d85f 28{
c801d85f 29public:
20e05ffb 30 wxIcon();
20e05ffb
RR
31 wxIcon( const char **bits, int width=-1, int height=-1 );
32
33 // For compatibility with wxMSW where desired size is sometimes required to
34 // distinguish between multiple icons in a resource.
4611dd06 35 wxIcon( const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_XPM,
20e05ffb
RR
36 int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
37 wxBitmap(filename, type)
38 {
39 }
40 wxIcon( char **bits, int width=-1, int height=-1 );
41
aaf7ab43 42 wxIcon(const wxIconLocation& loc)
6f12c2c9 43 : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY)
aaf7ab43
VZ
44 {
45 }
46
4b912ef2
VZ
47 bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
48 bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
019faef4
VS
49
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);
4b912ef2 54
20e05ffb
RR
55private:
56 DECLARE_DYNAMIC_CLASS(wxIcon)
c801d85f
KB
57};
58
59
60#endif // __GTKICONH__