X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fnative-image-source%2Fnative-image-source-example.cpp;h=a389a27dd92d340eea6b2095340daed0958dcc51;hb=6bccceebe41980e61f5d5d6956ab76b5a37653a0;hp=d4865cf6ba3ce00507ea3cd3ddb77c999ed70d06;hpb=cc86309efaef5f77c85ece1199f95e08534e4a32;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/native-image-source/native-image-source-example.cpp b/examples/native-image-source/native-image-source-example.cpp index d4865cf..a389a27 100644 --- a/examples/native-image-source/native-image-source-example.cpp +++ b/examples/native-image-source/native-image-source-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -130,9 +130,6 @@ public: Stage stage = Stage::GetCurrent(); stage.SetBackgroundColor( Color::WHITE ); - // Hide the indicator bar - application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); - stage.KeyEventSignal().Connect(this, &NativeImageSourceController::OnKeyEvent); CreateButtonArea(); @@ -146,7 +143,7 @@ public: Vector2 stageSize = stage.GetSize(); mButtonArea = Layer::New(); - mButtonArea.SetSize( stageSize.x, BUTTON_HEIGHT ); + mButtonArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, BUTTON_HEIGHT ) ); mButtonArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mButtonArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); stage.Add( mButtonArea ); @@ -156,7 +153,7 @@ public: mButtonShow.SetProperty( Toolkit::Button::Property::LABEL, "SHOW" ); mButtonShow.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonShow.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonShow.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); + mButtonShow.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); mButtonShow.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonShow ); @@ -165,8 +162,8 @@ public: mButtonRefreshAlways.SetProperty( Toolkit::Button::Property::LABEL, "ALWAYS" ); mButtonRefreshAlways.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonRefreshAlways.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonRefreshAlways.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonRefreshAlways.SetPosition( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f ); + mButtonRefreshAlways.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonRefreshAlways.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f )); mButtonRefreshAlways.StateChangedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonRefreshAlways ); @@ -174,8 +171,8 @@ public: mButtonRefreshOnce.SetProperty( Toolkit::Button::Property::LABEL, "ONCE" ); mButtonRefreshOnce.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonRefreshOnce.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonRefreshOnce.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonRefreshOnce.SetPosition( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f ); + mButtonRefreshOnce.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonRefreshOnce.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f )); mButtonRefreshOnce.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonRefreshOnce ); @@ -183,8 +180,8 @@ public: mButtonCapture.SetProperty( Toolkit::Button::Property::LABEL, "CAPTURE" ); mButtonCapture.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonCapture.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonCapture.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonCapture.SetPosition( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f ); + mButtonCapture.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonCapture.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f )); mButtonCapture.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonCapture ); @@ -192,8 +189,8 @@ public: mButtonReset.SetProperty( Toolkit::Button::Property::LABEL, "RESET" ); mButtonReset.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); mButtonReset.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); - mButtonReset.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); - mButtonReset.SetPosition( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f ); + mButtonReset.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); + mButtonReset.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f )); mButtonReset.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); mButtonArea.Add( mButtonReset ); } @@ -206,14 +203,14 @@ public: float contentHeight( (stageSize.y - BUTTON_HEIGHT)/2.0f ); mTopContentArea = Actor::New(); - mTopContentArea.SetSize( stageSize.x, contentHeight ); + mTopContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) ); mTopContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); mTopContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); - mTopContentArea.SetY( BUTTON_HEIGHT ); + mTopContentArea.SetProperty( Actor::Property::POSITION_Y, BUTTON_HEIGHT ); stage.Add( mTopContentArea ); mBottomContentArea = Actor::New(); - mBottomContentArea.SetSize( stageSize.x, contentHeight ); + mBottomContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) ); mBottomContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); mBottomContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); stage.Add( mBottomContentArea ); @@ -311,7 +308,7 @@ public: renderer.SetTextures( textureSet ); mDisplayActor.AddRenderer( renderer ); - mDisplayActor.SetSize( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ); + mDisplayActor.SetProperty( Actor::Property::SIZE, Vector2( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ) ); mBottomContentArea.Add( mDisplayActor ); }