DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "lineWrapMode", INTEGER, LINE_WRAP_MODE )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholderText", STRING, PLACEHOLDER_TEXT )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholderTextColor", VECTOR4, PLACEHOLDER_TEXT_COLOR )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableShiftSelection", BOOLEAN, ENABLE_SHIFT_SELECTION )
DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED )
{
if( impl.mController )
{
+
+ // The line spacing isn't supported by the TextEditor. Since it's supported
+ // by the TextLabel for now it must be ignored. The property is being shadowed
+ // locally so its value isn't affected.
const float lineSpacing = value.Get<float>();
- impl.mController->SetDefaultLineSpacing( lineSpacing );
+ impl.mLineSpacing = lineSpacing;
+ // set it to 0.0 due to missing implementation
+ impl.mController->SetDefaultLineSpacing( 0.0f );
impl.mRenderer.Reset();
}
break;
Text::LineWrap::Mode lineWrapMode( static_cast< Text::LineWrap::Mode >( -1 ) ); // Set to invalid value to ensure a valid mode does get set
if( GetLineWrapModeEnumeration( value, lineWrapMode ) )
{
- DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel %p LineWrap::MODE %d\n", impl.mController.Get(), lineWrapMode );
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p LineWrap::MODE %d\n", impl.mController.Get(), lineWrapMode );
impl.mController->SetLineWrapMode( lineWrapMode );
}
}
break;
}
+ case Toolkit::DevelTextEditor::Property::ENABLE_SHIFT_SELECTION:
+ {
+ if( impl.mController )
+ {
+ const bool shiftSelection = value.Get<bool>();
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p ENABLE_SHIFT_SELECTION %d\n", impl.mController.Get(), shiftSelection );
+
+ impl.mController->SetShiftSelectionEnabled( shiftSelection );
+ }
+ break;
+ }
} // switch
} // texteditor
}
{
if( impl.mController )
{
- value = impl.mController->GetDefaultLineSpacing();
+ // LINE_SPACING isn't implemented for the TextEditor. Returning
+ // only shadowed value, not the real one.
+ value = impl.mLineSpacing;
}
break;
}
{
value = impl.mController->GetLineWrapMode();
}
+ break;
+ }
+ case Toolkit::DevelTextEditor::Property::ENABLE_SHIFT_SELECTION:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->IsShiftSelectionEnabled();
+ }
+ break;
}
} //switch
}
mIdleCallback( NULL ),
mAlignmentOffset( 0.f ),
mScrollAnimationDuration( 0.f ),
+ mLineSpacing( 0.f ),
mRenderingBackend( DEFAULT_RENDERING_BACKEND ),
mHasBeenStaged( false ),
mScrollAnimationEnabled( false ),