/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const char* const POPUP_BUTTON_TITLE_LARGE_CONTENT_BUTTONS_ID = "POPUP_BUTTON_TITLE_LARGE_CONTENT_BUTTONS";
const char* const POPUP_BUTTON_FIXED_SIZE_ID = "POPUP_BUTTON_FIXED_SIZE_ID";
const char* const POPUP_BUTTON_COMPLEX_ID = "POPUP_BUTTON_COMPLEX";
+const char* const POPUP_BUTTON_CUSTOM_STYLE = "POPUP_BUTTON_CUSTOM_STYLE";
// Names to give Popup PushButton controls.
const char* const POPUP_CONTROL_OK_NAME = "controlOk";
{ POPUP_BUTTON_CONTENT_TEXT_ID, "Content Text" },
{ POPUP_BUTTON_CONTENT_IMAGE_ID, "Content Image" },
{ POPUP_BUTTON_TITLE_CONTENT_TEXT_ID, "Title + Content" },
- { POPUP_BUTTON_TITLE_LARGE_CONTENT_BUTTONS_ID, "Title + Large Content + Buttons" }
+ { POPUP_BUTTON_TITLE_LARGE_CONTENT_BUTTONS_ID, "Title + Large Content + Buttons" },
+ { POPUP_BUTTON_CUSTOM_STYLE, "Custom Styled Popup" }
};
const int POPUP_BUTTON_ITEMS_COUNT = sizeof( POPUP_BUTTON_ITEMS ) / sizeof( POPUP_BUTTON_ITEMS[0] );
+const char * const CUSTOM_POPUP_STYLE_NAME = "CustomPopupStyle"; ///< Custom popup style name
} // anonymous namespace
SetupPopup( mPopup, button );
}
+ else if( button.GetName() == POPUP_BUTTON_CUSTOM_STYLE )
+ {
+ mPopup = CreateConfirmationPopup( 2 );
+
+ Toolkit::TextLabel titleActor = Toolkit::TextLabel::New( "Styled Popup" );
+ titleActor.SetName( "titleActor" );
+ titleActor.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::RED );
+ titleActor.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true );
+ titleActor.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
+ mPopup.SetTitle( titleActor );
+
+ SetupPopup( mPopup, button );
+
+ mPopup.SetStyleName( CUSTOM_POPUP_STYLE_NAME );
+ }
return true;
}
"popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/00_popup_bg.9.png"
},
+ "CustomPopupStyle":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
+ "popupBackgroundBorder":[0,4,4,0],
+ "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
+ "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
+ "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
+ "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
+ },
+
"TextLabelRosemary":
{
"fontFamily":"Rosemary"
{
"styles":
{
+ "CustomPopupStyle":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
+ "popupBackgroundBorder":[0,4,4,0],
+ "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
+ "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
+ "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
+ "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
+ },
"TextLabelRosemary":
{
"fontFamily":"Rosemary"