// *
// * 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 Alsing.Drawing.GDI;
namespace Alsing.Windows.Forms.SyntaxBox
{
///
/// Indent styles used by the control
///
public enum IndentStyle
{
///
/// Caret is always confined to the first column when a new line is inserted
///
None = 0,
///
/// New lines inherit the same indention as the previous row.
///
LastRow = 1,
///
/// New lines get their indention from the scoping level.
///
Scope = 2,
///
/// New lines get thir indention from the scoping level or from the previous row
/// depending on which is most indented.
///
Smart = 3,
}
}
namespace Alsing.Windows.Forms.SyntaxBox
{
///
/// Text actions that can be performed by the SyntaxBoxControl
///
public enum EditAction
{
///
/// The control is not performing any action
///
None = 0,
///
/// The control is in Drag Drop mode
///
DragText = 1,
///
/// The control is selecting text
///
SelectText = 2
}
}
namespace Alsing.Windows.Forms.SyntaxBox.Painter
{
///
/// View point struct used by the SyntaxBoxControl.
/// The struct contains information about various rendering parameters that the IPainter needs.
///
public struct ViewPoint
{
///
/// The action that the SyntaxBoxControl is currently performing
///
public EditAction Action;
///
/// Width of a char (space) in pixels
///
public int CharWidth;
///
/// Height of the client area in pixels
///
public int ClientAreaStart;
///
/// Width of the client area in pixels
///
public int ClientAreaWidth;
///
/// Index of the first visible column
///
public int FirstVisibleColumn;
///
/// Index of the first visible row
///
public int FirstVisibleRow;
///
/// Width of the gutter margin in pixels
///
public int GutterMarginWidth;
///
/// Width of the Linenumber margin in pixels
///
public int LineNumberMarginWidth;
///
/// Height of a row in pixels
///
public int RowHeight;
///
/// Width of the text margin (sum of gutter + linenumber + folding margins)
///
public int TextMargin;
///
///
///
public int TotalMarginWidth;
///
/// Number of rows that can be displayed in the current view
///
public int VisibleRowCount;
///
/// Used for offsetting the screen in y axis.
///
public int YOffset;
//document items
}
///
/// Struct used by the NativePainter class.
///
public struct RenderItems
{
///
/// For internal use only
///
public GDISurface BackBuffer; //backbuffer surface
///
/// For internal use only
///
public GDIBrush BackgroundBrush; //background brush
///
/// For internal use only
///
public GDIFont FontBold; //Font , bold
///
/// For internal use only
///
public GDIFont FontBoldItalic; //Font , bold & italic
///
/// For internal use only
///
public GDIFont FontBoldItalicUnderline; //Font , bold & italic
///
/// For internal use only
///
public GDIFont FontBoldUnderline; //Font , bold
///
/// For internal use only
///
public GDIFont FontItalic; //Font , italic
///
/// For internal use only
///
public GDIFont FontItalicUnderline; //Font , italic
///
/// For internal use only
///
public GDIFont FontNormal; //Font , no decoration
///
/// For internal use only
///
public GDIFont FontUnderline; //Font , no decoration
///
/// For internal use only
///
public GDIBrush GutterMarginBorderBrush; //Gutter magrin brush
///
/// For internal use only
///
public GDIBrush GutterMarginBrush; //Gutter magrin brush
///
/// For internal use only
///
public GDIBrush HighLightLineBrush; //background brush
///
/// For internal use only
///
public GDIBrush LineNumberMarginBorderBrush; //linenumber margin brush
///
/// For internal use only
///
public GDIBrush LineNumberMarginBrush; //linenumber margin brush
///
/// For internal use only
///
public GDIBrush OutlineBrush; //background brush
///
/// For internal use only
///
public GDISurface SelectionBuffer; //backbuffer surface
///
/// For internal use only
///
public GDISurface StringBuffer; //backbuffer surface
}
}