1 #ifndef __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__
2 #define __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__
5 * Copyright (c) 2014 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/controls/buttons/push-button.h>
31 * @brief Creates a push button with the given images.
32 * Images will be shrunk to fit the button size keeping their aspect ratio.
33 * @note Images won't be scaled to fill the whole button size.
34 * @note If an image path is empty, this image is not set to the button.
36 * @param[in] unselectedImagePath Image path to be shown when the button is unselected.
37 * @param[in] selectedImagePath Image path to be shown when the button is selected.
38 * @param[in] backgroundImagePath Image path to be shown as button background.
39 * @param[in] disabledUnselectedImagePath Image path to be shown when the button is unselected and disabled.
40 * @param[in] disabledBackgroundImagePath Image path to be shown as button background when the button is disabled.
41 * @return A handle to the new push button
43 DALI_IMPORT_API PushButton CreatePushButton( const std::string& unselectedImagePath, const std::string& selectedImagePath, const std::string& backgroundImagePath,
44 const std::string& disabledUnselectedImagePath, const std::string& disabledBackgroundImagePath );
47 * @brief Creates a push button with the given images.
49 * Images will be shrunk to fit the button size keeping their aspect ratio.
50 * @note Images won't be scaled to fill the whole button size.
51 * @note If an image is an empty handle, this image is not set to the button.
53 * @param[in] unselectedImageActor Image to be shown when the button is unselected.
54 * @param[in] selectedImageActor Image to be shown when the button is pressed.
55 * @param[in] backgroundImageActor Image to be shown as button background.
56 * @param[in] disabledUnselectedImageActor Image to be shown when the button is unselected and disabled.
57 * @param[in] disabledBackgroundImageActor Image to be shown as button background when the button is disabled.
58 * @return A handle to the new pushbutton
60 DALI_IMPORT_API PushButton CreatePushButton( Actor unselectedImageActor, Actor selectedImageActor, Actor backgroundImageActor,
61 Actor disabledUnselectedImageActor, Actor disabledBackgroundImageActor );
64 * @brief Creates a push button with the given background image.
66 * Background image will be shrunk to fit the button size keeping its aspect ratio.
67 * @note Background image won't be scaled to fill the whole button size.
69 * @param[in] backgroundImagePath Image path to be shown as button background.
70 * @return a handle to the new push button
72 DALI_IMPORT_API PushButton CreatePushButton( const std::string& backgroundImagePath );
75 * @brief Creates a push button with the given background image.
77 * Background image will be shrunk to fit the button size keeping its aspect ratio.
78 * @note Background image won't be scaled to fill the whole button size.
80 * @param[in] backgroundImageActor Image to be shown as button background.
81 * @return a handle to the new push button
83 DALI_IMPORT_API PushButton CreatePushButton( Actor backgroundImageActor );
85 } // namespace Toolkit
89 #endif // __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__