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