// * // * Copyright (C) 2008 Roger Alsing : http://www.RogerAlsing.com // * // * This library is free software; you can redistribute it and/or modify it // * under the terms of the GNU Lesser General Public License 2.1 or later, as // * published by the Free Software Foundation. See the included license.txt // * or http://www.gnu.org/copyleft/lesser.html for details. // * // * using System; using System.Drawing; using System.Windows.Forms; using Alsing.SourceCode; namespace Alsing.Windows.Forms.SyntaxBox { public delegate void RowPaintHandler(object sender, RowPaintEventArgs e); public delegate void RowMouseHandler(object sender, RowMouseEventArgs e); public delegate void CopyHandler(object sender, CopyEventArgs e); public delegate void WordMouseHandler(object sender, ref WordMouseEventArgs e); /// /// Event arg for Copy/Cut actions. /// public class CopyEventArgs { /// /// The text copied to the clipboard. /// public string Text = ""; } /// /// Event args passed to word mouse events of the syntaxbox /// public class WordMouseEventArgs : EventArgs { /// /// The mouse buttons that was pressed when the event fired /// public MouseButtons Button; /// /// Reference to a mouse cursor , developers can assign new values here to display new cursors for a given pattern /// public Cursor Cursor; /// /// The pattern that triggered the event /// public Pattern Pattern; /// /// The word where the event was fired /// public Word Word; } /// /// Event args for mouse actions on the syntaxbox /// public class RowMouseEventArgs : EventArgs { /// /// The area of the row where the event was fired /// public RowArea Area; /// /// The mousebuttons that was pressed when the event was fired /// public MouseButtons Button; /// /// The X position of the mouse cursor when the event was fired /// public int MouseX; /// /// The Y position of the mouse cursor when the event was fired /// public int MouseY; /// /// The row where the event was fired /// public Row Row; } /// /// Describes in what area a mouse event occured on a row /// public enum RowArea { /// /// Represents the gutter margin /// GutterArea, /// /// Represents the LineNumber section /// LineNumberArea, /// /// Represents the area where the folding symbols are shown /// FoldingArea, /// /// Represents the actual text part of a row /// TextArea, } /// /// Event args passed to owner draw events of the syntaxbox /// public class RowPaintEventArgs : EventArgs { /// /// the bounds of the row /// public Rectangle Bounds; /// /// The graphics surface to draw on /// public Graphics Graphics; /// /// The row to draw /// public Row Row; } }