]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/generic/icon.h
get rid of the wxListString class in wxStatusBar code; introduce a wxStatusBarPane...
[wxWidgets.git] / include / wx / generic / icon.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/icon.h
3// Purpose: wxIcon implementation for ports where it's same as wxBitmap
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GENERIC_ICON_H_
13#define _WX_GENERIC_ICON_H_
14
15#include "wx/bitmap.h"
16
17//-----------------------------------------------------------------------------
18// wxIcon
19//-----------------------------------------------------------------------------
20
21class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
22{
23public:
24 wxIcon();
25
26 wxIcon(const char* const* bits);
27#ifdef wxNEEDS_CHARPP
28 wxIcon(char **bits);
29#endif
30
31 // For compatibility with wxMSW where desired size is sometimes required to
32 // distinguish between multiple icons in a resource.
33 wxIcon( const wxString& filename,
34 wxBitmapType type = wxICON_DEFAULT_TYPE,
35 int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
36 wxBitmap(filename, type)
37 {
38 }
39
40 wxIcon(const wxIconLocation& loc)
41 : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY)
42 {
43 }
44
45 bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE,
46 int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight))
47 { return wxBitmap::LoadFile(name, flags); }
48
49 // unhide the base class version
50 virtual bool LoadFile(const wxString& name, wxBitmapType flags)
51 { return wxBitmap::LoadFile(name, flags); }
52
53 // create from bitmap (which should have a mask unless it's monochrome):
54 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
55 // ctors, assignment operators...), but it's ok to have such function
56 void CopyFromBitmap(const wxBitmap& bmp);
57
58private:
59 DECLARE_DYNAMIC_CLASS(wxIcon)
60};
61
62#endif // _WX_GENERIC_ICON_H_