Ejemplo n.º 1
0
        public int PostEditorEventNotify(int inEvtDispId, IHTMLEventObj pIEventObj)
        {
            //get more DISPID constants from Netrix Component\netrix-27637\Netrix2.0\Core\ComInterop\DispId.cs
            const int KEYDOWN = (-602);
            const int MOUSEUP = (-607);

            //const int MOUSEDOWN = (-605);
            if (inEvtDispId == MOUSEUP)
            {
                CursorMoved?.Invoke(this);
            }
            else if (inEvtDispId == KEYDOWN)
            {
                switch (pIEventObj.keyCode)
                {
                case (int)Keys.Up:
                case (int)Keys.Down:
                case (int)Keys.Left:
                case (int)Keys.Right:
                case (int)Keys.PageDown:
                case (int)Keys.PageUp:
                case (int)Keys.Enter:
                    CursorMoved?.Invoke(this);
                    break;
                }
            }
            return(S_FALSE);
        }
        /// <summary> Move to the given caret location. </summary>
        /// <param name="blockCaret"> The block caret. </param>
        /// <param name="mode"> If the current selection should be replaced or extended to include the new position. </param>
        public void MoveTo(BlockCaret blockCaret, SelectionMode mode)
        {
            _caretStart = blockCaret;

            if (mode != SelectionMode.Extend)
            {
                _caretEnd = blockCaret;
            }

            CursorMoved?.Invoke(this, EventArgs.Empty);
        }
 private void fire_CursorMoved(InputTypes type, String title)
 {
     if (CursorMoved != null)
     {
         try
         {
             CursorMoved.Invoke(this, new InputEventArgs(type));
         }
         catch { }
     }
 }
        public static bool MoveCursor(Expression parent, int i = 0)
        {
            //if (parent == null || i < 0 || i >= parent.Children.Count || (parent == Cursor.Parent && Index == i))
            Index = RealIndex;
            if (parent == Cursor.Parent && Index == i)
            {
                return(false);
            }

            ViewLoc old = Cursor.Parent == null ? null : new ViewLoc(Cursor.Parent, Index);

            Index = i;
            parent.Insert(Index, Cursor);
            //print.log("cursor moved", parent, Index);
            CursorMoved?.Invoke(new ChangedEventArgs <ViewLoc>(old, new ViewLoc(parent, Index)));

            return(true);
        }
Ejemplo n.º 5
0
 internal void _FireCursorMovedEvent()
 {
     CursorMoved?.Invoke(this);
 }
Ejemplo n.º 6
0
 public void OnCursorMoved(TimeSpan t)
 {
     CursorMoved?.Invoke(this, new TimeSpanEventArgs(t));
 }