X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..61a0b9059a22e0f8b16e4396d0f8cbf49f31998f:/include/wx/mac/classic/cursor.h diff --git a/include/wx/mac/classic/cursor.h b/include/wx/mac/classic/cursor.h index c8414a4ee0..c4c0546769 100644 --- a/include/wx/mac/classic/cursor.h +++ b/include/wx/mac/classic/cursor.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: cursor.h +// Name: wx/mac/classic/cursor.h // Purpose: wxCursor class // Author: Stefan Csomor // Modified by: @@ -12,21 +12,17 @@ #ifndef _WX_CURSOR_H_ #define _WX_CURSOR_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "cursor.h" -#endif - #include "wx/bitmap.h" class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData { DECLARE_NO_COPY_CLASS(wxCursorRefData) - + friend class WXDLLEXPORT wxBitmap; friend class WXDLLEXPORT wxCursor; public: wxCursorRefData(); - ~wxCursorRefData(); + virtual ~wxCursorRefData(); protected: WXHCURSOR m_hCursor; @@ -47,11 +43,6 @@ class WXDLLEXPORT wxCursor: public wxBitmap public: wxCursor(); - // Copy constructors - wxCursor(const wxCursor& cursor) - : wxBitmap() - { Ref(cursor); } - wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, const char maskBits[] = NULL); @@ -62,14 +53,14 @@ public: int hotSpotX = 0, int hotSpotY = 0); wxCursor(int cursor_type); - ~wxCursor(); + virtual ~wxCursor(); - bool CreateFromXpm(const char **bits) ; - virtual bool Ok() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; } + bool CreateFromXpm(const char **bits) ; + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; } - inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; } - inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; } - inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; } + inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; } + inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; } void MacInstall() const ;