+void ConfigureTextLabel( ControllerPtr controller )
+{
+ TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+ fontClient.SetDpi( 93u, 93u );
+
+ // Set the text layout as multi-line.
+ controller->GetLayoutEngine().SetLayout( Layout::Engine::MULTI_LINE_BOX );
+
+ // Set cursor's width to zero.
+ controller->GetLayoutEngine().SetCursorWidth( 0 );
+
+ // Disables the text input.
+ controller->EnableTextInput( NULL );
+
+ // Disables the vertical scrolling.
+ controller->SetVerticalScrollEnabled( false );
+
+ // Disables the horizontal scrolling.
+ controller->SetHorizontalScrollEnabled( false );
+
+ // Enable the text elide.
+ controller->SetTextElideEnabled( true );
+}
+
+void ConfigureTextField( ControllerPtr controller )
+{
+ TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+ fontClient.SetDpi( 93u, 93u );
+
+ // Creates a decorator.
+ Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
+ *controller );
+
+ // Set the text layout as multi-line.
+ controller->GetLayoutEngine().SetLayout( Layout::Engine::SINGLE_LINE_BOX );
+
+ // Enables the text input.
+ controller->EnableTextInput( decorator );
+
+ // Enables the vertical scrolling after the text input has been enabled.
+ controller->SetVerticalScrollEnabled( false );
+
+ // Disables the horizontal scrolling.
+ controller->SetHorizontalScrollEnabled( true );
+
+ // No maximum number of characters.
+ controller->SetMaximumNumberOfCharacters( 50u );
+
+ // Disable the text elide.
+ controller->SetTextElideEnabled( false );
+}
+
+void ConfigureTextEditor( ControllerPtr controller )
+{
+ TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+ fontClient.SetDpi( 93u, 93u );
+
+ // Creates a decorator.
+ Text::DecoratorPtr decorator = Text::Decorator::New( *controller,
+ *controller );
+
+ // Set the text layout as multi-line.
+ controller->GetLayoutEngine().SetLayout( Layout::Engine::MULTI_LINE_BOX );
+
+ // Enables the text input.
+ controller->EnableTextInput( decorator );
+
+ // Enables the vertical scrolling after the text input has been enabled.
+ controller->SetVerticalScrollEnabled( true );
+
+ // Disables the horizontal scrolling.
+ controller->SetHorizontalScrollEnabled( false );
+
+ // No maximum number of characters.
+ controller->SetMaximumNumberOfCharacters( std::numeric_limits<Length>::max() );
+
+ // Disable the text elide.
+ controller->SetTextElideEnabled( false );
+}
+