private EventHandler<ScrollStateChangedEventArgs> textEditorScrollStateChangedEventHandler;
private ScrollStateChangedCallbackDelegate textEditorScrollStateChangedCallbackDelegate;
- private EventHandler<CursorPositionChangedEventArgs> textEditorCursorPositionChangedEventHandler;
+ private EventHandler textEditorCursorPositionChangedEventHandler;
private CursorPositionChangedCallbackDelegate textEditorCursorPositionChangedCallbackDelegate;
private EventHandler<MaxLengthReachedEventArgs> textEditorMaxLengthReachedEventHandler;
private EventHandler<AnchorClickedEventArgs> textEditorAnchorClickedEventHandler;
private AnchorClickedCallbackDelegate textEditorAnchorClickedCallbackDelegate;
- private EventHandler<TextSelectionChangedEventArgs> textEditorSelectionChangedEventHandler;
+ private EventHandler textEditorSelectionChangedEventHandler;
private SelectionChangedCallbackDelegate textEditorSelectionChangedCallbackDelegate;
private EventHandler<InputFilteredEventArgs> textEditorInputFilteredEventHandler;
/// </summary>
/// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler<CursorPositionChangedEventArgs> CursorPositionChanged
+ public event EventHandler CursorPositionChanged
{
add
{
/// </summary>
/// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler<TextSelectionChangedEventArgs> SelectionChanged
+ public event EventHandler SelectionChanged
{
add
{
private void OnCursorPositionChanged(IntPtr textEditor, uint oldPosition)
{
- if (textEditorCursorPositionChangedEventHandler != null)
- {
- CursorPositionChangedEventArgs e = new CursorPositionChangedEventArgs();
-
- // Populate all members of "e" (CursorPositionChangedEventArgs) with real data
- e.OldCursorPosition = oldPosition;
-
- //here we send all data to user event handlers
- textEditorCursorPositionChangedEventHandler?.Invoke(this, e);
- }
+ // no data to be sent to the user, as in NUI there is no event provide old values.
+ textEditorCursorPositionChangedEventHandler?.Invoke(this, EventArgs.Empty);
}
private void OnMaxLengthReached(IntPtr textEditor)
private void OnSelectionChanged(IntPtr textEditor, uint oldStart, uint oldEnd)
{
- if (textEditorSelectionChangedEventHandler != null)
- {
- TextSelectionChangedEventArgs e = new TextSelectionChangedEventArgs();
-
- // Populate all members of "e" (TextSelectionChangedEventArgs) with real data
- e.OldSelectionStart = oldStart;
- e.OldSelectionEnd = oldEnd;
-
- //here we send all data to user event handlers
- textEditorSelectionChangedEventHandler?.Invoke(this, e);
- }
+ // no data to be sent to the user, as in NUI there is no event provide old values.
+ textEditorSelectionChangedEventHandler?.Invoke(this, EventArgs.Empty);
}
private void OnInputFiltered(IntPtr textEditor, InputFilterType type)
[EditorBrowsable(EditorBrowsableState.Never)]
public InputFilterType Type { get; set; }
}
-
- /// <summary>
- /// The CursorPositionChanged event arguments.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class CursorPositionChangedEventArgs : EventArgs
- {
- /// <summary>
- /// cursor postion before the change.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public uint OldCursorPosition { get; set; }
- }
-
- /// <summary>
- /// The SelectionChanged event arguments.
- /// </summary>
- /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class TextSelectionChangedEventArgs : EventArgs
- {
- /// <summary>
- /// selection start before the change.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public uint OldSelectionStart { get; set; }
-
- /// <summary>
- /// selection end before the change.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public uint OldSelectionEnd { get; set; }
- }
}
\ No newline at end of file
{
private EventHandler<TextChangedEventArgs> textFieldTextChangedEventHandler;
private TextChangedCallbackDelegate textFieldTextChangedCallbackDelegate;
- private EventHandler<CursorPositionChangedEventArgs> textFieldCursorPositionChangedEventHandler;
+ private EventHandler textFieldCursorPositionChangedEventHandler;
private CursorPositionChangedCallbackDelegate textFieldCursorPositionChangedCallbackDelegate;
private EventHandler<MaxLengthReachedEventArgs> textFieldMaxLengthReachedEventHandler;
private MaxLengthReachedCallbackDelegate textFieldMaxLengthReachedCallbackDelegate;
private EventHandler<AnchorClickedEventArgs> textFieldAnchorClickedEventHandler;
private AnchorClickedCallbackDelegate textFieldAnchorClickedCallbackDelegate;
- private EventHandler<TextSelectionChangedEventArgs> textFieldSelectionChangedEventHandler;
+ private EventHandler textFieldSelectionChangedEventHandler;
private SelectionChangedCallbackDelegate textFieldSelectionChangedCallbackDelegate;
private EventHandler<InputFilteredEventArgs> textFieldInputFilteredEventHandler;
/// </summary>
/// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler<CursorPositionChangedEventArgs> CursorPositionChanged
+ public event EventHandler CursorPositionChanged
{
add
{
/// </summary>
/// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler<TextSelectionChangedEventArgs> SelectionChanged
+ public event EventHandler SelectionChanged
{
add
{
private void OnCursorPositionChanged(IntPtr textField, uint oldPosition)
{
- if (textFieldCursorPositionChangedEventHandler != null)
- {
- CursorPositionChangedEventArgs e = new CursorPositionChangedEventArgs();
-
- // Populate all members of "e" (CursorPositionChangedEventArgs) with real data
- e.OldCursorPosition = oldPosition;
-
- //here we send all data to user event handlers
- textFieldCursorPositionChangedEventHandler?.Invoke(this, e);
- }
+ // no data to be sent to the user, as in NUI there is no event provide old values.
+ textFieldCursorPositionChangedEventHandler?.Invoke(this, EventArgs.Empty);
}
private void OnMaxLengthReached(IntPtr textField)
private void OnSelectionChanged(IntPtr textField, uint oldStart, uint oldEnd)
{
- if (textFieldSelectionChangedEventHandler != null)
- {
- TextSelectionChangedEventArgs e = new TextSelectionChangedEventArgs();
-
- // Populate all members of "e" (TextSelectionChangedEventArgs) with real data
- e.OldSelectionStart = oldStart;
- e.OldSelectionEnd = oldEnd;
-
- //here we send all data to user event handlers
- textFieldSelectionChangedEventHandler?.Invoke(this, e);
- }
+ // no data to be sent to the user, as in NUI there is no event provide old values.
+ textFieldSelectionChangedEventHandler?.Invoke(this, EventArgs.Empty);
}
private void OnInputFiltered(IntPtr textField, InputFilterType type)