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:
Vadim Zeitlin
2002-09-21 23:01:25 +00:00
parent e2531c0c29
commit 833adb3bb1
7 changed files with 9 additions and 9 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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; }

View File

@@ -89,7 +89,7 @@ public:
// Internal
bool RealizeResource();
bool FreeResource(bool force = FALSE);
WXHANDLE GetResourceHandle() ;
WXHANDLE GetResourceHandle() const;
bool IsFree() const;
void Unshare();
};

View File

@@ -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();
}
// ----------------------------------------------------------------------------

View File

@@ -208,7 +208,7 @@ bool wxGDIImage::FreeResource(bool WXUNUSED(force))
return TRUE;
}
WXHANDLE wxGDIImage::GetResourceHandle()
WXHANDLE wxGDIImage::GetResourceHandle() const
{
return GetHandle();
}

View File

@@ -278,7 +278,7 @@ bool wxPen::RealizeResource()
return FALSE;
}
WXHANDLE wxPen::GetResourceHandle()
WXHANDLE wxPen::GetResourceHandle() const
{
if ( !M_PENDATA )
return 0;