remove (dead) ImageView UI control
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / scrollable / scroll-view / scroll-view-helper-functions.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_HELPER_FUNCTIONS_H__
2 #define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_HELPER_FUNCTIONS_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 // EXTERNAL INCLUDES
22 #include <dali/public-api/math/vector3.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace Internal
31 {
32
33 /// Some helper methods with common functionality used in scroll view constraints
34 namespace ScrollViewHelperFunctions
35 {
36
37 /**
38  * Checks whether the we're looking straight at the page and if we are, it returns true.
39  *
40  * @param[in]  position  The position of the page.
41  */
42 bool IsStraightOnView( const Vector3& position );
43
44 /**
45  * Modifies the position to wrap within the given domain.
46  *
47  * @param[in/out]  position  The position of the page, this is modified accordingly.
48  * @param[in]      pageSize  The size of each page.
49  * @param[in]      min       The minimum position of the scroll-view.
50  * @param[in]      max       The maximum position of the scroll-view.
51  */
52 void WrapPositionWithinDomain( Vector3& position, const Vector3& pageSize, const Vector3& min, const Vector3& max );
53
54 /**
55  * Checks whether the page is positioned outside of our view and returns true if it is.
56  *
57  * @param[in]  position  The position of the page.
58  * @param[in]  pageSize  The size of each page.
59  */
60 bool IsOutsideView( const Vector3& position, const Vector3& pageSize );
61
62 } // namespace ScrollViewHelperFunctions
63
64 } // namespace Internal
65
66 } // namespace Toolkit
67
68 } // namespace Dali
69
70 #endif // __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_HELPER_FUNCTIONS_H__