1 #ifndef DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H
2 #define DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H
5 * Copyright (c) 2020 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-toolkit/public-api/styling/style-manager.h>
28 namespace DevelStyleManager
31 * @brief The Type of BrokenImage
33 enum class BrokenImageType
40 using BrokenImageChangedSignalType = Signal<void(StyleManager)>;
43 * @brief Gets all currently defined configurations.
45 * @pre The Builder has been initialized.
46 * @param[in] styleManager The instance of StyleManager
47 * @return A property map to the currently defined configurations
49 DALI_TOOLKIT_API const Property::Map GetConfigurations(StyleManager styleManager);
52 * @brief Sets an image to be used when a visual has failed to correctly render
53 * @param[in] styleManager The instance of StyleManager
54 * @param[in] brokenImageType The type of broken image
55 * @param[in] brokenImageUrl The broken image url
57 DALI_TOOLKIT_API void SetBrokenImageUrl(StyleManager styleManager, DevelStyleManager::BrokenImageType brokenImageType, const std::string& brokenImageUrl);
60 * @brief Gets an image to be used when a visual has failed to correctly render
61 * @param[in] styleManager The instance of StyleManager
62 * @param[in] brokenImageType BrokenImage type
64 DALI_TOOLKIT_API std::string GetBrokenImageUrl(StyleManager styleManager, DevelStyleManager::BrokenImageType brokenImageType);
67 * @brief Get the Broken Image Url List
69 * This list is broken images stored in order of SMALL, NORMAL, and LARGE values except if the value is empty.
70 * This API just makes the list without comparing size, so the application must set a value that matches the size.
71 * @param styleManager The instance of StyleManager
72 * @return A List of Broken Image Url
74 DALI_TOOLKIT_API std::vector<std::string> GetBrokenImageUrlList(StyleManager styleManager);
77 * @brief This signal is emitted when the URL of the broken image is set
79 * A callback of the following type may be connected:
81 * void YourCallbackName(StyleManager styleManager)
83 * @param styleManager The instance of StyleManager
84 * @return The signal to connect to
86 DALI_TOOLKIT_API BrokenImageChangedSignalType& BrokenImageChangedSignal(StyleManager styleManager);
88 } // namespace DevelStyleManager
90 } // namespace Toolkit
94 #endif // DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H