Commit 68084ad1ce68796f9ae1db1cd6692ffaa5d5e3c9

Authored by David Steele
1 parent 799c9609

Updated demos to remove indicator where appropriate

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
... ... @@ -228,6 +228,9 @@ public:
228 228 {
229 229 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
230 230  
  231 + // Hide the indicator bar
  232 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  233 +
231 234 // Creates a default view with a default tool bar.
232 235 // The view is added to the stage.
233 236 Toolkit::ToolBar toolBar;
... ...
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
... ... @@ -175,6 +175,9 @@ public:
175 175 // Get a handle to the stage
176 176 Stage stage = Stage::GetCurrent();
177 177  
  178 + // Hide the indicator bar
  179 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  180 +
178 181 // Background image:
179 182 Dali::Property::Map backgroundImage;
180 183 backgroundImage.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE );
... ...
examples/image-view-svg/image-view-svg-example.cpp
... ... @@ -66,6 +66,9 @@ public:
66 66 Vector2 stageSize = stage.GetSize();
67 67 mActorSize = stageSize/2.f;
68 68  
  69 + // Hide the indicator bar
  70 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  71 +
69 72 stage.KeyEventSignal().Connect(this, &ImageSvgController::OnKeyEvent);
70 73  
71 74 // Background, for receiving gestures
... ...
examples/native-image-source/native-image-source-example.cpp
... ... @@ -146,6 +146,10 @@ public:
146 146 // Get a handle to the stage
147 147 Stage stage = Stage::GetCurrent();
148 148 stage.SetBackgroundColor( Color::WHITE );
  149 +
  150 + // Hide the indicator bar
  151 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  152 +
149 153 stage.KeyEventSignal().Connect(this, &NativeImageSourceController::OnKeyEvent);
150 154  
151 155 mButtonRefreshAlways = PushButton::New();
... ...
examples/page-turn-view/page-turn-view-example.cpp
... ... @@ -242,6 +242,9 @@ void PageTurnController::OnInit( Application&amp; app )
242 242  
243 243 Stage::GetCurrent().KeyEventSignal().Connect(this, &PageTurnController::OnKeyEvent);
244 244  
  245 + // Hide the indicator bar
  246 + app.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  247 +
245 248 Stage stage = Stage::GetCurrent();
246 249 Vector2 stageSize = stage.GetSize();
247 250  
... ...
examples/primitive-shapes/primitive-shapes-example.cpp
... ... @@ -68,6 +68,9 @@ public:
68 68 Stage stage = Stage::GetCurrent();
69 69 stage.SetBackgroundColor( Color::WHITE );
70 70  
  71 + // Hide the indicator bar
  72 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  73 +
71 74 //Set up layer to place UI on.
72 75 Layer layer = Layer::New();
73 76 layer.SetParentOrigin( ParentOrigin::CENTER );
... ...
examples/renderer-stencil/renderer-stencil-example.cpp
... ... @@ -116,6 +116,9 @@ private:
116 116 {
117 117 Stage stage = Stage::GetCurrent();
118 118  
  119 + // Hide the indicator bar
  120 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  121 +
119 122 // Creates the background image.
120 123 Toolkit::Control background = Dali::Toolkit::Control::New();
121 124 background.SetAnchorPoint( Dali::AnchorPoint::CENTER );
... ...
examples/text-field/text-field-example.cpp
... ... @@ -75,6 +75,9 @@ public:
75 75 stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
76 76 stage.KeyEventSignal().Connect(this, &TextFieldExample::OnKeyEvent);
77 77  
  78 + // Hide the indicator bar
  79 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  80 +
78 81 mButton = CreateFolderButton();
79 82 mButton.ClickedSignal().Connect( this, &TextFieldExample::OnButtonClicked );
80 83 stage.Add( mButton );
... ...
examples/tilt/tilt-example.cpp
... ... @@ -59,6 +59,9 @@ public:
59 59 stage.GetRootLayer().TouchSignal().Connect( this, &TiltController::OnTouch );
60 60  
61 61 CreateSensor();
  62 +
  63 + // Connect signals to allow Back and Escape to exit.
  64 + stage.KeyEventSignal().Connect( this, &TiltController::OnKeyEvent );
62 65 }
63 66  
64 67 void CreateSensor()
... ... @@ -88,6 +91,21 @@ public:
88 91 mTextLabel.RotateBy(pitchRot);;
89 92 }
90 93  
  94 + /**
  95 + * @brief OnKeyEvent signal handler.
  96 + * @param[in] event The key event information
  97 + */
  98 + void OnKeyEvent( const KeyEvent& event )
  99 + {
  100 + if( event.state == KeyEvent::Down )
  101 + {
  102 + if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) )
  103 + {
  104 + mApplication.Quit();
  105 + }
  106 + }
  107 + }
  108 +
91 109 private:
92 110 Application& mApplication;
93 111 TiltSensor mTiltSensor;
... ...
shared/view.h
... ... @@ -118,6 +118,9 @@ Dali::Layer CreateView( Dali::Application&amp; application,
118 118 {
119 119 Dali::Stage stage = Dali::Stage::GetCurrent();
120 120  
  121 + // Hide the indicator bar
  122 + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
  123 +
121 124 // Create default View.
122 125 view = Dali::Toolkit::Control::New();
123 126 view.SetAnchorPoint( Dali::AnchorPoint::CENTER );
... ...