1 #ifndef DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H
2 #define DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H
5 * Copyright (c) 2023 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/common/vector-wrapper.h>
25 #include <dali-toolkit/public-api/styling/style-manager.h>
31 namespace DevelStyleManager
34 * @brief The Type of BrokenImage
36 enum class BrokenImageType
43 using BrokenImageChangedSignalType = Signal<void(StyleManager)>;
46 * @brief Gets all currently defined configurations.
48 * @pre The Builder has been initialized.
49 * @param[in] styleManager The instance of StyleManager
50 * @return A property map to the currently defined configurations
52 DALI_TOOLKIT_API const Property::Map& GetConfigurations(StyleManager styleManager);
55 * @brief Sets an image to be used when a visual has failed to correctly render
56 * @param[in] styleManager The instance of StyleManager
57 * @param[in] brokenImageType The type of broken image
58 * @param[in] brokenImageUrl The broken image url
60 DALI_TOOLKIT_API void SetBrokenImageUrl(StyleManager styleManager, DevelStyleManager::BrokenImageType brokenImageType, const std::string& brokenImageUrl);
63 * @brief Gets an image to be used when a visual has failed to correctly render
64 * @param[in] styleManager The instance of StyleManager
65 * @param[in] brokenImageType BrokenImage type
67 DALI_TOOLKIT_API std::string GetBrokenImageUrl(StyleManager styleManager, DevelStyleManager::BrokenImageType brokenImageType);
70 * @brief Get the Broken Image Url List
72 * This list is broken images stored in order of SMALL, NORMAL, and LARGE values except if the value is empty.
73 * This API just makes the list without comparing size, so the application must set a value that matches the size.
74 * @param styleManager The instance of StyleManager
75 * @return A List of Broken Image Url
77 DALI_TOOLKIT_API std::vector<std::string> GetBrokenImageUrlList(StyleManager styleManager);
80 * @brief This signal is emitted when the URL of the broken image is set
82 * A callback of the following type may be connected:
84 * void YourCallbackName(StyleManager styleManager)
86 * @param styleManager The instance of StyleManager
87 * @return The signal to connect to
89 DALI_TOOLKIT_API BrokenImageChangedSignalType& BrokenImageChangedSignal(StyleManager styleManager);
91 } // namespace DevelStyleManager
93 } // namespace Toolkit
97 #endif // DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H