Cursor.pkg 810 B

123456789101112131415161718192021222324252627282930313233
  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. /// Construct.
  20. Cursor(Context* context);
  21. /// Destruct.
  22. virtual ~Cursor();
  23. /// Define a shape.
  24. void DefineShape(CursorShape shape, Image* image, const IntRect& imageRect, const IntVector2& hotSpot, bool osMouseVisible = false);
  25. /// Set current shape.
  26. void SetShape(CursorShape shape);
  27. /// Get current shape.
  28. CursorShape GetShape() const { return shape_; }
  29. };