Remove CAPI from Toolkit
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / scrollable / scroll-component.h
1 #ifndef __DALI_TOOLKIT_SCROLL_COMPONENT_H__
2 #define __DALI_TOOLKIT_SCROLL_COMPONENT_H__
3
4 /*
5  * Copyright (c) 2014 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 // INTERNAL INCLUDES
22 #include <dali/dali.h>
23 #include <dali-toolkit/public-api/controls/control.h>
24
25 namespace Dali DALI_IMPORT_API
26 {
27
28 namespace Toolkit
29 {
30
31 class ScrollComponentImpl;
32 class ScrollConnector;
33
34 /**
35  * Base class for scroll component handles.
36  * Scroll-components such as scroll bars, indicators etc. are connected to scrollable containers via ScrollConnector.
37  */
38 class ScrollComponent : public Control
39 {
40
41 public:
42   /**
43    * Create an uninitialized ScrollComponent; this can be initialized with ScrollComponent::New()
44    * Calling member functions with an uninitialized Dali::Object is not allowed.
45    */
46   ScrollComponent();
47
48   /**
49    * Copy constructor.
50    */
51   ScrollComponent( const ScrollComponent& scrollComponent );
52
53   /**
54    * Assignment operator.
55    */
56   ScrollComponent& operator=( const ScrollComponent& scrollComponent );
57
58   /**
59    * @brief Destructor
60    *
61    * This is non-virtual since derived Handle types must not contain data or virtual methods.
62    */
63   ~ScrollComponent();
64
65   /**
66    * Downcast an Object handle to ScrollComponent. If handle points to a ScrollComponent the
67    * downcast produces valid handle. If not the returned handle is left uninitialized.
68    * @param[in] handle Handle to an object
69    * @return handle to a ScrollComponent or an uninitialized handle
70    */
71   static ScrollComponent DownCast( BaseHandle handle );
72
73   /**
74    * @brief Sets the scroll connector.
75    *
76    * @param[in] connector The scroll-connector used to connect with scrollable container.
77    */
78   void SetScrollConnector( ScrollConnector connector );
79
80   /**
81    * @brief Retrieve the scroll connector.
82    *
83    * @return The scroll-connector used to connect with a scrollable container.
84    */
85   ScrollConnector GetScrollConnector() const;
86
87 public: // Not intended for application developers
88
89   /**
90    * Creates a handle using the implementation.
91    * @param[in]  implementation The Control implementation.
92    */
93   ScrollComponent( ScrollComponentImpl& implementation );
94
95   /**
96    * Allows the creation of this Control from an Internal::CustomActor pointer.
97    * @param[in]  internal  A pointer to the internal CustomActor.
98    */
99   ScrollComponent( Dali::Internal::CustomActor* internal );
100 };
101
102 } // namespace Toolkit
103
104 } // namespace Dali
105
106 #endif // __DALI_TOOLKIT_SCROLL_COMPONENT_H__