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