*** empty log message ***

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-10-10 18:36:14 +00:00
parent 89be8239db
commit fb9010ed40
18 changed files with 2958 additions and 269 deletions

View File

@@ -81,20 +81,6 @@ wxBrush::wxBrush(const wxBitmap& stipple)
wxTheBrushList->AddBrush(this);
}
void wxBrush::Unshare()
{
// Don't change shared data
if (!m_refData)
{
m_refData = new wxBrushRefData();
}
else
{
wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData);
UnRef();
m_refData = ref;
}
}
void wxBrush::SetColour(const wxColour& col)
{
@@ -138,3 +124,39 @@ bool wxBrush::RealizeResource()
return FALSE;
}
WXHANDLE wxBrush::GetResourceHandle(void)
{
return (WXHANDLE) M_BRUSHDATA->m_hBrush;
}
bool wxBrush::FreeResource(bool WXUNUSED(force))
{
if (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush != 0))
{
// TODO DeleteObject((HBRUSH) M_BRUSHDATA->m_hBrush);
M_BRUSHDATA->m_hBrush = 0;
return TRUE;
}
else return FALSE;
}
bool wxBrush::IsFree() const
{
return (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush == 0));
}
void wxBrush::Unshare()
{
// Don't change shared data
if (!m_refData)
{
m_refData = new wxBrushRefData();
}
else
{
wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData);
UnRef();
m_refData = ref;
}
}