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-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;
122 * Called when a property of an object of this type is set.
123 * @param[in] object The object whose property is set.
124 * @param[in] index The property index.
125 * @param[in] value The new property value.
127 static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
130 * Called to retrieve a property of an object of this type.
131 * @param[in] object The object whose property is to be retrieved.
132 * @param[in] index The property index.
133 * @return The current value of the property.
135 static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
141 * It initializes the Page members
147 std::string mSubTitle;
149 Toolkit::Popup mPopupMenu;
151 ActorContainer mTitleBarControls;
152 Toolkit::Page::ControlOnBarContainer mToolBarControls;
155 } // namespace Internal
157 // Helpers for public-api forwarding methods
159 inline Toolkit::Internal::Page& GetImpl( Toolkit::Page& page )
161 DALI_ASSERT_ALWAYS( page );
163 Dali::RefObject& handle = page.GetImplementation();
165 return static_cast<Toolkit::Internal::Page&>( handle );
168 inline const Toolkit::Internal::Page& GetImpl( const Toolkit::Page& page )
170 DALI_ASSERT_ALWAYS( page );
172 const Dali::RefObject& handle = page.GetImplementation();
174 return static_cast<const Toolkit::Internal::Page&>( handle );
177 }// namespace Toolkit
182 #endif /* __DALI_TOOLKIT_INTERNAL_PAGE_IMPL_H__*/