context: using System;
  using System.Collections.Generic;
  using System.Text;
  using System.Windows.Forms;
  using System.Runtime.InteropServices;
  using System.ComponentModel;
  namespace ScintillaNet
  {
  	#region DropMarkerCollectEventArgs
  	/// <summary>
  	/// Provides data for a DropMarkerCollect event
  	/// </summary>
  	public class DropMarkerCollectEventArgs : CancelEventArgs
  	{
  		private DropMarker _dropMarker;
  		/// <summary>
  		/// Returns the DropMarker that was collected
  		/// </summary>
  		public DropMarker DropMarker
  		{
  			get
  			{
  				return _dropMarker;
  			}
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the DropMarkerCollectEventArgs class.
  		/// </summary>
  		/// <param name="dropMarker"></param>
  		public DropMarkerCollectEventArgs(DropMarker dropMarker)
  		{
  			_dropMarker = dropMarker;
  		}
  	} 
  	#endregion
  
  	#region CharAddedEventArgs
  
  	/// <summary>
  	/// Provides data for the CallTipClick event
  	/// </summary>
  	public class CallTipClickEventArgs : EventArgs
  	{
  		private CallTipArrow _callTipArrow;
  		/// <summary>
  		/// Returns the CallTipArrow that was clicked
  		/// </summary>
  		public CallTipArrow CallTipArrow
  		{
  			get
  			{
  				return _callTipArrow;
  			}
  		}
  
  		private int _currentIndex;
  		/// <summary>
  		/// Gets the current index of the CallTip's overload list
  		/// </summary>
  		public int CurrentIndex
  		{
  			get
  			{
  				return _currentIndex;
  			}
  		}
  
  		private int _newIndex;
  		/// <summary>
  		/// Gets/Sets the new index of the CallTip's overload list
  		/// </summary>
  		public int NewIndex
  		{
  			get
  			{
  				return _newIndex;
  			}
  			set
  			{
  				_newIndex = value;
  			}
  		}
  
  		private OverloadList _overloadList;
  		/// <summary>
  		/// Returns the OverLoad list of the CallTip
  		/// </summary>
  		public OverloadList OverloadList
  		{
  			get
  			{
  				return _overloadList;
  			}
  		}
  
  		private bool _cancel = false;
  		/// <summary>
  		/// Gets/Sets if the CallTip should be hidden
  		/// </summary>
  		public bool Cancel
  		{
  			get
  			{
  				return _cancel;
  			}
  			set
  			{
  				_cancel = value;
  			}
  		}
  
  		private int _highlightStart;
  
  		/// <summary>
  		/// Gets/Sets the start position of the CallTip's highlighted portion of text
  		/// </summary>
  		public int HighlightStart
  		{
  			get
  			{
  				return _highlightStart;
  			}
  			set
  			{
  				_highlightStart = value;
  			}
  		}
  
  		private int _highlightEnd;
  		/// <summary>
  		/// Gets/Sets the end position of the CallTip's highlighted portion of text
  		/// </summary>
  		public int HighlightEnd
  		{
  			get
  			{
  				return _highlightEnd;
  			}
  			set
  			{
  				_highlightEnd = value;
  			}
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the CallTipClickEventArgs class.
  		/// </summary>
  		/// <param name="callTipArrow">CallTipArrow clicked</param>
  		/// <param name="currentIndex">Current posision of the overload list</param>
  		/// <param name="newIndex">New position of the overload list</param>
  		/// <param name="overloadList">List of overloads to be cycled in the calltip</param>
  		/// <param name="highlightStart">Start position of the highlighted text</param>
  		/// <param name="highlightEnd">End position of the highlighted text</param>
  		public CallTipClickEventArgs(CallTipArrow callTipArrow, int currentIndex, int newIndex, OverloadList overloadList, int highlightStart, int highlightEnd)
  		{
  			_callTipArrow = callTipArrow;
  			_currentIndex = currentIndex;
  			_newIndex = newIndex;
  			_overloadList = overloadList;
  			_highlightStart = highlightStart;
  			_highlightEnd = highlightEnd;
  		}
  	}
  	#endregion
  
  	#region CharAddedEventArgs
  
  	/// <summary>
  	/// Provides data for the CharAdded event
  	/// </summary>
  	public class CharAddedEventArgs : EventArgs
  	{
  		private char _ch;
  		/// <summary>
  		/// Returns the character that was added
  		/// </summary>
  		public char Ch
  		{
  			get
  			{
  				return _ch;
  			}
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the CharAddedEventArgs class.
  		/// </summary>
  		/// <param name="ch">The character that was added</param>
  		public CharAddedEventArgs(char ch)
  		{
  			_ch = ch;
  		}
  	}
  	#endregion
  
  	#region FoldChangedEventArgs
  	/// <summary>
  	/// Provides data for the FoldChanged event
  	/// </summary>
  	public class FoldChangedEventArgs : ModifiedEventArgs
  	{
  		private int _line;
  		private int _newFoldLevel;
  		private int _previousFoldLevel;
  
  		/// <summary>
  		/// Gets/Sets the Line # that the fold change occured on
  		/// </summary>
  		public int Line
  		{
  			get
  			{
  				return _line;
  			}
  			set
  			{
  				_line = value;
  			}
  		}
  
  		/// <summary>
  		/// Gets the new Fold Level of the line
  		/// </summary>
  		public int NewFoldLevel
  		{
  			get
  			{
  				return _newFoldLevel;
  			}
  		}
  
  		/// <summary>
  		/// Gets the previous Fold Level of the line
  		/// </summary>
  		public int PreviousFoldLevel
  		{
  			get
  			{
  				return _previousFoldLevel;
  			}
  			
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the FoldChangedEventArgs class.
  		/// </summary>
  		/// <param name="line">Line # that the fold change occured on</param>
  		/// <param name="newFoldLevel">new Fold Level of the line</param>
  		/// <param name="previousFoldLevel">previous Fold Level of the line</param>
  		/// <param name="modificationType">What kind of fold modification occured</param>
  		public FoldChangedEventArgs(int line, int newFoldLevel, int previousFoldLevel, int modificationType) : base(modificationType)
  		{
  			_line				= line;
  			_newFoldLevel		= newFoldLevel;
  			_previousFoldLevel	= previousFoldLevel;
  		}
  	}
  	#endregion 
  
  	#region LinesNeedShownEventArgs
  	/// <summary>
  	/// Provides data for the LinesNeedShown event
  	/// </summary>
  	public class LinesNeedShownEventArgs : EventArgs
  	{
  		private int _firstLine;
  		private int _lastLine;
  
  		/// <summary>
  		/// Returns the first (top) line that needs to be shown
  		/// </summary>
  		public int FirstLine
  		{
  			get { return _firstLine; }
  		}
  
  		/// <summary>
  		/// Returns the last (bottom) line that needs to be shown
  		/// </summary>
  		public int LastLine
  		{
  			get { return _lastLine; }
  			set { _lastLine = value; }
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the LinesNeedShownEventArgs class.
  		/// </summary>
  		/// <param name="startLine">the first (top) line that needs to be shown</param>
  		/// <param name="endLine">the last (bottom) line that needs to be shown</param>
  		public LinesNeedShownEventArgs(int startLine, int endLine)
  		{
  			_firstLine	= startLine;
  			_lastLine	= endLine;
  		}
  
  	}
  
  	#endregion
  
  	#region MarkerChangedEventArgs
  	/// <summary>
  	/// Provides data for the MarkerChanged event
  	/// </summary>
  	public class MarkerChangedEventArgs : ModifiedEventArgs
  	{
  		private int _line;
  
  		/// <summary>
  		/// Returns the line number where the marker change occured
  		/// </summary>
  		public int Line
  		{
  			get
  			{
  				return _line;
  			}
  			set
  			{
  				_line = value;
  			}
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the LinesNeedShownEventArgs class.
  		/// </summary>
  		/// <param name="line">Line number where the marker change occured</param>
  		/// <param name="modificationType">What type of Scintilla modification occured</param>
  		public MarkerChangedEventArgs(int line, int modificationType)
  			: base(modificationType)
  		{
  			_line = line;
  		}
  
  	}
  	#endregion
  
  	#region ModifiedEventArgs
  
  	
  	/// <summary>
  	/// Base class for modified events
  	/// </summary>
  	/// <remarks>
  	/// ModifiedEventArgs is the base class for all events that are fired 
  	///	in response to an SCN_MODIFY notification message. They all have 
  	///	the Undo/Redo flags in common and I'm also including the raw 
  	///	modificationType integer value for convenience purposes.
  	/// </remarks>
  	public abstract class ModifiedEventArgs : EventArgs
  	{
  		private UndoRedoFlags _undoRedoFlags;
  		private int _modificationType;
  
  		public int ModificationType
  		{
  			get
  			{
  				return _modificationType;
  			}
  			set
  			{
  				_modificationType = value;
  			}
  		}
  
  		public UndoRedoFlags UndoRedoFlags
  		{
  			get
  			{
  				return _undoRedoFlags;
  			}
  			set
  			{
  				_undoRedoFlags = value;
  			}
  		}
  
  		public ModifiedEventArgs(int modificationType)
  		{
  			_modificationType	= modificationType;
  			_undoRedoFlags		= new UndoRedoFlags(modificationType);
  		}
  	}
  	#endregion
  
  	#region NativeScintillaEventArgs
  	
  	
  	/// <summary>
  	/// Provides data for native Scintilla Events
  	/// </summary>
  	/// <remarks>
  	/// All events fired from the INativeScintilla Interface uses
  	///	NativeScintillaEventArgs. Msg is a copy
  	///	of the Notification Message sent to Scintilla's Parent WndProc
  	///	and SCNotification is the SCNotification Struct pointed to by 
  	///	Msg's lParam. 
  	/// </remarks>
  	public class NativeScintillaEventArgs : EventArgs
  	{
  		private Message _msg;
  		private SCNotification _notification;
  
  		/// <summary>
  		/// Notification Message sent from the native Scintilla
  		/// </summary>
  		public Message Msg
  		{
  			get
  			{
  				return _msg;
  			}
  		}
  
  		/// <summary>
  		/// SCNotification structure sent from Scintilla that contains the event data
  		/// </summary>
  		public SCNotification SCNotification
  		{
  			get
  			{
  				return _notification;
  			}
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the NativeScintillaEventArgs class.
  		/// </summary>
  		/// <param name="msg">Notification Message sent from the native Scintilla</param>
  		/// <param name="notification">SCNotification structure sent from Scintilla that contains the event data</param>
  		public NativeScintillaEventArgs(Message msg, SCNotification notification)
  		{
  			_msg			= msg;
  			_notification	= notification;
  		}
  	}
  	#endregion
  		
  	#region ScintillaMouseEventArgs
  
  	/// <summary>
  	/// Provides data for Scintilla mouse events
  	/// </summary>
  	public class ScintillaMouseEventArgs : EventArgs
  	{
  		private int _x;
  		private int _y;
  		private int _position;
  
  		/// <summary>
  		/// Returns the X (left) position of mouse in pixels
  		/// </summary>
  		public int X
  		{
  			get { return _x; }
  			set { _x = value; }
  		}
  
  		/// <summary>
  		/// Returns the Y (top) position of mouse in pixels
  		/// </summary>
  		public int Y
  		{
  			get { return _y; }
  			set { _y = value; }
  		}
  
  		/// <summary>
  		/// Returns the Document position
  		/// </summary>
  		public int Position
  		{
  			get { return _position; }
  			set { _position = value; }
  		}
  
  		/// <summary>
  		/// Initializes a new instance of the ScintillaMouseEventArgs class.
  		/// </summary>
  		/// <param name="x">X (left) position of mouse in pixels</param>
  		/// <param name="y">Y (top) position of mouse in pixels</param>
  		/// <param name="position"> Document position</param>
  		public ScintillaMouseEventArgs(int x, int y, int position)
  		{
  			_x			= x;
  			_y			= y;
  			_position	= position;
  		}
  	}
  
  	#endregion
  	
  	#region StyleChangedEventArgs
  	
  	/// <summary>
  	/// Provides data for the StyleChanged event
  	/// </summary>
  	/// <remarks>
  	/// StyleChangedEventHandler is used for the StyleChanged Event which is also used as 
  	///	a more specific abstraction around the SCN_MODIFIED notification message.
  	/// </remarks>
  	public class StyleChangedEventArgs : ModifiedEventArgs
  	{
  		private int _position;
  		private int _length;
  
  		/// <summary>
  		/// Returns the starting document position where the style has been changed
  		/// </summary>
  		public int Position
  		{
  			get
  			{
  				return _position;
  			}
  		}
  
  		/// <summary>
  		/// Returns how many characters have changed
  		/// </summary>
  		public int Length
  		{
  			get
  			{
  				return _length;
  			}
  		}
  
  		internal StyleChangedEventArgs(int position, int length, int modificationType) : base(modificationType)
  		{
  			_position	= position;
  			_length		= length;
  		}
  	}
  	#endregion
  
  	#region StyleNeededEventArgs
  
  	/// <summary>
  	/// Provides data for the StyleNeeded event
  	/// </summary>
  	public class StyleNeededEventArgs : EventArgs
  	{
  		private Range _range;
  		/// <summary>
  		/// Returns the document range that needs styling
  		/// </summary>
  		public Range Range
  		{
  
gt: 			get { return _range; }