+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::IsAutoScrollEnabled[%s]\n", mImpl->mIsAutoScrollEnabled?"true":"false" );
+
+ return mImpl->mIsAutoScrollEnabled;
+}
+
+void Controller::SetAutoscrollSpeed( int scrollSpeed )
+{
+ if( NULL == mImpl->mAutoScrollData )
+ {
+ mImpl->mAutoScrollData = new ScrollerData();
+ }
+
+ mImpl->mAutoScrollData->mScrollSpeed = scrollSpeed;
+}
+
+int Controller::GetAutoScrollSpeed() const
+{
+ if( NULL != mImpl->mAutoScrollData )
+ {
+ return mImpl->mAutoScrollData->mScrollSpeed;
+ }
+
+ return 0;
+}
+
+void Controller::SetAutoScrollLoopCount( int loopCount )
+{
+ if( NULL == mImpl->mAutoScrollData )
+ {
+ mImpl->mAutoScrollData = new ScrollerData();
+ }
+
+ mImpl->mAutoScrollData->mLoopCount = loopCount;
+}
+
+int Controller::GetAutoScrollLoopCount() const
+{
+ if( NULL != mImpl->mAutoScrollData )
+ {
+ return mImpl->mAutoScrollData->mLoopCount;
+ }
+
+ return 0;
+}
+
+void Controller::SetAutoScrollWrapGap( float wrapGap )
+{
+ if( NULL == mImpl->mAutoScrollData )
+ {
+ mImpl->mAutoScrollData = new ScrollerData();
+ }
+
+ mImpl->mAutoScrollData->mWrapGap = wrapGap;
+}
+
+float Controller::GetAutoScrollWrapGap() const
+{
+ if( NULL != mImpl->mAutoScrollData )
+ {
+ return mImpl->mAutoScrollData->mWrapGap;
+ }
+
+ return 0.f;
+}
+
+const ScrollerData* const Controller::GetAutoScrollData()
+{
+ if( NULL != mImpl->mAutoScrollData )
+ {
+ // Need to update the data with the latest layout.
+ if( mImpl->mVisualModel )
+ {
+ mImpl->mAutoScrollData->mControlSize = mImpl->mVisualModel->mControlSize;
+ mImpl->mAutoScrollData->mOffscreenSize = GetNaturalSize().GetVectorXY();
+
+ mImpl->mAutoScrollData->mAlignmentOffset = 0.f;
+ if( 0u != mImpl->mVisualModel->mLines.Count() )
+ {
+ mImpl->mAutoScrollData->mAlignmentOffset = ( *mImpl->mVisualModel->mLines.Begin() ).alignmentOffset;
+ }
+ }
+
+ return mImpl->mAutoScrollData;
+ }
+
+ return NULL;
+}
+
+void Controller::SetHorizontalScrollEnabled( bool enable )
+{
+ if( ( NULL != mImpl->mEventData ) &&
+ mImpl->mEventData->mDecorator )
+ {
+ mImpl->mEventData->mDecorator->SetHorizontalScrollEnabled( enable );
+ }
+}
+
+bool Controller::IsHorizontalScrollEnabled() const
+{
+ if( ( NULL != mImpl->mEventData ) &&
+ mImpl->mEventData->mDecorator )
+ {
+ return mImpl->mEventData->mDecorator->IsHorizontalScrollEnabled();
+ }
+
+ return false;
+}
+
+void Controller::SetVerticalScrollEnabled( bool enable )
+{
+ if( ( NULL != mImpl->mEventData ) &&
+ mImpl->mEventData->mDecorator )
+ {
+ if( mImpl->mEventData->mDecorator )
+ {
+ mImpl->mEventData->mDecorator->SetVerticalScrollEnabled( enable );
+ }
+ }
+}
+
+bool Controller::IsVerticalScrollEnabled() const
+{
+ if( ( NULL != mImpl->mEventData ) &&
+ mImpl->mEventData->mDecorator )
+ {
+ return mImpl->mEventData->mDecorator->IsVerticalScrollEnabled();
+ }
+
+ return false;
+}
+
+void Controller::SetSmoothHandlePanEnabled( bool enable )
+{
+ if( ( NULL != mImpl->mEventData ) &&
+ mImpl->mEventData->mDecorator )
+ {
+ mImpl->mEventData->mDecorator->SetSmoothHandlePanEnabled( enable );
+ }
+}
+
+bool Controller::IsSmoothHandlePanEnabled() const
+{
+ if( ( NULL != mImpl->mEventData ) &&
+ mImpl->mEventData->mDecorator )
+ {
+ return mImpl->mEventData->mDecorator->IsSmoothHandlePanEnabled();
+ }
+
+ return false;
+}
+
+void Controller::SetMaximumNumberOfCharacters( Length maxCharacters )
+{
+ mImpl->mMaximumNumberOfCharacters = maxCharacters;
+}
+
+int Controller::GetMaximumNumberOfCharacters()
+{
+ return mImpl->mMaximumNumberOfCharacters;
+}
+
+void Controller::SetEnableCursorBlink( bool enable )
+{
+ DALI_ASSERT_DEBUG( NULL != mImpl->mEventData && "TextInput disabled" );
+
+ if( NULL != mImpl->mEventData )
+ {
+ mImpl->mEventData->mCursorBlinkEnabled = enable;
+
+ if( !enable &&
+ mImpl->mEventData->mDecorator )
+ {
+ mImpl->mEventData->mDecorator->StopCursorBlink();
+ }
+ }
+}
+
+bool Controller::GetEnableCursorBlink() const
+{
+ if( NULL != mImpl->mEventData )
+ {
+ return mImpl->mEventData->mCursorBlinkEnabled;
+ }
+
+ return false;
+}
+
+void Controller::SetMultiLineEnabled( bool enable )
+{
+ const LayoutEngine::Layout layout = enable ? LayoutEngine::MULTI_LINE_BOX : LayoutEngine::SINGLE_LINE_BOX;
+
+ if( layout != mImpl->mLayoutEngine.GetLayout() )
+ {
+ // Set the layout type.
+ mImpl->mLayoutEngine.SetLayout( layout );
+
+ // Set the flags to redo the layout operations
+ const OperationsMask layoutOperations = static_cast<OperationsMask>( LAYOUT |
+ UPDATE_LAYOUT_SIZE |
+ ALIGN |
+ REORDER );
+
+ mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | layoutOperations );