]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/iconbndl.h
Moved list of subclasses away from 'classes overview' corrected some wxGrid overview...
[wxWidgets.git] / interface / wx / iconbndl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: iconbndl.h
3 // Purpose: interface of wxIconBundle
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxIconBundle
11
12 This class contains multiple copies of an icon in different sizes,
13 see also wxDialog::SetIcons and
14 wxTopLevelWindow::SetIcons.
15
16 @library{wxcore}
17 @category{FIXME}
18
19 @stdobjects
20 ::wxNullIconBundle
21 */
22 class wxIconBundle : public wxGDIObject
23 {
24 public:
25 //@{
26 /**
27 Copy constructor.
28 */
29 wxIconBundle();
30 wxIconBundle(const wxString& file, wxBitmapType type);
31 wxIconBundle(const wxIcon& icon);
32 wxIconBundle(const wxIconBundle& ic);
33 //@}
34
35 /**
36 Destructor.
37 */
38 virtual ~wxIconBundle();
39
40 //@{
41 /**
42 Adds the icon to the collection; if the collection already
43 contains an icon with the same width and height, it is
44 replaced by the new one.
45 */
46 void AddIcon(const wxString& file, wxBitmapType type);
47 void AddIcon(const wxIcon& icon);
48 //@}
49
50 //@{
51 /**
52 Same as GetIcon( wxSize( size, size ) ).
53 */
54 wxIcon GetIcon(const wxSize& size) const;
55 const wxIcon GetIcon(wxCoord size = -1) const;
56 //@}
57
58 /**
59 Returns the icon with exactly the given size or @c wxNullIcon if this
60 size is not available.
61 */
62 wxIcon GetIconOfExactSize(const wxSize& size) const;
63
64 /**
65 Returns @true if the bundle doesn't contain any icons, @false otherwise (in
66 which case a call to GetIcon() with default
67 parameter should return a valid icon).
68 */
69 bool IsEmpty() const;
70
71 /**
72 Assignment operator, using @ref overview_trefcount "reference counting".
73 */
74 wxIconBundle operator =(const wxIconBundle& ic);
75
76 /**
77 Equality operator. This returns @true if two icon bundles are equal.
78 */
79 bool operator ==(const wxIconBundle& ic);
80 };
81
82
83 /**
84 An empty wxIconBundle.
85 */
86 wxIconBundle wxNullIconBundle;
87
88