Merge "dali-toolkit: update text selection UI handles with selection properties"...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller-event-handler.h
1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H
3
4 /*
5  * Copyright (c) 2020 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 // EXTERNAL INCLUDES
22 #include <dali/public-api/events/gesture-enumerations.h>
23 #include <dali/public-api/events/key-event.h>
24 #include <dali/public-api/math/vector2.h>
25 #include <dali/devel-api/adaptor-framework/input-method-context.h>
26
27 // INTERNAL INCLUDES
28 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
29 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
30 #include <dali-toolkit/internal/text/text-controller.h>
31
32 namespace Dali
33 {
34
35 namespace Toolkit
36 {
37
38 namespace Text
39 {
40
41 struct Controller::EventHandler
42 {
43   static void KeyboardFocusGainEvent(Controller& controller);
44   static void KeyboardFocusLostEvent(Controller& controller);
45   static bool KeyEvent(Controller& controller, const Dali::KeyEvent& keyEvent);
46   static void TapEvent(Controller& controller, unsigned int tapCount, float x, float y);
47   static void PanEvent(Controller& controller, GestureState state, const Vector2& displacement);
48   static void LongPressEvent(Controller& controller, GestureState state, float x, float y);
49   static void SelectEvent(Controller& controller, float x, float y, SelectionType selectType);
50   static void ProcessModifyEvents(Controller& controller);
51   static void TextReplacedEvent(Controller& controller);
52   static void TextInsertedEvent(Controller& controller);
53   static void TextDeletedEvent(Controller& controller);
54   static bool DeleteEvent(Controller& controller, int keyCode);
55   static InputMethodContext::CallbackData OnInputMethodContextEvent(Controller& controller, InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent);
56   static void PasteClipboardItemEvent(Controller& controller);
57   static void DecorationEvent(Controller& controller, HandleType handleType, HandleState state, float x, float y);
58   static void TextPopupButtonTouched(Controller& controller, Dali::Toolkit::TextSelectionPopup::Buttons button);
59 };
60
61 } // namespace Text
62
63 } // namespace Toolkit
64
65 } // namespace Dali
66
67 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H