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/dali.h>
23 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
25 namespace Dali DALI_IMPORT_API
32 * @brief Creates a push button with the given images.
33 * Images will be shrunk to fit the button size keeping their aspect ratio.
34 * @note Images won't be scaled to fill the whole button size.
35 * @note If an image path is empty, this image is not set to the button.
37 * @param[in] releasedImagePath Image path to be shown when the button is released.
38 * @param[in] pressedImagePath Image path to be shown when the button is pressed.
39 * @param[in] backgroundImagePath Image path to be shown as button background.
40 * @param[in] dimmedReleasedImagePath Image path to be shown when the button is released and dimmed.
41 * @param[in] dimmedBackgroundImagePath Image path to be shown as button background when the button is dimmed.
42 * @return A handle to the new push button
44 PushButton CreatePushButton( const std::string& releasedImagePath, const std::string& pressedImagePath, const std::string& backgroundImagePath,
45 const std::string& dimmedReleasedImagePath, const std::string& dimmedBackgroundImagePath );
48 * @brief Creates a push button with the given images.
50 * Images will be shrunk to fit the button size keeping their aspect ratio.
51 * @note Images won't be scaled to fill the whole button size.
52 * @note If an image is an empty handle, this image is not set to the button.
54 * @param[in] releasedImageActor Image to be shown when the button is released.
55 * @param[in] pressedImageActor Image to be shown when the button is pressed.
56 * @param[in] backgroundImageActor Image to be shown as button background.
57 * @param[in] dimmedReleasedImageActor Image to be shown when the button is released and dimmed.
58 * @param[in] dimmedBackgroundImageActor Image to be shown as button background when the button is dimmed.
59 * @return A handle to the new pushbutton
61 PushButton CreatePushButton( Actor releasedImageActor, Actor pressedImageActor, Actor backgroundImageActor,
62 Actor dimmedReleasedImageActor, Actor dimmedBackgroundImageActor );
65 * @brief Creates a push button with the given background image.
67 * Background image will be shrunk to fit the button size keeping its aspect ratio.
68 * @note Background image won't be scaled to fill the whole button size.
70 * @param[in] backgroundImagePath Image path to be shown as button background.
71 * @return a handle to the new push button
73 PushButton CreatePushButton( const std::string& backgroundImagePath );
76 * @brief Creates a push button with the given background image.
78 * Background image will be shrunk to fit the button size keeping its aspect ratio.
79 * @note Background image won't be scaled to fill the whole button size.
81 * @param[in] backgroundImageActor Image to be shown as button background.
82 * @return a handle to the new push button
84 PushButton CreatePushButton( Actor backgroundImageActor );
86 } // namespace Toolkit
90 #endif // __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__