License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / public-api / controls / selectors / rotating-selector.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 #include <dali-toolkit/public-api/controls/selectors/rotating-selector.h>
19 #include <dali-toolkit/internal/controls/selectors/rotating-selector-impl.h>
20
21 namespace Dali
22 {
23
24 namespace Toolkit
25 {
26
27 const char* const RotatingSelector::SIGNAL_CHECKED = "checked";
28
29 RotatingSelector::RotatingSelector()
30 {
31 }
32
33 RotatingSelector::RotatingSelector( const RotatingSelector& rotatingSelector )
34 : Control( rotatingSelector )
35 {
36 }
37
38 RotatingSelector& RotatingSelector::operator=( const RotatingSelector& rotatingSelector )
39 {
40   if( &rotatingSelector != this )
41   {
42     Control::operator=( rotatingSelector );
43   }
44
45   return *this;
46 }
47
48
49 RotatingSelector::~RotatingSelector()
50 {
51 }
52
53 RotatingSelector RotatingSelector::New(Actor& unSelectedActor, Actor& selectedActor)
54 {
55   return Internal::RotatingSelector::New(unSelectedActor, selectedActor);
56 }
57
58 RotatingSelector RotatingSelector::DownCast( BaseHandle handle )
59 {
60   return Control::DownCast<RotatingSelector, Internal::RotatingSelector>(handle);
61 }
62
63 void RotatingSelector::SetSelected( bool checked )
64 {
65   Dali::Toolkit::GetImpl( *this ).SetSelected( checked );
66 }
67
68 bool RotatingSelector::IsSelected() const
69 {
70   return Dali::Toolkit::GetImpl( *this ).IsSelected();
71 }
72
73 void RotatingSelector::SetSelectedActor( Actor& selectedActor )
74 {
75   Dali::Toolkit::GetImpl( *this ).SetSelectedActor( selectedActor );
76 }
77
78 Actor RotatingSelector::GetSelectedActor()
79 {
80   return Dali::Toolkit::GetImpl( *this ).GetSelectedActor();
81 }
82
83 void RotatingSelector::SetUnSelectedActor( Actor& unSelectedActor )
84 {
85   Dali::Toolkit::GetImpl( *this ).SetUnSelectedActor( unSelectedActor );
86 }
87
88 Actor RotatingSelector::GetUnSelectedActor()
89 {
90   return Dali::Toolkit::GetImpl( *this ).GetUnSelectedActor();
91 }
92
93 void RotatingSelector::SetSelectable( bool selectable )
94 {
95   Dali::Toolkit::GetImpl( *this ).SetSelectable( selectable );
96 }
97
98 bool RotatingSelector::IsSelectable()const
99 {
100   return Dali::Toolkit::GetImpl( *this ).IsSelectable();
101 }
102
103 RotatingSelector::SelectedSignalV2& RotatingSelector::SelectedSignal()
104 {
105   return Dali::Toolkit::GetImpl( *this ).SelectedSignal();
106 }
107
108 RotatingSelector::RotatingSelector( Internal::RotatingSelector& implementation )
109 : Control(implementation)
110 {
111 }
112
113 RotatingSelector::RotatingSelector( Dali::Internal::CustomActor* internal )
114 : Control( internal )
115 {
116   VerifyCustomActorPointer<Internal::RotatingSelector>(internal);
117 }
118
119 } // namespace Toolkit
120
121 } // namespace Dali