DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "matchSystemLanguageDirection", BOOLEAN, MATCH_SYSTEM_LANGUAGE_DIRECTION )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "enableGrabHandlePopup", BOOLEAN, ENABLE_GRAB_HANDLE_POPUP )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "textBackground", VECTOR4, BACKGROUND )
+DALI_DEVEL_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextField, "selectedText", STRING, SELECTED_TEXT )
DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "maxLengthReached", SIGNAL_MAX_LENGTH_REACHED )
}
break;
}
+ case Toolkit::DevelTextField::Property::SELECTED_TEXT:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetSelectedText( );
+ }
+ break;
+ }
} //switch
}
{
if( mController && mController->IsShowingRealText() )
{
- mController->SelectEvent( 0.f, 0.f, true );
+ mController->SelectEvent( 0.f, 0.f, SelectionType::ALL );
+ SetKeyInputFocus();
+ }
+}
+
+void TextField::SelectNone()
+{
+ if( mController && mController->IsShowingRealText() )
+ {
+ mController->SelectEvent( 0.f, 0.f, SelectionType::NONE );
SetKeyInputFocus();
}
}
if( mStencil )
{
- mStencil.SetPosition( padding.start, padding.top );
+ mStencil.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top ));
}
if( mActiveLayer )
{
- mActiveLayer.SetPosition( padding.start, padding.top );
+ mActiveLayer.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top ));
}
const Text::Controller::UpdateTextType updateTextType = mController->Relayout( contentSize, layoutDirection );
renderableActorPositionY = scrollOffset.y + padding.top;
}
- mRenderableActor.SetPosition( renderableActorPositionX, renderableActorPositionY );
+ mRenderableActor.SetProperty( Actor::Property::POSITION, Vector2( renderableActorPositionX, renderableActorPositionY ));
// Make sure the actors are parented correctly with/without clipping
Actor self = mStencil ? mStencil : Self();
self.Add( *it );
it->LowerToBottom();
- if ( it->GetName() == "HighlightActor" )
+ if ( it->GetProperty< std::string >( Dali::Actor::Property::NAME ) == "HighlightActor" )
{
highlightActor = *it;
}
if ( mDecorator && mDecorator->IsHighlightVisible() )
{
self.Add( mBackgroundActor );
- mBackgroundActor.SetPosition( renderableActorPositionX, renderableActorPositionY); // In text field's coords.
+ mBackgroundActor.SetProperty( Actor::Property::POSITION, Vector2( renderableActorPositionX, renderableActorPositionY) ); // In text field's coords.
mBackgroundActor.LowerBelow( highlightActor );
}
else
{
mRenderableActor.Add( mBackgroundActor );
- mBackgroundActor.SetPosition( 0.0f, 0.0f ); // In renderable actor's coords.
+ mBackgroundActor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ) ); // In renderable actor's coords.
mBackgroundActor.LowerToBottom();
}
}
}
else
{
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Self().Add( actor );
mActiveLayer = actor;
}
{
// Creates an extra control to be used as stencil buffer.
mStencil = Control::New();
- mStencil.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mStencil.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ mStencil.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ mStencil.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
// Creates a background visual. Even if the color is transparent it updates the stencil.
mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND,