#include "wx/utils.h"
#include "wx/icon.h"
#include "wx/gdicmn.h"
+ #include "wx/image.h"
#endif
#include "wx/x11/private.h"
// wxCursor
//-----------------------------------------------------------------------------
-class wxCursorRefData: public wxObjectRefData
+class wxCursorRefData: public wxGDIRefData
{
public:
WXCursor m_cursor;
WXDisplay *m_display;
+
+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()
}
-wxCursor::wxCursor( int cursorId )
+void wxCursor::InitFromStock( wxStockCursor cursorId )
{
m_refData = new wxCursorRefData();
#endif
}
-wxCursor::wxCursor(const char bits[], int width, int height,
- int hotSpotX, int hotSpotY,
- const char maskBits[], wxColour *fg, wxColour *bg)
+wxCursor::wxCursor(const wxString& WXUNUSED(name),
+ wxBitmapType WXUNUSED(type),
+ int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY))
{
- wxFAIL_MSG( wxT("wxCursor creation from bits not yet implemented") );
+ wxFAIL_MSG( wxT("wxCursor creation from file not yet implemented") );
}
#if wxUSE_IMAGE
-wxCursor::wxCursor( const wxImage & image )
+wxCursor::wxCursor( const wxImage & WXUNUSED(image) )
{
wxFAIL_MSG( wxT("wxCursor creation from wxImage not yet implemented") );
}
{
}
-bool wxCursor::IsOk() const
+wxGDIRefData *wxCursor::CreateGDIRefData() const
{
- return (m_refData != NULL);
+ return new wxCursorRefData;
+}
+
+wxGDIRefData *
+wxCursor::CloneGDIRefData(const wxGDIRefData * WXUNUSED(data)) const
+{
+ wxFAIL_MSG( wxS("Cloning cursors is not implemented in wxX11.") );
+
+ return new wxCursorRefData;
}
WXCursor wxCursor::GetCursor() const