X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-impl.cpp;h=f77714c712f4698532cb1ef98614ded652a3675a;hb=da0b26956ee6258765ff541e1b8057557a37144b;hp=c50b753d4ca872e4a59a92a38359fba21f64a9fa;hpb=46516d3e1711bd272cc00002876cf207465fa8ce;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index c50b753..f77714c 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include // INTERNAL INCLUDES #include @@ -35,6 +36,10 @@ namespace { +#if defined(DEBUG_ENABLED) + Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_CONTROLS"); +#endif + /** * @brief Some characters can be shaped in more than one glyph. * This struct is used to retrieve metrics from these group of glyphs. @@ -138,14 +143,14 @@ EventData::~EventData() bool Controller::Impl::ProcessInputEvents() { + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "-->Controller::ProcessInputEvents\n" ); if( NULL == mEventData ) { // Nothing to do if there is no text input. + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--Controller::ProcessInputEvents no event data\n" ); return false; } - mEventData->mDecoratorUpdated = false; - if( mEventData->mDecorator ) { for( std::vector::iterator iter = mEventData->mEventQueue.begin(); @@ -154,16 +159,6 @@ bool Controller::Impl::ProcessInputEvents() { switch( iter->type ) { - case Event::KEYBOARD_FOCUS_GAIN_EVENT: - { - OnKeyboardFocus( true ); - break; - } - case Event::KEYBOARD_FOCUS_LOST_EVENT: - { - OnKeyboardFocus( false ); - break; - } case Event::CURSOR_KEY_EVENT: { OnCursorKeyEvent( *iter ); @@ -235,7 +230,11 @@ bool Controller::Impl::ProcessInputEvents() mEventData->mEventQueue.clear(); - return mEventData->mDecoratorUpdated; + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--Controller::ProcessInputEvents\n" ); + + bool decoratorUpdated = mEventData->mDecoratorUpdated; + mEventData->mDecoratorUpdated = false; + return decoratorUpdated; } void Controller::Impl::UpdateModel( OperationsMask operationsRequired ) @@ -398,24 +397,6 @@ void Controller::Impl::GetDefaultFonts( Vector& fonts, Length numberOfC } } -void Controller::Impl::OnKeyboardFocus( bool hasFocus ) -{ - if( NULL == mEventData ) - { - // Nothing to do if there is no text input. - return; - } - - if( !hasFocus ) - { - ChangeState( EventData::INACTIVE ); - } - else - { - ChangeState( EventData::EDITING ); - } -} - void Controller::Impl::OnCursorKeyEvent( const Event& event ) { if( NULL == mEventData ) @@ -1052,9 +1033,11 @@ CharacterIndex Controller::Impl::CalculateNewCursorIndex( CharacterIndex index ) void Controller::Impl::UpdateCursorPosition() { + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "-->Controller::UpdateCursorPosition %p\n", this ); if( NULL == mEventData ) { // Nothing to do if there is no text input. + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--Controller::UpdateCursorPosition no event data\n" ); return; } @@ -1071,6 +1054,7 @@ void Controller::Impl::UpdateCursorPosition() cursorPosition.y, cursorInfo.primaryCursorHeight, cursorInfo.lineHeight ); + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Primary cursor position: %f,%f\n", cursorPosition.x, cursorPosition.y ); // Sets the grab handle position. mEventData->mDecorator->SetPosition( GRAB_HANDLE, @@ -1086,11 +1070,13 @@ void Controller::Impl::UpdateCursorPosition() cursorInfo.secondaryPosition.y + offset.y, cursorInfo.secondaryCursorHeight, cursorInfo.lineHeight ); + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Secondary cursor position: %f,%f\n", cursorInfo.secondaryPosition.x + offset.x, cursorInfo.secondaryPosition.y + offset.y ); } else { mEventData->mDecorator->SetActiveCursor( ACTIVE_CURSOR_PRIMARY ); } + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--Controller::UpdateCursorPosition\n" ); } void Controller::Impl::UpdateSelectionHandle( HandleType handleType )