]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/icon.h
Add wxFont ctor taking a single flags argument instead of style/weight/...
[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
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
925f7740 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_ICON_H_
13#define _WX_ICON_H_
14
9b6dbb09
JS
15#include "wx/bitmap.h"
16
9b6dbb09 17// Icon
53a2db12 18class WXDLLIMPEXP_CORE wxIcon : public wxBitmap
9b6dbb09 19{
9b6dbb09 20public:
83df96d6 21 wxIcon();
1d54b9d2 22
83df96d6
JS
23 // Initialize with XBM data
24 wxIcon(const char bits[], int width, int height);
1d54b9d2 25
83df96d6 26 // Initialize with XPM data
e45080c1
PC
27 wxIcon(const char* const* data);
28#ifdef wxNEEDS_CHARPP
83df96d6 29 wxIcon(char **data);
e45080c1 30#endif
1d54b9d2 31
c48d0d37 32 wxIcon(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE,
aaf7ab43
VZ
33 int desiredWidth = -1, int desiredHeight = -1)
34 {
35 LoadFile(name, type, desiredWidth, desiredHeight);
36 }
37
38 wxIcon(const wxIconLocation& loc)
39 {
6f12c2c9 40 LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ANY);
aaf7ab43
VZ
41 }
42
d3c7fc99 43 virtual ~wxIcon();
1d54b9d2 44
0208a9a3
VZ
45 bool LoadFile(const wxString& name, wxBitmapType type,
46 int desiredWidth, int desiredHeight);
47
48 // unhide the base class version
49 virtual bool LoadFile(const wxString& name,
50 wxBitmapType flags = wxICON_DEFAULT_TYPE)
51 { return LoadFile(name, flags); }
329e276a
VS
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);
1d54b9d2 57
aaf7ab43 58
777105f2 59 DECLARE_DYNAMIC_CLASS(wxIcon)
9b6dbb09
JS
60};
61
59e034c0 62#endif // _WX_ICON_H_