| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: icon.cpp |
| 3 | // Purpose: |
| 4 | // Author: Robert Roebling |
| 5 | // Id: $Id$ |
| 6 | // Copyright: (c) 1998 Robert Roebling |
| 7 | // Licence: wxWindows licence |
| 8 | ///////////////////////////////////////////////////////////////////////////// |
| 9 | |
| 10 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
| 11 | #pragma implementation "icon.h" |
| 12 | #endif |
| 13 | |
| 14 | // For compilers that support precompilation, includes "wx.h". |
| 15 | #include "wx/wxprec.h" |
| 16 | |
| 17 | #include "wx/icon.h" |
| 18 | |
| 19 | //----------------------------------------------------------------------------- |
| 20 | // wxIcon |
| 21 | //----------------------------------------------------------------------------- |
| 22 | |
| 23 | IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap) |
| 24 | |
| 25 | wxIcon::wxIcon( const char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : |
| 26 | wxBitmap( bits ) |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : |
| 31 | wxBitmap( bits ) |
| 32 | { |
| 33 | } |
| 34 | |
| 35 | wxIcon::wxIcon() : wxBitmap() |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | wxIcon::wxIcon( const wxIcon& icon ) : wxBitmap() |
| 40 | { |
| 41 | Ref(icon); |
| 42 | } |
| 43 | |
| 44 | wxIcon& wxIcon::operator = ( const wxIcon& icon ) |
| 45 | { |
| 46 | if (*this == icon) 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 | } |