]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/icon.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/icon.h
3 // Purpose: wxIcon class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/bitmap.h"
17 class WXDLLIMPEXP_CORE wxIcon
: public wxBitmap
22 // Initialize with XBM data
23 wxIcon(const char bits
[], int width
, int height
);
25 // Initialize with XPM data
26 wxIcon(const char* const* data
);
31 wxIcon(const wxString
& name
, wxBitmapType type
= wxICON_DEFAULT_TYPE
,
32 int desiredWidth
= -1, int desiredHeight
= -1)
34 LoadFile(name
, type
, desiredWidth
, desiredHeight
);
37 wxIcon(const wxIconLocation
& loc
)
39 LoadFile(loc
.GetFileName(), wxBITMAP_TYPE_ANY
);
44 bool LoadFile(const wxString
& name
, wxBitmapType type
,
45 int desiredWidth
, int desiredHeight
);
47 // unhide the base class version
48 virtual bool LoadFile(const wxString
& name
,
49 wxBitmapType flags
= wxICON_DEFAULT_TYPE
)
50 { return LoadFile(name
, flags
); }
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
);
58 DECLARE_DYNAMIC_CLASS(wxIcon
)