DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "cursor-blink-interval", FLOAT, CURSOR_BLINK_INTERVAL )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "cursor-blink-duration", FLOAT, CURSOR_BLINK_DURATION )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "grab-handle-image", STRING, GRAB_HANDLE_IMAGE )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "grab-handle-pressed-image", VECTOR4, GRAB_HANDLE_PRESSED_IMAGE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "grab-handle-pressed-image", STRING, GRAB_HANDLE_PRESSED_IMAGE )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "scroll-threshold", FLOAT, SCROLL_THRESHOLD )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "scroll-speed", FLOAT, SCROLL_SPEED )
DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-image-left", STRING, SELECTION_HANDLE_IMAGE_LEFT )
const Vector4 color = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PRIMARY_CURSOR_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
- impl.mDecorator->SetColor( PRIMARY_CURSOR, color );
+ impl.mDecorator->SetCursorColor( PRIMARY_CURSOR, color );
impl.RequestTextRelayout();
}
break;
const Vector4 color = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SECONDARY_CURSOR_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
- impl.mDecorator->SetColor( SECONDARY_CURSOR, color );
+ impl.mDecorator->SetCursorColor( SECONDARY_CURSOR, color );
impl.RequestTextRelayout();
}
break;
mController->EnableTextInput( mDecorator );
// Forward input events to controller
- EnableGestureDetection(Gesture::Tap);
+ EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan |Gesture::LongPress ) );
GetTapGestureDetector().SetMaximumTapsRequired( 2 );
- EnableGestureDetection(Gesture::Pan);
self.TouchedSignal().Connect( this, &TextField::OnTouched );
notifier.ContentSelectedSignal().Connect( this, &TextField::OnClipboardTextSelected );
}
- mController->KeyboardFocusGainEvent();
+ mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event
EmitKeyInputFocusSignal( true ); // Calls back into the Control hence done last.
}
mController->PanEvent( gesture.state, gesture.displacement );
}
+void TextField::OnLongPress( const LongPressGesture& gesture )
+{
+ mController->LongPressEvent( gesture.state, gesture.localPoint.x, gesture.localPoint.y );
+}
+
bool TextField::OnKeyEvent( const KeyEvent& event )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyEvent %p keyCode %d\n", mController.Get(), event.keyCode );
}
else
{
- mController->KeyboardFocusGainEvent();
+ mController->KeyboardFocusGainEvent(); // Initially called by OnKeyInputFocusGained
}
}
-void TextField::OnStageConnection( unsigned int depth )
+void TextField::OnStageConnection( int depth )
{
mDepth = depth;
}