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:
parent
05e0b047d8
commit
24af522c43
@ -12,19 +12,11 @@
|
||||
#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"
|
||||
|
||||
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
|
||||
@ -40,12 +32,7 @@ public:
|
||||
// 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
|
||||
|
@ -8,14 +8,6 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
@ -27,20 +19,19 @@
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/settings.h"
|
||||
#include "wx/icon.h"
|
||||
#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"
|
||||
|
||||
WX_DEFINE_OBJARRAY(wxIconArray)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject)
|
||||
|
||||
#define M_ICONBUNDLEDATA ((wxIconBundleRefData *)m_refData)
|
||||
#define M_ICONBUNDLEDATA static_cast<wxIconBundleRefData*>(m_refData)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxIconBundleRefData
|
||||
@ -53,10 +44,7 @@ public:
|
||||
|
||||
virtual bool IsOk() const { return !m_icons.empty(); }
|
||||
|
||||
protected:
|
||||
wxIconArray m_icons;
|
||||
|
||||
friend class wxIconBundle;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
@ -64,7 +52,6 @@ protected:
|
||||
// ============================================================================
|
||||
|
||||
wxIconBundle::wxIconBundle()
|
||||
: wxGDIObject()
|
||||
{
|
||||
}
|
||||
|
||||
@ -74,12 +61,6 @@ wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type)
|
||||
AddIcon(file, type);
|
||||
}
|
||||
|
||||
wxIconBundle::wxIconBundle(const wxIconBundle& icon)
|
||||
: wxGDIObject()
|
||||
{
|
||||
Ref(icon);
|
||||
}
|
||||
|
||||
wxIconBundle::wxIconBundle(const wxIcon& icon)
|
||||
: wxGDIObject()
|
||||
{
|
||||
@ -237,5 +218,3 @@ wxIcon wxIconBundle::GetIconByIndex(size_t n) const
|
||||
|
||||
return M_ICONBUNDLEDATA->m_icons[n];
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user