]> git.saurik.com Git - wxWidgets.git/commitdiff
added IsEmpty()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Apr 2007 23:04:15 +0000 (23:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Apr 2007 23:04:15 +0000 (23:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/iconbndl.tex
include/wx/iconbndl.h

index e76082bb04cf246232786ebf9489bedba5662420..efd9defb8456d85e0945b9b3de7bc310dd095ff3 100644 (file)
@@ -15,6 +15,7 @@ see also \helpref{wxDialog::SetIcons}{wxdialogseticons} and
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
+
 \membersection{wxIconBundle::wxIconBundle}\label{wxiconbundlewxiconbundle}
 
 \func{}{wxIconBundle}{\void}
@@ -33,12 +34,14 @@ Initializes the bundle with a single icon.
 
 Copy constructor.
 
+
 \membersection{wxIconBundle::\destruct{wxIconBundle}}\label{wxiconbundledtor}
 
 \func{}{\destruct{wxIconBundle}}{\void}
 
 Destructor.
 
+
 \membersection{wxIconBundle::AddIcon}\label{wxiconbundleaddicon}
 
 \func{void}{AddIcon}{\param{const wxString\& }{file}, \param{long }{type}}
@@ -53,6 +56,7 @@ 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.
 
+
 \membersection{wxIconBundle::GetIcon}\label{wxiconbundlegeticon}
 
 \constfunc{wxIcon}{GetIcon}{\param{const wxSize\& }{size}}
@@ -67,18 +71,30 @@ returns the icon with size wxSYS\_ICON\_X/wxSYS\_ICON\_Y.
 
 Same as GetIcon( wxSize( size, size ) ).
 
+
+\membersection{wxIconBundle::IsEmpty}\label{wxiconbundleisempty}
+
+\constfunc{bool}{IsEmpty}{\void}
+
+Returns \true if the bundle doesn't contain any icons, \false otherwise (in
+which case a call to \helpref{GetIcon()}{wxiconbundlegeticon} with default
+parameter should return a valid icon).
+
+
 \membersection{wxIconBundle::operator $=$}\label{wxiconbundleoperatorassign}
 
 \func{wxIconBundle\&}{operator $=$}{\param{const wxIconBundle\& }{ic}}
 
 Assignment operator, using \helpref{reference counting}{trefcount}.
 
+
 \membersection{wxIconBundle::operator $==$}\label{wxiconbundleoperatorequals}
 
 \func{bool}{operator $==$}{\param{const wxIconBundle\& }{ic}}
 
 Equality operator. This returns \true if two icon bundles are equal.
 
+
 \membersection{wxIconBundle::operator $!=$}\label{wxiconbundleoperatornotequals}
 
 \func{bool}{operator $!=$}{\param{const wxIconBundle\& }{ic}}
index 8a76d39eb5fa28b3dbf6fa1f0d86d80db700205b..8f8e3d1f5b98afff50be4a3925ff2e2fb60139ab 100644 (file)
@@ -78,6 +78,9 @@ public:
     // return the icon at index (must be < GetIconCount())
     wxIcon GetIconByIndex(size_t n) const;
 
+    // check if we have any icons at all
+    bool IsEmpty() const { return GetIconCount() == 0; }
+
 protected:
     virtual wxObjectRefData *CreateRefData() const;
     virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;