#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/rendering-backend.h>
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
+#include <dali-toolkit/internal/styling/style-manager-impl.h>
using Dali::Toolkit::Text::LayoutEngine;
using Dali::Toolkit::Text::Backend;
-namespace
-{
-
-const unsigned int DEFAULT_RENDERING_BACKEND = 0;
-
-} // namespace
-
namespace Dali
{
namespace
{
+ const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
+}
+
+namespace
+{
// Type registration
BaseHandle Create()
{
case Toolkit::TextLabel::Property::RENDERING_BACKEND:
{
- unsigned int backend = value.Get< int >();
+ int backend = value.Get< int >();
if( impl.mRenderingBackend != backend )
{
- impl.mRenderingBackend = static_cast< unsigned int >( backend );
+ impl.mRenderingBackend = backend;
impl.mRenderer.Reset();
impl.RequestTextRelayout();
}
impl.mController->GetText( text );
value = text;
}
-
- DALI_LOG_WARNING( "UTF-8 text representation was discarded\n" );
break;
}
case Toolkit::TextLabel::Property::MULTI_LINE:
mController = Text::Controller::New( *this );
}
+void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange change )
+{
+ GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
+}
+
Vector3 TextLabel::GetNaturalSize()
{
return mController->GetNaturalSize();
}
TextLabel::TextLabel()
-: Control( ControlBehaviour( CONTROL_BEHAVIOUR_NONE ) ),
+: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
mRenderingBackend( DEFAULT_RENDERING_BACKEND )
{
}