GetFontStyleProperty( mController, value, Text::FontStyle::DEFAULT );
map.Insert( Toolkit::TextVisual::Property::FONT_STYLE, value );
- map.Insert( Toolkit::TextVisual::Property::POINT_SIZE, mController->GetDefaultPointSize() );
+ map.Insert( Toolkit::TextVisual::Property::POINT_SIZE, mController->GetDefaultFontSize( Text::Controller::POINT_SIZE ) );
map.Insert( Toolkit::TextVisual::Property::MULTI_LINE, mController->IsMultiLineEnabled() );
map.Insert( Toolkit::TextVisual::Property::ENABLE_MARKUP, mController->IsMarkupProcessorEnabled() );
}
+void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
+{
+ map.Clear();
+ map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+ std::string text;
+ mController->GetText( text );
+ map.Insert( Toolkit::TextVisual::Property::TEXT, text );
+}
+
+
TextVisual::TextVisual( VisualFactoryCache& factoryCache )
: Visual::Base( factoryCache ),
mController( Text::Controller::New() ),
case Toolkit::TextVisual::Property::POINT_SIZE:
{
const float pointSize = propertyValue.Get<float>();
- if( !Equals( mController->GetDefaultPointSize(), pointSize ) )
+ if( !Equals( mController->GetDefaultFontSize( Text::Controller::POINT_SIZE ), pointSize ) )
{
- mController->SetDefaultPointSize( pointSize );
+ mController->SetDefaultFontSize( pointSize, Text::Controller::POINT_SIZE );
}
break;
}
mImpl->mRenderer.SetTextures( textureSet );
control.AddRenderer( mImpl->mRenderer );
+
+ // Text rendered and ready to display
+ ResourceReady();
}
}
}