2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: iconbndl.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxIconBundle
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxIconBundle
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This class contains multiple copies of an icon in different sizes,
|
|
|
|
see also wxDialog::SetIcons and
|
|
|
|
wxTopLevelWindow::SetIcons.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{FIXME}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@stdobjects
|
2008-04-06 11:28:55 -04:00
|
|
|
::wxNullIconBundle
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxIconBundle : public wxGDIObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Copy constructor.
|
|
|
|
*/
|
|
|
|
wxIconBundle();
|
2008-06-06 19:33:58 -04:00
|
|
|
wxIconBundle(const wxString& file, wxBitmapType type);
|
2008-03-08 09:43:31 -05:00
|
|
|
wxIconBundle(const wxIcon& icon);
|
|
|
|
wxIconBundle(const wxIconBundle& ic);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxIconBundle();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Adds the icon to the collection; if the collection already
|
|
|
|
contains an icon with the same width and height, it is
|
|
|
|
replaced by the new one.
|
|
|
|
*/
|
2008-06-06 19:33:58 -04:00
|
|
|
void AddIcon(const wxString& file, wxBitmapType type);
|
2008-03-08 09:43:31 -05:00
|
|
|
void AddIcon(const wxIcon& icon);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Same as GetIcon( wxSize( size, size ) ).
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxIcon GetIcon(const wxSize& size) const;
|
|
|
|
const wxIcon GetIcon(wxCoord size = -1) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the icon with exactly the given size or @c wxNullIcon if this
|
|
|
|
size is not available.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxIcon GetIconOfExactSize(const wxSize& size) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if the bundle doesn't contain any icons, @false otherwise (in
|
|
|
|
which case a call to GetIcon() with default
|
|
|
|
parameter should return a valid icon).
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
bool IsEmpty() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Assignment operator, using @ref overview_trefcount "reference counting".
|
|
|
|
*/
|
|
|
|
wxIconBundle operator =(const wxIconBundle& ic);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Equality operator. This returns @true if two icon bundles are equal.
|
|
|
|
*/
|
|
|
|
bool operator ==(const wxIconBundle& ic);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2008-04-06 11:28:55 -04:00
|
|
|
An empty wxIconBundle.
|
2008-03-10 11:24:38 -04:00
|
|
|
*/
|
|
|
|
wxIconBundle wxNullIconBundle;
|
|
|
|
|
|
|
|
|