cursor.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/x11/cursor.h
  3. // Purpose: wxCursor class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 17/09/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_CURSOR_H_
  11. #define _WX_CURSOR_H_
  12. #include "wx/gdiobj.h"
  13. #include "wx/gdicmn.h"
  14. #include "wx/colour.h"
  15. class WXDLLIMPEXP_FWD_CORE wxImage;
  16. //-----------------------------------------------------------------------------
  17. // wxCursor
  18. //-----------------------------------------------------------------------------
  19. class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
  20. {
  21. public:
  22. wxCursor();
  23. wxCursor(wxStockCursor id) { InitFromStock(id); }
  24. #if WXWIN_COMPATIBILITY_2_8
  25. wxCursor(int id) { InitFromStock((wxStockCursor)id); }
  26. #endif
  27. #if wxUSE_IMAGE
  28. wxCursor( const wxImage & image );
  29. #endif
  30. wxCursor(const wxString& name,
  31. wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
  32. int hotSpotX = 0, int hotSpotY = 0);
  33. virtual ~wxCursor();
  34. // implementation
  35. WXCursor GetCursor() const;
  36. protected:
  37. void InitFromStock(wxStockCursor);
  38. virtual wxGDIRefData *CreateGDIRefData() const;
  39. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  40. private:
  41. DECLARE_DYNAMIC_CLASS(wxCursor)
  42. };
  43. #endif // _WX_CURSOR_H_