Merge "Fix documentation for Text::EditableControlInterface interface override functi...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / navigation-view / navigation-view-impl.h
1 #ifndef DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H
2 #define DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <list>
23 #include <dali/public-api/actors/layer.h>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/public-api/controls/control-impl.h>
27 #include <dali-toolkit/devel-api/controls/navigation-view/navigation-view.h>
28
29 namespace Dali
30 {
31
32 namespace Toolkit
33 {
34
35 class NavigationView;
36
37 namespace Internal
38 {
39
40 class NavigationBar;
41
42 /**
43  * @brief
44  *
45  * NavigationView implements a controller than manages the navigation of hierarchical contents.
46  */
47
48 class NavigationView : public Control
49 {
50 public:
51
52   /**
53    * Create an initialized NavigationView.
54    * @return A handle to a newly allocated Dali resource
55    */
56   static Toolkit::NavigationView New();
57
58   /**
59    * @copydoc Dali::Toolkit::NavigationView::Push()
60    */
61   void Push( Actor& actor );
62
63   /**
64    * @copydoc Dali::Toolkit::NavigationView::Pop()
65    */
66   Actor Pop();
67
68   /**
69    * Performs actions as requested using the action name.
70    * @param[in] object The object on which to perform the action.
71    * @param[in] actionName The action to perform.
72    * @param[in] properties The properties with which to perform this action.
73    * @return true if action has been accepted by this control
74    */
75   //static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& properties );
76
77
78 private: // override functions from Control
79
80   /**
81    * @copydoc Control::OnSceneConnection( int depth  )
82    */
83   void OnSceneConnection( int depth ) override;
84
85   /**
86    * @copydoc Control::OnRelayout()
87    */
88   //virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
89
90 protected:
91
92   /**
93    * Constructor.
94    * It initializes the NavigationView members
95    */
96   NavigationView();
97
98   /**
99    * A reference counted object may only be deleted by calling Unreference()
100    */
101   virtual ~NavigationView();
102
103 private:
104
105   // Undefined
106   NavigationView(const NavigationView&);
107
108   // Undefined
109   NavigationView& operator=(const NavigationView& rhs);
110
111 private:
112
113   std::vector< Actor >         mContentStack;
114 };
115
116 } // namespace Internal
117
118 // Helpers for public-api forwarding methods
119
120 inline Toolkit::Internal::NavigationView& GetImpl( Toolkit::NavigationView& navigationView )
121 {
122   DALI_ASSERT_ALWAYS( navigationView );
123
124   Dali::RefObject& handle = navigationView.GetImplementation();
125
126   return static_cast<Toolkit::Internal::NavigationView&>( handle );
127 }
128
129 inline const Toolkit::Internal::NavigationView& GetImpl( const Toolkit::NavigationView& navigationView )
130 {
131   DALI_ASSERT_ALWAYS( navigationView );
132
133   const Dali::RefObject& handle = navigationView.GetImplementation();
134
135   return static_cast<const Toolkit::Internal::NavigationView&>( handle );
136 }
137
138 } // namespace Toolkit
139
140 } // namespace Dali
141
142 #endif // DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H