]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/icon.h
Build fix after last commit.
[wxWidgets.git] / include / wx / mgl / icon.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: icon.h
3 // Purpose:
4 // Author: Vaclav Slavik
5 // Id: $Id$
6 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __WX_ICON_H__
11 #define __WX_ICON_H__
12
13 #include "wx/defs.h"
14 #include "wx/object.h"
15 #include "wx/bitmap.h"
16
17 //-----------------------------------------------------------------------------
18 // classes
19 //-----------------------------------------------------------------------------
20
21 class WXDLLEXPORT wxIcon;
22
23 //-----------------------------------------------------------------------------
24 // wxIcon
25 //-----------------------------------------------------------------------------
26
27 class WXDLLEXPORT wxIcon: public wxBitmap
28 {
29 public:
30 wxIcon() : wxBitmap() {}
31 wxIcon(const wxIcon& icon);
32 wxIcon(const char **bits, int width=-1, int height=-1);
33 wxIcon(char **bits, int width=-1, int height=-1);
34
35 // For compatibility with wxMSW where desired size is sometimes required to
36 // distinguish between multiple icons in a resource.
37 wxIcon(const wxString& filename, int type = wxBITMAP_TYPE_ICO_RESOURCE,
38 int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
39 wxBitmap(filename, (wxBitmapType)type) {}
40
41 wxIcon(const wxIconLocation& loc)
42 : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY)
43 {
44 }
45
46 wxIcon& operator=(const wxIcon& icon);
47 bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
48 bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
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);
54
55 private:
56 DECLARE_DYNAMIC_CLASS(wxIcon)
57 };
58
59
60 #endif // __WX_ICON_H__