From f7186899843324aa584437f367f7c01b2642bf01 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Apr 2007 23:04:15 +0000 Subject: [PATCH] added IsEmpty() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/iconbndl.tex | 16 ++++++++++++++++ include/wx/iconbndl.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/docs/latex/wx/iconbndl.tex b/docs/latex/wx/iconbndl.tex index e76082bb04..efd9defb84 100644 --- a/docs/latex/wx/iconbndl.tex +++ b/docs/latex/wx/iconbndl.tex @@ -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}} diff --git a/include/wx/iconbndl.h b/include/wx/iconbndl.h index 8a76d39eb5..8f8e3d1f5b 100644 --- a/include/wx/iconbndl.h +++ b/include/wx/iconbndl.h @@ -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; -- 2.45.2