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; }
|
||||
|
||||
// create (if necessary) and return the HBRUSH for this brush
|
||||
WXHBRUSH GetResourceHandle() const;
|
||||
// return the HBRUSH for this brush
|
||||
virtual WXHANDLE GetResourceHandle() const;
|
||||
|
||||
protected:
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
|
@@ -180,7 +180,7 @@ public:
|
||||
|
||||
// forward some of base class virtuals to wxGDIImageRefData
|
||||
bool FreeResource(bool force = FALSE);
|
||||
virtual WXHANDLE GetResourceHandle();
|
||||
virtual WXHANDLE GetResourceHandle() const;
|
||||
|
||||
protected:
|
||||
// create the data for the derived class here
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
bool IsNull() const { return (m_refData == 0); }
|
||||
|
||||
// Returns handle.
|
||||
virtual WXHANDLE GetResourceHandle() { return 0; }
|
||||
virtual WXHANDLE GetResourceHandle() const { return 0; }
|
||||
|
||||
virtual bool GetVisible() { return m_visible; }
|
||||
virtual void SetVisible(bool v) { m_visible = v; }
|
||||
|
@@ -89,7 +89,7 @@ public:
|
||||
// Internal
|
||||
bool RealizeResource();
|
||||
bool FreeResource(bool force = FALSE);
|
||||
WXHANDLE GetResourceHandle() ;
|
||||
WXHANDLE GetResourceHandle() const;
|
||||
bool IsFree() const;
|
||||
void Unshare();
|
||||
};
|
||||
|
@@ -293,11 +293,11 @@ wxBitmap *wxBrush::GetStipple() const
|
||||
return M_BRUSHDATA->GetStipple();
|
||||
}
|
||||
|
||||
WXHBRUSH wxBrush::GetResourceHandle() const
|
||||
WXHANDLE wxBrush::GetResourceHandle() const
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
WXHANDLE wxGDIImage::GetResourceHandle()
|
||||
WXHANDLE wxGDIImage::GetResourceHandle() const
|
||||
{
|
||||
return GetHandle();
|
||||
}
|
||||
|
@@ -278,7 +278,7 @@ bool wxPen::RealizeResource()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
WXHANDLE wxPen::GetResourceHandle()
|
||||
WXHANDLE wxPen::GetResourceHandle() const
|
||||
{
|
||||
if ( !M_PENDATA )
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user