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-field-impl.cpp;h=1ed87bd1547ab557278f966c917ea89fe47b7d39;hp=0905572e3c2c4a20dd567474ce0ad5c84cba4958;hb=a827febe27e8131e681c24c255472bbbf097905f;hpb=50106cc2737496e2b27b2a6d089f205321678a41 diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 0905572..1ed87bd 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -140,6 +140,8 @@ DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "outline", DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputOutline", MAP, INPUT_OUTLINE ) DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "hiddenInputSettings", MAP, HIDDEN_INPUT_SETTINGS ) DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "pixelSize", FLOAT, PIXEL_SIZE ) +DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "enableSelection", BOOLEAN, ENABLE_SELECTION ) +DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "placeholder", MAP, PLACEHOLDER ) DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "textChanged", SIGNAL_TEXT_CHANGED ) DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "maxLengthReached", SIGNAL_MAX_LENGTH_REACHED ) @@ -751,6 +753,25 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr } break; } + case Toolkit::DevelTextField::Property::ENABLE_SELECTION: + { + if( impl.mController ) + { + const bool enableSelection = value.Get< bool >(); + DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p ENABLE_SELECTION %d\n", impl.mController.Get(), enableSelection ); + impl.mController->SetSelectionEnabled( enableSelection ); + } + break; + } + case Toolkit::DevelTextField::Property::PLACEHOLDER: + { + const Property::Map* map = value.GetMap(); + if( map ) + { + impl.mController->SetPlaceholderProperty( *map ); + } + break; + } } // switch } // textfield } @@ -1129,6 +1150,21 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde } break; } + case Toolkit::DevelTextField::Property::ENABLE_SELECTION: + { + if( impl.mController ) + { + value = impl.mController->IsSelectionEnabled(); + } + break; + } + case Toolkit::DevelTextField::Property::PLACEHOLDER: + { + Property::Map map; + impl.mController->GetPlaceholderProperty( map ); + value = map; + break; + } } //switch } @@ -1354,7 +1390,11 @@ void TextField::RenderText( Text::Controller::UpdateTextType updateTextType ) { if( mRenderer ) { + Dali::Toolkit::TextField handle = Dali::Toolkit::TextField( GetOwner() ); + renderableActor = mRenderer->Render( mController->GetView(), + handle, + Property::INVALID_INDEX, // Animatable property not supported mAlignmentOffset, DepthIndex::CONTENT ); }