]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/icon.h
Revert "Make wxMSW stack walking methods work with Unicode identifiers."
[wxWidgets.git] / include / wx / motif / icon.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/icon.h
9b6dbb09
JS
3// Purpose: wxIcon class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
9b6dbb09 7// Copyright: (c) Julian Smart
925f7740 8// Licence: wxWindows licence
9b6dbb09
JS
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_ICON_H_
12#define _WX_ICON_H_
13
9b6dbb09
JS
14#include "wx/bitmap.h"
15
9b6dbb09 16// Icon
53a2db12 17class WXDLLIMPEXP_CORE wxIcon : public wxBitmap
9b6dbb09 18{
9b6dbb09 19public:
83df96d6 20 wxIcon();
1d54b9d2 21
83df96d6
JS
22 // Initialize with XBM data
23 wxIcon(const char bits[], int width, int height);
1d54b9d2 24
83df96d6 25 // Initialize with XPM data
e45080c1
PC
26 wxIcon(const char* const* data);
27#ifdef wxNEEDS_CHARPP
83df96d6 28 wxIcon(char **data);
e45080c1 29#endif
1d54b9d2 30
c48d0d37 31 wxIcon(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE,
aaf7ab43
VZ
32 int desiredWidth = -1, int desiredHeight = -1)
33 {
34 LoadFile(name, type, desiredWidth, desiredHeight);
35 }
36
37 wxIcon(const wxIconLocation& loc)
38 {
6f12c2c9 39 LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ANY);
aaf7ab43
VZ
40 }
41
d3c7fc99 42 virtual ~wxIcon();
1d54b9d2 43
0208a9a3
VZ
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); }
329e276a
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);
1d54b9d2 56
aaf7ab43 57
777105f2 58 DECLARE_DYNAMIC_CLASS(wxIcon)
9b6dbb09
JS
59};
60
59e034c0 61#endif // _WX_ICON_H_