X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Ftooltip%2Ftooltip-example.cpp;h=36f436e2b8f46f9ae9891abdc0891b9f5fd39f8a;hb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;hp=885c55efd301acf2fd8a2de073cd1045d306575f;hpb=a832af2813558a32f0a18747f3e6134ff6f6f301;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/tooltip/tooltip-example.cpp b/examples/tooltip/tooltip-example.cpp index 885c55e..36f436e 100644 --- a/examples/tooltip/tooltip-example.cpp +++ b/examples/tooltip/tooltip-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -63,8 +63,8 @@ private: // Add a text label at the top for information purposes Control label = TextLabel::New( "Hover over buttons to see tooltip" ); - label.SetParentOrigin( ParentOrigin::TOP_CENTER ); - label.SetAnchorPoint( AnchorPoint::TOP_CENTER ); + label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); + label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "Center" ); stage.Add( label ); @@ -94,21 +94,21 @@ private: SetLabel( customFromCode, "Custom From Code" ); Layout( customFromCode, stageSize ); customFromCode.SetProperty( DevelControl::Property::TOOLTIP, - Property::Map().Add( Tooltip::Property::CONTENT, - Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) - .Add( ImageVisual::Property::URL, DEMO_IMAGE_DIR "Logo-for-demo.png" ) ) - .Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT ) - .Add( TextVisual::Property::TEXT_COLOR, Color::WHITE ) - .Add( TextVisual::Property::TEXT, "Custom coded style\nat hover point" ) - .Add( TextVisual::Property::MULTI_LINE, true ) - .Add( TextVisual::Property::HORIZONTAL_ALIGNMENT, "CENTER" ) - .Add( TextVisual::Property::POINT_SIZE, 16 ) ) ) - .Add( Tooltip::Property::LAYOUT, Vector2( 2, 1 ) ) - .Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT ) - .Add( Tooltip::Property::BACKGROUND, - Property::Map().Add( Tooltip::Background::Property::VISUAL, DEMO_IMAGE_DIR "tooltip.9.png" ) - .Add( Tooltip::Background::Property::BORDER, Rect< int >( 1, 5, 5, 1 ) ) ) - ); + { { Tooltip::Property::CONTENT, + Property::Array{ { { { Toolkit::Visual::Property::TYPE, Visual::IMAGE }, + { ImageVisual::Property::URL, DEMO_IMAGE_DIR "Logo-for-demo.png" } } }, + { { { Toolkit::Visual::Property::TYPE, Visual::TEXT }, + { TextVisual::Property::TEXT_COLOR, Color::WHITE }, + { TextVisual::Property::TEXT, "Custom coded style\nat hover point" }, + { TextVisual::Property::MULTI_LINE, true }, + { TextVisual::Property::HORIZONTAL_ALIGNMENT, "CENTER" }, + { TextVisual::Property::POINT_SIZE, 16 } } } } }, + { Tooltip::Property::LAYOUT, Vector2( 2, 1 ) }, + { Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT }, + { Tooltip::Property::BACKGROUND, + { { Tooltip::Background::Property::VISUAL, DEMO_IMAGE_DIR "tooltip.9.png" }, + { Tooltip::Background::Property::BORDER, Rect< int >( 1, 5, 5, 1 ) } } } + } ); stage.Add( customFromCode ); } @@ -154,10 +154,10 @@ private: { previousPosition += POSITION_INCREMENTER; control.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); - control.SetSizeModeFactor( Vector3( 0.75, 0.1, 1.0 ) ); - control.SetAnchorPoint( AnchorPoint::CENTER ); - control.SetParentOrigin( ParentOrigin::TOP_CENTER ); - control.SetY( stageSize.height * previousPosition ); + control.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75, 0.1, 1.0 ) ); + control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); + control.SetProperty( Actor::Property::POSITION_Y, stageSize.height * previousPosition ); } }