Photon microGUI widgets library
0.6.0
Cursor.h
1
#ifndef PHWIDGETS_CURSOR_H
2
#define PHWIDGETS_CURSOR_H
3
4
#include <photon/PhCursor.h>
5
#include <photon/PhT.h>
6
7
namespace
PhWidgets
8
{
10
struct
Cursors
11
{
12
enum
eCursors
13
{
14
None
= Ph_CURSOR_NONE,
15
Inherit
= Ph_CURSOR_INHERIT,
16
Pointer
= Ph_CURSOR_POINTER,
17
BigPointer
= Ph_CURSOR_BIG_POINTER,
18
Move
= Ph_CURSOR_MOVE,
19
Crosshair
= Ph_CURSOR_CROSSHAIR,
20
Clock
= Ph_CURSOR_CLOCK,
21
Wait
= Ph_CURSOR_WAIT,
22
Noinput
= Ph_CURSOR_NOINPUT,
23
Dont
= Ph_CURSOR_DONT,
24
Finger
= Ph_CURSOR_FINGER,
25
Insert
= Ph_CURSOR_INSERT,
26
DragVertical
= Ph_CURSOR_DRAG_VERTICAL,
27
DragTop
= Ph_CURSOR_DRAG_TOP,
28
DragBottom
= Ph_CURSOR_DRAG_BOTTOM,
29
DragHorizontal
= Ph_CURSOR_DRAG_HORIZONTAL,
30
DragLeft
= Ph_CURSOR_DRAG_LEFT,
31
DragRight
= Ph_CURSOR_DRAG_RIGHT,
32
DragBackDiag
= Ph_CURSOR_DRAG_BACKDIAG,
33
DragTL
= Ph_CURSOR_DRAG_TL,
34
DragBR
= Ph_CURSOR_DRAG_BR,
35
DragForeDiag
= Ph_CURSOR_DRAG_FOREDIAG,
36
DragTR
= Ph_CURSOR_DRAG_TR,
37
DragBL
= Ph_CURSOR_DRAG_BL,
38
LongWait
= Ph_CURSOR_LONG_WAIT,
39
QuestionPoint
= Ph_CURSOR_QUESTION_POINT,
40
Paste
= Ph_CURSOR_PASTE,
41
42
// Visual Studio styles:
43
AppStarting =
LongWait
,
// The cursor that appears when an application starts.
44
Default
= Ph_CURSOR_POINTER,
45
Arrow
= Ph_CURSOR_POINTER,
46
Cross
=
Crosshair
,
47
Hand
=
Finger
,
48
Help
=
QuestionPoint
,
49
Split
=
DragHorizontal
,
50
IBeam
=
Insert
,
51
No
=
Dont
,
52
NoMove2D
=
Move
,
53
SizeAll
=
Move
,
54
SizeNESW
=
DragForeDiag
,
55
SizeNS
=
DragVertical
,
56
SizeNWSE
=
DragBackDiag
,
57
SizeWE
=
DragHorizontal
,
58
VSplit
=
DragVertical
,
59
WaitCursor
=
Wait
60
};
61
};
62
64
class
Cursor
65
{
66
public
:
67
68
typedef
PhWidgets::Cursors
Cursors
;
69
71
75
Cursor
(
Cursors::eCursors
cursor =
Cursors::Default
);
76
78
82
Cursor
(
const
PhCursorDef_t
&def);
83
85
89
Cursor
(
const
Cursor
&other);
90
92
~Cursor
();
93
95
99
Cursor
&
operator=
(
const
Cursor
&other);
100
102
106
bool
operator==
(
const
Cursor
&other)
const
;
107
109
113
bool
operator!=
(
const
Cursor
&other)
const
;
114
116
120
bool
operator<
(
const
Cursor
&other)
const
;
121
122
operator
const
PhCursorDef_t
*()
const
;
123
124
private
:
125
PhCursorDef_t
*_def;
126
Cursors::eCursors
_cursor;
127
128
friend
class
Widget
;
129
};
130
131
bool
operator==(
const
Cursors::eCursors
&lhs,
const
Cursor
&rhs);
132
bool
operator!=(
const
Cursors::eCursors
&lhs,
const
Cursor
&rhs);
133
bool
operator<(
const
Cursors::eCursors
&lhs,
const
Cursor
&rhs);
134
}
// namespace PhWidgets
135
136
137
#endif
// PHWIDGETS_CURSOR_H
PhWidgets::Cursor
Represents the image used to paint the mouse pointer.
Definition:
Cursor.h:65
PhWidgets::Cursor::~Cursor
~Cursor()
(destructor)
PhWidgets::Cursor::Cursor
Cursor(const PhCursorDef_t &def)
(constructor)
PhWidgets::Cursor::operator<
bool operator<(const Cursor &other) const
Compares Cursors.
PhWidgets::Cursor::Cursor
Cursor(Cursors::eCursors cursor=Cursors::Default)
(constructor)
PhWidgets::Cursor::operator!=
bool operator!=(const Cursor &other) const
Compares Cursors.
PhWidgets::Cursor::Cursor
Cursor(const Cursor &other)
(copy constructor)
PhWidgets::Cursor::operator==
bool operator==(const Cursor &other) const
Compares Cursors.
PhWidgets::Cursor::operator=
Cursor & operator=(const Cursor &other)
Assigns value in Cursor.
PhWidgets::Widget
Superclass for all widgets.
Definition:
Widget.h:110
PhWidgets
The main namespace for all widgets.
Definition:
Basic.h:11
PhCursorDef_t
PhWidgets::Cursors
Provides a collection of standard cursors for use by a Photon microGUI application.
Definition:
Cursor.h:11
PhWidgets::Cursors::eCursors
eCursors
Definition:
Cursor.h:13
PhWidgets::Cursors::SizeAll
@ SizeAll
The four-headed sizing cursor, which consists of four joined arrows that point north,...
Definition:
Cursor.h:53
PhWidgets::Cursors::NoMove2D
@ NoMove2D
The cursor that appears during wheel operations when the mouse is not moving, but the window can be s...
Definition:
Cursor.h:52
PhWidgets::Cursors::QuestionPoint
@ QuestionPoint
The question mark cursor.
Definition:
Cursor.h:39
PhWidgets::Cursors::Noinput
@ Noinput
The cursor that indicates that the input is disabled.
Definition:
Cursor.h:22
PhWidgets::Cursors::DragTL
@ DragTL
The two-headed diagonal (northwest/southeast) sizing cursor.
Definition:
Cursor.h:33
PhWidgets::Cursors::BigPointer
@ BigPointer
The big arrow cursor.
Definition:
Cursor.h:17
PhWidgets::Cursors::Inherit
@ Inherit
Inherit cursor not from the class hierarchy, but from the family hierarchy.
Definition:
Cursor.h:15
PhWidgets::Cursors::DragForeDiag
@ DragForeDiag
The two-headed diagonal (northeast/southwest) sizing cursor.
Definition:
Cursor.h:35
PhWidgets::Cursors::Default
@ Default
The default cursor, which is usually an arrow cursor.
Definition:
Cursor.h:44
PhWidgets::Cursors::DragVertical
@ DragVertical
The two-headed vertical (north/south) sizing cursor.
Definition:
Cursor.h:26
PhWidgets::Cursors::SizeNESW
@ SizeNESW
The two-headed diagonal (northeast/southwest) sizing cursor.
Definition:
Cursor.h:54
PhWidgets::Cursors::DragBackDiag
@ DragBackDiag
The two-headed diagonal (northwest/southeast) sizing cursor.
Definition:
Cursor.h:32
PhWidgets::Cursors::Finger
@ Finger
The finger cursor, typically used when hovering over a Web link.
Definition:
Cursor.h:24
PhWidgets::Cursors::Move
@ Move
The four-headed sizing cursor, which consists of four joined arrows that point north,...
Definition:
Cursor.h:18
PhWidgets::Cursors::Crosshair
@ Crosshair
The crosshair cursor.
Definition:
Cursor.h:19
PhWidgets::Cursors::Hand
@ Hand
The hand cursor, typically used when hovering over a Web link.
Definition:
Cursor.h:47
PhWidgets::Cursors::IBeam
@ IBeam
The I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked.
Definition:
Cursor.h:50
PhWidgets::Cursors::LongWait
@ LongWait
The hour glass shaped cursor.
Definition:
Cursor.h:38
PhWidgets::Cursors::Paste
@ Paste
The copy-paste cursor.
Definition:
Cursor.h:40
PhWidgets::Cursors::None
@ None
No cursor at all.
Definition:
Cursor.h:14
PhWidgets::Cursors::Split
@ Split
The cursor that appears when the mouse is positioned over a horizontal splitter bar.
Definition:
Cursor.h:49
PhWidgets::Cursors::Pointer
@ Pointer
The arrow cursor.
Definition:
Cursor.h:16
PhWidgets::Cursors::Cross
@ Cross
The crosshair cursor.
Definition:
Cursor.h:46
PhWidgets::Cursors::DragBottom
@ DragBottom
The two-headed vertical (north/south) sizing cursor.
Definition:
Cursor.h:28
PhWidgets::Cursors::DragTop
@ DragTop
The two-headed vertical (north/south) sizing cursor.
Definition:
Cursor.h:27
PhWidgets::Cursors::DragBL
@ DragBL
The two-headed diagonal (northeast/southwest) sizing cursor.
Definition:
Cursor.h:37
PhWidgets::Cursors::Clock
@ Clock
The clock cursor.
Definition:
Cursor.h:20
PhWidgets::Cursors::Arrow
@ Arrow
The arrow cursor.
Definition:
Cursor.h:45
PhWidgets::Cursors::DragBR
@ DragBR
The two-headed diagonal (northwest/southeast) sizing cursor.
Definition:
Cursor.h:34
PhWidgets::Cursors::Wait
@ Wait
The wait cursor, typically an clock shape.
Definition:
Cursor.h:21
PhWidgets::Cursors::WaitCursor
@ WaitCursor
The wait cursor, typically an hourglass shape.
Definition:
Cursor.h:59
PhWidgets::Cursors::VSplit
@ VSplit
The cursor that appears when the mouse is positioned over a vertical splitter bar.
Definition:
Cursor.h:58
PhWidgets::Cursors::DragTR
@ DragTR
The two-headed diagonal (northeast/southwest) sizing cursor.
Definition:
Cursor.h:36
PhWidgets::Cursors::SizeNWSE
@ SizeNWSE
The two-headed diagonal (northwest/southeast) sizing cursor.
Definition:
Cursor.h:56
PhWidgets::Cursors::Help
@ Help
The Help cursor, which is a question mark.
Definition:
Cursor.h:48
PhWidgets::Cursors::DragLeft
@ DragLeft
The two-headed horizontal (west/east) sizing cursor.
Definition:
Cursor.h:30
PhWidgets::Cursors::SizeNS
@ SizeNS
The two-headed vertical (north/south) sizing cursor.
Definition:
Cursor.h:55
PhWidgets::Cursors::SizeWE
@ SizeWE
The two-headed horizontal (west/east) sizing cursor.
Definition:
Cursor.h:57
PhWidgets::Cursors::Insert
@ Insert
The I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked.
Definition:
Cursor.h:25
PhWidgets::Cursors::DragHorizontal
@ DragHorizontal
The two-headed horizontal (west/east) sizing cursor.
Definition:
Cursor.h:29
PhWidgets::Cursors::No
@ No
The cursor that indicates that a particular region is invalid for the current operation.
Definition:
Cursor.h:51
PhWidgets::Cursors::DragRight
@ DragRight
The two-headed horizontal (west/east) sizing cursor.
Definition:
Cursor.h:31
PhWidgets::Cursors::Dont
@ Dont
The cursor that indicates that a particular region is invalid for the current operation.
Definition:
Cursor.h:23
src
Cursor.h
Generated by
1.9.4