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 Flora License, Version 1.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://floralicense.org/license/
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.
23 #include <dali/dali.h>
24 #include <dali-toolkit/public-api/controls/control-impl.h>
25 #include <dali-toolkit/public-api/controls/navigation-frame/page.h>
39 * Page object is a custom control which can be pushed into the stack of navigation control.
40 * @see Dali::Toolkit::Page for more details
43 class Page : public Control
54 * Create an initialized Page.
55 * @return A handle to a newly allocated Dali resource
57 static Toolkit::Page New();
60 * @copydoc Dali::Toolkit::Page::SetTitle
62 void SetTitle(const std::string& title);
65 * @copydoc Dali::Toolkit::Page::GetTitle
67 const std::string& GetTitle() const;
70 * @copydoc Dali::Toolkit::Page::SetSubTitle
72 void SetSubTitle(const std::string& subtitle);
75 * @copydoc Dali::Toolkit::Page::GetSubTitle
77 const std::string& GetSubTitle() const;
80 * @copydoc Dali::Toolkit::Page::SetTitleIcon
82 void SetTitleIcon( Actor titleIcon);
85 * @copydoc Dali::Toolkit::Page::GetTitleIcon
87 Actor GetTitleIcon() const;
90 * @copydoc Dali::Toolkit::Page::AddControlToToolBar
92 bool AddControlToToolBar(Actor control, Toolkit::Alignment::Type alignment);
95 * @copydoc Dali::Toolkit::Page::GetControlsOnToolBar
97 const Toolkit::Page::ControlOnBarContainer& GetControlsOnToolBar() const;
100 * @copydoc Dali::Toolkit::Page::AddControlToTitleBar
102 bool AddControlToTitleBar(Actor control);
105 * @copydoc Dali::Toolkit::Page::GetControlsOnTitleBar
107 const ActorContainer& GetControlsOnTitleBar() const;
110 * @copydoc Dali::Toolkit::Page::SetPopupMenu
112 void SetPopupMenu( Toolkit::Popup popupMenu );
115 * @copydoc Dali::Toolkit::Page::GetPopupMenu
117 Toolkit::Popup GetPopupMenu() const;
119 private: // From Control
122 * @copydoc Toolkit::Control::OnInitialize()
124 virtual void OnInitialize();
127 * @copydoc Dali::CustomActorImpl::OnPropertySet()
129 virtual void OnPropertySet( Property::Index index, Property::Value propertyValue );
135 * It initializes the Page members
141 std::string mSubTitle;
143 Toolkit::Popup mPopupMenu;
145 ActorContainer mTitleBarControls;
146 Toolkit::Page::ControlOnBarContainer mToolBarControls;
148 Property::Index mPropertyTitle; ///< Property index for title.
149 Property::Index mPropertySubTitle; ///< Property index for sub title.
152 } // namespace Internal
154 // Helpers for public-api forwarding methods
156 inline Toolkit::Internal::Page& GetImpl( Toolkit::Page& page )
158 DALI_ASSERT_ALWAYS( page );
160 Dali::RefObject& handle = page.GetImplementation();
162 return static_cast<Toolkit::Internal::Page&>( handle );
165 inline const Toolkit::Internal::Page& GetImpl( const Toolkit::Page& page )
167 DALI_ASSERT_ALWAYS( page );
169 const Dali::RefObject& handle = page.GetImplementation();
171 return static_cast<const Toolkit::Internal::Page&>( handle );
174 }// namespace Toolkit
179 #endif /* __DALI_TOOLKIT_INTERNAL_PAGE_IMPL_H__*/