]>
Commit | Line | Data |
---|---|---|
83df96d6 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: icon.cpp | |
3 | // Purpose: wxIcon class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
83df96d6 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
83df96d6 JS |
12 | #include "wx/icon.h" |
13 | #include "wx/window.h" | |
14 | ||
bc797f4c | 15 | #include "wx/x11/private.h" |
83df96d6 | 16 | |
a11672a4 RR |
17 | //----------------------------------------------------------------------------- |
18 | // wxIcon | |
19 | //----------------------------------------------------------------------------- | |
83df96d6 | 20 | |
a11672a4 | 21 | IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap) |
83df96d6 | 22 | |
a11672a4 RR |
23 | wxIcon::wxIcon( const char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : |
24 | wxBitmap( bits ) | |
83df96d6 | 25 | { |
83df96d6 JS |
26 | } |
27 | ||
a11672a4 RR |
28 | wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : |
29 | wxBitmap( bits ) | |
83df96d6 | 30 | { |
83df96d6 JS |
31 | } |
32 | ||
a11672a4 | 33 | wxIcon::wxIcon() : wxBitmap() |
83df96d6 | 34 | { |
83df96d6 JS |
35 | } |
36 | ||
a11672a4 | 37 | wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap() |
83df96d6 | 38 | { |
a11672a4 | 39 | Ref(icon); |
83df96d6 JS |
40 | } |
41 | ||
a11672a4 | 42 | wxIcon& wxIcon::operator = ( const wxIcon& icon ) |
83df96d6 | 43 | { |
a11672a4 RR |
44 | if (*this == icon) return (*this); |
45 | Ref(icon); | |
46 | return *this; | |
83df96d6 JS |
47 | } |
48 | ||
a11672a4 | 49 | void wxIcon::CopyFromBitmap(const wxBitmap& bmp) |
7266b672 | 50 | { |
a11672a4 | 51 | wxIcon *icon = (wxIcon*)(&bmp); |
b6ed4565 | 52 | *this = *icon; |
7266b672 | 53 | } |