cursor.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/cursor.h
  3. // Purpose: wxCursor class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_CURSOR_H_
  11. #define _WX_CURSOR_H_
  12. #include "wx/bitmap.h"
  13. // Cursor
  14. class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
  15. {
  16. public:
  17. wxCursor();
  18. wxCursor(const wxImage & image) ;
  19. wxCursor(const wxString& name,
  20. wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
  21. int hotSpotX = 0, int hotSpotY = 0);
  22. wxCursor(wxStockCursor id) { InitFromStock(id); }
  23. #if WXWIN_COMPATIBILITY_2_8
  24. wxCursor(int id) { InitFromStock((wxStockCursor)id); }
  25. #endif
  26. virtual ~wxCursor();
  27. void MacInstall() const ;
  28. void SetHCURSOR(WXHCURSOR cursor);
  29. WXHCURSOR GetHCURSOR() const;
  30. protected:
  31. virtual wxGDIRefData *CreateGDIRefData() const;
  32. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  33. private:
  34. void InitFromStock(wxStockCursor);
  35. void CreateFromImage(const wxImage & image) ;
  36. DECLARE_DYNAMIC_CLASS(wxCursor)
  37. };
  38. extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor);
  39. #endif // _WX_CURSOR_H_