synfig-studio
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
gui
event_mouse.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
21
/* ========================================================================= */
22
23
/* === S T A R T =========================================================== */
24
25
#ifndef __SYNFIG_EVENT_MOUSE_H
26
#define __SYNFIG_EVENT_MOUSE_H
27
28
/* === H E A D E R S ======================================================= */
29
30
#include <synfig/vector.h>
31
#include "
smach.h
"
32
#include <gdkmm/types.h>
33
#include "
duck.h
"
34
35
/* === M A C R O S ========================================================= */
36
37
/* === T Y P E D E F S ===================================================== */
38
39
/* === C L A S S E S & S T R U C T S ======================================= */
40
41
namespace
studio {
42
43
enum
MouseButton
44
{
45
BUTTON_NONE
,
46
BUTTON_LEFT
,
47
BUTTON_MIDDLE
,
48
BUTTON_RIGHT
,
49
BUTTON_UP
,
50
BUTTON_DOWN
,
51
52
BUTTON_END
53
};
54
55
struct
EventMouse
:
public
Smach::event
56
{
57
synfig::Point
pos
;
58
MouseButton
button
;
59
float
pressure
;
60
Gdk::ModifierType
modifier
;
61
etl::handle<Duck>
duck
;
62
63
EventMouse
(
EventKey
id
,
MouseButton
button
,
const
synfig::Point&
pos
, Gdk::ModifierType
modifier
=Gdk::ModifierType(0), etl::handle<Duck>
duck
= etl::handle<Duck>()):
64
Smach
::event(id),
65
pos(pos),
66
button(button),
67
pressure
(button==
BUTTON_NONE
?0.0f:1.0f),
68
modifier
(
modifier
),
69
duck
(
duck
)
70
{ }
71
72
EventMouse
(
EventKey
id
,
MouseButton
button,
const
synfig::Point& pos,
float
pressure
, Gdk::ModifierType
modifier
=Gdk::ModifierType(0), etl::handle<Duck>
duck
= etl::handle<Duck>()):
73
Smach
::event(id),
74
pos(pos),
75
button(button),
76
pressure(pressure),
77
modifier
(
modifier
),
78
duck
(
duck
)
79
{ }
80
};
// END of EventMouse
81
82
struct
EventBox
:
public
Smach::event
83
{
84
synfig::Point
p1
,
p2
;
85
MouseButton
button
;
86
Gdk::ModifierType
modifier
;
87
88
EventBox
(
EventKey
id
,
const
synfig::Point&
p1
,
const
synfig::Point&
p2
,
MouseButton
button=
BUTTON_NONE
, Gdk::ModifierType
modifier
=Gdk::ModifierType(0)):
89
Smach
::event(id),
90
p1(p1),
91
p2(p2),
92
button(button),
93
modifier
(
modifier
)
94
{ }
95
96
EventBox
(
const
synfig::Point& p1,
const
synfig::Point& p2,
MouseButton
button=
BUTTON_NONE
, Gdk::ModifierType
modifier
=Gdk::ModifierType(0)):
97
Smach
::event(
EVENT_WORKAREA_BOX
),
98
p1(p1),
99
p2(p2),
100
button(button),
101
modifier
(
modifier
)
102
{ }
103
};
// END of EventBox
104
105
106
};
// END of namespace studio
107
108
/* === E N D =============================================================== */
109
110
#endif
Generated on Mon Nov 16 2015 15:36:42 for synfig-studio by
1.8.1.2