Click here to Skip to main content
15,886,689 members
Articles / Desktop Programming / Windows Forms

Storm - the world's best IDE framework for .NET

Rate me:
Please Sign up or sign in to vote.
4.96/5 (82 votes)
4 Feb 2010LGPL311 min read 274.7K   6.5K   340  
Create fast, flexible, and extensible IDE applications easily with Storm - it takes nearly no code at all!

using Storm.TextEditor.Editor;
using Storm.TextEditor.Parser.Objects.Collections;
using System;

namespace Storm.TextEditor.Parser.Objects
{
	/// <summary>
	/// Represents a scope in a Block.
	/// </summary>
	public sealed class Scope
	{
		#region Fields

		private Pattern           start       = null;
		private PatternCollection endPatterns = new PatternCollection();

		private Block spawnBlockOnStart = null;
		private Block spawnBlockOnEnd   = null;
		private Block parent            = null;

		private TextStyle style         = null;
		private string    expansionText = "";

		private bool defaultExpanded = true;
		private bool noHighlighting  = false;
		private bool indenter        = false;
		private bool caseSensitive   = false;
		private bool normalizeCase   = true;
		private bool causeIndent     = false;

		#endregion

		#region Properties

		/// <summary>
		/// Gets or sets the starting Pattern of the Scope.
		/// </summary>
		public Pattern Start
		{
			get { return start; }
			set { start = value; }
		}

		/// <summary>
		/// Gets or sets the collection of Patterns that the define the ending Patterns of the Scope.
		/// </summary>
		public PatternCollection EndPatterns
		{
			get { return endPatterns; }
			set { endPatterns = value; }
		}

		/// <summary>
		/// Gets or sets the Block that the Scope spawns on start.
		/// </summary>
		public Block SpawnBlockOnStart
		{
			get { return spawnBlockOnStart; }
			set { spawnBlockOnStart = value; }
		}

		/// <summary>
		/// Gets or sets the Block that the Scope spawns on end.
		/// </summary>
		public Block SpawnBlockOnEnd
		{
			get { return spawnBlockOnEnd; }
			set { spawnBlockOnEnd = value; }
		}

		/// <summary>
		/// Gets or sets the parent Block of the Scope.
		/// </summary>
		public Block Parent
		{
			get { return parent; }
			set { parent = value; }
		}

		/// <summary>
		/// Gets or sets the TextStyle of the Scope.
		/// </summary>
		public TextStyle Style
		{
			get { return style; }
			set { style = value; }
		}

		/// <summary>
		/// Gets or sets the text of the Scope when it's folded.
		/// </summary>
		public string ExpansionText
		{
			get { return expansionText; }
			set { expansionText = value; }
		}

		/// <summary>
		/// Gets or sets whether the Scope is expanded as default.
		/// </summary>
		public bool DefaultExpanded
		{
			get { return defaultExpanded; }
			set { defaultExpanded = value; }
		}

		/// <summary>
		/// Gets or sets a value indicating whether the scope should use default keyword highlighting.
		/// </summary>
		public bool NoHighlighting
		{
			get { return noHighlighting; }
			set { noHighlighting = value; }
		}

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="Scope"/> is an indenter.
		/// </summary>
		public bool Indenter
		{
			get { return indenter; }
			set { indenter = value; }
		}

		/// <summary>
		/// Gets or sets whether the Scope is case sensitive.
		/// </summary>
		public bool CaseSensitive
		{
			get { return caseSensitive; }
			set { caseSensitive = value; }
		}

		/// <summary>
		/// Gets or sets whether the Scope should normalize case.
		/// </summary>
		public bool NormalizeCase
		{
			get { return normalizeCase; }
			set { normalizeCase = value; }
		}

		/// <summary>
		/// Gets or sets whether the Scoep should cause indentation.
		/// </summary>
		public bool CauseIndent
		{
			get { return causeIndent; }
			set { causeIndent = value; }
		}

		#endregion

		/// <summary>
		/// Initializes a new instance of Scope.
		/// </summary>
		public Scope()
		{
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)



Comments and Discussions