Lines Matching defs:event
42 bool Rotateable::on_click(GdkEventButton *event) {
43 if (event->button == 1) {
44 drag_started_x = event->x;
45 drag_started_y = event->y;
46 modifier = get_single_modifier(modifier, event->state);
91 bool Rotateable::on_motion(GdkEventMotion *event) {
93 double dist = Geom::L2(Geom::Point(event->x, event->y) - Geom::Point(drag_started_x, drag_started_y));
94 double angle = atan2(event->y - drag_started_y, event->x - drag_started_x);
100 if (modifier != get_single_modifier(modifier, event->state)) {
105 modifier = get_single_modifier(modifier, event->state);
117 bool Rotateable::on_release(GdkEventButton *event) {
119 double angle = atan2(event->y - drag_started_y, event->x - drag_started_x);
134 bool Rotateable::on_scroll(GdkEventScroll* event)
138 if (event->direction == GDK_SCROLL_UP) {
140 } else if (event->direction == GDK_SCROLL_DOWN) {
146 drag_started_x = event->x;
147 drag_started_y = event->y;
148 modifier = get_single_modifier(modifier, event->state);