git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55277
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifndef _WX_ICONBNDL_H_
#define _WX_ICONBNDL_H_
#ifndef _WX_ICONBNDL_H_
#define _WX_ICONBNDL_H_
-#include "wx/dynarray.h"
#include "wx/gdiobj.h"
// for wxSize
#include "wx/gdicmn.h"
#include "wx/icon.h"
#include "wx/gdiobj.h"
// for wxSize
#include "wx/gdicmn.h"
#include "wx/icon.h"
-class WXDLLIMPEXP_FWD_CORE wxIcon;
-class WXDLLIMPEXP_FWD_BASE wxString;
-
-class WXDLLIMPEXP_FWD_CORE wxIconBundle;
-
-WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray);
-
// this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE,
// if you need them, you have to load them manually and call
// wxIconCollection::AddIcon
// this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE,
// if you need them, you have to load them manually and call
// wxIconCollection::AddIcon
// initializes the bundle with a single icon
wxIconBundle(const wxIcon& icon);
// initializes the bundle with a single icon
wxIconBundle(const wxIcon& icon);
- // initializes the bundle from another icon bundle
- wxIconBundle(const wxIconBundle& icon);
-
- wxIconBundle& operator=(const wxIconBundle& ic)
- { if ( this != &ic) Ref(ic); return *this; }
-
+ // default copy ctor and assignment operator are OK
// adds all the icons contained in the file to the collection,
// if the collection already contains icons with the same
// adds all the icons contained in the file to the collection,
// if the collection already contains icons with the same
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/bitmap.h"
#include "wx/image.h"
#endif
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/bitmap.h"
#include "wx/image.h"
#endif
+WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray);
#include "wx/arrimpl.cpp"
#include "wx/arrimpl.cpp"
WX_DEFINE_OBJARRAY(wxIconArray)
IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject)
WX_DEFINE_OBJARRAY(wxIconArray)
IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject)
-#define M_ICONBUNDLEDATA ((wxIconBundleRefData *)m_refData)
+#define M_ICONBUNDLEDATA static_cast<wxIconBundleRefData*>(m_refData)
// ----------------------------------------------------------------------------
// wxIconBundleRefData
// ----------------------------------------------------------------------------
// wxIconBundleRefData
virtual bool IsOk() const { return !m_icons.empty(); }
virtual bool IsOk() const { return !m_icons.empty(); }
-
- friend class wxIconBundle;
};
// ============================================================================
};
// ============================================================================
// ============================================================================
wxIconBundle::wxIconBundle()
// ============================================================================
wxIconBundle::wxIconBundle()
-wxIconBundle::wxIconBundle(const wxIconBundle& icon)
- : wxGDIObject()
-{
- Ref(icon);
-}
-
wxIconBundle::wxIconBundle(const wxIcon& icon)
: wxGDIObject()
{
wxIconBundle::wxIconBundle(const wxIcon& icon)
: wxGDIObject()
{
return M_ICONBUNDLEDATA->m_icons[n];
}
return M_ICONBUNDLEDATA->m_icons[n];
}