Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
scroll_gesture.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2021 XITRIX
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
17
#pragma once
18
19
#include <
aurore/core/touch/pan_gesture.hpp
>
20
21
namespace
aurore
22
{
23
24
/*
25
* Scroll recognizer
26
*
27
* Child of Pan recognizer.
28
* The only difference is that Scroll recognizer will translate scrolling wheel to pan gestures.
29
* If NO_TOUCH_SCROLLING=true defined, will ignore scrolling by touch.
30
*
31
* If mouse translation used, the only available state is MOVE.
32
* Also PanGestureStatus will be returned with delta values ONLY.
33
*
34
* TODO: Reimplement scroll events when mouse input will be separated from touch
35
*/
36
class
ScrollGestureRecognizer
:
public
PanGestureRecognizer
37
{
38
public
:
39
ScrollGestureRecognizer
(
PanGestureEvent::Callback
respond,
PanAxis
axis);
40
GestureState
recognitionLoop
(
TouchState
touch,
MouseState
mouse,
View
* view,
Sound
* soundToPlay)
override
;
41
};
42
43
}
// namespace aurore
aurore::Event< PanGestureStatus, Sound * >::Callback
std::function< void(Ts...)> Callback
Definition
event.hpp:43
aurore::PanGestureRecognizer
Definition
pan_gesture.hpp:66
aurore::ScrollGestureRecognizer
Definition
scroll_gesture.hpp:37
aurore::ScrollGestureRecognizer::ScrollGestureRecognizer
ScrollGestureRecognizer(PanGestureEvent::Callback respond, PanAxis axis)
aurore::ScrollGestureRecognizer::recognitionLoop
GestureState recognitionLoop(TouchState touch, MouseState mouse, View *view, Sound *soundToPlay) override
aurore::View
Definition
view.hpp:232
aurore
Definition
actions.hpp:25
aurore::PanAxis
PanAxis
Definition
pan_gesture.hpp:53
aurore::Sound
Sound
Definition
audio.hpp:23
aurore::GestureState
GestureState
Definition
gesture.hpp:30
pan_gesture.hpp
aurore::MouseState
Definition
input.hpp:321
aurore::TouchState
Definition
input.hpp:277
aurore
core
touch
scroll_gesture.hpp
Generated by
1.9.8