defaults for plain text editing (we don't need a config for that)

This commit is contained in:
codeimp 2008-11-04 18:54:47 +00:00
parent 0dbb3bc505
commit 39e6167f85
4 changed files with 41 additions and 16 deletions

View file

@ -1,16 +0,0 @@
/*******************************************************************\
Doom Builder Script highlighting definitions for Text
\*******************************************************************/
casesensitive = false;
insertcase = 0; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 0;
keywordhelp = "";
keywords
{
}
constants
{
}

View file

@ -93,6 +93,31 @@ namespace CodeImp.DoomBuilder.Config
#region ================== Constructor / Disposer
// This creates the default script configuration
// that is used for documents of unknown type
internal ScriptConfiguration()
{
// Initialize
this.cfg = new Configuration();
this.keywords = new Dictionary<string, string>();
this.constants = new List<string>();
this.lowerkeywords = new Dictionary<string, string>();
this.lowerconstants = new Dictionary<string, string>();
// Settings
lexer = 1;
casesensitive = false;
parameters = "";
resultlump = "";
insertcase = 0;
keywordhelp = "";
functionopen = "";
functionclose = "";
argumentdelimiter = "";
terminator = "";
functionregex = "";
}
// Constructor
internal ScriptConfiguration(Configuration cfg)
{

View file

@ -112,6 +112,9 @@ namespace CodeImp.DoomBuilder.Controls
//scriptedit.AddIgnoredKey(Keys.ControlKey, Keys.None);
//scriptedit.AddIgnoredKey(Keys.Space, Keys.None);
//scriptedit.AddIgnoredKey(Keys.Space, Keys.Control);
// Setup with default script config
SetupStyles(new ScriptConfiguration());
}
#endregion

View file

@ -9,6 +9,16 @@
// ScriptStyleType enum. The indices for keywords and constants are mapped forwards (the value
// is the index for the Scintilla control).
lexer1 // None
{
0 = 0; // plain text
keywordsindex = -1;
constantsindex = -1;
}
lexer3 // CPP-style, case-sensitive
{
0 = 0; // plain text
@ -25,6 +35,7 @@ lexer3 // CPP-style, case-sensitive
constantsindex = 1;
}
lexer35 // CPP-style, case-insensitive
{
0 = 0; // plain text
@ -41,6 +52,7 @@ lexer35 // CPP-style, case-insensitive
constantsindex = 1;
}
lexer6 // Perl-style
{
0 = 0; // plain text
@ -54,3 +66,4 @@ lexer6 // Perl-style
keywordsindex = 0;
constantsindex = -1;
}