1 #ifndef DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_IMPL_PROPERTY_HANDLER_H
2 #define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_IMPL_PROPERTY_HANDLER_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/object/base-object.h>
23 #include <dali/public-api/object/property.h>
25 namespace Dali::Toolkit::Internal
29 /// Handles the properties in scroll view calling the appropriate scroll view methods
30 struct ScrollViewPropertyHandler
33 * @brief Sets the property on the given scroll-view object.
35 * @param object The scrollview object
36 * @param index The index to set
37 * @param value The value to set
39 static void Set(BaseObject* object, Property::Index index, const Property::Value& value);
42 * @brief Retrieves the value of a scroll-view property.
44 * @param object The scrollview object
45 * @param index The index whose value is to be retrieved
48 static Property::Value Get(BaseObject* object, Property::Index index);
51 * Set up default rulers using a property map
52 * @param[in] scrollView The scroll view to apply this on
53 * @param[in] scrollModeMap A map defining the characteristics of X and Y scrolling
54 * using either FixedRuler or DefaultRuler.
56 static void SetScrollMode(ScrollView& scrollView, const Property::Map& scrollModeMap);
59 * This is called whenever the Scroll Rulers are modified.
61 * This will update the properties: 'scrollPositionMin' * and 'scrollPositionMax' to reflect the changes.
62 * @param scrollView The Scroll View to modify
64 static void UpdatePropertyDomain(ScrollView& scrollView);
67 } // namespace Dali::Toolkit::Internal
69 #endif // DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_IMPL_PROPERTY_HANDLER_H