]>
Commit | Line | Data |
---|---|---|
32b8ec41 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: icon.cpp | |
3 | // Author: Vaclav Slavik | |
4 | // Id: $Id$ | |
5 | // Copyright: (c) 2001 Vaclav Slavik | |
6 | // Licence: wxWindows licence | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | #ifdef __GNUG__ | |
10 | #pragma implementation "icon.h" | |
11 | #endif | |
12 | ||
13 | // For compilers that support precompilation, includes "wx.h". | |
14 | #include "wx/wxprec.h" | |
15 | ||
16 | #ifdef __BORLANDC__ | |
17 | #pragma hdrstop | |
18 | #endif | |
19 | ||
20 | #include "wx/icon.h" | |
21 | ||
22 | //----------------------------------------------------------------------------- | |
23 | // wxIcon | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
26 | IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) | |
27 | ||
28 | wxIcon::wxIcon(const char **bits, int WXUNUSED(width), int WXUNUSED(height)) : | |
29 | wxBitmap(bits) | |
30 | { | |
31 | } | |
32 | ||
33 | wxIcon::wxIcon(char **bits, int WXUNUSED(width), int WXUNUSED(height)) : | |
34 | wxBitmap(bits) | |
35 | { | |
36 | } | |
37 | ||
38 | wxIcon::wxIcon(const wxIcon& icon) : wxBitmap() | |
39 | { | |
40 | Ref(icon); | |
41 | } | |
42 | ||
43 | wxIcon& wxIcon::operator = (const wxIcon& icon) | |
44 | { | |
45 | if (*this == icon) | |
46 | return (*this); | |
47 | Ref(icon); | |
48 | return *this; | |
49 | } | |
50 | ||
51 | void wxIcon::CopyFromBitmap(const wxBitmap& bmp) | |
52 | { | |
53 | wxIcon *icon = (wxIcon*)(&bmp); | |
54 | *this = *icon; | |
55 | } | |
56 |