Merge "Text segmentation interface" into new_text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / text-controls / text-field.cpp
1 /*
2  * Copyright (c) 2015 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-controls/text-field.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/text-controls/text-field-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 const std::string TextField::RENDERING_BACKEND_PROPERTY_NAME("rendering-backend");
31 const std::string TextField::PLACEHOLDER_TEXT_PROPERTY_NAME("placeholder-text");
32 const std::string TextField::TEXT_PROPERTY_NAME("text");
33 const std::string TextField::CURSOR_IMAGE_PROPERTY_NAME("cursor-image");
34 const std::string TextField::PRIMARY_CURSOR_COLOR_PROPERTY_NAME("primary-cursor-color");
35 const std::string TextField::SECONDARY_CURSOR_COLOR_PROPERTY_NAME("secondary-cursor-color");
36 const std::string TextField::ENABLE_CURSOR_BLINK_PROPERTY_NAME("enable-cursor-blink");
37 const std::string TextField::CURSOR_BLINK_INTERVAL_PROPERTY_NAME("cursor-blink-interval");
38 const std::string TextField::CURSOR_BLINK_DURATION_PROPERTY_NAME("cursor-blink-duration");
39 const std::string TextField::GRAB_HANDLE_IMAGE_PROPERTY_NAME("grab-handle-image");
40 const std::string TextField::DECORATION_BOUNDING_BOX("decoration-bounding-box");
41
42 TextField TextField::New()
43 {
44   return Internal::TextField::New();
45 }
46
47 TextField::TextField()
48 {
49 }
50
51 TextField::TextField( const TextField& handle )
52 : Control( handle )
53 {
54 }
55
56 TextField& TextField::operator=( const TextField& handle )
57 {
58   if( &handle != this )
59   {
60     Control::operator=( handle );
61   }
62   return *this;
63 }
64
65 TextField::~TextField()
66 {
67 }
68
69 TextField TextField::DownCast( BaseHandle handle )
70 {
71   return Control::DownCast<TextField, Internal::TextField>(handle);
72 }
73
74 TextField::TextField( Internal::TextField& implementation )
75 : Control(implementation)
76 {
77 }
78
79 TextField::TextField( Dali::Internal::CustomActor* internal )
80 : Control( internal )
81 {
82   VerifyCustomActorPointer<Internal::TextField>( internal );
83 }
84
85 } // namespace Toolkit
86
87 } // namespace Dali