Remove unnecessarily exported signals and action names
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / text-input / text-input.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
18 // CLASS HEADER
19 #include <dali-toolkit/public-api/controls/text-input/text-input.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/actors/mesh-actor.h>
23 #include <dali/public-api/adaptor-framework/clipboard.h>
24 #include <dali/public-api/adaptor-framework/clipboard-event-notifier.h>
25 #include <dali/public-api/adaptor-framework/imf-manager.h>
26 #include <dali/public-api/adaptor-framework/timer.h>
27
28 // INTERNAL INCLUDES
29 #include <dali-toolkit/public-api/controls/text-input/text-input.h>
30 #include <dali-toolkit/internal/controls/text-input/text-input-impl.h>
31
32 namespace Dali
33 {
34
35 namespace Toolkit
36 {
37
38 TextInput::TextInput()
39 {
40 }
41
42 TextInput::TextInput(Internal::TextInput& implementation)
43 : Control(implementation)
44 {
45 }
46
47 TextInput::TextInput( const TextInput& textInput )
48 : Control( textInput )
49 {
50 }
51
52 TextInput& TextInput::operator=( const TextInput& textInput )
53 {
54   if( &textInput != this )
55   {
56     Control::operator=( textInput );
57   }
58
59   return *this;
60 }
61
62 TextInput TextInput::New()
63 {
64   return Internal::TextInput::New();
65 }
66
67 TextInput TextInput::DownCast( BaseHandle actor )
68 {
69   return Control::DownCast<TextInput, Internal::TextInput>(actor);
70 }
71
72 TextInput::~TextInput()
73 {
74 }
75
76 std::string TextInput::GetText() const
77 {
78   return GetImpl(*this).GetText();
79 }
80
81 std::string TextInput::GetMarkupText() const
82 {
83   return GetImpl(*this).GetMarkupText();
84 }
85
86 void TextInput::SetMaxCharacterLength(std::size_t maxChars)
87 {
88   GetImpl(*this).SetMaxCharacterLength(maxChars);
89 }
90
91 void TextInput::SetNumberOfLinesLimit(std::size_t maxLines)
92 {
93   GetImpl(*this).SetNumberOfLinesLimit( maxLines );
94 }
95
96 std::size_t TextInput::GetNumberOfLinesLimit() const
97 {
98   return GetImpl(*this).GetNumberOfLinesLimit();
99 }
100
101 std::size_t TextInput::GetNumberOfCharacters() const
102 {
103   return GetImpl(*this).GetNumberOfCharacters();
104 }
105
106 void TextInput::SetPlaceholderText( const std::string& placeHolderText )
107 {
108   GetImpl(*this).SetPlaceholderText( placeHolderText );
109 }
110
111 std::string TextInput::GetPlaceholderText()
112 {
113   return GetImpl(*this).GetPlaceholderText();
114 }
115
116 void TextInput::SetInitialText(const std::string& initialText)
117 {
118   GetImpl(*this).SetInitialText(initialText);
119 }
120
121 void TextInput::SetEditable(bool editMode)
122 {
123   GetImpl(*this).SetEditable(editMode, false);
124 }
125
126 void TextInput::SetEditable(bool editMode, const Vector2& touchPoint)
127 {
128   GetImpl(*this).SetEditable(editMode, true, touchPoint);
129 }
130
131 bool TextInput::IsEditable() const
132 {
133   return GetImpl(*this).IsEditable();
134 }
135
136 void TextInput::SetEditOnTouch( bool editOnTouch )
137 {
138   GetImpl(*this).SetEditOnTouch( editOnTouch );
139 }
140
141 bool TextInput::IsEditOnTouch() const
142 {
143   return GetImpl(*this).IsEditOnTouch();
144 }
145
146 void TextInput::SetTextSelectable( bool textSelectable )
147 {
148   GetImpl(*this).SetTextSelectable( textSelectable );
149 }
150
151 bool TextInput::IsTextSelectable() const
152 {
153   return GetImpl(*this).IsTextSelectable();
154 }
155
156 bool TextInput::IsTextSelected() const
157 {
158   return GetImpl(*this).IsTextSelected();
159 }
160
161 void TextInput::SelectText(std::size_t start, std::size_t end)
162 {
163   GetImpl(*this).SelectText( start, end );
164 }
165
166 void TextInput::DeSelectText()
167 {
168   GetImpl(*this).DeSelectText();
169 }
170
171 void TextInput::SetGrabHandleImage( Image image )
172 {
173   GetImpl(*this).SetGrabHandleImage(image);
174 }
175
176 void TextInput::SetCursorImage(Dali::Image image, const Vector4& border )
177 {
178   GetImpl(*this).SetCursorImage(image, border );
179 }
180
181 Vector3 TextInput::GetSelectionHandleSize()
182 {
183   return GetImpl(*this).GetSelectionHandleSize();
184 }
185
186 void TextInput::SetRTLCursorImage(Dali::Image image, const Vector4& border )
187 {
188   GetImpl(*this).SetRTLCursorImage(image, border );
189 }
190
191 void TextInput::EnableGrabHandle(bool toggle)
192 {
193   GetImpl(*this).EnableGrabHandle( toggle );
194 }
195
196 bool TextInput::IsGrabHandleEnabled()
197 {
198   return GetImpl(*this).IsGrabHandleEnabled();
199 }
200
201 void TextInput::SetBoundingRectangle( const Rect<float>& boundingOriginAndSize )
202 {
203   GetImpl(*this).SetBoundingRectangle( boundingOriginAndSize );
204 }
205
206 const Rect<float> TextInput::GetBoundingRectangle() const
207 {
208   return GetImpl(*this).GetBoundingRectangle();
209 }
210
211 void TextInput::SetActiveStyle( const TextStyle& style, const TextStyle::Mask mask )
212 {
213   GetImpl(*this).SetActiveStyle(style,mask);
214 }
215
216 void TextInput::ApplyStyle( const TextStyle& style, const TextStyle::Mask mask )
217 {
218   GetImpl(*this).ApplyStyle( style, mask );
219 }
220
221 void TextInput::ApplyStyleToAll( const TextStyle& style, const TextStyle::Mask mask )
222 {
223   GetImpl(*this).ApplyStyleToAll( style, mask );
224 }
225
226 TextStyle TextInput::GetStyleAtCursor() const
227 {
228   return GetImpl(*this).GetStyleAtCursor();
229 }
230
231 void TextInput::SetTextAlignment( Toolkit::Alignment::Type align )
232 {
233   GetImpl(*this).SetTextAlignment(align);
234 }
235
236 void TextInput::SetTextLineJustification( Toolkit::TextView::LineJustification justification )
237 {
238   GetImpl(*this).SetTextLineJustification(justification);
239 }
240
241 void TextInput::SetFadeBoundary( const Toolkit::TextView::FadeBoundary& fadeBoundary )
242 {
243   GetImpl(*this).SetFadeBoundary( fadeBoundary );
244 }
245
246 const Toolkit::TextView::FadeBoundary& TextInput::GetFadeBoundary() const
247 {
248   return GetImpl(*this).GetFadeBoundary();
249 }
250
251 Alignment::Type TextInput::GetTextAlignment() const
252 {
253   return GetImpl(*this).GetTextAlignment();
254 }
255
256 void TextInput::SetMultilinePolicy( TextView::MultilinePolicy policy )
257 {
258   GetImpl(*this).SetMultilinePolicy(policy);
259 }
260
261 TextView::MultilinePolicy TextInput::GetMultilinePolicy() const
262 {
263   return GetImpl(*this).GetMultilinePolicy();
264 }
265
266 void TextInput::SetWidthExceedPolicy( TextView::ExceedPolicy policy )
267 {
268   GetImpl(*this).SetWidthExceedPolicy(policy);
269 }
270
271 TextView::ExceedPolicy TextInput::GetWidthExceedPolicy() const
272 {
273   return GetImpl(*this).GetWidthExceedPolicy();
274 }
275
276 void TextInput::SetHeightExceedPolicy( TextView::ExceedPolicy policy )
277 {
278   GetImpl(*this).SetHeightExceedPolicy(policy);
279 }
280
281 TextView::ExceedPolicy TextInput::GetHeightExceedPolicy() const
282 {
283   return GetImpl(*this).GetHeightExceedPolicy();
284 }
285
286 void TextInput::SetExceedEnabled( bool enable )
287 {
288   GetImpl(*this).SetExceedEnabled( enable );
289 }
290
291 bool TextInput::GetExceedEnabled() const
292 {
293   return GetImpl(*this).GetExceedEnabled();
294 }
295
296 void TextInput::SetSortModifier( float depthOffset )
297 {
298   GetImpl( *this ).SetSortModifier( depthOffset );
299 }
300
301 void TextInput::SetSnapshotModeEnabled( bool enable )
302 {
303   GetImpl( *this ).SetSnapshotModeEnabled( enable );
304 }
305
306 bool TextInput::IsSnapshotModeEnabled() const
307 {
308   return GetImpl( *this ).IsSnapshotModeEnabled();
309 }
310
311 void TextInput::SetScrollEnabled( bool enable )
312 {
313   GetImpl( *this ).SetScrollEnabled( enable );
314 }
315
316 bool TextInput::IsScrollEnabled() const
317 {
318   return GetImpl( *this ).IsScrollEnabled();
319 }
320
321 void TextInput::SetScrollPosition( const Vector2& position )
322 {
323   GetImpl( *this ).SetScrollPosition( position );
324 }
325
326 Vector2 TextInput::GetScrollPosition() const
327 {
328   return GetImpl( *this ).GetScrollPosition();
329 }
330
331 TextInput::InputSignalType& TextInput::InputStartedSignal()
332 {
333   return GetImpl(*this).InputStartedSignal();
334 }
335
336 TextInput::InputSignalType& TextInput::InputFinishedSignal()
337 {
338   return GetImpl(*this).InputFinishedSignal();
339 }
340
341 TextInput::InputSignalType& TextInput::CutAndPasteToolBarDisplayedSignal()
342 {
343   return GetImpl(*this).CutAndPasteToolBarDisplayedSignal();
344 }
345
346 TextInput::StyleChangedSignalType& TextInput::StyleChangedSignal()
347 {
348   return GetImpl(*this).StyleChangedSignal();
349 }
350
351 TextInput::TextModifiedSignalType& TextInput::TextModifiedSignal()
352 {
353   return GetImpl(*this).TextModifiedSignal();
354 }
355
356 TextInput::MaxInputCharactersReachedSignalType& TextInput::MaxInputCharactersReachedSignal()
357 {
358   return GetImpl(*this).MaxInputCharactersReachedSignal();
359 }
360
361 TextInput::InputTextExceedBoundariesSignalType& TextInput::InputTextExceedBoundariesSignal()
362 {
363   return GetImpl(*this).InputTextExceedBoundariesSignal();
364 }
365
366 void TextInput::SetMarkupProcessingEnabled( bool enable )
367 {
368   return GetImpl( *this ).SetMarkupProcessingEnabled( enable );
369 }
370
371 bool TextInput::IsMarkupProcessingEnabled() const
372 {
373   return GetImpl( *this ).IsMarkupProcessingEnabled();
374 }
375
376
377 TextInput::TextInput( Dali::Internal::CustomActor* internal )
378 : Control( internal )
379 {
380   VerifyCustomActorPointer<Internal::TextInput>(internal);
381 }
382
383 } // namespace Toolkit
384
385 } // namespace Dali