made GetResourceHandle() const everywhere, not just in wxBrush (fixes first part of the bug 612658)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -50,8 +50,8 @@ public:
|
|||||||
|
|
||||||
bool Ok() const { return m_refData != NULL; }
|
bool Ok() const { return m_refData != NULL; }
|
||||||
|
|
||||||
// create (if necessary) and return the HBRUSH for this brush
|
// return the HBRUSH for this brush
|
||||||
WXHBRUSH GetResourceHandle() const;
|
virtual WXHANDLE GetResourceHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxObjectRefData *CreateRefData() const;
|
virtual wxObjectRefData *CreateRefData() const;
|
||||||
|
@@ -180,7 +180,7 @@ public:
|
|||||||
|
|
||||||
// forward some of base class virtuals to wxGDIImageRefData
|
// forward some of base class virtuals to wxGDIImageRefData
|
||||||
bool FreeResource(bool force = FALSE);
|
bool FreeResource(bool force = FALSE);
|
||||||
virtual WXHANDLE GetResourceHandle();
|
virtual WXHANDLE GetResourceHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// create the data for the derived class here
|
// create the data for the derived class here
|
||||||
|
@@ -49,7 +49,7 @@ public:
|
|||||||
bool IsNull() const { return (m_refData == 0); }
|
bool IsNull() const { return (m_refData == 0); }
|
||||||
|
|
||||||
// Returns handle.
|
// Returns handle.
|
||||||
virtual WXHANDLE GetResourceHandle() { return 0; }
|
virtual WXHANDLE GetResourceHandle() const { return 0; }
|
||||||
|
|
||||||
virtual bool GetVisible() { return m_visible; }
|
virtual bool GetVisible() { return m_visible; }
|
||||||
virtual void SetVisible(bool v) { m_visible = v; }
|
virtual void SetVisible(bool v) { m_visible = v; }
|
||||||
|
@@ -89,7 +89,7 @@ public:
|
|||||||
// Internal
|
// Internal
|
||||||
bool RealizeResource();
|
bool RealizeResource();
|
||||||
bool FreeResource(bool force = FALSE);
|
bool FreeResource(bool force = FALSE);
|
||||||
WXHANDLE GetResourceHandle() ;
|
WXHANDLE GetResourceHandle() const;
|
||||||
bool IsFree() const;
|
bool IsFree() const;
|
||||||
void Unshare();
|
void Unshare();
|
||||||
};
|
};
|
||||||
|
@@ -293,11 +293,11 @@ wxBitmap *wxBrush::GetStipple() const
|
|||||||
return M_BRUSHDATA->GetStipple();
|
return M_BRUSHDATA->GetStipple();
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxBrush::GetResourceHandle() const
|
WXHANDLE wxBrush::GetResourceHandle() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), FALSE, _T("invalid brush") );
|
wxCHECK_MSG( Ok(), FALSE, _T("invalid brush") );
|
||||||
|
|
||||||
return (WXHBRUSH)M_BRUSHDATA->GetHBRUSH();
|
return (WXHANDLE)M_BRUSHDATA->GetHBRUSH();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -208,7 +208,7 @@ bool wxGDIImage::FreeResource(bool WXUNUSED(force))
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHANDLE wxGDIImage::GetResourceHandle()
|
WXHANDLE wxGDIImage::GetResourceHandle() const
|
||||||
{
|
{
|
||||||
return GetHandle();
|
return GetHandle();
|
||||||
}
|
}
|
||||||
|
@@ -278,7 +278,7 @@ bool wxPen::RealizeResource()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHANDLE wxPen::GetResourceHandle()
|
WXHANDLE wxPen::GetResourceHandle() const
|
||||||
{
|
{
|
||||||
if ( !M_PENDATA )
|
if ( !M_PENDATA )
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user