Conversion to Apache 2.0 license
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / popup / popup-style-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_POPUP_STYLE_H__
2 #define __DALI_TOOLKIT_INTERNAL_POPUP_STYLE_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 // INTERNAL INCLUDES
22 #include <dali/dali.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace Internal
31 {
32
33 class PopupStyle;
34
35 typedef IntrusivePtr<PopupStyle> PopupStylePtr;
36
37 /**
38  * A PopupStyle describes the images, positions, sizes, and various other metrics
39  * which define how the popup should look.
40  */
41 class PopupStyle : public RefObject
42 {
43 public:
44
45   /**
46    * Virtual destructor.
47    */
48   virtual ~PopupStyle();
49
50 public:
51
52   Vector4 backingColor;                               ///< Color of backing layer (covers entire screen)
53   std::string backgroundImage;                        ///< Background image path
54   std::string buttonAreaImage;                        ///< This image is for the back ground area common for all the buttons in the popup
55   Vector2 backgroundSize;                             ///< Background image size.
56   Vector4 backgroundScale9Border;                     ///< Background scale-9 border settings.
57   Vector4 backgroundOuterBorder;                      ///< Background outer border settings.
58   Vector4 buttonArea9PatchBorder;                     ///< 9 patch border constants for buttonAreaImage
59   float margin;                                       ///< Margin for all contents (body, title, button)
60   float buttonSpacing;                                ///< Horizontal spacing for buttons.
61   Vector3 buttonSize;                                 ///< Size of Buttons.
62   Vector3 bottomSize;                                 ///< size of bottom button bar.
63   std::string bottomBackgroundImage;                  ///< bottom background image path.
64   std::string tailUpImage;                            ///< Tail Up-side image path.
65   std::string tailDownImage;                          ///< Tail Down-side image path.
66   std::string tailLeftImage;                          ///< Tail Left-side image path.
67   std::string tailRightImage;                         ///< Tail Right-side image path.
68
69 protected:
70
71   /**
72    * Create a new PopupStyle; Only derived versions are instantiable.
73    */
74   PopupStyle();
75 };
76
77 class PopupStyleDefault;
78
79 typedef IntrusivePtr<PopupStyleDefault> PopupStyleDefaultPtr;
80
81 /**
82  * This is the default popup style.
83  */
84 class PopupStyleDefault : public PopupStyle
85 {
86 public:
87
88   /**
89    * Create a new PopupStyle
90    */
91   static PopupStyleDefaultPtr New();
92
93   /**
94    * Virtual destructor.
95    */
96   virtual ~PopupStyleDefault();
97
98 private:
99
100 protected:
101
102   /**
103    * Protected constructor; see also PopupStyleDefault::New()
104    */
105   PopupStyleDefault();
106 };
107
108 } // namespace Internal
109
110 } // namespace Toolkit
111
112 } // namespace Dali
113
114 #endif // __DALI_TOOLKIT_INTERNAL_POPUP_STYLE_H__