remove dead code from shadow view (OnStageConnection & OnStageDisconnection)
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / popup / popup-style-impl.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // EXTERNAL INCLUDES
19 #include <dali-toolkit/internal/controls/popup/popup-style-impl.h>
20
21 using namespace Dali;
22 using namespace Dali::Toolkit;
23
24 namespace // unnamed namespace
25 {
26 // Popup style default
27 const Vector4 DEFAULT_BACKING_COLOR = Vector4(0.0f, 0.0f, 0.0f, 0.5f);
28 const float DEFAULT_MARGIN = 20.0f;          //From Tizen GUI UX
29 const float DEFAULT_BUTTON_SPACING = 10.0f;  //From Tizen GUI UX
30 const Vector3 DEFAULT_BUTTON_SIZE(275.0f, 74.0f, 0.0f);
31 const char* DEFAULT_BACKGROUND_IMAGE_PATH = DALI_IMAGE_DIR "00_popup_bg.9.png";
32 const char* DEFAULT_BUTTON_AREA_IMAGE_PATH = DALI_IMAGE_DIR "00_popup_button_bg.png";
33 const char* DEFAULT_TAIL_UP_IMAGE_PATH = DALI_IMAGE_DIR "popup_tail_up.png";
34 const char* DEFAULT_TAIL_DOWN_IMAGE_PATH = DALI_IMAGE_DIR "popup_tail_down.png";
35 const char* DEFAULT_TAIL_LEFT_IMAGE_PATH = DALI_IMAGE_DIR "popup_tail_left.png";
36 const char* DEFAULT_TAIL_RIGHT_IMAGE_PATH = DALI_IMAGE_DIR "popup_tail_right.png";
37 const Vector3 DEFAULT_BOTTOM_SIZE(620.0f,96.0f,0.0f);
38 const Vector2 DEFAULT_BACKGROUND_SIZE(620.0f, 236.0f);
39 const Vector4 DEFAULT_BACKGROUND_STYLE_9_BORDER( 25.0f, 25.0f, 26.0f, 50.0f );
40 const Vector4 DEFAULT_BACKGROUND_OUTER_BORDER( 40.0f, 0.0f, 30.0f, 0.0f );
41 const Vector4 DEFAULT_BUTTON_AREA_9_PATCH_BORDER( 13.0f, 8.0f, 13.0f, 8.0f );
42 }
43
44 namespace Dali
45 {
46
47 namespace Toolkit
48 {
49
50 namespace Internal
51 {
52
53 ///////////////////////////////////////////////////////////////////////////////
54 // Popup Style (base class)
55 ///////////////////////////////////////////////////////////////////////////////
56
57 PopupStyle::PopupStyle()
58 : backingColor(),
59   backgroundImage(),
60   buttonAreaImage(),
61   backgroundSize(),
62   backgroundScale9Border(),
63   backgroundOuterBorder(),
64   buttonArea9PatchBorder(),
65   margin(0.0f),
66   buttonSpacing(0.0f),
67   buttonSize(),
68   tailUpImage(),
69   tailDownImage(),
70   tailLeftImage(),
71   tailRightImage()
72 {
73 }
74
75 PopupStyle::~PopupStyle()
76 {
77 }
78
79 ///////////////////////////////////////////////////////////////////////////////
80 // Popup style: Default
81 ///////////////////////////////////////////////////////////////////////////////
82
83 PopupStyleDefault::PopupStyleDefault()
84 {
85   backingColor = DEFAULT_BACKING_COLOR;
86   backgroundImage = DEFAULT_BACKGROUND_IMAGE_PATH;
87   buttonAreaImage = DEFAULT_BUTTON_AREA_IMAGE_PATH;
88   margin = DEFAULT_MARGIN;
89   buttonSpacing = DEFAULT_BUTTON_SPACING;
90   buttonSize = DEFAULT_BUTTON_SIZE;
91   tailUpImage = DEFAULT_TAIL_UP_IMAGE_PATH;
92   tailDownImage = DEFAULT_TAIL_DOWN_IMAGE_PATH;
93   tailLeftImage = DEFAULT_TAIL_LEFT_IMAGE_PATH;
94   tailRightImage = DEFAULT_TAIL_RIGHT_IMAGE_PATH;
95   backgroundSize = DEFAULT_BACKGROUND_SIZE;
96   backgroundScale9Border = DEFAULT_BACKGROUND_STYLE_9_BORDER;
97   backgroundOuterBorder = DEFAULT_BACKGROUND_OUTER_BORDER;
98   buttonArea9PatchBorder = DEFAULT_BUTTON_AREA_9_PATCH_BORDER;
99   bottomSize = DEFAULT_BOTTOM_SIZE;
100 }
101
102 PopupStyleDefaultPtr PopupStyleDefault::New()
103 {
104   return PopupStyleDefaultPtr(new PopupStyleDefault());
105 }
106
107 PopupStyleDefault::~PopupStyleDefault()
108 {
109 }
110
111 } // namespace Internal
112
113 } // namespace Toolkit
114
115 } // namespace Dali