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