Revert "Updates following rename of PropertyBuffer"
[platform/core/uifw/dali-demo.git] / examples / line-mesh / line-mesh-example.cpp
index b4fd114..ff3aace 100644 (file)
@@ -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.
@@ -16,7 +16,9 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/actors/actor-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
 
 // INTERNAL INCLUDES
 #include "shared/view.h"
@@ -119,7 +121,7 @@ public:
    */
   ExampleController( Application& application )
   : mApplication( application ),
-    mStageSize(),
+    mWindowSize(),
     mShader(),
     mGeometry(),
     mRenderer(),
@@ -150,7 +152,7 @@ public:
    */
   void Create( Application& application )
   {
-    Stage stage = Stage::GetCurrent();
+    Window window = application.GetWindow();
 
     // initial settings
     mPrimitiveType = Geometry::LINES;
@@ -159,16 +161,13 @@ public:
 
     CreateRadioButtons();
 
-    stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
+    window.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
 
-    mStageSize = stage.GetSize();
+    mWindowSize = window.GetSize();
 
     Initialise();
 
-    // Hide the indicator bar
-    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
-
-    stage.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f));
+    window.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f));
   }
 
   /**
@@ -176,12 +175,12 @@ public:
    */
   void Initialise()
   {
-    Stage stage = Stage::GetCurrent();
+    Window window = mApplication.GetWindow();
 
     // destroy mesh actor and its resources if already exists
     if( mMeshActor )
     {
-      stage.Remove( mMeshActor );
+      window.Remove( mMeshActor );
       mMeshActor.Reset();
     }
 
@@ -195,6 +194,7 @@ public:
     mMeshActor = Actor::New();
     mMeshActor.AddRenderer( mRenderer );
     mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(200, 200) );
+    mMeshActor.SetProperty( DevelActor::Property::UPDATE_SIZE_HINT, Vector2(400, 400) );
 
     Property::Index morphAmountIndex = mMeshActor.RegisterProperty( "uMorphAmount", 0.0f );
 
@@ -202,7 +202,7 @@ public:
 
     mMeshActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     mMeshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
-    stage.Add( mMeshActor );
+    window.Add( mMeshActor );
 
     Animation  animation = Animation::New(5);
     KeyFrames keyFrames = KeyFrames::New();
@@ -219,7 +219,7 @@ public:
    */
   void CreateRadioButtons()
   {
-    Stage stage = Stage::GetCurrent();
+    Window window = mApplication.GetWindow();
 
     Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 4, 1 );
     modeSelectTableView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
@@ -293,8 +293,8 @@ public:
     elementCountTableView.AddChild( mIndicesCountLabel, Toolkit::TableView::CellPosition( 0,  1 ) );
     elementCountTableView.AddChild( mPlusButton, Toolkit::TableView::CellPosition( 0,  2 ) );
 
-    stage.Add(modeSelectTableView);
-    stage.Add(elementCountTableView);
+    window.Add(modeSelectTableView);
+    window.Add(elementCountTableView);
   }
 
   /**
@@ -376,7 +376,7 @@ public:
 private:
 
   Application&  mApplication;                             ///< Application instance
-  Vector3 mStageSize;                                     ///< The size of the stage
+  Vector3 mWindowSize;                                     ///< The size of the window
 
   Shader   mShader;
   Geometry mGeometry;