Exemplo n.º 1
0
        internal void NotifyVerticalScroll(VSTextEditorScrollEventArgs scrollInfo)
        {
            int diff = 0;

            _topLine = null;
            int topLine = TopLine;

            if (_oldTopLine.HasValue)
            {
                diff = _oldTopLine.Value - topLine;
            }
            _oldTopLine = topLine;
            int dy = (_firstLine - scrollInfo.FirstVisibleUnit) * LineHeight - diff;

            _firstLine = scrollInfo.FirstVisibleUnit;
            _lastLine  = scrollInfo.VisibleUnits + scrollInfo.FirstVisibleUnit;

            NativeMethods.ScrollWindowEx(Handle, 0, dy, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, NativeMethods.SW_INVALIDATE);
        }
Exemplo n.º 2
0
 private void logMessageEditor1_VerticalScroll(object sender, VSTextEditorScrollEventArgs e)
 {
     blameMarginControl1.NotifyVerticalScroll(e);
 }
Exemplo n.º 3
0
 private void OnVerticalTextScroll(VSTextEditorScrollEventArgs ea)
 {
     if (VerticalTextScroll != null)
         VerticalTextScroll(this, ea);
 }
Exemplo n.º 4
0
 private void OnHorizontalTextScroll(VSTextEditorScrollEventArgs ea)
 {
     if (HorizontalTextScroll != null)
         HorizontalTextScroll(this, ea);
 }
Exemplo n.º 5
0
        /// <summary>
        /// Occurs when the text view scrolled
        /// </summary>
        void IVsTextViewEvents.OnChangeScrollInfo(IVsTextView pView, int iBar, int iMinUnit, int iMaxUnits, int iVisibleUnits, int iFirstVisibleUnit)
        {
            bool vertical = (iBar == 1);
            VSTextEditorScrollEventArgs ea = new VSTextEditorScrollEventArgs(iMinUnit, iMaxUnits, iVisibleUnits, iFirstVisibleUnit);

            if (vertical)
                OnVerticalTextScroll(ea);
            else
                OnHorizontalTextScroll(ea);
        }