Dali 3D User Interface Engine
gesture-processor.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_GESTURE_PROCESSOR_H__
2 #define __DALI_INTERNAL_GESTURE_PROCESSOR_H__
3 
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // INTERNAL INCLUDES
25 
26 namespace Dali
27 {
28 
29 class Actor;
30 
31 namespace Internal
32 {
33 
38 {
39 protected:
40 
41  // Construction & Destruction
42 
47 
51  virtual ~GestureProcessor();
52 
53  // Methods to be used by deriving classes
54 
64  void GetGesturedActor( Actor*& actor, GestureDetectorContainer& gestureDetectors );
65 
75  void ProcessAndEmit( HitTestAlgorithm::Results& hitTestResults );
76 
84  virtual bool HitTest(Stage& stage, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults);
85 
90  void SetActor( Actor* actor );
91 
95  void ResetActor();
96 
103 
104 private:
105 
106  // For derived classes to override
107 
111  virtual void OnGesturedActorStageDisconnection() = 0;
112 
122  virtual bool CheckGestureDetector( GestureDetector* detector, Actor* actor ) = 0;
123 
133  virtual void EmitGestureSignal( Actor* actor, const GestureDetectorContainer& gestureDetectors, Vector2 actorCoordinates ) = 0;
134 
135  // Undefined
136 
139 
140  // SceneObject overrides
141 
147  virtual void SceneObjectAdded(Object& object) { }
148 
155  virtual void SceneObjectRemoved(Object& object);
156 
162  virtual void ObjectDestroyed(Object& object);
163 
164 private: // Data
165 
169 };
170 
171 } // namespace Internal
172 
173 } // namespace Dali
174 
175 #endif // __DALI_INTERNAL_GESTURE_PROCESSOR_H__
Dali Docs Home
Read more about Dali