]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mgl/icon.h
wxGTK2: Declare GTK_DISABLE_DEPRECATED in defs.h. I will be monitoring the tinderbox...
[wxWidgets.git] / include / wx / mgl / icon.h
CommitLineData
32b8ec41
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: icon.h
3// Purpose:
4// Author: Vaclav Slavik
5// Id: $Id$
52750c2e 6// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
65571936 7// Licence: wxWindows licence
32b8ec41
VZ
8/////////////////////////////////////////////////////////////////////////////
9
32b8ec41
VZ
10#ifndef __WX_ICON_H__
11#define __WX_ICON_H__
12
32b8ec41
VZ
13#include "wx/defs.h"
14#include "wx/object.h"
15#include "wx/bitmap.h"
16
17//-----------------------------------------------------------------------------
18// classes
19//-----------------------------------------------------------------------------
20
21class WXDLLEXPORT wxIcon;
22
23//-----------------------------------------------------------------------------
24// wxIcon
25//-----------------------------------------------------------------------------
26
27class WXDLLEXPORT wxIcon: public wxBitmap
28{
29public:
30 wxIcon() : wxBitmap() {}
32b8ec41
VZ
31 wxIcon(const char **bits, int width=-1, int height=-1);
32 wxIcon(char **bits, int width=-1, int height=-1);
33
34 // For compatibility with wxMSW where desired size is sometimes required to
35 // distinguish between multiple icons in a resource.
625e74a7 36 wxIcon(const wxString& filename, int type = wxBITMAP_TYPE_ICO_RESOURCE,
32b8ec41 37 int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
625e74a7 38 wxBitmap(filename, (wxBitmapType)type) {}
aaf7ab43
VZ
39
40 wxIcon(const wxIconLocation& loc)
6f12c2c9 41 : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY)
aaf7ab43
VZ
42 {
43 }
44
aaf7ab43
VZ
45 bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
46 bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
32b8ec41
VZ
47
48 // create from bitmap (which should have a mask unless it's monochrome):
49 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
50 // ctors, assignment operators...), but it's ok to have such function
51 void CopyFromBitmap(const wxBitmap& bmp);
aaf7ab43 52
32b8ec41
VZ
53private:
54 DECLARE_DYNAMIC_CLASS(wxIcon)
55};
56
57
58#endif // __WX_ICON_H__