8e6c9d3bcb27d435a66455b0e3a76546700d19e5
[platform/core/uifw/dali-toolkit.git] / capi / dali-toolkit / public-api / controls / default-controls / push-button-factory.h
1 #ifndef __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__
2 #define __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 /**
22  * @addtogroup CAPI_DALI_TOOLKIT_DEFAULT_CONTROLS_MODULE
23  * @{
24  */
25
26 // INTERNAL INCLUDES
27 #include <dali/dali.h>
28 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
29
30 namespace Dali DALI_IMPORT_API
31 {
32
33 namespace Toolkit
34 {
35
36 /**
37  * @brief Creates a push button with the given images.
38  * Images will be shrunk to fit the button size keeping their aspect ratio.
39  * @note Images won't be scaled to fill the whole button size.
40  * @note If an image path is empty, this image is not set to the button.
41  *
42  * @param[in] releasedImagePath          Image path to be shown when the button is released.
43  * @param[in] pressedImagePath           Image path to be shown when the button is pressed.
44  * @param[in] backgroundImagePath        Image path to be shown as button background.
45  * @param[in] dimmedReleasedImagePath    Image path to be shown when the button is released and dimmed.
46  * @param[in] dimmedBackgroundImagePath  Image path to be shown as button background when the button is dimmed.
47  * @return A handle to the new push button
48  */
49 PushButton CreatePushButton( const std::string& releasedImagePath, const std::string& pressedImagePath, const std::string& backgroundImagePath,
50                              const std::string& dimmedReleasedImagePath, const std::string& dimmedBackgroundImagePath );
51
52 /**
53  * @brief Creates a push button with the given images.
54  *
55  * Images will be shrunk to fit the button size keeping their aspect ratio.
56  * @note Images won't be scaled to fill the whole button size.
57  * @note If an image is an empty handle, this image is not set to the button.
58  *
59  * @param[in] releasedImageActor          Image to be shown when the button is released.
60  * @param[in] pressedImageActor           Image to be shown when the button is pressed.
61  * @param[in] backgroundImageActor        Image to be shown as button background.
62  * @param[in] dimmedReleasedImageActor    Image to be shown when the button is released and dimmed.
63  * @param[in] dimmedBackgroundImageActor  Image to be shown as button background when the button is dimmed.
64  * @return A handle to the new pushbutton
65  */
66 PushButton CreatePushButton( Actor releasedImageActor, Actor pressedImageActor, Actor backgroundImageActor,
67                              Actor dimmedReleasedImageActor, Actor dimmedBackgroundImageActor );
68
69 /**
70  * @brief Creates a push button with the given background image.
71  *
72  * Background image will be shrunk to fit the button size keeping its aspect ratio.
73  * @note Background image won't be scaled to fill the whole button size.
74  *
75  * @param[in] backgroundImagePath  Image path to be shown as button background.
76  * @return a handle to the new push button
77  */
78 PushButton CreatePushButton( const std::string& backgroundImagePath );
79
80 /**
81  * @brief Creates a push button with the given background image.
82  *
83  * Background image will be shrunk to fit the button size keeping its aspect ratio.
84  * @note Background image won't be scaled to fill the whole button size.
85  *
86  * @param[in] backgroundImageActor  Image to be shown as button background.
87  * @return a handle to the new push button
88  */
89 PushButton CreatePushButton( Actor backgroundImageActor );
90
91 } // namespace Toolkit
92
93 } // namespace Dali
94
95 /**
96  * @}
97  */
98 #endif // __DALI_TOOLKIT_PUSH_BUTTON_FACTORY_H__