cursor.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/cursor.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK_CURSOR_H_
  9. #define _WX_GTK_CURSOR_H_
  10. #include "wx/gdiobj.h"
  11. #include "wx/gdicmn.h"
  12. class WXDLLIMPEXP_FWD_CORE wxColour;
  13. class WXDLLIMPEXP_FWD_CORE wxImage;
  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. #if wxUSE_IMAGE
  26. wxCursor( const wxImage & image );
  27. wxCursor(const wxString& name,
  28. wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
  29. int hotSpotX = 0, int hotSpotY = 0);
  30. #endif
  31. wxCursor( const char bits[], int width, int height,
  32. int hotSpotX = -1, int hotSpotY = -1,
  33. const char maskBits[] = NULL,
  34. const wxColour* fg = NULL, const wxColour* bg = NULL);
  35. virtual ~wxCursor();
  36. // implementation
  37. GdkCursor *GetCursor() const;
  38. protected:
  39. void InitFromStock(wxStockCursor);
  40. #if wxUSE_IMAGE
  41. void InitFromImage(const wxImage& image);
  42. #endif
  43. virtual wxGDIRefData *CreateGDIRefData() const;
  44. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  45. private:
  46. DECLARE_DYNAMIC_CLASS(wxCursor)
  47. };
  48. #endif // _WX_GTK_CURSOR_H_