1 #ifndef __DALI_TOOLKIT_INTERNAL_PAGE_IMPL_H__
2 #define __DALI_TOOLKIT_INTERNAL_PAGE_IMPL_H__
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
24 #include <dali/dali.h>
25 #include <dali-toolkit/public-api/controls/control-impl.h>
26 #include <dali-toolkit/public-api/controls/navigation-frame/page.h>
40 * Page object is a custom control which can be pushed into the stack of navigation control.
41 * @see Dali::Toolkit::Page for more details
44 class Page : public Control
55 * Create an initialized Page.
56 * @return A handle to a newly allocated Dali resource
58 static Toolkit::Page New();
61 * @copydoc Dali::Toolkit::Page::SetTitle
63 void SetTitle(const std::string& title);
66 * @copydoc Dali::Toolkit::Page::GetTitle
68 const std::string& GetTitle() const;
71 * @copydoc Dali::Toolkit::Page::SetSubTitle
73 void SetSubTitle(const std::string& subtitle);
76 * @copydoc Dali::Toolkit::Page::GetSubTitle
78 const std::string& GetSubTitle() const;
81 * @copydoc Dali::Toolkit::Page::SetTitleIcon
83 void SetTitleIcon( Actor titleIcon);
86 * @copydoc Dali::Toolkit::Page::GetTitleIcon
88 Actor GetTitleIcon() const;
91 * @copydoc Dali::Toolkit::Page::AddControlToToolBar
93 bool AddControlToToolBar(Actor control, Toolkit::Alignment::Type alignment);
96 * @copydoc Dali::Toolkit::Page::GetControlsOnToolBar
98 const Toolkit::Page::ControlOnBarContainer& GetControlsOnToolBar() const;
101 * @copydoc Dali::Toolkit::Page::AddControlToTitleBar
103 bool AddControlToTitleBar(Actor control);
106 * @copydoc Dali::Toolkit::Page::GetControlsOnTitleBar
108 const ActorContainer& GetControlsOnTitleBar() const;
111 * @copydoc Dali::Toolkit::Page::SetPopupMenu
113 void SetPopupMenu( Toolkit::Popup popupMenu );
116 * @copydoc Dali::Toolkit::Page::GetPopupMenu
118 Toolkit::Popup GetPopupMenu() const;
120 private: // From Control
123 * @copydoc Toolkit::Control::OnInitialize()
125 virtual void OnInitialize();
128 * @copydoc Dali::CustomActorImpl::OnPropertySet()
130 virtual void OnPropertySet( Property::Index index, Property::Value propertyValue );
136 * It initializes the Page members
142 std::string mSubTitle;
144 Toolkit::Popup mPopupMenu;
146 ActorContainer mTitleBarControls;
147 Toolkit::Page::ControlOnBarContainer mToolBarControls;
149 Property::Index mPropertyTitle; ///< Property index for title.
150 Property::Index mPropertySubTitle; ///< Property index for sub title.
153 } // namespace Internal
155 // Helpers for public-api forwarding methods
157 inline Toolkit::Internal::Page& GetImpl( Toolkit::Page& page )
159 DALI_ASSERT_ALWAYS( page );
161 Dali::RefObject& handle = page.GetImplementation();
163 return static_cast<Toolkit::Internal::Page&>( handle );
166 inline const Toolkit::Internal::Page& GetImpl( const Toolkit::Page& page )
168 DALI_ASSERT_ALWAYS( page );
170 const Dali::RefObject& handle = page.GetImplementation();
172 return static_cast<const Toolkit::Internal::Page&>( handle );
175 }// namespace Toolkit
180 #endif /* __DALI_TOOLKIT_INTERNAL_PAGE_IMPL_H__*/