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