Add a TextEditor property to limit input to maximum characters
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / radio-button.cpp
1 /*
2  * Copyright (c) 2017 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
20 #include <dali-toolkit/public-api/controls/buttons/radio-button.h>
21
22 // INTERNAL INCLUDES
23
24 #include <dali-toolkit/internal/controls/buttons/radio-button-impl.h>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 RadioButton::RadioButton()
33   : Button()
34 {
35 }
36
37 RadioButton::RadioButton( Internal::RadioButton& implementation )
38   : Button( implementation )
39 {
40 }
41
42 RadioButton::RadioButton( const RadioButton& radioButton )
43   : Button( radioButton )
44 {
45 }
46
47 RadioButton& RadioButton::operator=( const RadioButton& radioButton )
48 {
49   if( &radioButton != this )
50   {
51     Button::operator=( radioButton );
52   }
53   return *this;
54 }
55
56 RadioButton::RadioButton( Dali::Internal::CustomActor* internal )
57   : Button( internal )
58 {
59   VerifyCustomActorPointer<Internal::RadioButton>( internal );
60 }
61
62 RadioButton::~RadioButton()
63 {
64 }
65
66 RadioButton RadioButton::New()
67 {
68   return Internal::RadioButton::New();
69 }
70
71 RadioButton RadioButton::New( const std::string& label )
72 {
73   RadioButton radioButton = Internal::RadioButton::New();
74   radioButton.SetProperty( Toolkit::Button::Property::LABEL, label );
75   return radioButton;
76 }
77
78 RadioButton RadioButton::DownCast( BaseHandle handle )
79 {
80   return Control::DownCast<RadioButton, Internal::RadioButton>( handle );
81 }
82
83 } // namespace Toolkit
84
85 } // namespace Dali