]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/icon.h
wx/gtk1/taskbarpriv.h and gnome/gprint.h not necessary for gtk1. Deleting.
[wxWidgets.git] / include / wx / gtk1 / icon.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: icon.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKICONH__
11 #define __GTKICONH__
12
13 #include "wx/defs.h"
14 #include "wx/object.h"
15 #include "wx/bitmap.h"
16
17 //-----------------------------------------------------------------------------
18 // classes
19 //-----------------------------------------------------------------------------
20
21 class WXDLLIMPEXP_CORE wxIcon;
22
23 //-----------------------------------------------------------------------------
24 // wxIcon
25 //-----------------------------------------------------------------------------
26
27 class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
28 {
29 public:
30 wxIcon();
31 wxIcon( const wxIcon& icon);
32 wxIcon( const char **bits, int width=-1, int height=-1 );
33
34 // For compatibility with wxMSW where desired size is sometimes required to
35 // distinguish between multiple icons in a resource.
36 wxIcon( const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_XPM,
37 int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
38 wxBitmap(filename, type)
39 {
40 }
41 wxIcon( char **bits, int width=-1, int height=-1 );
42
43 wxIcon(const wxIconLocation& loc)
44 : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY)
45 {
46 }
47
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); }
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 private:
58 DECLARE_DYNAMIC_CLASS(wxIcon)
59 };
60
61
62 #endif // __GTKICONH__