X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.cpp;h=14bac16d94206c53cc77abe39d95b815835e2574;hp=5eaecfa0292e174252be83850c3f13437fc30d5e;hb=93636543988d72ae45810bdf2347c2b0de8946f2;hpb=a97787d5b7db865cea0b003db309a619877b0144 diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp old mode 100644 new mode 100755 index 5eaecfa..14bac16 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -1315,7 +1316,7 @@ void TextEditor::OnInitialize() // Fill-parent area by default self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); - self.OnStageSignal().Connect( this, &TextEditor::OnStageConnect ); + self.OnSceneSignal().Connect( this, &TextEditor::OnSceneConnect ); DevelControl::SetInputMethodContext( *this, mInputMethodContext ); @@ -1400,7 +1401,15 @@ void TextEditor::OnRelayout( const Vector2& size, RelayoutContainer& container ) Vector2 contentSize( size.x - ( padding.start + padding.end ), size.y - ( padding.top + padding.bottom ) ); // Support Right-To-Left of padding - Dali::LayoutDirection::Type layoutDirection = static_cast( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + Dali::LayoutDirection::Type layoutDirection; + if( mController->IsMatchSystemLanguageDirection() ) + { + layoutDirection = static_cast( DevelWindow::Get( self ).GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } + else + { + layoutDirection = static_cast( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } if( Dali::LayoutDirection::RIGHT_TO_LEFT == layoutDirection ) { std::swap( padding.start, padding.end ); @@ -1592,12 +1601,12 @@ void TextEditor::OnLongPress( const LongPressGesture& gesture ) bool TextEditor::OnKeyEvent( const KeyEvent& event ) { - DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyEvent %p keyCode %d\n", mController.Get(), event.keyCode ); + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyEvent %p keyCode %d\n", mController.Get(), event.GetKeyCode() ); - if( Dali::DALI_KEY_ESCAPE == event.keyCode && mController->ShouldClearFocusOnEscape() ) + if( Dali::DALI_KEY_ESCAPE == event.GetKeyCode() && mController->ShouldClearFocusOnEscape() ) { // Make sure ClearKeyInputFocus when only key is up - if( event.state == KeyEvent::Up ) + if( event.GetState() == KeyEvent::UP ) { ClearKeyInputFocus(); } @@ -1793,7 +1802,7 @@ void TextEditor::OnScrollIndicatorAnimationFinished( Animation& animation ) } } -void TextEditor::OnStageConnect( Dali::Actor actor ) +void TextEditor::OnSceneConnect( Dali::Actor actor ) { if ( mHasBeenStaged ) { @@ -1841,20 +1850,20 @@ void TextEditor::KeyboardStatusChanged(bool keyboardShown) } } -void TextEditor::OnStageConnection( int depth ) +void TextEditor::OnSceneConnection( int depth ) { // Sets the depth to the visuals inside the text's decorator. mDecorator->SetTextDepth( depth ); // The depth of the text renderer is set in the RenderText() called from OnRelayout(). - // Call the Control::OnStageConnection() to set the depth of the background. - Control::OnStageConnection( depth ); + // Call the Control::OnSceneConnection() to set the depth of the background. + Control::OnSceneConnection( depth ); } -bool TextEditor::OnTouched( Actor actor, const TouchData& touch ) +bool TextEditor::OnTouched( Actor actor, const TouchEvent& touch ) { - return true; + return false; } void TextEditor::OnIdleSignal()