| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- $#include "Cursor.h"
- /// %Cursor shapes recognized by the UI subsystem.
- enum CursorShape
- {
- CS_NORMAL = 0,
- CS_RESIZEVERTICAL,
- CS_RESIZEDIAGONAL_TOPRIGHT,
- CS_RESIZEHORIZONTAL,
- CS_RESIZEDIAGONAL_TOPLEFT,
- CS_ACCEPTDROP,
- CS_REJECTDROP,
- CS_BUSY,
- CS_MAX_SHAPES
- };
- /// Mouse cursor %UI element.
- class Cursor : public BorderImage
- {
- public:
- /// Construct.
- Cursor(Context* context);
- /// Destruct.
- virtual ~Cursor();
-
- /// Define a shape.
- void DefineShape(CursorShape shape, Image* image, const IntRect& imageRect, const IntVector2& hotSpot, bool osMouseVisible = false);
- /// Set current shape.
- void SetShape(CursorShape shape);
-
- /// Get current shape.
- CursorShape GetShape() const { return shape_; }
- };
- /// Create sprite without lua GC.
- Cursor* NewCursor(Context* context);
- /// Delete sprite.
- void Delete(Cursor* cursor);
- ${
- static Cursor* NewCursor(Context* context)
- {
- return new Cursor(context);
- }
- static void Delete(Cursor* cursor)
- {
- delete cursor;
- }
- $}
|