]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/iconbndl.h
reset the associated view frame pointer when the frame is deleted directly instead...
[wxWidgets.git] / interface / wx / iconbndl.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: iconbndl.h
e54c96f1 3// Purpose: interface of wxIconBundle
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxIconBundle
7c913512 11
427c415b
FM
12 This class contains multiple copies of an icon in different sizes.
13 It is typically used in wxDialog::SetIcons and wxTopLevelWindow::SetIcons.
7c913512 14
23324ae1 15 @library{wxcore}
427c415b 16 @category{gdi}
7c913512 17
23324ae1 18 @stdobjects
65874118 19 ::wxNullIconBundle
23324ae1
FM
20*/
21class wxIconBundle : public wxGDIObject
22{
23public:
23324ae1 24 /**
427c415b 25 Default ctor.
23324ae1
FM
26 */
27 wxIconBundle();
427c415b
FM
28
29 /**
30 Initializes the bundle with the icon(s) found in the file.
31 */
e98e625c 32 wxIconBundle(const wxString& file, wxBitmapType type);
427c415b
FM
33
34 /**
35 Initializes the bundle with a single icon.
36 */
7c913512 37 wxIconBundle(const wxIcon& icon);
427c415b
FM
38
39 /**
40 Copy constructor.
41 */
7c913512 42 wxIconBundle(const wxIconBundle& ic);
23324ae1
FM
43
44 /**
45 Destructor.
46 */
adaaa686 47 virtual ~wxIconBundle();
23324ae1 48
427c415b
FM
49 /**
50 Adds all the icons contained in the file to the bundle; if the collection
51 already contains icons with the same width and height, they are replaced
52 by the new ones.
53 */
54 void AddIcon(const wxString& file, wxBitmapType type);
55
23324ae1
FM
56 /**
57 Adds the icon to the collection; if the collection already
58 contains an icon with the same width and height, it is
59 replaced by the new one.
60 */
7c913512 61 void AddIcon(const wxIcon& icon);
23324ae1 62
23324ae1 63 /**
427c415b
FM
64 Returns the icon with the given size; if no such icon exists, returns
65 the icon with size @c wxSYS_ICON_X and @c wxSYS_ICON_Y; if no such icon
66 exists, returns the first icon in the bundle.
67
68 If size = wxDefaultSize, returns the icon with size @c wxSYS_ICON_X and
69 @c wxSYS_ICON_Y.
23324ae1 70 */
328f5751 71 wxIcon GetIcon(const wxSize& size) const;
427c415b
FM
72
73 /**
74 Same as @code GetIcon( wxSize( size, size ) ) @endcode.
75 */
a44f3b5a 76 wxIcon GetIcon(wxCoord size = wxDefaultCoord) const;
23324ae1
FM
77
78 /**
427c415b 79 Returns the icon with exactly the given size or ::wxNullIcon if this
23324ae1
FM
80 size is not available.
81 */
328f5751 82 wxIcon GetIconOfExactSize(const wxSize& size) const;
23324ae1
FM
83
84 /**
427c415b
FM
85 Returns @true if the bundle doesn't contain any icons, @false otherwise
86 (in which case a call to GetIcon() with default parameter should return
87 a valid icon).
23324ae1 88 */
328f5751 89 bool IsEmpty() const;
23324ae1
FM
90
91 /**
427c415b 92 Assignment operator, using @ref overview_refcount "reference counting".
23324ae1 93 */
43c48e1e 94 wxIconBundle& operator=(const wxIconBundle& ic);
23324ae1
FM
95
96 /**
97 Equality operator. This returns @true if two icon bundles are equal.
98 */
99 bool operator ==(const wxIconBundle& ic);
427c415b
FM
100
101 /**
102 Inequality operator. This returns true if two icon bundles are not equal.
103 */
104 bool operator !=(const wxIconBundle& ic);
23324ae1 105};
e54c96f1
FM
106
107
108/**
65874118 109 An empty wxIconBundle.
e54c96f1
FM
110*/
111wxIconBundle wxNullIconBundle;
112
113