Shortcut check for markup in a string, before attempting to parse and split the strin...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / focus-manager / keyboard-focus-manager.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // CLASS HEADER
18
19 #include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24
25 #include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 const char* const KeyboardFocusManager::SIGNAL_PRE_FOCUS_CHANGE = "keyboard-pre-focus-change";
34 const char* const KeyboardFocusManager::SIGNAL_FOCUS_CHANGED = "keyboard-focus-changed";
35 const char* const KeyboardFocusManager::SIGNAL_FOCUS_GROUP_CHANGED = "keyboard-focus-group-changed";
36 const char* const KeyboardFocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED = "keyboard-focused-actor-activated";
37
38 KeyboardFocusManager::KeyboardFocusManager()
39 {
40 }
41
42 KeyboardFocusManager::~KeyboardFocusManager()
43 {
44 }
45
46 KeyboardFocusManager KeyboardFocusManager::Get()
47 {
48   return Internal::KeyboardFocusManager::Get();
49 }
50
51 KeyboardFocusManager::KeyboardFocusManager(Internal::KeyboardFocusManager *impl)
52   : BaseHandle(impl)
53 {
54 }
55
56 bool KeyboardFocusManager::SetCurrentFocusActor(Actor actor)
57 {
58   return GetImpl(*this).SetCurrentFocusActor(actor);
59 }
60
61 Actor KeyboardFocusManager::GetCurrentFocusActor()
62 {
63   return GetImpl(*this).GetCurrentFocusActor();
64 }
65
66 bool KeyboardFocusManager::MoveFocus(Control::KeyboardFocusNavigationDirection direction)
67 {
68   return GetImpl(*this).MoveFocus(direction);
69 }
70
71 void KeyboardFocusManager::ClearFocus()
72 {
73   GetImpl(*this).ClearFocus();
74 }
75
76 void KeyboardFocusManager::SetAsFocusGroup(Actor actor, bool isFocusGroup)
77 {
78   // deprecated method.
79   GetImpl(*this).SetAsFocusGroup(actor, isFocusGroup);
80 }
81
82 bool KeyboardFocusManager::IsFocusGroup(Actor actor) const
83 {
84   // deprecated method.
85   return GetImpl(*this).IsFocusGroup(actor);
86 }
87
88 Actor KeyboardFocusManager::GetFocusGroup(Actor actor)
89 {
90   return GetImpl(*this).GetFocusGroup(actor);
91 }
92
93 void KeyboardFocusManager::SetFocusGroupLoop(bool enabled)
94 {
95   GetImpl(*this).SetFocusGroupLoop(enabled);
96 }
97
98 bool KeyboardFocusManager::GetFocusGroupLoop() const
99 {
100   return GetImpl(*this).GetFocusGroupLoop();
101 }
102
103 void KeyboardFocusManager::SetFocusIndicatorActor(Actor indicator)
104 {
105   GetImpl(*this).SetFocusIndicatorActor(indicator);
106 }
107
108 Actor KeyboardFocusManager::GetFocusIndicatorActor()
109 {
110   return GetImpl(*this).GetFocusIndicatorActor();
111 }
112
113 KeyboardFocusManager::PreFocusChangeSignalV2& KeyboardFocusManager::PreFocusChangeSignal()
114 {
115   return GetImpl(*this).PreFocusChangeSignal();
116 }
117
118 KeyboardFocusManager::FocusChangedSignalV2& KeyboardFocusManager::FocusChangedSignal()
119 {
120   return GetImpl(*this).FocusChangedSignal();
121 }
122
123 KeyboardFocusManager::FocusGroupChangedSignalV2& KeyboardFocusManager::FocusGroupChangedSignal()
124 {
125   return GetImpl(*this).FocusGroupChangedSignal();
126 }
127
128 KeyboardFocusManager::FocusedActorActivatedSignalV2& KeyboardFocusManager::FocusedActorActivatedSignal()
129 {
130   return GetImpl(*this).FocusedActorActivatedSignal();
131 }
132
133 } // namespace Toolkit
134
135 } // namespace Dali