Cursor.pkg 725 B

123456789101112131415161718192021222324252627282930
  1. $#include "Cursor.h"
  2. /// %Cursor shapes recognized by the UI subsystem.
  3. enum CursorShape
  4. {
  5. CS_NORMAL = 0,
  6. CS_RESIZEVERTICAL,
  7. CS_RESIZEDIAGONAL_TOPRIGHT,
  8. CS_RESIZEHORIZONTAL,
  9. CS_RESIZEDIAGONAL_TOPLEFT,
  10. CS_ACCEPTDROP,
  11. CS_REJECTDROP,
  12. CS_BUSY,
  13. CS_MAX_SHAPES
  14. };
  15. /// Mouse cursor %UI element.
  16. class Cursor : public BorderImage
  17. {
  18. public:
  19. /// Define a shape.
  20. void DefineShape(CursorShape shape, Image* image, const IntRect& imageRect, const IntVector2& hotSpot, bool osMouseVisible = false);
  21. /// Set current shape.
  22. void SetShape(CursorShape shape);
  23. /// Get current shape.
  24. CursorShape GetShape() const;
  25. };
  26. Cursor* NewCursor @ Cursor();