blob: 889fdcdef1c6874bfc9cd4ec397c7d3102786aa5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include <SharedGraphics/GraphicsBitmap.h>
enum class WSStandardCursor {
None = 0,
Arrow,
IBeam,
ResizeHorizontal,
ResizeVertical,
ResizeDiagonalTLBR,
ResizeDiagonalBLTR,
};
class WSCursor : public Retainable<WSCursor> {
public:
static Retained<WSCursor> create(Retained<GraphicsBitmap>&&, const Point& hotspot);
static Retained<WSCursor> create(Retained<GraphicsBitmap>&&);
static RetainPtr<WSCursor> create(WSStandardCursor);
~WSCursor();
Point hotspot() const { return m_hotspot; }
const GraphicsBitmap& bitmap() const { return *m_bitmap; }
Rect rect() const { return m_bitmap->rect(); }
Size size() const { return m_bitmap->size(); }
private:
WSCursor(Retained<GraphicsBitmap>&&, const Point&);
RetainPtr<GraphicsBitmap> m_bitmap;
Point m_hotspot;
};
|