move wxIconArray declaration out of header, remove unneccessary copy ctor and assignment operator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,19 +12,11 @@
|
|||||||
#ifndef _WX_ICONBNDL_H_
|
#ifndef _WX_ICONBNDL_H_
|
||||||
#define _WX_ICONBNDL_H_
|
#define _WX_ICONBNDL_H_
|
||||||
|
|
||||||
#include "wx/dynarray.h"
|
|
||||||
#include "wx/gdiobj.h"
|
#include "wx/gdiobj.h"
|
||||||
// for wxSize
|
// for wxSize
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
#include "wx/icon.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,
|
// this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE,
|
||||||
// if you need them, you have to load them manually and call
|
// if you need them, you have to load them manually and call
|
||||||
// wxIconCollection::AddIcon
|
// wxIconCollection::AddIcon
|
||||||
@@ -40,12 +32,7 @@ public:
|
|||||||
// initializes the bundle with a single icon
|
// initializes the bundle with a single icon
|
||||||
wxIconBundle(const wxIcon& icon);
|
wxIconBundle(const wxIcon& icon);
|
||||||
|
|
||||||
// initializes the bundle from another icon bundle
|
// default copy ctor and assignment operator are OK
|
||||||
wxIconBundle(const wxIconBundle& icon);
|
|
||||||
|
|
||||||
wxIconBundle& operator=(const wxIconBundle& ic)
|
|
||||||
{ if ( this != &ic) Ref(ic); return *this; }
|
|
||||||
|
|
||||||
|
|
||||||
// adds all the icons contained in the file to the collection,
|
// adds all the icons contained in the file to the collection,
|
||||||
// if the collection already contains icons with the same
|
// if the collection already contains icons with the same
|
||||||
|
@@ -8,14 +8,6 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// ============================================================================
|
|
||||||
// declarations
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// headers
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
@@ -27,20 +19,19 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/icon.h"
|
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray);
|
||||||
#include "wx/arrimpl.cpp"
|
#include "wx/arrimpl.cpp"
|
||||||
|
|
||||||
WX_DEFINE_OBJARRAY(wxIconArray)
|
WX_DEFINE_OBJARRAY(wxIconArray)
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject)
|
||||||
|
|
||||||
#define M_ICONBUNDLEDATA ((wxIconBundleRefData *)m_refData)
|
#define M_ICONBUNDLEDATA static_cast<wxIconBundleRefData*>(m_refData)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxIconBundleRefData
|
// wxIconBundleRefData
|
||||||
@@ -53,10 +44,7 @@ public:
|
|||||||
|
|
||||||
virtual bool IsOk() const { return !m_icons.empty(); }
|
virtual bool IsOk() const { return !m_icons.empty(); }
|
||||||
|
|
||||||
protected:
|
|
||||||
wxIconArray m_icons;
|
wxIconArray m_icons;
|
||||||
|
|
||||||
friend class wxIconBundle;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -64,7 +52,6 @@ protected:
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
wxIconBundle::wxIconBundle()
|
wxIconBundle::wxIconBundle()
|
||||||
: wxGDIObject()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,12 +61,6 @@ wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type)
|
|||||||
AddIcon(file, type);
|
AddIcon(file, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIconBundle::wxIconBundle(const wxIconBundle& icon)
|
|
||||||
: wxGDIObject()
|
|
||||||
{
|
|
||||||
Ref(icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxIconBundle::wxIconBundle(const wxIcon& icon)
|
wxIconBundle::wxIconBundle(const wxIcon& icon)
|
||||||
: wxGDIObject()
|
: wxGDIObject()
|
||||||
{
|
{
|
||||||
@@ -237,5 +218,3 @@ wxIcon wxIconBundle::GetIconByIndex(size_t n) const
|
|||||||
|
|
||||||
return M_ICONBUNDLEDATA->m_icons[n];
|
return M_ICONBUNDLEDATA->m_icons[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user