Renamed KeyEvent enum values to comply with coding standards.
[platform/core/uifw/dali-demo.git] / examples / line-mesh / line-mesh-example.cpp
index 99f3009..3d1d2db 100644 (file)
@@ -95,7 +95,7 @@ Geometry CreateGeometry()
   pentagonVertexFormat["aPosition1"] = Property::VECTOR2;
   pentagonVertexFormat["aPosition2"] = Property::VECTOR2;
   pentagonVertexFormat["aColor"] = Property::VECTOR3;
-  PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat );
+  VertexBuffer pentagonVertices = VertexBuffer::New( pentagonVertexFormat );
   pentagonVertices.SetData(pentagonVertexData, 5);
 
 
@@ -121,7 +121,7 @@ public:
    */
   ExampleController( Application& application )
   : mApplication( application ),
-    mStageSize(),
+    mWindowSize(),
     mShader(),
     mGeometry(),
     mRenderer(),
@@ -152,7 +152,7 @@ public:
    */
   void Create( Application& application )
   {
-    Stage stage = Stage::GetCurrent();
+    Window window = application.GetWindow();
 
     // initial settings
     mPrimitiveType = Geometry::LINES;
@@ -161,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));
   }
 
   /**
@@ -178,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();
     }
 
@@ -205,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();
@@ -222,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 );
@@ -296,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);
   }
 
   /**
@@ -313,7 +310,7 @@ public:
 
   void OnKeyEvent(const KeyEvent& event)
   {
-    if(event.state == KeyEvent::Down)
+    if(event.GetState() == KeyEvent::DOWN)
     {
       if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) )
       {
@@ -379,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;