예제 #1
0
 internal ScrollingManager(EditorControl editor)
 {
     this.editor = editor;
 }
예제 #2
0
 public LineEditor(EditorControl editor) : base(editor.EditorSettings)
 {
     LimitedMode = true;
     this.editor = editor;
     AdjustHeight();
 }
예제 #3
0
 public MatchBracketManager(EditorControl editor)
 {
     this.editor = editor;
 }
예제 #4
0
        private void DoAftermath(EditorControl editor, ActionResults exp, int selCount, Pos caret, int edit = 0)
        {
            var scrolled = false;

            if (exp.Has(Modify))
            {
                editor.Scroll.InvalidateLines(
                    exp.Has(AtomicChange) ? InvalidateFlags.Atomic : InvalidateFlags.None);

                if (editor.Scroll.ScrollPosition.Y + editor.Info.TextHeight < -editor.Scroll.ScrollBounds.Height)
                {
                    exp |= Scroll;
                }

                if (!exp.Has(ShallowChange))
                {
                    editor.Buffer.Edits += edit;
                }

                if (!exp.Has(KeepRedo))
                {
                    editor.Buffer.RedoStack.Clear();
                }

                if (editor.HasContentModified)
                {
                    editor.OnContentModified();
                }
            }

            if (exp.Has(SetEditRange))
            {
                editor.FirstEditLine = int.MaxValue;
                editor.LastEditLine  = 0;
                SetEditLines(editor);
            }

            if (exp.Has(RestoreCaret))
            {
                SetCarets(editor, selCount, caret);
            }

            if (exp.Has(SetEditRange))
            {
                SetEditLines(editor);
            }

            if (exp.Has(Scroll))
            {
                editor.Scroll.SuppressOnScroll = true;
                scrolled = editor.Scroll.UpdateVisibleRectangle();
                editor.Scroll.SuppressOnScroll = false;
            }

            if (exp.Has(UpdateScrollInfo))
            {
                editor.Buffer.UpdateScrollInfo(editor);
            }

            if (/*scrolled ||*/ exp.Has(Modify))
            {
                editor.Styles.Restyle();
                editor.Search.RequestSearch();
            }

            if (!exp.Has(Silent))
            {
                editor.Buffer.RequestRedraw();
            }

            if (exp.Has(Modify))
            {
                editor.Folding.RebuildFolding();
            }

            if (exp.Has(LeaveEditor))
            {
                editor.Buffer.Selections.Truncate();
            }
        }
예제 #5
0
 internal LocationManager(EditorControl editor)
 {
     this.editor = editor;
 }
예제 #6
0
파일: EditorInfo.cs 프로젝트: vorov2/slot
 internal EditorInfo(EditorControl editor)
 {
     this.editor = editor;
 }