1 #ifndef DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H
2 #define DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/actors/layer.h>
26 #include <dali-toolkit/devel-api/controls/navigation-view/navigation-view.h>
27 #include <dali-toolkit/public-api/controls/control-impl.h>
42 * NavigationView implements a controller than manages the navigation of hierarchical contents.
45 class NavigationView : public Control
49 * Create an initialized NavigationView.
50 * @return A handle to a newly allocated Dali resource
52 static Toolkit::NavigationView New();
55 * @copydoc Dali::Toolkit::NavigationView::Push()
57 void Push(Actor& actor);
60 * @copydoc Dali::Toolkit::NavigationView::Pop()
65 * Performs actions as requested using the action name.
66 * @param[in] object The object on which to perform the action.
67 * @param[in] actionName The action to perform.
68 * @param[in] properties The properties with which to perform this action.
69 * @return true if action has been accepted by this control
71 //static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& properties );
73 private: // override functions from Control
75 * @copydoc Constrol::OnInitialize
77 virtual void OnInitialize() override;
80 * @copydoc Control::OnSceneConnection( int depth )
82 void OnSceneConnection(int depth) override;
85 * @copydoc Control::OnRelayout()
87 //virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
92 * It initializes the NavigationView members
97 * A reference counted object may only be deleted by calling Unreference()
99 virtual ~NavigationView();
103 NavigationView(const NavigationView&);
106 NavigationView& operator=(const NavigationView& rhs);
109 std::vector<Actor> mContentStack;
112 } // namespace Internal
114 // Helpers for public-api forwarding methods
116 inline Toolkit::Internal::NavigationView& GetImpl(Toolkit::NavigationView& navigationView)
118 DALI_ASSERT_ALWAYS(navigationView);
120 Dali::RefObject& handle = navigationView.GetImplementation();
122 return static_cast<Toolkit::Internal::NavigationView&>(handle);
125 inline const Toolkit::Internal::NavigationView& GetImpl(const Toolkit::NavigationView& navigationView)
127 DALI_ASSERT_ALWAYS(navigationView);
129 const Dali::RefObject& handle = navigationView.GetImplementation();
131 return static_cast<const Toolkit::Internal::NavigationView&>(handle);
134 } // namespace Toolkit
138 #endif // DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H