Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / public-api / controls / navigation-frame / page.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 #include "page.h"
19
20 // EXTERNAL INCLUDES
21
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/internal/controls/navigation-frame/page-impl.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 const char* const Page::PROPERTY_TITLE = "title";
32 const char* const Page::PROPERTY_SUB_TITLE = "sub-title";
33
34 Page::Page()
35 {
36 }
37
38 Page::Page( const Page& handle )
39 : Control(handle)
40 {
41 }
42
43 Page& Page::operator=( const Page& handle )
44 {
45   if( &handle != this )
46   {
47     CustomActor::operator=( handle );
48   }
49   return *this;
50 }
51
52 Page Page::New()
53 {
54   return Internal::Page::New();
55 }
56
57 Page Page::DownCast( BaseHandle handle )
58 {
59   return Control::DownCast<Page, Internal::Page>(handle);
60 }
61
62 Page::Page(Internal::Page& impl)
63 : Control(impl)
64 {
65 }
66
67 Page::Page( Dali::Internal::CustomActor* internal )
68 : Control( internal)
69 {
70   VerifyCustomActorPointer<Internal::Page>(internal);
71 }
72
73 void Page::SetTitle(const std::string& title)
74 {
75   GetImpl( *this ).SetTitle(title);
76 }
77
78 const std::string& Page::GetTitle() const
79 {
80   return GetImpl( *this ).GetTitle();
81 }
82
83 void Page::SetSubTitle(const std::string& subtitle)
84 {
85   GetImpl( *this ).SetSubTitle(subtitle);
86 }
87
88 const std::string& Page::GetSubTitle() const
89 {
90   return GetImpl( *this ).GetSubTitle();
91 }
92
93 void Page::SetTitleIcon( Actor titleIcon)
94 {
95   GetImpl( *this ).SetTitleIcon(titleIcon);
96 }
97
98 Actor Page::GetTitleIcon() const
99 {
100   return GetImpl( *this ).GetTitleIcon();
101 }
102
103 bool Page::AddControlToToolBar(Actor control, Alignment::Type alignment)
104 {
105   return GetImpl( *this ).AddControlToToolBar(control, alignment);
106 }
107
108 const Page::ControlOnBarContainer Page::GetControlsOnToolBar() const
109 {
110   return GetImpl( *this ).GetControlsOnToolBar();
111 }
112
113 bool Page::AddControlToTitleBar(Actor control)
114 {
115   return GetImpl( *this ).AddControlToTitleBar(control);
116 }
117
118 const ActorContainer Page::GetControlsOnTitleBar() const
119 {
120   return GetImpl( *this ).GetControlsOnTitleBar();
121 }
122
123 void Page::SetPopupMenu( Toolkit::Popup popupMenu )
124 {
125   GetImpl( *this ).SetPopupMenu( popupMenu );
126 }
127
128 Toolkit::Popup Page::GetPopupMenu() const
129 {
130   return GetImpl( *this ).GetPopupMenu();
131 }
132
133 } // namespace Toolkit
134
135 } // namespace Dali