cursor.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/dfb/cursor.h
  3. // Purpose: wxCursor declaration
  4. // Author: Vaclav Slavik
  5. // Created: 2006-08-08
  6. // Copyright: (c) 2006 REA Elektronik GmbH
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_DFB_CURSOR_H_
  10. #define _WX_DFB_CURSOR_H_
  11. #include "wx/gdiobj.h"
  12. #include "wx/gdicmn.h"
  13. class WXDLLIMPEXP_FWD_CORE wxBitmap;
  14. //-----------------------------------------------------------------------------
  15. // wxCursor
  16. //-----------------------------------------------------------------------------
  17. class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
  18. {
  19. public:
  20. wxCursor() {}
  21. wxCursor(wxStockCursor id) { InitFromStock(id); }
  22. #if WXWIN_COMPATIBILITY_2_8
  23. wxCursor(int id) { InitFromStock((wxStockCursor)id); }
  24. #endif
  25. wxCursor(const wxString& name,
  26. wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
  27. int hotSpotX = 0, int hotSpotY = 0);
  28. // implementation
  29. wxBitmap GetBitmap() const;
  30. protected:
  31. void InitFromStock(wxStockCursor);
  32. // ref counting code
  33. virtual wxGDIRefData *CreateGDIRefData() const;
  34. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  35. DECLARE_DYNAMIC_CLASS(wxCursor)
  36. };
  37. #endif // _WX_DFB_CURSOR_H_