// wxCursor
//-----------------------------------------------------------------------------
-class wxCursorRefData: public wxObjectRefData
+class wxCursorRefData : public wxGDIRefData
{
- public:
-
+public:
wxCursorRefData();
virtual ~wxCursorRefData();
GdkCursor *m_cursor;
+
+private:
+ // There is no way to copy m_cursor so we can't implement a copy ctor
+ // properly.
+ wxDECLARE_NO_COPY_CLASS(wxCursorRefData);
};
wxCursorRefData::wxCursorRefData()
{
- m_cursor = (GdkCursor *) NULL;
+ m_cursor = NULL;
}
wxCursorRefData::~wxCursorRefData()
}
-wxCursor::wxCursor( int cursorId )
+void wxCursor::InitFromStock( wxStockCursor cursorId )
{
m_refData = new wxCursorRefData();
{
}
-bool wxCursor::operator == ( const wxCursor& cursor ) const
+GdkCursor *wxCursor::GetCursor() const
{
- return m_refData == cursor.m_refData;
+ return M_CURSORDATA->m_cursor;
}
-bool wxCursor::operator != ( const wxCursor& cursor ) const
+wxGDIRefData *wxCursor::CreateGDIRefData() const
{
- return m_refData != cursor.m_refData;
+ return new wxCursorRefData;
}
-bool wxCursor::IsOk() const
+wxGDIRefData *
+wxCursor::CloneGDIRefData(const wxGDIRefData * WXUNUSED(data)) const
{
- return (m_refData != NULL);
-}
+ wxFAIL_MSG( wxS("Cloning cursors is not implemented in wxGTK.") );
-GdkCursor *wxCursor::GetCursor() const
-{
- return M_CURSORDATA->m_cursor;
+ return new wxCursorRefData;
}
//-----------------------------------------------------------------------------
if (gs_busyCount++ > 0)
return;
- wxASSERT_MSG( !gs_savedCursor.Ok(),
+ wxASSERT_MSG( !gs_savedCursor.IsOk(),
wxT("forgot to call wxEndBusyCursor, will leak memory") );
gs_savedCursor = g_globalCursor;