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=a0417dfa618ab3e2fa20724309ad1deb0d3d5fc4;hp=8b7ea1dc3270251336375028c87b90ccb386e571;hb=4d763eb68b5aa2448dfc81d90fc5ce598c68c99f;hpb=bd0b6d9d85d1e484aad8e96b0de89c494f013827 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 8b7ea1d..a0417df 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -30,8 +30,8 @@ // INTERNAL INCLUDES #include #include -#include #include +#include #include #include @@ -120,6 +120,9 @@ DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "decorationBoundingBox", DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputMethodSettings", MAP, INPUT_METHOD_SETTINGS ) DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputColor", VECTOR4, INPUT_COLOR ) DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "enableMarkup", BOOLEAN, ENABLE_MARKUP ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputFontFamily", STRING, INPUT_FONT_FAMILY ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputFontStyle", STRING, INPUT_FONT_STYLE ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "inputPointSize", FLOAT, INPUT_POINT_SIZE ) DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "textChanged", SIGNAL_TEXT_CHANGED ) DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "maxLengthReached", SIGNAL_MAX_LENGTH_REACHED ) @@ -214,7 +217,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr } case Toolkit::TextField::Property::FONT_STYLE: { - SetFontStyleProperty( impl.mController, value ); + SetFontStyleProperty( impl.mController, value, Text::FontStyle::DEFAULT ); break; } case Toolkit::TextField::Property::POINT_SIZE: @@ -578,6 +581,31 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr } break; } + case Toolkit::TextField::Property::INPUT_FONT_FAMILY: + { + if( impl.mController ) + { + const std::string fontFamily = value.Get< std::string >(); + DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p INPUT_FONT_FAMILY %s\n", impl.mController.Get(), fontFamily.c_str() ); + impl.mController->SetInputFontFamily( fontFamily ); + } + break; + } + case Toolkit::TextField::Property::INPUT_FONT_STYLE: + { + SetFontStyleProperty( impl.mController, value, Text::FontStyle::INPUT ); + break; + } + case Toolkit::TextField::Property::INPUT_POINT_SIZE: + { + if( impl.mController ) + { + const float pointSize = value.Get< float >(); + DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p INPUT_POINT_SIZE %f\n", impl.mController.Get(), pointSize ); + impl.mController->SetInputFontPointSize( pointSize ); + } + break; + } } // switch } // textfield } @@ -640,7 +668,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde } case Toolkit::TextField::Property::FONT_STYLE: { - GetFontStyleProperty( impl.mController, value ); + GetFontStyleProperty( impl.mController, value, Text::FontStyle::DEFAULT ); break; } case Toolkit::TextField::Property::POINT_SIZE: @@ -708,14 +736,6 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde } break; } - case Toolkit::TextField::Property::INPUT_COLOR: - { - if( impl.mController ) - { - value = impl.mController->GetInputColor(); - } - break; - } case Toolkit::TextField::Property::SHADOW_OFFSET: { if ( impl.mController ) @@ -869,6 +889,14 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde { break; } + case Toolkit::TextField::Property::INPUT_COLOR: + { + if( impl.mController ) + { + value = impl.mController->GetInputColor(); + } + break; + } case Toolkit::TextField::Property::ENABLE_MARKUP: { if( impl.mController ) @@ -877,6 +905,27 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde } break; } + case Toolkit::TextField::Property::INPUT_FONT_FAMILY: + { + if( impl.mController ) + { + value = impl.mController->GetInputFontFamily(); + } + break; + } + case Toolkit::TextField::Property::INPUT_FONT_STYLE: + { + GetFontStyleProperty( impl.mController, value, Text::FontStyle::INPUT ); + break; + } + case Toolkit::TextField::Property::INPUT_POINT_SIZE: + { + if( impl.mController ) + { + value = impl.mController->GetInputFontPointSize(); + } + break; + } } //switch }