cursor.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/cursor.h
  3. // Purpose: wxCursor class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_CURSOR_H_
  11. #define _WX_CURSOR_H_
  12. #include "wx/msw/gdiimage.h"
  13. class WXDLLIMPEXP_FWD_CORE wxImage;
  14. // Cursor
  15. class WXDLLIMPEXP_CORE wxCursor : public wxGDIImage
  16. {
  17. public:
  18. // constructors
  19. wxCursor();
  20. wxCursor(const wxImage& image);
  21. wxCursor(const wxString& name,
  22. wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
  23. int hotSpotX = 0, int hotSpotY = 0);
  24. wxCursor(wxStockCursor id) { InitFromStock(id); }
  25. #if WXWIN_COMPATIBILITY_2_8
  26. wxCursor(int id) { InitFromStock((wxStockCursor)id); }
  27. #endif
  28. virtual ~wxCursor();
  29. // implementation only
  30. void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
  31. WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
  32. protected:
  33. void InitFromStock(wxStockCursor);
  34. virtual wxGDIImageRefData *CreateData() const;
  35. private:
  36. DECLARE_DYNAMIC_CLASS(wxCursor)
  37. };
  38. #endif
  39. // _WX_CURSOR_H_