2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali-toolkit/internal/controls/popup/popup-style-impl.h>
22 using namespace Dali::Toolkit;
24 namespace // unnamed namespace
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 );
53 ///////////////////////////////////////////////////////////////////////////////
54 // Popup Style (base class)
55 ///////////////////////////////////////////////////////////////////////////////
57 PopupStyle::PopupStyle()
62 backgroundScale9Border(),
63 backgroundOuterBorder(),
64 buttonArea9PatchBorder(),
75 PopupStyle::~PopupStyle()
79 ///////////////////////////////////////////////////////////////////////////////
80 // Popup style: Default
81 ///////////////////////////////////////////////////////////////////////////////
83 PopupStyleDefault::PopupStyleDefault()
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;
102 PopupStyleDefaultPtr PopupStyleDefault::New()
104 return PopupStyleDefaultPtr(new PopupStyleDefault());
107 PopupStyleDefault::~PopupStyleDefault()
111 } // namespace Internal
113 } // namespace Toolkit