예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LineCollection" /> class.
        /// </summary>
        /// <param name="Scintilla">The <see cref="Scintilla" /> control that created this collection.</param>
        public LineCollection(ZeroitCodeExplorer Scintilla)
        {
            this.Scintilla = Scintilla;
            this.Scintilla.SCNotification += scintilla_SCNotification;

            this.perLineData = new GapBuffer <PerLine>();
            this.perLineData.Add(new PerLine {
                Start = 0
            });
            this.perLineData.Add(new PerLine {
                Start = 0
            });                                              // Terminal
        }
예제 #2
0
        internal void RebuildLineData()
        {
            stepLine   = 0;
            stepLength = 0;

            perLineData = new GapBuffer <PerLine>();
            perLineData.Add(new PerLine {
                Start = 0
            });
            perLineData.Add(new PerLine {
                Start = 0
            });                                         // Terminal

            // Fake an insert notification
            var scn = new NativeMethods.SCNotification();

            scn.linesAdded = Scintilla.DirectMessage(NativeMethods.SCI_GETLINECOUNT).ToInt32() - 1;
            scn.position   = 0;
            scn.length     = Scintilla.DirectMessage(NativeMethods.SCI_GETLENGTH).ToInt32();
            scn.text       = Scintilla.DirectMessage(NativeMethods.SCI_GETRANGEPOINTER, new IntPtr(scn.position), new IntPtr(scn.length));
            TrackInsertText(scn);
        }