1 #ifndef DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_CONSTRAINTS_H
2 #define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_CONSTRAINTS_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/animation/constraint.h>
33 /// Sets up and owns the Constraints used by the ScrollView class
34 class ScrollViewConstraints
38 ScrollViewConstraints() = default; ///< Default Constructor
39 ~ScrollViewConstraints() = default; ///< Default Non-Virtual Destructor
41 // Not copyable or moveable
42 ScrollViewConstraints(const ScrollViewConstraints&) = delete;
43 ScrollViewConstraints(ScrollViewConstraints&&) = delete;
44 ScrollViewConstraints& operator=(const ScrollViewConstraints&) = delete;
45 ScrollViewConstraints& operator=(ScrollViewConstraints&&) = delete;
48 * Updates the main internal scroll constraints with new ruler and domain values
50 * @param[in] scrollView A reference to the scroll view object
52 void UpdateMainInternalConstraint(Internal::ScrollView& scrollView);
55 * Enables/disables the overshoot constraints
57 * @param[in] scrollView A reference to the scroll view object
58 * @param[in] enabled whether to enable or disable the overshoot constraints
60 void SetOvershootConstraintsEnabled(ScrollView& scrollView, bool enabled);
63 * Sets internal constraints for this ScrollView.
64 * Many of these internal constraints are based on properties within ScrollView.
66 * @param[in] scrollView A reference to the scroll view object
68 void SetInternalConstraints(ScrollView& scrollView);
72 Constraint mScrollMainInternalPrePositionConstraint;
73 Constraint mScrollMainInternalPositionConstraint;
74 Constraint mScrollMainInternalOvershootXConstraint;
75 Constraint mScrollMainInternalOvershootYConstraint;
76 Constraint mScrollMainInternalDeltaConstraint;
77 Constraint mScrollMainInternalFinalConstraint;
78 Constraint mScrollMainInternalRelativeConstraint;
79 Constraint mScrollMainInternalDomainConstraint;
80 Constraint mScrollMainInternalPrePositionMaxConstraint;
83 } // namespace Internal
85 } // namespace Toolkit
89 #endif // DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_CONSTRAINTS_H