]> git.saurik.com Git - wxWidgets.git/blob - src/mgl/icon.cpp
allowing ampersands in choices and comboboxes means we have to strip outside of uma.cpp
[wxWidgets.git] / src / mgl / icon.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: icon.cpp
3 // Author: Vaclav Slavik
4 // Id: $Id$
5 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
11
12 #ifdef __BORLANDC__
13 #pragma hdrstop
14 #endif
15
16 #include "wx/icon.h"
17
18 //-----------------------------------------------------------------------------
19 // wxIcon
20 //-----------------------------------------------------------------------------
21
22 IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
23
24 wxIcon::wxIcon(const char **bits, int WXUNUSED(width), int WXUNUSED(height)) :
25 wxBitmap(bits)
26 {
27 }
28
29 wxIcon::wxIcon(char **bits, int WXUNUSED(width), int WXUNUSED(height)) :
30 wxBitmap(bits)
31 {
32 }
33
34 wxIcon::wxIcon(const wxIcon& icon) : wxBitmap()
35 {
36 Ref(icon);
37 }
38
39 wxIcon& wxIcon::operator = (const wxIcon& icon)
40 {
41 if (*this == icon)
42 return (*this);
43 Ref(icon);
44 return *this;
45 }
46
47 void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
48 {
49 wxIcon *icon = (wxIcon*)(&bmp);
50 *this = *icon;
51 }
52