+void WidgetView::CloseRemoteSurface()
+{
+ screen_connector_toolkit_remove( mWatcherHandle );
+ mRemoteSurface = NULL;
+}
+
+void WidgetView::ShowLoadingState( bool show )
+{
+ if( mPreviewImage && mPreviewVisible )
+ {
+ mPreviewImage.SetVisible( show );
+ }
+
+ if( mStateText && mLoadingTextVisible )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, GET_LOCALE_TEXT( "IDS_ST_POP_LOADING_ING" ) );
+ mStateText.SetVisible( show );
+ }
+}
+
+void WidgetView::ShowTapWidgetState( bool show )
+{
+ if( mPreviewImage && mPreviewVisible )
+ {
+ mPreviewImage.SetVisible( false );
+ }
+
+ if( mStateText && mTapTextVisible )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT, GET_LOCALE_TEXT( "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" ) );
+ mStateText.SetVisible( show );
+ }
+}
+
+void WidgetView::SetLoadingTextPropertyMap( Property::Map map )
+{
+ if( mStateText )
+ {
+ Property::Value* fontStyle = map.Find( FONT_STYLE );
+ std::string style;
+
+ if( fontStyle && fontStyle->Get( style ) )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::FONT_STYLE, style );
+ }
+
+ Property::Value* textPointSize = map.Find( TEXT_POINT_SIZE );
+ float size = 0.f;
+
+ if( textPointSize && textPointSize->Get( size ) )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, size );
+ }
+
+ Property::Value* textColor = map.Find( TEXT_COLOR );
+ Vector4 color;
+
+ if( textColor && textColor->Get( color ) )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, color );
+ }
+ }
+}
+
+float WidgetView::TextPixelToPointSize( int pixelSize )
+{
+ Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi();
+ float meanDpi = (dpi.height + dpi.width) / 2.0f;
+
+ return (pixelSize * 72.0f) / meanDpi;
+}
+