void RequestUpdateOnce();
/**
+ * Request adaptor to update indicator's height
+ */
+ void IndicatorSizeChanged(int height);
+
+ /**
* @copydoc Dali::Adaptor::NotifySceneCreated()
*/
void NotifySceneCreated();
mCurrentSharedFile( 0 ),
mSharedBufferType( BUFFER_TYPE_SHM ),
mImpl( NULL ),
- mBackgroundVisible( false )
+ mBackgroundVisible( false ),
+ mTopMargin( 0 )
{
mIndicatorContentActor = Dali::Actor::New();
mIndicatorContentActor.SetParentOrigin( ParentOrigin::TOP_CENTER );
mIndicatorContentActor.RemoveRenderer( mBackgroundRenderer );
mBackgroundVisible = false;
}
+ UpdateTopMargin();
}
void Indicator::SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool forceUpdate )
}
mVisible = visibleMode;
+ UpdateTopMargin();
if( mForegroundRenderer && mForegroundRenderer.GetTextures().GetTexture( 0u ) )
{
mIndicatorContentActor.SetSize( mImageWidth, mImageHeight );
mIndicatorActor.SetSize( mImageWidth, mImageHeight );
mEventActor.SetSize(mImageWidth, mImageHeight);
+ UpdateTopMargin();
}
}
}
}
+void Indicator::UpdateTopMargin()
+{
+ int newMargin = (mVisible == Dali::Window::VISIBLE && mOpacityMode == Dali::Window::OPAQUE) ? mImageHeight : 0;
+ if (mTopMargin != newMargin)
+ {
+ mTopMargin = newMargin;
+ mAdaptor->IndicatorSizeChanged( mTopMargin );
+ }
+}
+
void Indicator::UpdateVisibility()
{
if( CheckVisibleState() )
mIndicatorContentActor.SetSize( mImageWidth, mImageHeight );
mIndicatorActor.SetSize( mImageWidth, mImageHeight );
mEventActor.SetSize( mImageWidth, mImageHeight );
+ UpdateTopMargin();
}
else
{
void LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent );
/**
+ * Update top margin of the stage as much as indicator height
+ */
+ void UpdateTopMargin();
+
+ /**
* Update the visibility and position of the actors
*/
void UpdateVisibility();
Impl* mImpl; ///< Created on construction and destroyed on destruction.
bool mBackgroundVisible; ///< Indicate whether background is visible
+ int mTopMargin; ///< Top margin of the stage for indicator
};
} // Adaptor
mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
}
+void TestApplication::SetTopMargin( unsigned int margin )
+{
+ mCore->SetTopMargin( margin );
+}
+
void TestApplication::DoUpdate( unsigned int intervalMilliseconds, const char* location )
{
if( GetUpdateStatus() == 0 &&
void ProcessEvent(const Integration::Event& event);
void SendNotification();
void SetSurfaceWidth( unsigned int width, unsigned height );
+ void SetTopMargin( unsigned int margin );
bool Render( unsigned int intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL );
unsigned int GetUpdateStatus();
bool UpdateOnly( unsigned int intervalMilliseconds = DEFAULT_RENDER_INTERVAL );