Example #1
0
        public void Collect()
        {
            while (_markerStack.Count > 0)
            {
                DropMarker dm = _markerStack.Pop();

                //	If the Drop Marker was deleted in the document by
                //	a user action it will be disposed but not removed
                //	from the marker stack. In this case just pretend
                //	like it doesn't exist and go on to the next one
                if (dm.IsDisposed)
                {
                    continue;
                }

                //	The MarkerCollection fires a cancellable event.
                //	If it is canclled the Collect() method will return
                //	false. In this case we need to push the marker back
                //	on the stack so that it will still be collected in
                //	the future.
                if (!dm.Collect())
                {
                    _markerStack.Push(dm);
                }

                return;
            }
        }
Example #2
0
        public DropMarker Drop(int position)
        {
            DropMarker dm = new DropMarker(position, position, getCurrentTopOffset(), Scintilla);

            _allDocumentDropMarkers.Add(dm);
            _markerStack.Push(dm);
            Scintilla.ManagedRanges.Add(dm);

            //	Force the Drop Marker to paint
            Scintilla.Invalidate(dm.GetClientRectangle());
            return(dm);
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the DropMarkerCollectEventArgs class.
 /// </summary>
 /// <param name="dropMarker"></param>
 public DropMarkerCollectEventArgs(DropMarker dropMarker)
 {
     _dropMarker = dropMarker;
 }