]>
Commit | Line | Data |
---|---|---|
0dbd6262 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: icon.h | |
3 | // Purpose: wxIcon class | |
4 | // Author: AUTHOR | |
5 | // Modified by: | |
6 | // Created: ??/??/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) AUTHOR | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_ICON_H_ | |
13 | #define _WX_ICON_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "icon.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/bitmap.h" | |
20 | ||
0dbd6262 SC |
21 | // Icon |
22 | class WXDLLEXPORT wxIcon: public wxBitmap | |
23 | { | |
24 | DECLARE_DYNAMIC_CLASS(wxIcon) | |
25 | ||
26 | public: | |
27 | wxIcon(); | |
28 | ||
29 | // Copy constructors | |
30 | inline wxIcon(const wxIcon& icon) { Ref(icon); } | |
31 | ||
3dec57ad SC |
32 | wxIcon( const char **data ); |
33 | wxIcon( char **data ); | |
0dbd6262 | 34 | wxIcon(const char bits[], int width, int height); |
519cb848 | 35 | wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICON_RESOURCE, |
0dbd6262 SC |
36 | int desiredWidth = -1, int desiredHeight = -1); |
37 | ~wxIcon(); | |
38 | ||
519cb848 SC |
39 | bool LoadFile(const wxString& name, long flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ , |
40 | int desiredWidth /* = -1 */ , int desiredHeight = -1); | |
41 | bool LoadFile(const wxString& name ,long flags = wxBITMAP_TYPE_ICON_RESOURCE ) | |
42 | { return LoadFile( name , flags , -1 , -1 ) ; } | |
0dbd6262 SC |
43 | |
44 | inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } | |
45 | inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } | |
46 | inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } | |
0dbd6262 SC |
47 | }; |
48 | ||
519cb848 SC |
49 | /* |
50 | class WXDLLEXPORT wxICONFileHandler: public wxBitmapHandler | |
0dbd6262 | 51 | { |
519cb848 | 52 | DECLARE_DYNAMIC_CLASS(wxICONFileHandler) |
0dbd6262 | 53 | public: |
519cb848 | 54 | inline wxICONFileHandler() |
0dbd6262 SC |
55 | { |
56 | m_name = "ICO icon file"; | |
57 | m_extension = "ico"; | |
58 | m_type = wxBITMAP_TYPE_ICO; | |
59 | }; | |
60 | ||
61 | virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, | |
62 | int desiredWidth = -1, int desiredHeight = -1); | |
63 | }; | |
519cb848 | 64 | */ |
0dbd6262 | 65 | |
519cb848 | 66 | class WXDLLEXPORT wxICONResourceHandler: public wxBitmapHandler |
0dbd6262 | 67 | { |
519cb848 | 68 | DECLARE_DYNAMIC_CLASS(wxICONResourceHandler) |
0dbd6262 | 69 | public: |
519cb848 | 70 | inline wxICONResourceHandler() |
0dbd6262 | 71 | { |
519cb848 SC |
72 | m_name = "ICON resource"; |
73 | m_extension = ""; | |
74 | m_type = wxBITMAP_TYPE_ICON_RESOURCE; | |
0dbd6262 SC |
75 | }; |
76 | ||
77 | virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, | |
78 | int desiredWidth = -1, int desiredHeight = -1); | |
79 | ||
80 | }; | |
81 | ||
0dbd6262 SC |
82 | #endif |
83 | // _WX_ICON_H_ |