/*
- * 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;
}
bool mContextual; ///< True if currently using the contextual popup mode.
bool mAnimationFade; ///< True if currently using the fade animation.
- ResourceImage mContextButtonDisabledImage; ///< The disabled context button icon.
- ResourceImage mContextButtonEnabledImage; ///< The enabled context button icon.
- ResourceImage mAnimationButtonZoomImage; ///< The zoom animation button icon.
- ResourceImage mAnimationButtonFadeImage; ///< The fade animation button icon.
-
Toolkit::Popup mPopup; ///< The current example popup.
Toolkit::ItemView mItemView; ///< ItemView to hold test images