[3.0] Updated demos to remove indicator where appropriate 83/85283/3
authorDavid Steele <david.steele@samsung.com>
Thu, 4 Aug 2016 15:15:19 +0000 (16:15 +0100)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Wed, 24 Aug 2016 18:11:54 +0000 (11:11 -0700)
Removed indicator from demo toolbar, and from other examples that
don't use toolbar and have a UI at the top of the display.

Change-Id: Ifd3b3c5f916f249f492ff154a0ca28054763ee6e
Signed-off-by: David Steele <david.steele@samsung.com>
examples/blocks/blocks-example.cpp
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
examples/image-view-svg/image-view-svg-example.cpp
examples/native-image-source/native-image-source-example.cpp
examples/page-turn-view/page-turn-view-example.cpp
examples/primitive-shapes/primitive-shapes-example.cpp
examples/renderer-stencil/renderer-stencil-example.cpp
examples/text-field/text-field-example.cpp
examples/tilt/tilt-example.cpp
shared/view.h

index 28eb286..03a99e6 100644 (file)
@@ -228,6 +228,9 @@ public:
   {
     Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
 
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     // Creates a default view with a default tool bar.
     // The view is added to the stage.
     Toolkit::ToolBar toolBar;
index 3af560d..7cdc4a6 100644 (file)
@@ -175,6 +175,9 @@ public:
     // Get a handle to the stage
     Stage stage = Stage::GetCurrent();
 
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     // Background image:
     Dali::Property::Map backgroundImage;
     backgroundImage.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::Visual::IMAGE );
index 7c08b44..12180f2 100644 (file)
@@ -66,6 +66,9 @@ public:
     Vector2 stageSize = stage.GetSize();
     mActorSize = stageSize/2.f;
 
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     stage.KeyEventSignal().Connect(this, &ImageSvgController::OnKeyEvent);
 
     // Background, for receiving gestures
index fe676dc..cf9304b 100644 (file)
@@ -146,6 +146,10 @@ public:
     // Get a handle to the stage
     Stage stage = Stage::GetCurrent();
     stage.SetBackgroundColor( Color::WHITE );
+
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     stage.KeyEventSignal().Connect(this, &NativeImageSourceController::OnKeyEvent);
 
     mButtonRefreshAlways = PushButton::New();
index b1b71ab..3d037eb 100644 (file)
@@ -242,6 +242,9 @@ void PageTurnController::OnInit( Application& app )
 
   Stage::GetCurrent().KeyEventSignal().Connect(this, &PageTurnController::OnKeyEvent);
 
+  // Hide the indicator bar
+  app.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
   Stage stage = Stage::GetCurrent();
   Vector2 stageSize =  stage.GetSize();
 
index bf8478d..9329371 100644 (file)
@@ -68,6 +68,9 @@ public:
     Stage stage = Stage::GetCurrent();
     stage.SetBackgroundColor( Color::WHITE );
 
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     //Set up layer to place UI on.
     Layer layer = Layer::New();
     layer.SetParentOrigin( ParentOrigin::CENTER );
index 5a92cd6..27385f0 100644 (file)
@@ -116,6 +116,9 @@ private:
   {
     Stage stage = Stage::GetCurrent();
 
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     // Creates the background image.
     Toolkit::Control background = Dali::Toolkit::Control::New();
     background.SetAnchorPoint( Dali::AnchorPoint::CENTER );
index 6d357eb..1b21b48 100644 (file)
@@ -75,6 +75,9 @@ public:
     stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
     stage.KeyEventSignal().Connect(this, &TextFieldExample::OnKeyEvent);
 
+    // Hide the indicator bar
+    application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
     mButton = CreateFolderButton();
     mButton.ClickedSignal().Connect( this, &TextFieldExample::OnButtonClicked );
     stage.Add( mButton );
index 0adc72e..230704a 100644 (file)
@@ -59,6 +59,9 @@ public:
     stage.GetRootLayer().TouchSignal().Connect( this, &TiltController::OnTouch );
 
     CreateSensor();
+
+    // Connect signals to allow Back and Escape to exit.
+    stage.KeyEventSignal().Connect( this, &TiltController::OnKeyEvent );
   }
 
   void CreateSensor()
@@ -88,6 +91,21 @@ public:
     mTextLabel.RotateBy(pitchRot);;
   }
 
+  /**
+   * @brief OnKeyEvent signal handler.
+   * @param[in] event The key event information
+   */
+  void OnKeyEvent( const KeyEvent& event )
+  {
+    if( event.state == KeyEvent::Down )
+    {
+      if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) )
+      {
+        mApplication.Quit();
+      }
+    }
+  }
+
 private:
   Application&  mApplication;
   TiltSensor mTiltSensor;
index 2606fd2..cc7ca8f 100644 (file)
@@ -118,6 +118,9 @@ Dali::Layer CreateView( Dali::Application& application,
 {
   Dali::Stage stage = Dali::Stage::GetCurrent();
 
+  // Hide the indicator bar
+  application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+
   // Create default View.
   view = Dali::Toolkit::Control::New();
   view.SetAnchorPoint( Dali::AnchorPoint::CENTER );