]>
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
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/bitmap.h"
18 class WXDLLIMPEXP_CORE wxIcon
: public wxBitmap
23 // Initialize with XBM data
24 wxIcon(const char bits
[], int width
, int height
);
26 // Initialize with XPM data
27 wxIcon(const char* const* data
);
32 wxIcon(const wxString
& name
, wxBitmapType type
= wxICON_DEFAULT_TYPE
,
33 int desiredWidth
= -1, int desiredHeight
= -1)
35 LoadFile(name
, type
, desiredWidth
, desiredHeight
);
38 wxIcon(const wxIconLocation
& loc
)
40 LoadFile(loc
.GetFileName(), wxBITMAP_TYPE_ANY
);
45 bool LoadFile(const wxString
& name
, wxBitmapType type
= wxICON_DEFAULT_TYPE
,
46 int desiredWidth
= -1, int desiredHeight
= -1);
48 // create from bitmap (which should have a mask unless it's monochrome):
49 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
50 // ctors, assignment operators...), but it's ok to have such function
51 void CopyFromBitmap(const wxBitmap
& bmp
);
54 DECLARE_DYNAMIC_CLASS(wxIcon
)