1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_EVENT_HANDLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_EVENT_HANDLER_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/internal/text/text-controller-impl.h>
34 * Contains all the event handling methods for Text::Controller::Impl
36 struct ControllerImplEventHandler
39 * @brief Called by Controller::Impl when a cursor key event is received.
41 * @param controllerImpl A reference to Controller::Impl
42 * @param event The event
44 static void OnCursorKeyEvent(Controller::Impl& controllerImpl, const Event& event);
47 * @brief Called by Controller::Impl when a tap event is received.
49 * @param controllerImpl A reference to Controller::Impl
50 * @param event The event
52 static void OnTapEvent(Controller::Impl& controllerImpl, const Event& event);
55 * @brief Called by Controller::Impl when a pan event is received.
57 * @param controllerImpl A reference to Controller::Impl
58 * @param event The event
60 static void OnPanEvent(Controller::Impl& controllerImpl, const Event& event);
63 * @brief Called by Controller::Impl when a long press event is received.
65 * @param controllerImpl A reference to Controller::Impl
66 * @param event The event
68 static void OnLongPressEvent(Controller::Impl& controllerImpl, const Event& event);
71 * @brief Called by Controller::Impl when a handle event is received.
73 * @param controllerImpl A reference to Controller::Impl
74 * @param event The event
76 static void OnHandleEvent(Controller::Impl& controllerImpl, const Event& event);
79 * @brief Called by Controller::Impl when a select event is received.
81 * @param controllerImpl A reference to Controller::Impl
82 * @param event The event
84 static void OnSelectEvent(Controller::Impl& controllerImpl, const Event& event );
87 * @brief Called by Controller::Impl when a select all event is received.
89 * @param controllerImpl A reference to Controller::Impl
90 * @param event The event
92 static void OnSelectAllEvent(Controller::Impl& controllerImpl);
95 * @brief Called by Controller::Impl when a select none event is received.
97 * @param controllerImpl A reference to Controller::Impl
98 * @param event The event
100 static void OnSelectNoneEvent(Controller::Impl& controllerImpl);
105 * @brief Called by OnHandleEvent when we are in the Pressed state.
107 * @param impl A reference to Controller::Impl
108 * @param event The event
109 * @param isSmoothHandlePanEnabled Whether smooth handle pan is enabled
111 static void OnHandlePressed(Controller::Impl& impl, const Event& event, const bool isSmoothHandlePanEnabled);
114 * @brief Called by OnHandleEvent when we are in the Released state.
116 * @param impl A reference to Controller::Impl
117 * @param event The event
118 * @param isSmoothHandlePanEnabled Whether smooth handle pan is enabled
119 * @param handleStopScrolling Whether we should handle stop scrolling or not
121 static void OnHandleReleased(Controller::Impl& impl, const Event& event, const bool isSmoothHandlePanEnabled, const bool handleStopScrolling);
124 * @brief Called by OnHandleEvent when we are in the Scrolling state.
126 * @param impl A reference to Controller::Impl
127 * @param event The event
128 * @param isSmoothHandlePanEnabled Whether smooth handle pan is enabled
130 static void OnHandleScrolling(Controller::Impl& impl, const Event& event, const bool isSmoothHandlePanEnabled);
135 } // namespace Toolkit
139 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_EVENT_HANDLER_H