Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added
wxGDIObject::Create/CloneGDIRefData() and implemented them for (almost) all ports git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,6 +51,8 @@ class WXDLLEXPORT wxIconBundleRefData : public wxGDIRefData
|
||||
public:
|
||||
// default and copy ctors and assignment operators are ok
|
||||
|
||||
virtual bool IsOk() const { return !m_icons.empty(); }
|
||||
|
||||
protected:
|
||||
wxIconArray m_icons;
|
||||
|
||||
@@ -84,12 +86,12 @@ wxIconBundle::wxIconBundle(const wxIcon& icon)
|
||||
AddIcon(icon);
|
||||
}
|
||||
|
||||
wxObjectRefData *wxIconBundle::CreateRefData() const
|
||||
wxGDIRefData *wxIconBundle::CreateGDIRefData() const
|
||||
{
|
||||
return new wxIconBundleRefData;
|
||||
}
|
||||
|
||||
wxObjectRefData *wxIconBundle::CloneRefData(const wxObjectRefData *data) const
|
||||
wxGDIRefData *wxIconBundle::CloneGDIRefData(const wxGDIRefData *data) const
|
||||
{
|
||||
return new wxIconBundleRefData(*wx_static_cast(const wxIconBundleRefData *, data));
|
||||
}
|
||||
@@ -99,11 +101,6 @@ void wxIconBundle::DeleteIcons()
|
||||
UnRef();
|
||||
}
|
||||
|
||||
bool wxIconBundle::IsOk() const
|
||||
{
|
||||
return M_ICONBUNDLEDATA && !M_ICONBUNDLEDATA->m_icons.IsEmpty();
|
||||
}
|
||||
|
||||
void wxIconBundle::AddIcon(const wxString& file, long type)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
|
Reference in New Issue
Block a user