Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / motif / icon.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/icon.h
3 // Purpose: wxIcon class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_ICON_H_
12 #define _WX_ICON_H_
13
14 #include "wx/bitmap.h"
15
16 // Icon
17 class WXDLLIMPEXP_CORE wxIcon : public wxBitmap
18 {
19 public:
20 wxIcon();
21
22 // Initialize with XBM data
23 wxIcon(const char bits[], int width, int height);
24
25 // Initialize with XPM data
26 wxIcon(const char* const* data);
27 #ifdef wxNEEDS_CHARPP
28 wxIcon(char **data);
29 #endif
30
31 wxIcon(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE,
32 int desiredWidth = -1, int desiredHeight = -1)
33 {
34 LoadFile(name, type, desiredWidth, desiredHeight);
35 }
36
37 wxIcon(const wxIconLocation& loc)
38 {
39 LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ANY);
40 }
41
42 virtual ~wxIcon();
43
44 bool LoadFile(const wxString& name, wxBitmapType type,
45 int desiredWidth, int desiredHeight);
46
47 // unhide the base class version
48 virtual bool LoadFile(const wxString& name,
49 wxBitmapType flags = wxICON_DEFAULT_TYPE)
50 { return LoadFile(name, flags); }
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);
56
57
58 DECLARE_DYNAMIC_CLASS(wxIcon)
59 };
60
61 #endif // _WX_ICON_H_