]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: icon.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
58614078 RR |
5 | // Id: $Id$ |
6 | // Copyright: (c) 1998 Robert Roebling | |
8bbe427f | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __GTKICONH__ | |
12 | #define __GTKICONH__ | |
13 | ||
ab7ce33c | 14 | #if defined(__GNUG__) && !defined(__APPLE__) |
c801d85f KB |
15 | #pragma interface |
16 | #endif | |
17 | ||
18 | #include "wx/defs.h" | |
19 | #include "wx/object.h" | |
20 | #include "wx/bitmap.h" | |
21 | ||
22 | //----------------------------------------------------------------------------- | |
23 | // classes | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
26 | class wxIcon; | |
27 | ||
28 | //----------------------------------------------------------------------------- | |
29 | // wxIcon | |
30 | //----------------------------------------------------------------------------- | |
31 | ||
32 | class wxIcon: public wxBitmap | |
33 | { | |
c801d85f | 34 | public: |
20e05ffb RR |
35 | wxIcon(); |
36 | wxIcon( const wxIcon& icon); | |
37 | wxIcon( const char **bits, int width=-1, int height=-1 ); | |
38 | ||
39 | // For compatibility with wxMSW where desired size is sometimes required to | |
40 | // distinguish between multiple icons in a resource. | |
4b912ef2 | 41 | wxIcon( const wxString& filename, int type = wxBITMAP_TYPE_XPM, |
20e05ffb RR |
42 | int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) : |
43 | wxBitmap(filename, type) | |
44 | { | |
45 | } | |
46 | wxIcon( char **bits, int width=-1, int height=-1 ); | |
47 | ||
4b912ef2 VZ |
48 | wxIcon& operator=(const wxIcon& icon); |
49 | bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; } | |
50 | bool operator!=(const wxIcon& icon) const { return !(*this == icon); } | |
019faef4 VS |
51 | |
52 | // create from bitmap (which should have a mask unless it's monochrome): | |
53 | // there shouldn't be any implicit bitmap -> icon conversion (i.e. no | |
54 | // ctors, assignment operators...), but it's ok to have such function | |
55 | void CopyFromBitmap(const wxBitmap& bmp); | |
4b912ef2 | 56 | |
20e05ffb RR |
57 | private: |
58 | DECLARE_DYNAMIC_CLASS(wxIcon) | |
c801d85f KB |
59 | }; |
60 | ||
61 | ||
62 | #endif // __GTKICONH__ |