cursor.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/cursor.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef __GTKCURSORH__
  9. #define __GTKCURSORH__
  10. #include "wx/gdiobj.h"
  11. #include "wx/gdicmn.h"
  12. #if wxUSE_IMAGE
  13. #include "wx/image.h"
  14. #endif
  15. //-----------------------------------------------------------------------------
  16. // wxCursor
  17. //-----------------------------------------------------------------------------
  18. class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
  19. {
  20. public:
  21. wxCursor();
  22. wxCursor(wxStockCursor id) { InitFromStock(id); }
  23. #if WXWIN_COMPATIBILITY_2_8
  24. wxCursor(int id) { InitFromStock((wxStockCursor)id); }
  25. #endif
  26. #if wxUSE_IMAGE
  27. wxCursor( const wxImage & image );
  28. #endif
  29. wxCursor( const char bits[], int width, int height,
  30. int hotSpotX=-1, int hotSpotY=-1,
  31. const char maskBits[] = NULL,
  32. const wxColour* fg = NULL, const wxColour* bg = NULL);
  33. /* WARNING: the following ctor is missing:
  34. wxCursor(const wxString& name,
  35. wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
  36. int hotSpotX = 0, int hotSpotY = 0);
  37. */
  38. virtual ~wxCursor();
  39. // implementation
  40. GdkCursor *GetCursor() const;
  41. protected:
  42. void InitFromStock(wxStockCursor);
  43. virtual wxGDIRefData *CreateGDIRefData() const;
  44. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  45. private:
  46. DECLARE_DYNAMIC_CLASS(wxCursor)
  47. };
  48. #endif // __GTKCURSORH__