]> O.S.I.I.S - jp/crow.git/commitdiff
limit to html safe color plus several ones, crowIDE wip
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 13 Mar 2018 16:16:24 +0000 (17:16 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 13 Mar 2018 16:16:24 +0000 (17:16 +0100)
107 files changed:
Crow.csproj
CrowIDE/CrowIDE.csproj
CrowIDE/src/CrowIDE.cs
CrowIDE/src/DesignInterface.cs
CrowIDE/src/Editors/CodeBuffer/CodeBuffer.cs
CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs [deleted file]
CrowIDE/src/Editors/CodeBuffer/TextBuffer.cs
CrowIDE/src/Editors/CodeBuffer/TextBufferEventArgs.cs [new file with mode: 0644]
CrowIDE/src/Editors/CodeBuffer/TextEditor.cs
CrowIDE/src/Editors/ImlVisualEditor.cs
CrowIDE/src/Editors/Parsers/BufferParser.cs
CrowIDE/src/Editors/Parsers2/Tokenizer.cs [new file with mode: 0644]
CrowIDE/src/Editors/SourceEditor.cs [new file with mode: 0644]
CrowIDE/src/MemberView/MembersView.cs
CrowIDE/src/MemberView/PropertyContainer.cs
CrowIDE/src/Project.cs
CrowIDE/src/ProjectTree/ImlProjectItem.cs
CrowIDE/src/ProjectTree/ProjectFile.cs
CrowIDE/src/ProjectTree/StyleProjectItem.cs [new file with mode: 0644]
CrowIDE/src/Solution.cs
CrowIDE/ui/CategoryExp.template [new file with mode: 0755]
CrowIDE/ui/ContextMenu.template
CrowIDE/ui/CrowIDE.crow
CrowIDE/ui/DockWindows/GTreeExpITemp.crow
CrowIDE/ui/DockWindows/WinSchemaItem.template
CrowIDE/ui/DockWindows/winGTExplorer.crow
CrowIDE/ui/DockWindows/winStyleView.crow [new file with mode: 0644]
CrowIDE/ui/DockWindows/winToolbox.crow
CrowIDE/ui/IDE.style
CrowIDE/ui/ItemTemplates/Enum.template
CrowIDE/ui/ItemTemplates/Fill.template
CrowIDE/ui/LQIsExplorer.crow
CrowIDE/ui/MembersItem.template
CrowIDE/ui/MenuItem.template
CrowIDE/ui/Options.crow
CrowIDE/ui/ProjectTree.template
CrowIDE/ui/TreeExpandable.template
CrowIDE/ui/editors/IMLEdit.itemp
CrowIDE/ui/editors/TextEditor.crow
CrowIDE/ui/test.crow
Default.style
Templates/ColorPicker.template
Templates/ContextMenu.template
Templates/FileDialog.template
Templates/HScrollBar.template
Templates/MenuItem.template
Templates/ScrollBar.template
Templates/TabItem.template
Templates/Tooltip.template
Tests/BasicTests.cs
Tests/Interfaces/Container/0.crow
Tests/Interfaces/Container/2.crow
Tests/Interfaces/Container/3.crow
Tests/Interfaces/Divers/0.crow
Tests/Interfaces/Divers/colorPicker.crow
Tests/Interfaces/Divers/testPropLess.crow
Tests/Interfaces/Divers/testShape.crow
Tests/Interfaces/Divers/welcome.crow
Tests/Interfaces/DragAndDrop/0.crow
Tests/Interfaces/Experimental/testDock.crow
Tests/Interfaces/Experimental/testDock2.crow
Tests/Interfaces/Experimental/testStack.crow
Tests/Interfaces/GraphicObject/0.crow
Tests/Interfaces/GraphicObject/1.crow
Tests/Interfaces/Group/0.crow
Tests/Interfaces/Group/1.crow
Tests/Interfaces/Group/2.crow
Tests/Interfaces/Group/3.crow
Tests/Interfaces/Group/4.crow
Tests/Interfaces/Splitter/1.crow
Tests/Interfaces/Stack/0.crow
Tests/Interfaces/Stack/0h.crow
Tests/Interfaces/Stack/1.crow
Tests/Interfaces/Stack/1h.crow
Tests/Interfaces/Stack/2.crow
Tests/Interfaces/Stack/2h.crow
Tests/Interfaces/Stack/3.crow
Tests/Interfaces/Stack/3h.crow
Tests/Interfaces/Stack/4.crow
Tests/Interfaces/TabItem.template
Tests/Interfaces/TemplatedContainer/0.crow
Tests/Interfaces/TemplatedContainer/testTabView.crow
Tests/Interfaces/TemplatedContainer/testTabView2.crow
Tests/Interfaces/TemplatedControl/testCombobox.crow
Tests/Interfaces/Wrapper/1.1.crow
Tests/Interfaces/Wrapper/1.crow
Tests/Interfaces/Wrapper/2.1.crow
Tests/Interfaces/Wrapper/2.2.crow
Tests/Interfaces/Wrapper/2.crow
Tests/Tests.csproj
Tests/Tutorials/T4_Gauge.cs
Tests/test.style
Tests/ui/showcase.crow
Tests/ui/test.crow
src/Colors.cs
src/GraphicObjects/Border.cs
src/GraphicObjects/ColorPicker.cs
src/GraphicObjects/Expandable.cs
src/GraphicObjects/GraphicObject.cs
src/GraphicObjects/Label.cs
src/GraphicObjects/SaturationValueSelector.cs
src/GraphicObjects/Window.cs
src/Instantiator.cs
src/Interface.cs
src/ObservableList.cs
src/Size.cs
src/StyleReader.cs

index f14b185af0869dc9e9ed68a328aa92291f6a2bbb..db3da7bb91261ee14fb32cb66872d90d43fa7d85 100644 (file)
@@ -36,7 +36,7 @@
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <Optimize>true</Optimize>
-    <DefineConstants>__linux__</DefineConstants>
+    <DefineConstants>DESIGN_MODE</DefineConstants>
     <OutputPath>$(SolutionDir)build\Release</OutputPath>
   </PropertyGroup>
   <ItemGroup>
index 6f423c09f5ab2f0e5ac7adc0ac522141bf74fabd..a92b4d9b2f761d544f23724bef5605e5fe186c5c 100644 (file)
     <Compile Include="src\Editors\CodeBuffer\CodeBufferEventArgs.cs" />
     <Compile Include="src\Editors\CodeBuffer\CodeLine.cs" />
     <Compile Include="src\Editors\CodeBuffer\Node.cs" />
-    <Compile Include="src\Editors\CodeBuffer\SourceEditor.cs" />
     <Compile Include="src\Editors\CodeBuffer\TextFormatting.cs" />
     <Compile Include="src\Editors\CodeBuffer\Token.cs" />
     <Compile Include="src\ProjectTree\ProjectNodes.cs" />
     <Compile Include="src\Editors\CodeBuffer\TextBuffer.cs" />
     <Compile Include="src\Editors\CodeBuffer\TextEditor.cs" />
     <Compile Include="src\Editors\ImlSchematicEditor.cs" />
+    <Compile Include="src\Editors\CodeBuffer\TextBufferEventArgs.cs" />
+    <Compile Include="src\Editors\Parsers2\Tokenizer.cs" />
+    <Compile Include="src\Editors\SourceEditor.cs" />
+    <Compile Include="src\ProjectTree\StyleProjectItem.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="ui\" />
     <Folder Include="src\Editors\Parsers\" />
     <Folder Include="src\Editors\CodeBuffer\" />
     <Folder Include="src\ProjectTree\" />
+    <Folder Include="src\Editors\Parsers2\" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="images\save.svg" />
     <EmbeddedResource Include="ui\editors\TextEditor.crow">
       <LogicalName>Crow.Coding.ui.TextEditor.crow</LogicalName>
     </EmbeddedResource>
+    <EmbeddedResource Include="ui\DockWindows\winStyleView.crow" />
+    <EmbeddedResource Include="ui\CategoryExp.template" />
   </ItemGroup>
   <ItemGroup>
     <None Include="ui\test.crow">
index 12664f1b37ac65eca14db5c1a7647851a40a07d8..783db5d162edc31b536276193ef3fdb6f93bfde5 100644 (file)
@@ -42,7 +42,7 @@ namespace Crow.Coding
                CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp,
                CMDAbout, CMDOptions,
                CMDViewGTExp, CMDViewProps, CMDViewProj, CMDViewProjProps, CMDViewErrors, CMDViewSolution, CMDViewEditor, CMDViewProperties,
-               CMDViewToolbox, CMDViewSchema,
+               CMDViewToolbox, CMDViewSchema, CMDViewStyling,
                CMDCompile;
 
                void initCommands () {
@@ -57,7 +57,7 @@ namespace Crow.Coding
                        CMDCopy = new Command(new Action(() => Quit (null, null))) { Caption = "Copy", Icon = new SvgPicture("#Crow.Coding.icons.copy-file.svg"), CanExecute = false};
                        CMDPaste = new Command(new Action(() => Quit (null, null))) { Caption = "Paste", Icon = new SvgPicture("#Crow.Coding.icons.paste-on-document.svg"), CanExecute = false};
                        CMDHelp = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("help"))) { Caption = "Help", Icon = new SvgPicture("#Crow.Coding.icons.question.svg")};
-                       CMDOptions = new Command(new Action(() => openOptionsDialog())) { Caption = "Editor Options", Icon = new SvgPicture("#Crow.Coding.icons.tools.svg")};
+                       CMDOptions = new Command(new Action(() => loadWindow("#Crow.Coding.ui.Options.crow"))) { Caption = "Editor Options", Icon = new SvgPicture("#Crow.Coding.icons.tools.svg")};
 
                        cmdCloseSolution = new Command(new Action(() => closeSolution()))
                        { Caption = "Close Solution", Icon = new SvgPicture("#Crow.Coding.ui.icons.paste-on-document.svg"), CanExecute = false};
@@ -74,6 +74,8 @@ namespace Crow.Coding
                        { Caption = "Toolbox", CanExecute = false};
                        CMDViewSchema = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winSchema.crow")))
                        { Caption = "IML Shematic View", CanExecute = true};
+                       CMDViewStyling = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winStyleView.crow")))
+                       { Caption = "Styling Explorer", CanExecute = true};
                                
                        CMDViewGTExp = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winGTExplorer.crow")))
                        { Caption = "Graphic Tree Explorer", CanExecute = false};
@@ -103,12 +105,13 @@ namespace Crow.Coding
                static void Main ()
                {
                        CrowIDE win = new CrowIDE ();
+                       MainWin = win;
                        win.Run (30);
                }
 
                public CrowIDE ()
                        : base(1024, 800,"UIEditor")
-               {
+               {                       
                }
 
                Instantiator instFileDlg;
@@ -117,6 +120,7 @@ namespace Crow.Coding
                Docker mainDock;
 
                public static Interface MainIFace;
+               public static CrowIDE MainWin;
 
                protected override void OnLoad (EventArgs e)
                {
index 4178e39847bbbadf50307a2c19b3575cfc08f7ea..04666b110a7487c904b4c0bf32f269d9ce8a6f07 100644 (file)
@@ -66,21 +66,6 @@ namespace Crow.Coding
                                return CreateITorFromIMLFragment (pi.Source).CreateInstance();                  
                        return null;
                }
-               public override Crow.IML.Instantiator GetInstantiator (string path)
-               {                       
-                       System.Diagnostics.Debugger.Break ();
-                       return null;
-               }
-               public override ItemTemplate GetItemTemplate (string path)
-               {
-                       ProjectFile pi;
-
-                       if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi))
-                               return new ItemTemplate (this, pi.AbsolutePath);
-
-                       System.Diagnostics.Debugger.Break ();
-                       return null;
-               }
                public override System.IO.Stream GetStreamFromPath (string path)
                {
                        ProjectFile pi;
index 13c422a649b14b660731c412d3adf3c51c86c3c1..7d5efec94c3fd6f379ecca7a2a6f56cedf349938 100644 (file)
@@ -63,7 +63,7 @@ namespace Crow.Coding
 
                public CodeLine this[int i]
                {
-                       get { return lines[i]; }
+                       get { return i < LineCount ? lines[i] : null; }
                        set {
                                if (lines [i] == value)
                                        return;
@@ -392,7 +392,9 @@ namespace Crow.Coding
 
                                editMutex.EnterReadLock ();
 
-                               if (value >= lines.Count)
+                               if (LineCount == 0)
+                                       _currentLine = 0;
+                               else if (value >= lines.Count)
                                        _currentLine = lines.Count-1;
                                else if (value < 0)
                                        _currentLine = 0;
diff --git a/CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs b/CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs
deleted file mode 100644 (file)
index 48d634b..0000000
+++ /dev/null
@@ -1,1206 +0,0 @@
-//
-// ScrollingTextBox.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Xml.Serialization;
-using System.ComponentModel;
-using System.Collections;
-using Cairo;
-using System.Text;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-using System.Linq;
-using System.Diagnostics;
-using System.IO;
-using System.Threading;
-
-namespace Crow.Coding
-{
-       /// <summary>
-       /// Scrolling text box optimized for monospace fonts, for coding
-       /// </summary>
-       public class SourceEditor : Editor
-       {               
-               #region CTOR
-               public SourceEditor (): base()
-               {
-                       formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.DarkJungleGreen, Color.Transparent));
-                       formatting.Add ((int)XMLParser.TokenType.ElementName, new TextFormatting (Color.DarkBlue, Color.Transparent));
-                       formatting.Add ((int)XMLParser.TokenType.ElementStart, new TextFormatting (Color.Black, Color.Transparent));
-                       formatting.Add ((int)XMLParser.TokenType.ElementEnd, new TextFormatting (Color.Black, Color.Transparent));
-                       formatting.Add ((int)XMLParser.TokenType.ElementClosing, new TextFormatting (Color.Black, Color.Transparent));
-
-                       formatting.Add ((int)XMLParser.TokenType.AttributeValueOpening, new TextFormatting (Color.Carmine, Color.Transparent));
-                       formatting.Add ((int)XMLParser.TokenType.AttributeValueClosing, new TextFormatting (Color.Carmine, Color.Transparent));
-                       formatting.Add ((int)XMLParser.TokenType.AttributeValue, new TextFormatting (Color.TractorRed, Color.Transparent, false, true));
-                       formatting.Add ((int)XMLParser.TokenType.XMLDecl, new TextFormatting (Color.AoEnglish, Color.Transparent));
-
-                       formatting.Add ((int)BufferParser.TokenType.BlockComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
-                       formatting.Add ((int)BufferParser.TokenType.LineComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
-                       formatting.Add ((int)BufferParser.TokenType.OperatorOrPunctuation, new TextFormatting (Color.Black, Color.Transparent));
-                       formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.Teal, Color.Transparent));
-                       //formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent));
-
-                       parsing.Add (".crow", "Crow.Coding.XMLParser");
-                       parsing.Add (".svg", "Crow.Coding.XMLParser");
-                       parsing.Add (".template", "Crow.Coding.XMLParser");
-                       parsing.Add (".cs", "Crow.Coding.CSharpParser");
-                       parsing.Add (".style", "Crow.Coding.StyleParser");
-
-                       buffer = new CodeBuffer ();
-                       buffer.LineUpadateEvent += Buffer_LineUpadateEvent;
-                       buffer.LineAdditionEvent += Buffer_LineAdditionEvent;;
-                       buffer.LineRemoveEvent += Buffer_LineRemoveEvent;
-                       buffer.BufferCleared += Buffer_BufferCleared;
-                       buffer.SelectionChanged += Buffer_SelectionChanged;
-                       buffer.PositionChanged += Buffer_PositionChanged;
-                       buffer.FoldingEvent += Buffer_FoldingEvent;
-                       buffer.Add (new CodeLine(""));
-               }
-               #endregion
-
-               string oldSource = "";
-               //save requested position on error, and try it on next move
-               int requestedLine = 0, requestedCol = 0;
-               volatile bool isDirty = false;
-
-               const int leftMarginGap = 10;//gap between items in margin and text
-               const int foldSize = 9;//folding rectangles size
-               const int foldHSpace = 4;//folding level tabulation x
-               int foldMargin { get { return parser == null ? 0 : parser.SyntacticTreeMaxDepth * foldHSpace; }}//folding margin size
-
-               #region private and protected fields
-               bool foldingEnabled = true;
-               int leftMargin = 0;     //margin used to display line numbers, folding errors,etc...
-               int visibleLines = 1;
-               int visibleColumns = 1;
-               int firstPrintedLine = -1;
-               int printedCurrentLine = 0;//Index of the currentline in the PrintedLines array
-
-               CodeBuffer buffer;
-               BufferParser parser;
-               List<CodeLine> PrintedLines;//list of lines visible in the Editor depending on scrolling and folding
-
-               Dictionary<int, TextFormatting> formatting = new Dictionary<int, TextFormatting>();
-               Dictionary<string, string> parsing = new Dictionary<string, string>();
-
-               Color selBackground;
-               Color selForeground;
-               int selStartCol;
-               int selEndCol;
-
-               protected Rectangle rText;
-               protected FontExtents fe;
-               protected TextExtents te;
-
-               Point mouseLocalPos;
-               bool doubleClicked = false;
-               #endregion
-
-               void measureLeftMargin () {
-                       leftMargin = 0;
-                       if (PrintLineNumbers)
-                               leftMargin += (int)Math.Ceiling((double)buffer.LineCount.ToString().Length * fe.MaxXAdvance) +6;
-                       if (foldingEnabled)
-                               leftMargin += foldMargin;
-                       if (leftMargin > 0)
-                               leftMargin += leftMarginGap;                    
-                       updateVisibleColumns ();
-               }
-               void findLongestLineAndUpdateMaxScrollX() {
-                       buffer.FindLongestVisualLine ();
-                       updateMaxScrollX ();
-//                     Debug.WriteLine ("SourceEditor: Find Longest line and update maxscrollx: {0} visible cols:{1}", MaxScrollX, visibleColumns);
-               }
-               /// <summary>
-               /// Updates visible line in widget, adapt max scroll y and updatePrintedLines
-               /// </summary>
-               void updateVisibleLines(){
-                       visibleLines = (int)Math.Floor ((double)ClientRectangle.Height / (fe.Ascent+fe.Descent));
-                       NotifyValueChanged ("VisibleLines", visibleLines);
-                       updateMaxScrollY ();
-                       updatePrintedLines ();
-                       RegisterForGraphicUpdate ();
-//                     System.Diagnostics.Debug.WriteLine ("update visible lines: " + visibleLines);
-//                     System.Diagnostics.Debug.WriteLine ("update MaxScrollY: " + MaxScrollY);
-               }
-               void updateVisibleColumns(){
-                       visibleColumns = (int)Math.Floor ((double)(ClientRectangle.Width - leftMargin)/ fe.MaxXAdvance);
-                       NotifyValueChanged ("VisibleColumns", visibleColumns);
-                       updateMaxScrollX ();
-//                     System.Diagnostics.Debug.WriteLine ("update visible columns: {0} leftMargin:{1}",visibleColumns, leftMargin);
-//                     System.Diagnostics.Debug.WriteLine ("update MaxScrollX: " + MaxScrollX);
-               }
-               void updateMaxScrollX () {
-                       MaxScrollX = Math.Max (0, buffer.longestLineCharCount - visibleColumns);
-                       if (buffer.longestLineCharCount > 0)
-                               NotifyValueChanged ("ChildWidthRatio", Slot.Width * visibleColumns / buffer.longestLineCharCount);                      
-               }
-               void updateMaxScrollY () {
-                       if (parser == null || !foldingEnabled) {
-                               MaxScrollY = Math.Max (0, buffer.LineCount - visibleLines);
-                               if (buffer.UnfoldedLines > 0)
-                                       NotifyValueChanged ("ChildHeightRatio", Slot.Height * visibleLines / buffer.UnfoldedLines);                                                     
-                       } else {
-                               MaxScrollY = Math.Max (0, buffer.UnfoldedLines - visibleLines);
-                               if (buffer.UnfoldedLines > 0)
-                                       NotifyValueChanged ("ChildHeightRatio", Slot.Height * visibleLines / buffer.UnfoldedLines);                                                     
-                       }
-               }                       
-               void updatePrintedLines () {
-                       buffer.editMutex.EnterReadLock ();
-                       editorMutex.EnterWriteLock ();
-
-                       PrintedLines = new List<CodeLine> ();
-                       int curL = 0;
-                       int i = 0;
-
-                       while (curL < buffer.LineCount && i < ScrollY) {
-                               if (buffer [curL].IsFolded)
-                                       curL = buffer.GetEndNodeIndex (curL);
-                               curL++;
-                               i++;
-                       }
-
-                       firstPrintedLine = curL;
-                       i = 0;
-                       while (i < visibleLines && curL < buffer.LineCount) {
-                               PrintedLines.Add (buffer [curL]);
-
-                               if (buffer [curL].IsFolded)
-                                       curL = buffer.GetEndNodeIndex (curL);
-
-                               curL++;
-                               i++;
-                       }
-
-                       buffer.editMutex.ExitReadLock ();
-                       editorMutex.ExitWriteLock ();
-               }
-               void updateOnScreenCurLineFromBuffCurLine(){
-                       printedCurrentLine = PrintedLines.IndexOf (buffer.CurrentCodeLine);
-               }
-               void toogleFolding (int line) {
-                       if (parser == null || !foldingEnabled)
-                               return;
-                       buffer.ToogleFolding (line);
-               }
-
-               #region Editor overrides
-               protected override void updateEditorFromProjFile ()
-               {
-                       buffer.editMutex.EnterWriteLock ();
-                       loadSource ();
-                       buffer.editMutex.ExitWriteLock ();
-
-                       isDirty = false;
-                       oldSource = projFile.Source;
-                       CurrentLine = requestedLine;
-                       CurrentColumn = requestedCol;
-                       projFile.RegisteredEditors [this] = true;
-               }
-               protected override void updateProjFileFromEditor ()
-               {
-                       buffer.editMutex.EnterWriteLock ();
-                       string newsrc = buffer.FullText;
-                       buffer.editMutex.ExitWriteLock ();
-                       projFile.UpdateSource (this, newsrc);
-               }
-               protected override bool EditorIsDirty {
-                       get { return isDirty; }
-                       set { isDirty = value; }
-               }
-               protected override bool IsReady {
-                       get { return projFile != null && buffer != null; }
-               }
-               #endregion
-
-               #region Buffer events handlers
-               void Buffer_BufferCleared (object sender, EventArgs e)
-               {
-                       editorMutex.EnterWriteLock ();
-
-                       buffer.longestLineCharCount = 0;
-                       buffer.longestLineIdx = 0;
-                       measureLeftMargin ();
-                       MaxScrollX = MaxScrollY = 0;
-                       PrintedLines = null;
-                       RegisterForGraphicUpdate ();
-                       notifyPositionChanged ();
-                       isDirty = true;
-
-                       editorMutex.ExitWriteLock ();
-               }
-               void Buffer_LineAdditionEvent (object sender, CodeBufferEventArgs e)
-               {
-                       for (int i = 0; i < e.LineCount; i++) {
-                               int lptr = e.LineStart + i;
-                               int charCount = buffer[lptr].PrintableLength;
-                               if (charCount > buffer.longestLineCharCount) {
-                                       buffer.longestLineIdx = lptr;
-                                       buffer.longestLineCharCount = charCount;
-                               }else if (lptr <= buffer.longestLineIdx)
-                                       buffer.longestLineIdx++;
-                               if (parser == null)
-                                       continue;
-                               parser.TryParseBufferLine (e.LineStart + i);
-                       }
-
-                       if (parser != null)
-                               parser.reparseSource ();
-
-                       measureLeftMargin ();
-
-                       updatePrintedLines ();
-                       updateMaxScrollY ();
-                       RegisterForGraphicUpdate ();
-                       notifyPositionChanged ();
-                       isDirty = true;
-               }
-               void Buffer_LineRemoveEvent (object sender, CodeBufferEventArgs e)
-               {
-                       bool trigFindLongestLine = false;
-                       for (int i = 0; i < e.LineCount; i++) {
-                               int lptr = e.LineStart + i;
-                               if (lptr <= buffer.longestLineIdx)
-                                       trigFindLongestLine = true;
-                       }
-                       if (trigFindLongestLine)
-                               findLongestLineAndUpdateMaxScrollX ();
-
-                       measureLeftMargin ();
-                       updatePrintedLines ();
-                       updateMaxScrollY ();
-                       RegisterForGraphicUpdate ();
-                       notifyPositionChanged ();
-                       isDirty = true;
-               }
-               void Buffer_LineUpadateEvent (object sender, CodeBufferEventArgs e)
-               {
-                       bool trigFindLongestLine = false;
-                       for (int i = 0; i < e.LineCount; i++) {
-
-                               int lptr = e.LineStart + i;
-                               if (lptr == buffer.longestLineIdx)
-                                       trigFindLongestLine = true;
-                               else if (buffer[lptr].PrintableLength > buffer.longestLineCharCount) {
-                                       buffer.longestLineCharCount = buffer[lptr].PrintableLength;
-                                       buffer.longestLineIdx = lptr;
-                               }
-                       }
-                       if (trigFindLongestLine)
-                               findLongestLineAndUpdateMaxScrollX ();
-                       
-                       RegisterForGraphicUpdate ();
-                       notifyPositionChanged ();
-                       isDirty = true;
-               }
-               void Buffer_PositionChanged (object sender, EventArgs e)
-               {
-                       Console.WriteLine ("Position changes: ({0},{1})", buffer.CurrentLine, buffer.CurrentColumn);
-                       int cc = buffer.CurrentTabulatedColumn;
-
-                       if (cc > visibleColumns + ScrollX) {
-                               ScrollX = cc - visibleColumns;
-                       } else if (cc < ScrollX)
-                               ScrollX = cc;
-                       
-                       RegisterForGraphicUpdate ();
-                       updateOnScreenCurLineFromBuffCurLine ();
-                       notifyPositionChanged ();
-               }
-
-               void Buffer_SelectionChanged (object sender, EventArgs e)
-               {
-                       RegisterForGraphicUpdate ();
-               }
-               void Buffer_FoldingEvent (object sender, CodeBufferEventArgs e)
-               {
-                       updatePrintedLines ();
-                       updateOnScreenCurLineFromBuffCurLine ();
-                       updateMaxScrollY ();
-                       RegisterForGraphicUpdate ();
-               }
-               #endregion
-
-               void notifyPositionChanged (){
-                       try {                           
-                               NotifyValueChanged ("CurrentLine", buffer.CurrentLine+1);
-                               NotifyValueChanged ("CurrentColumn", buffer.CurrentColumn+1);
-                               NotifyValueChanged ("CurrentLineHasError", CurrentLineHasError);
-                               NotifyValueChanged ("CurrentLineError", CurrentLineError);
-                       } catch (Exception ex) {
-                               Console.WriteLine (ex.ToString ());
-                       }
-               }
-                       
-               #region Public Crow Properties
-               public int CurrentLine{
-                       get { return buffer == null ? 0 : buffer.CurrentLine+1; }
-                       set {
-                               try {
-                                       int l = value - 1;
-                                       if (l == buffer.CurrentLine)
-                                               return;
-                                       buffer.CurrentLine = l;
-                                       if (buffer [l].IsFolded)
-                                               buffer.ToogleFolding (l);                                       
-                               } catch (Exception ex) {
-                                       requestedLine = value - 1;
-                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
-                               }
-                       }
-               }
-               public int CurrentColumn{
-                       get { return buffer == null ? 0 : buffer.CurrentColumn+1; }
-                       set {
-                               try {                                   
-                                       if (value - 1 == buffer.CurrentColumn)
-                                               return;
-                                       buffer.CurrentColumn = value - 1;
-                               } catch (Exception ex) {
-                                       requestedCol = value - 1;
-                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
-                               }
-                       }
-               }
-               public bool PrintLineNumbers
-               {
-                       get { return Configuration.Global.Get<bool> ("PrintLineNumbers"); }
-                       set     {
-                               if (PrintLineNumbers == value)
-                                       return;
-                               Configuration.Global.Set ("PrintLineNumbers", value);
-                               NotifyValueChanged ("PrintLineNumbers", PrintLineNumbers);
-                               measureLeftMargin ();
-                               RegisterForGraphicUpdate ();
-                       }
-               }
-               [DefaultValue("BlueGray")]
-               public virtual Color SelectionBackground {
-                       get { return selBackground; }
-                       set {
-                               if (value == selBackground)
-                                       return;
-                               selBackground = value;
-                               NotifyValueChanged ("SelectionBackground", selBackground);
-                               RegisterForRedraw ();
-                       }
-               }
-               [DefaultValue("White")]
-               public virtual Color SelectionForeground {
-                       get { return selForeground; }
-                       set {
-                               if (value == selForeground)
-                                       return;
-                               selForeground = value;
-                               NotifyValueChanged ("SelectionForeground", selForeground);
-                               RegisterForRedraw ();
-                       }
-               }
-               public override int ScrollY {
-                       get {
-                               return base.ScrollY;
-                       }
-                       set {
-                               if (value == base.ScrollY)
-                                       return;
-                               base.ScrollY = value;
-                               updatePrintedLines ();
-                               updateOnScreenCurLineFromBuffCurLine ();
-                               RegisterForGraphicUpdate ();
-                       }
-               }
-               public ParserException CurrentLineError {
-                       get { return buffer?.CurrentCodeLine?.exception; }
-               }
-               public bool CurrentLineHasError {
-                       get { return buffer == null ? false : buffer.CurrentCodeLine == null ? false :
-                               buffer.CurrentCodeLine.exception != null; }
-               }
-               public override ProjectFile ProjectNode {
-                       get {
-                               return base.ProjectNode;
-                       }
-                       set {
-                               base.ProjectNode = value;
-                               if (projFile != null)
-                                       parser = getParserFromExt (System.IO.Path.GetExtension (projFile.Extension));
-                       }
-               }
-               #endregion
-
-               BufferParser getParserFromExt (string extension) {
-                       if (string.IsNullOrEmpty(extension))
-                               return null;
-                       if (!parsing.ContainsKey(extension))
-                               return null;
-                       Type parserType = Type.GetType (parsing [extension]);
-                       if (parserType == null)
-                               return null;
-                       return (BufferParser)Activator.CreateInstance (parserType, buffer );
-               }
-               void loadSource () {
-
-                       try {
-
-                               if (parser == null)
-                                       buffer.Load (projFile.Source);
-                               else//parser may have special linebrk rules
-                                       buffer.Load (projFile.Source, parser.LineBrkRegex);
-
-                       } catch (Exception ex) {
-                               Debug.WriteLine (ex.ToString ());
-                       }
-
-                       projFile.RegisteredEditors [this] = true;
-
-                       updateMaxScrollY ();
-                       MaxScrollX = Math.Max (0, buffer.longestLineCharCount - visibleColumns);
-                       updatePrintedLines ();
-
-                       RegisterForGraphicUpdate ();
-               }
-
-               /// <summary>
-               /// Current editor line, when set, update buffer.CurrentLine
-               /// </summary>
-               int PrintedCurrentLine {
-                       get { return printedCurrentLine;}
-                       set {
-                               if (value < 0) {
-                                       ScrollY += value;
-                                       printedCurrentLine = 0;
-                               } else if (PrintedLines.Count < visibleLines && value >= PrintedLines.Count) {
-                                       printedCurrentLine = PrintedLines.Count - 1;
-                               }else if (value >= visibleLines) {
-                                       ScrollY += value - visibleLines + 1;
-                                       printedCurrentLine = visibleLines - 1;
-                               }else
-                                       printedCurrentLine = value;
-                               //Debug.WriteLine ("printed current line:" + printedCurrentLine.ToString ());
-                               //update position in buffer
-                               buffer.CurrentLine = buffer.IndexOf (PrintedLines[printedCurrentLine]);
-                       }
-               }
-               int getTabulatedColumn (int col, int line) {
-                       return buffer [line].Content.Substring (0, col).Replace ("\t", new String (' ', Interface.TabSize)).Length;
-               }
-               int getTabulatedColumn (Point pos) {
-                       return getTabulatedColumn (pos.X,pos.Y);
-               }
-               /// <summary>
-               /// Moves cursor one char to the left, move up if cursor reaches start of line
-               /// </summary>
-               /// <returns><c>true</c> if move succeed</returns>
-               public bool MoveLeft(){
-                       if (buffer.CurrentColumn == 0) {
-                               if (printedCurrentLine == 0)
-                                       return false;
-                               PrintedCurrentLine--;
-                               buffer.CurrentColumn = int.MaxValue;
-                       } else
-                               buffer.CurrentColumn--;
-                       return true;
-               }
-               /// <summary>
-               /// Moves cursor one char to the right, move down if cursor reaches end of line
-               /// </summary>
-               /// <returns><c>true</c> if move succeed</returns>
-               public bool MoveRight(){
-                       if (buffer.CurrentColumn >= buffer.CurrentCodeLine.Length) {
-                               if (PrintedCurrentLine == buffer.UnfoldedLines - 1)
-                                       return false;
-                               buffer.CurrentColumn = 0;
-                               PrintedCurrentLine++;
-                       } else
-                               buffer.CurrentColumn++;
-                       return true;
-               }
-
-               #region Drawing
-               void drawLine(Context gr, Rectangle cb, int i) {
-                       CodeLine cl = PrintedLines[i];
-                       int lineIndex = buffer.IndexOf(cl);
-
-                       double y = cb.Y + (fe.Ascent+fe.Descent) * i, x = cb.X;
-
-                       //Draw line numbering
-                       Color mgFg = Color.Gray;
-                       Color mgBg = Color.White;
-                       if (PrintLineNumbers){
-                               Rectangle mgR = new Rectangle ((int)x, (int)y, leftMargin - leftMarginGap, (int)Math.Ceiling((fe.Ascent+fe.Descent)));
-                               if (cl.exception != null) {
-                                       mgBg = Color.Red;
-                                       if (buffer.CurrentLine == lineIndex)
-                                               mgFg = Color.White;
-                                       else
-                                               mgFg = Color.LightGray;
-                               }else if (buffer.CurrentLine == lineIndex) {
-                                       mgFg = Color.Black;
-                                       mgBg = Color.DarkGray;
-                               }
-                               string strLN = (lineIndex+1).ToString ();
-                               gr.SetSourceColor (mgBg);
-                               gr.Rectangle (mgR);
-                               gr.Fill();
-                               gr.SetSourceColor (mgFg);
-
-                               gr.MoveTo (cb.X + (int)(gr.TextExtents (buffer.LineCount.ToString()).Width - gr.TextExtents (strLN).Width), y + fe.Ascent);
-                               gr.ShowText (strLN);
-                               gr.Fill ();
-                       }
-
-
-
-                       //draw folding
-                       if (foldingEnabled){
-
-                               Rectangle rFld = new Rectangle (cb.X + leftMargin - leftMarginGap - foldMargin,
-                                       (int)(y + (fe.Ascent + fe.Descent) / 2.0 - foldSize / 2.0), foldSize, foldSize);
-
-                               gr.SetSourceColor (Color.Black);
-                               gr.LineWidth = 1.0;
-
-                               int level = 0;
-                               bool closingNode = false;
-
-                               if (currentNode != null) {
-                                       if (cl == currentNode.EndLine) {
-                                               currentNode = currentNode.Parent;
-                                               closingNode = true;
-                                       }
-                                       if (currentNode != null)
-                                               level = currentNode.Level - 1;
-                               }
-
-                               for (int l = 0; l < level; l++) {                                       
-                                       gr.MoveTo (rFld.Center.X + 0.5, y);
-                                       gr.LineTo (rFld.Center.X + 0.5, y + fe.Ascent + fe.Descent);
-                                       rFld.Left += foldHSpace;
-                               }
-                               if (closingNode) {
-                                       gr.MoveTo (rFld.Center.X + 0.5, y);
-                                       gr.LineTo (rFld.Center.X + 0.5, y + fe.Ascent / 2 + 0.5);
-                                       gr.LineTo (rFld.Center.X + 0.5 + foldSize / 2, y + fe.Ascent / 2 + 0.5);
-                                       closingNode = false;
-                               }
-                               gr.SetDash (new double[]{ 1.5 },0.0);
-                               gr.SetSourceColor (Color.Gray);
-                               gr.Stroke ();
-                               gr.SetDash (new double[]{}, 0.0);
-
-                               if (cl.IsFoldable) {
-                                       gr.Rectangle (rFld);
-                                       gr.SetSourceColor (Color.White);
-                                       gr.Fill();
-                                       gr.SetSourceColor (Color.Black);
-                                       gr.Rectangle (rFld, 1.0);
-                                       if (cl.IsFolded) {
-                                               gr.MoveTo (rFld.Center.X + 0.5, rFld.Y + 2);
-                                               gr.LineTo (rFld.Center.X + 0.5, rFld.Bottom - 2);
-                                       }else
-                                               currentNode = cl.SyntacticNode;
-                                       
-                                       gr.MoveTo (rFld.Left + 2, rFld.Center.Y + 0.5);
-                                       gr.LineTo (rFld.Right - 2, rFld.Center.Y + 0.5);
-                                       gr.Stroke ();
-                               } 
-                       }
-
-                       gr.SetSourceColor (Foreground);
-                       x += leftMargin;
-
-                       if (cl.Tokens == null)
-                               drawRawCodeLine (gr, x, y, i, lineIndex);
-                       else
-                               drawParsedCodeLine (gr, x, y, i, lineIndex);
-               }
-               Node currentNode = null;
-//             void drawParsed(Context gr){
-//                     if (PrintedLines == null)
-//                             return;
-//
-//                     gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
-//                     gr.SetFontSize (Font.Size);
-//                     gr.FontOptions = Interface.FontRenderingOptions;
-//                     gr.Antialias = Interface.Antialias;
-//
-//                     Rectangle cb = ClientRectangle;
-//                     gr.Save ();
-//                     CairoHelpers.CairoRectangle (gr, cb, CornerRadius);
-//                     gr.Clip ();
-//
-//                     bool selectionInProgress = false;
-//
-//                     Foreground.SetAsSource (gr);
-//
-//                     #region draw text cursor
-//                     if (SelBegin != SelRelease)
-//                             selectionInProgress = true;
-//                     else if (HasFocus){
-//                             gr.LineWidth = 1.0;
-//                             double cursorX = + leftMargin + cb.X + (CurrentColumn - ScrollX) * fe.MaxXAdvance;
-//                             gr.MoveTo (0.5 + cursorX, cb.Y + printedCurrentLine * (fe.Ascent+fe.Descent));
-//                             gr.LineTo (0.5 + cursorX, cb.Y + (printedCurrentLine + 1) * (fe.Ascent+fe.Descent));
-//                             gr.Stroke();
-//                     }
-//                     #endregion
-//
-//                     for (int i = 0; i < PrintedLines.Count; i++)
-//                             drawTokenLine (gr, i, selectionInProgress, cb);
-//
-//                     gr.Restore ();
-//             }
-               void drawRawCodeLine(Context gr, double x, double y, int i, int lineIndex) {
-                       string lstr = buffer[lineIndex].PrintableContent;
-                       if (ScrollX < lstr.Length)
-                               lstr = lstr.Substring (ScrollX);
-                       else
-                               lstr = "";
-
-                       gr.MoveTo (x, y + fe.Ascent);
-                       gr.ShowText (lstr);
-                       gr.Fill ();
-
-                       if (!buffer.SelectionIsEmpty && lineIndex >= buffer.SelectionStart.Y && lineIndex <= buffer.SelectionEnd.Y) {
-                               double rLineX = x,
-                               rLineY = y,
-                               rLineW = lstr.Length * fe.MaxXAdvance;
-
-                               //System.Diagnostics.Debug.WriteLine ("sel start: " + buffer.SelectionStart + " sel end: " + buffer.SelectionEnd);
-                               if (lineIndex == buffer.SelectionStart.Y) {
-                                       rLineX += (selStartCol - ScrollX) * fe.MaxXAdvance;
-                                       rLineW -= selStartCol * fe.MaxXAdvance;
-                               }
-                               if (lineIndex == buffer.SelectionEnd.Y)
-                                       rLineW -= (lstr.Length - selEndCol) * fe.MaxXAdvance;
-
-                               gr.Save ();
-                               gr.Operator = Operator.Source;
-                               gr.Rectangle (rLineX, rLineY, rLineW, (fe.Ascent+fe.Descent));
-                               gr.SetSourceColor (SelectionBackground);
-                               gr.FillPreserve ();
-                               gr.Clip ();
-                               gr.Operator = Operator.Over;
-                               gr.SetSourceColor (SelectionForeground);
-                               gr.MoveTo (x, y + fe.Ascent);
-                               gr.ShowText (lstr);
-                               gr.Fill ();
-                               gr.Restore ();
-                       }
-               }
-               void drawParsedCodeLine (Context gr, double x, double y, int i, int lineIndex) {
-                       int lPtr = 0;
-                       CodeLine cl = PrintedLines[i];
-
-                       for (int t = 0; t < cl.Tokens.Count; t++) {
-                               string lstr = cl.Tokens [t].PrintableContent;
-                               if (lPtr < ScrollX) {
-                                       if (lPtr - ScrollX + lstr.Length <= 0) {
-                                               lPtr += lstr.Length;
-                                               continue;
-                                       }
-                                       lstr = lstr.Substring (ScrollX - lPtr);
-                                       lPtr += ScrollX - lPtr;
-                               }
-                               Color bg = this.Background;
-                               Color fg = this.Foreground;
-                               Color selbg = this.SelectionBackground;
-                               Color selfg = this.SelectionForeground;
-                               FontSlant fts = FontSlant.Normal;
-                               FontWeight ftw = FontWeight.Normal;
-
-                               if (formatting.ContainsKey ((int)cl.Tokens [t].Type)) {
-                                       TextFormatting tf = formatting [(int)cl.Tokens [t].Type];
-                                       bg = tf.Background;
-                                       fg = tf.Foreground;
-                                       if (tf.Bold)
-                                               ftw = FontWeight.Bold;
-                                       if (tf.Italic)
-                                               fts = FontSlant.Italic;
-                               }
-
-                               gr.SelectFontFace (Font.Name, fts, ftw);
-                               gr.SetSourceColor (fg);
-
-                               gr.MoveTo (x, y + fe.Ascent);
-                               gr.ShowText (lstr);
-                               gr.Fill ();
-
-                               if (buffer.SelectionInProgress && lineIndex >= buffer.SelectionStart.Y && lineIndex <= buffer.SelectionEnd.Y &&
-                                       !(lineIndex == buffer.SelectionStart.Y && lPtr + lstr.Length <= selStartCol) &&
-                                       !(lineIndex == buffer.SelectionEnd.Y && selEndCol <= lPtr)) {
-
-                                       double rLineX = x,
-                                       rLineY = y,
-                                       rLineW = lstr.Length * fe.MaxXAdvance;
-                                       double startAdjust = 0.0;
-
-                                       if ((lineIndex == buffer.SelectionStart.Y) && (selStartCol < lPtr + lstr.Length) && (selStartCol > lPtr))
-                                               startAdjust = (selStartCol - lPtr) * fe.MaxXAdvance;
-                                       rLineX += startAdjust;
-                                       if ((lineIndex == buffer.SelectionEnd.Y) && (selEndCol < lPtr + lstr.Length))
-                                               rLineW = (selEndCol - lPtr) * fe.MaxXAdvance;
-                                       rLineW -= startAdjust;
-
-                                       gr.Save ();
-                                       gr.Operator = Operator.Source;
-                                       gr.Rectangle (rLineX, rLineY, rLineW, (fe.Ascent+fe.Descent));
-                                       gr.SetSourceColor (selbg);
-                                       gr.FillPreserve ();
-                                       gr.Clip ();
-                                       gr.Operator = Operator.Over;
-                                       gr.SetSourceColor (selfg);
-                                       gr.MoveTo (x, y + fe.Ascent);
-                                       gr.ShowText (lstr);
-                                       gr.Fill ();
-                                       gr.Restore ();
-                               }
-                               x += (int)lstr.Length * fe.MaxXAdvance;
-                               lPtr += lstr.Length;
-                       }
-               }
-
-               #endregion
-
-               #region GraphicObject overrides
-               public override Font Font {
-                       get { return base.Font; }
-                       set {
-                               base.Font = value;
-
-                               using (ImageSurface img = new ImageSurface (Format.Argb32, 1, 1)) {
-                                       using (Context gr = new Context (img)) {
-                                               gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
-                                               gr.SetFontSize (Font.Size);
-
-                                               fe = gr.FontExtents;
-                                       }
-                               }
-                               MaxScrollY = 0;
-                               RegisterForGraphicUpdate ();
-                       }
-               }
-               protected override int measureRawSize(LayoutingType lt)
-               {
-                       if (lt == LayoutingType.Height)
-                               return (int)Math.Ceiling((fe.Ascent+fe.Descent) * buffer.LineCount) + Margin * 2;
-
-                       return (int)(fe.MaxXAdvance * buffer.longestLineCharCount) + Margin * 2 + leftMargin;
-               }
-               public override void OnLayoutChanges (LayoutingType layoutType)
-               {
-                       base.OnLayoutChanges (layoutType);
-
-                       if (layoutType == LayoutingType.Height)
-                               updateVisibleLines ();
-                       else if (layoutType == LayoutingType.Width)
-                               updateVisibleColumns ();
-               }
-
-               protected override void onDraw (Context gr)
-               {
-                       base.onDraw (gr);
-
-                       gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
-                       gr.SetFontSize (Font.Size);
-                       gr.FontOptions = Interface.FontRenderingOptions;
-                       gr.Antialias = Interface.Antialias;
-
-                       Rectangle cb = ClientRectangle;
-
-                       Foreground.SetAsSource (gr);
-
-                       buffer.editMutex.EnterReadLock ();
-                       editorMutex.EnterReadLock ();
-
-                       #region draw text cursor
-                       if (buffer.SelectionInProgress){
-                               selStartCol = getTabulatedColumn (buffer.SelectionStart);
-                               selEndCol = getTabulatedColumn (buffer.SelectionEnd);
-                       }else if (HasFocus && printedCurrentLine >= 0){
-                               gr.LineWidth = 1.0;
-                               double cursorX = cb.X + (getTabulatedColumn(buffer.CurrentPosition) - ScrollX) * fe.MaxXAdvance + leftMargin;
-                               gr.MoveTo (0.5 + cursorX, cb.Y + (printedCurrentLine) * (fe.Ascent+fe.Descent));
-                               gr.LineTo (0.5 + cursorX, cb.Y + (printedCurrentLine + 1) * (fe.Ascent+fe.Descent));
-                               gr.Stroke();
-                       }
-                       #endregion
-
-                       if (PrintedLines?.Count > 0) {                          
-                               int unfoldedLines = buffer.UnfoldedLines;
-                               currentNode = null;
-                               CodeLine cl = PrintedLines[0];
-                               int idx0 = buffer.IndexOf(cl);
-                               int li = idx0-1;
-                               while (li >= 0) {
-                                       if (buffer [li].IsFoldable && !buffer [li].IsFolded) {
-                                               if (buffer.IndexOf(buffer [li].SyntacticNode.EndLine) > idx0){
-                                                       currentNode = buffer [li].SyntacticNode;
-                                                       break;
-                                               }
-                                       }
-                                       li--;
-                               }
-
-                               for (int i = 0; i < visibleLines; i++) {
-                                       if (i + ScrollY >= unfoldedLines)//TODO:need optimize
-                                               break;
-                                       drawLine (gr, cb, i);
-                               }
-                       }
-
-                       editorMutex.ExitReadLock ();
-
-                       buffer.editMutex.ExitReadLock ();
-
-               }
-               #endregion
-
-               #region Mouse handling
-
-               int hoverLine = -1;
-               public int HoverLine {
-                       get { return hoverLine; }
-                       set { 
-                               if (hoverLine == value)
-                                       return;
-                               hoverLine = value;
-                               NotifyValueChanged ("HoverLine", hoverLine);                            
-                       }
-               }
-               void updateHoverLine () {
-                       int hvl = (int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)));
-                       hvl = Math.Min (PrintedLines.Count, hvl);
-                       HoverLine = buffer.IndexOf (PrintedLines[hvl]);
-               }
-               void updateCurrentPosFromMouseLocalPos(){                       
-                       PrintedCurrentLine = (int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)));
-                       int curVisualCol = ScrollX +  (int)Math.Round ((mouseLocalPos.X - leftMargin) / fe.MaxXAdvance);
-
-                       int i = 0;
-                       int buffCol = 0;
-                       while (i < curVisualCol && buffCol < buffer.CurrentCodeLine.Length) {
-                               if (buffer.CurrentCodeLine[buffCol] == '\t')
-                                       i += Interface.TabSize;
-                               else
-                                       i++;
-                               buffCol++;
-                       }
-                       buffer.CurrentColumn = buffCol;
-               }
-               public override void onMouseEnter (object sender, MouseMoveEventArgs e)
-               {
-                       base.onMouseEnter (sender, e);
-                       if (e.X - ScreenCoordinates(Slot).X < leftMargin + ClientRectangle.X)
-                               IFace.MouseCursor = XCursor.Default;
-                       else
-                               IFace.MouseCursor = XCursor.Text;
-               }
-               public override void onMouseLeave (object sender, MouseMoveEventArgs e)
-               {
-                       base.onMouseLeave (sender, e);
-                       IFace.MouseCursor = XCursor.Default;
-               }
-               public override void onMouseMove (object sender, MouseMoveEventArgs e)
-               {
-                       base.onMouseMove (sender, e);
-
-                       mouseLocalPos = e.Position - ScreenCoordinates(Slot).TopLeft - ClientRectangle.TopLeft;
-
-                       updateHoverLine ();
-
-                       if (!e.Mouse.IsButtonDown (MouseButton.Left)) {
-                               if (mouseLocalPos.X < leftMargin)
-                                       IFace.MouseCursor = XCursor.Default;
-                               else
-                                       IFace.MouseCursor = XCursor.Text;
-                               return;
-                       }
-
-                       if (!HasFocus || !buffer.SelectionInProgress)
-                               return;
-
-                       //mouse is down
-                       updateCurrentPosFromMouseLocalPos();
-                       buffer.SetSelEndPos ();
-               }
-               public override void onMouseDown (object sender, MouseButtonEventArgs e)
-               {
-                       if (!this.Focusable)
-                               return;
-
-                       if (mouseLocalPos.X >= leftMargin)
-                               base.onMouseDown (sender, e);
-
-                       if (doubleClicked) {
-                               doubleClicked = false;
-                               return;
-                       }
-
-                       if (mouseLocalPos.X < leftMargin) {
-                               toogleFolding (buffer.IndexOf (PrintedLines [(int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)))]));
-                               return;
-                       }
-
-                       updateCurrentPosFromMouseLocalPos ();
-                       buffer.SetSelStartPos ();
-               }
-               public override void onMouseUp (object sender, MouseButtonEventArgs e)
-               {
-                       base.onMouseUp (sender, e);
-
-                       if (buffer.SelectionIsEmpty)
-                               buffer.ResetSelection ();
-               }
-
-               public override void onMouseDoubleClick (object sender, MouseButtonEventArgs e)
-               {
-                       doubleClicked = true;
-                       base.onMouseDoubleClick (sender, e);
-
-                       buffer.GotoWordStart ();
-                       buffer.SetSelStartPos ();
-                       buffer.GotoWordEnd ();
-                       buffer.SetSelEndPos ();
-               }
-
-               public override void onMouseWheel (object sender, MouseWheelEventArgs e)
-               {
-                       base.onMouseWheel (sender, e);
-               }
-               #endregion
-
-               #region Keyboard handling
-               public override void onKeyDown (object sender, KeyboardKeyEventArgs e)
-               {
-                       //base.onKeyDown (sender, e);
-
-                       Key key = e.Key;
-
-                       if (e.Control) {
-                               switch (key) {
-                               case Key.S:
-                                       projFile.Save ();
-                                       break;
-                               case Key.W:
-                                       editorMutex.EnterWriteLock ();
-                                       if (e.Shift)
-                                               projFile.Redo (null);
-                                       else
-                                               projFile.Undo (null);
-                                       editorMutex.ExitWriteLock ();
-                                       break;
-                               default:
-                                       Console.WriteLine ("");
-                                       break;
-                               }
-                       }
-
-                       switch (key)
-                       {
-                       case Key.Back:
-                               buffer.DeleteChar ();
-                               break;
-                       case Key.Clear:
-                               break;
-                       case Key.Delete:
-                               if (buffer.SelectionIsEmpty)
-                                       MoveRight ();
-                               else if (e.Shift)
-                                       IFace.Clipboard = buffer.SelectedText;
-                               buffer.DeleteChar ();
-                               break;
-                       case Key.Enter:
-                       case Key.KeypadEnter:
-                               if (!buffer.SelectionIsEmpty)
-                                       buffer.DeleteChar ();
-                               buffer.InsertLineBreak ();
-                               break;
-                       case Key.Escape:
-                               buffer.ResetSelection ();
-                               break;
-                       case Key.Home:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       if (e.Control)
-                                               buffer.CurrentLine = 0;
-                                       buffer.CurrentColumn = 0;
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               if (e.Control)
-                                       buffer.CurrentLine = 0;
-                               buffer.CurrentColumn = 0;
-                               break;
-                       case Key.End:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       if (e.Control)
-                                               buffer.CurrentLine = int.MaxValue;
-                                       buffer.CurrentColumn = int.MaxValue;
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               if (e.Control)
-                                       buffer.CurrentLine = int.MaxValue;
-                               buffer.CurrentColumn = int.MaxValue;
-                               break;
-                       case Key.Insert:
-                               if (e.Shift)
-                                       buffer.Insert (IFace.Clipboard);
-                               else if (e.Control && !buffer.SelectionIsEmpty)
-                                       IFace.Clipboard = buffer.SelectedText;
-                               break;
-                       case Key.Left:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       if (e.Control)
-                                               buffer.GotoWordStart ();
-                                       else
-                                               MoveLeft ();
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               if (e.Control)
-                                       buffer.GotoWordStart ();
-                               else
-                                       MoveLeft();
-                               break;
-                       case Key.Right:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       if (e.Control)
-                                               buffer.GotoWordEnd ();
-                                       else
-                                               MoveRight ();
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               if (e.Control)
-                                       buffer.GotoWordEnd ();
-                               else
-                                       MoveRight ();
-                               break;
-                       case Key.Up:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       PrintedCurrentLine--;
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               PrintedCurrentLine--;
-                               break;
-                       case Key.Down:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       PrintedCurrentLine++;
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               PrintedCurrentLine++;
-                               break;
-                       case Key.Menu:
-                               break;
-                       case Key.NumLock:
-                               break;
-                       case Key.PageDown:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       PrintedCurrentLine += visibleLines;
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               PrintedCurrentLine += visibleLines;
-                               break;
-                       case Key.PageUp:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty)
-                                               buffer.SetSelStartPos ();
-                                       PrintedCurrentLine -= visibleLines;
-                                       buffer.SetSelEndPos ();
-                                       break;
-                               }
-                               buffer.ResetSelection ();
-                               PrintedCurrentLine -= visibleLines;
-                               break;
-                       case Key.RWin:
-                               break;
-                       case Key.Tab:
-                               if (e.Shift) {
-                                       if (buffer.SelectionIsEmpty ||
-                                               (buffer.SelectionStart.Y == buffer.SelectionEnd.Y)) {
-                                               //TODO
-                                               break;
-                                       }
-                                       for (int i = buffer.SelectionStart.Y; i <= buffer.SelectionEnd.Y; i++)
-                                               buffer.RemoveLeadingTab (i);
-                                       buffer.SetSelectionOnFullLines ();
-                               } else {
-                                       if (buffer.SelectionIsEmpty ||
-                                               (buffer.SelectionStart.Y == buffer.SelectionEnd.Y)) {
-                                               buffer.Insert ("\t");
-                                               break;
-                                       }
-                                       for (int i = buffer.SelectionStart.Y; i <= buffer.SelectionEnd.Y; i++) {
-                                               buffer.UpdateLine (i, "\t" + buffer [i].Content);
-                                       }
-                               }
-
-                               break;
-                       case Key.F8:
-                               toogleFolding (buffer.CurrentLine);
-                               break;
-                       default:
-                               break;
-                       }
-                       RegisterForGraphicUpdate();
-               }
-               public override void onKeyPress (object sender, KeyPressEventArgs e)
-               {
-                       base.onKeyPress (sender, e);
-
-                       buffer.Insert (e.KeyChar.ToString());
-                       buffer.ResetSelection ();
-               }
-               #endregion
-       }
-}
\ No newline at end of file
index a98aa08c10bb93ca9472dd3d6454f519c3f8f056..e8c8718274e97ead5f799e2b36d74f4c53c0b093 100644 (file)
@@ -26,7 +26,7 @@ using System.Diagnostics;
 using System.Threading;
 using System.Text;
 
-namespace Crow.Coding
+namespace Crow.Text
 {
        /// <summary>
        /// Code buffer, lines are arranged in a List<string>, new line chars are removed during string.split on '\n...',
@@ -38,9 +38,9 @@ namespace Crow.Coding
                Regex reghexLineBrk = new Regex(@"\r\n|\r|\n|\\\n");//original text line break regex
 
                #region Events
-               public event EventHandler<CodeBufferEventArgs> LineUpadateEvent;
-               public event EventHandler<CodeBufferEventArgs> LineRemoveEvent;
-               public event EventHandler<CodeBufferEventArgs> LineAdditionEvent;
+               public event EventHandler<TextBufferEventArgs> LineUpadateEvent;
+               public event EventHandler<TextBufferEventArgs> LineRemoveEvent;
+               public event EventHandler<TextBufferEventArgs> LineAdditionEvent;
                public event EventHandler BufferCleared;
                public event EventHandler SelectionChanged;
                public event EventHandler PositionChanged;
@@ -137,7 +137,7 @@ namespace Crow.Coding
                        buffer.Remove (GetBufferIndexOfLine (i), lineLength [i]);
                        lineLength.RemoveAt (i);
                        editMutex.ExitWriteLock ();
-                       LineRemoveEvent.Raise (this, new CodeBufferEventArgs (i));
+                       LineRemoveEvent.Raise (this, new TextBufferEventArgs (i));
                }
                /// <summary>
                /// insert string without linebreaks at position i in buff
@@ -149,7 +149,7 @@ namespace Crow.Coding
                        buffer.Insert (this [i], str);
                        lineLength.Insert (i, str.Length);
                        editMutex.ExitWriteLock ();
-                       LineAdditionEvent.Raise (this, new CodeBufferEventArgs (i));
+                       LineAdditionEvent.Raise (this, new TextBufferEventArgs (i));
                }
                public void AddLine(string str){
                        editMutex.EnterWriteLock ();
@@ -159,7 +159,7 @@ namespace Crow.Coding
                                lineLength.Add (0);
                        }
                        editMutex.ExitWriteLock ();
-                       LineAdditionEvent.Raise (this, new CodeBufferEventArgs (lineLength.Count - 1));
+                       LineAdditionEvent.Raise (this, new TextBufferEventArgs (lineLength.Count - 1));
                }
                public void AddRange (string[] items){
                        int start = lineLength.Count;
@@ -167,7 +167,7 @@ namespace Crow.Coding
                        for (int i = 0; i < items.Length; i++)
                                AddLine (items [i]);
                        editMutex.ExitWriteLock ();
-                       LineAdditionEvent.Raise (this, new CodeBufferEventArgs (start, items.Length));
+                       LineAdditionEvent.Raise (this, new TextBufferEventArgs (start, items.Length));
                }
                public void Clear () {
                        editMutex.EnterWriteLock ();
@@ -183,7 +183,7 @@ namespace Crow.Coding
                        buffer.Insert (ptrL, newContent);
                        lineLength [i] = newContent.Length;
                        editMutex.ExitWriteLock ();
-                       LineUpadateEvent.Raise (this, new CodeBufferEventArgs (i));
+                       LineUpadateEvent.Raise (this, new TextBufferEventArgs (i));
                }
                public void AppenedLine(int i, string newContent){
                        editMutex.EnterWriteLock ();
@@ -193,7 +193,7 @@ namespace Crow.Coding
                        buffer.Insert(ptr, newContent);
                        lineLength [i] += newContent.Length;
                        editMutex.ExitWriteLock ();
-                       LineUpadateEvent.Raise (this, new CodeBufferEventArgs (i));
+                       LineUpadateEvent.Raise (this, new TextBufferEventArgs (i));
                }
                /// <summary>
                /// Insert new string at caret position, should be sure no line break is inside.
diff --git a/CrowIDE/src/Editors/CodeBuffer/TextBufferEventArgs.cs b/CrowIDE/src/Editors/CodeBuffer/TextBufferEventArgs.cs
new file mode 100644 (file)
index 0000000..3b67bb1
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+
+namespace Crow.Text
+{
+       public class TextBufferEventArgs : EventArgs {
+               public int LineStart;
+               public int LineCount;
+
+               public TextBufferEventArgs(int lineNumber) {
+                       LineStart = lineNumber;
+                       LineCount = 1;
+               }
+               public TextBufferEventArgs(int lineStart, int lineCount) {
+                       LineStart = lineStart;
+                       LineCount = lineCount;
+               }
+       }
+
+}
+
index 69233e18c395087ef2290022bca5ab44aea29327..6b7234dc23131c7cf8c0e523bfc19cff30b97e5b 100644 (file)
@@ -37,12 +37,12 @@ using System.Diagnostics;
 using System.IO;
 using System.Threading;
 
-namespace Crow.Coding
+namespace Crow.Text
 {
        /// <summary>
        /// Scrolling text box optimized for monospace fonts, for coding
        /// </summary>
-       public class TextEditor : Editor
+       public class TextEditor : Crow.Coding.Editor
        {               
                #region CTOR
                public TextEditor (): base()
@@ -152,20 +152,20 @@ namespace Crow.Coding
 
                        editorMutex.ExitWriteLock ();
                }
-               void Buffer_LineAdditionEvent (object sender, CodeBufferEventArgs e)
+               void Buffer_LineAdditionEvent (object sender, TextBufferEventArgs e)
                {
                        updateMaxScrollY ();
                        RegisterForGraphicUpdate ();
                        isDirty = true;
                }
-               void Buffer_LineRemoveEvent (object sender, CodeBufferEventArgs e)
+               void Buffer_LineRemoveEvent (object sender, TextBufferEventArgs e)
                {
                        updateMaxScrollY ();
                        RegisterForGraphicUpdate ();
                        notifyPositionChanged ();
                        isDirty = true;
                }
-               void Buffer_LineUpadateEvent (object sender, CodeBufferEventArgs e)
+               void Buffer_LineUpadateEvent (object sender, TextBufferEventArgs e)
                {
                        RegisterForGraphicUpdate ();
                        notifyPositionChanged ();
index 7a7a888bf92972ca3af7faf3eadeb58a0bdc8baf..76cb40094ddbeb8a51910252e29fdaa61081f2e4 100644 (file)
@@ -28,6 +28,7 @@ using System.Collections.Generic;
 using Crow.IML;
 using System.Text;
 using System.Xml;
+using System.Diagnostics;
 
 namespace Crow.Coding
 {
@@ -46,7 +47,8 @@ namespace Crow.Coding
                Exception imlError = null;
 
                bool drawGrid, snapToGrid;
-               int gridSpacing;
+               int gridSpacing, zoom = 100;
+               Measure designWidth, designHeight;
                bool updateEnabled;
 
                [DefaultValue(true)]
@@ -81,6 +83,42 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
+               [DefaultValue(100)]
+               public int Zoom {
+                       get { return zoom; }
+                       set {
+                               if (zoom == value)
+                                       return;
+                               
+                               zoom = value;
+                               NotifyValueChanged ("Zoom", zoom);
+                               Width = (int)(designWidth * zoom / 100.0);
+                               Height = (int)(designHeight * zoom / 100.0);
+                       }
+               }
+               [DefaultValue("512")]
+               public Measure DesignWidth {
+                       get { return designWidth; }
+                       set { 
+                               if (designWidth == value)
+                                       return;
+                               designWidth = value;
+                               NotifyValueChanged ("DesignWidth", designWidth);
+                               Width = (int)(designWidth * zoom / 100.0);
+                       }
+               }
+               [DefaultValue("512")]
+               public Measure DesignHeight {
+                       get { return designHeight; }
+                       set {
+                               if (designHeight == value)
+                                       return;
+                               designHeight = value;
+                               NotifyValueChanged ("DesignHeight", designHeight);
+                               Height = (int)(designHeight * zoom / 100.0);
+                       }
+               }
+
                public GraphicObject SelectedItem {
                        get { return selectedItem; }
                        set {
@@ -149,6 +187,7 @@ namespace Crow.Coding
 
                protected override void updateProjFileFromEditor ()
                {
+                       Debug.WriteLine("\t\tImlEditor updateProjFileFromEditor");
                        try {
                                projFile.UpdateSource(this, imlProjFile.Instance.GetIML());
                        } catch (Exception ex) {
@@ -158,6 +197,7 @@ namespace Crow.Coding
                        }
                }
                protected override void updateEditorFromProjFile () {
+                       Debug.WriteLine("\t\tImlEditor updateEditorFromProjFile");
                        try {
                                string selItemDesignID = null;
                                if (SelectedItem!=null)
@@ -196,7 +236,7 @@ namespace Crow.Coding
                                }
                                SelectedItem = go;
                        } catch (Exception ex) {
-                               Error = ex.InnerException;
+                               Error = ex;
                                if (Monitor.IsEntered(imlVE.UpdateMutex))
                                        Monitor.Exit (imlVE.UpdateMutex);
                        }
@@ -223,11 +263,10 @@ namespace Crow.Coding
                        switch (layoutType) {
                        case LayoutingType.Width:
                        case LayoutingType.Height:
-                               imlVE.ProcessResize (this.ClientRectangle.Size);
+                               imlVE.ProcessResize (new Size(designWidth,designHeight));
                                break;
                        }
                }
-
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseMove (sender, e);
@@ -264,29 +303,38 @@ namespace Crow.Coding
                protected override void onDraw (Cairo.Context gr)
                {
                        base.onDraw (gr);
-                       if (!drawGrid)
-                               return;
 
+                       Rectangle cb = new Rectangle (0, 0, designWidth, designHeight);// ClientRectangle;
 
-                       Rectangle cb = ClientRectangle;
-                       const double gridLineWidth = 0.1;
-                       double glhw = gridLineWidth / 2.0;
-                       int nbLines = cb.Width / gridSpacing ;
-                       double d = cb.Left + gridSpacing;
-                       for (int i = 0; i < nbLines; i++) {
-                               gr.MoveTo (d-glhw, cb.Y);
-                               gr.LineTo (d-glhw, cb.Bottom);
-                               d += gridSpacing;
-                       }
-                       nbLines = cb.Height / gridSpacing;
-                       d = cb.Top + gridSpacing;
-                       for (int i = 0; i < nbLines; i++) {
-                               gr.MoveTo (cb.X, d - glhw);
-                               gr.LineTo (cb.Right, d -glhw);
-                               d += gridSpacing;
+                       gr.Save ();
+
+                       double z = zoom / 100.0;
+
+                       gr.Scale (z, z);
+
+                       if (drawGrid) {
+                               double gridLineWidth = 0.2 / z;
+                               double glhw = gridLineWidth / 2.0;
+                               int nbLines = cb.Width / gridSpacing;
+                               double d = cb.Left + gridSpacing;
+                               for (int i = 0; i < nbLines; i++) {
+                                       gr.MoveTo (d - glhw, cb.Y);
+                                       gr.LineTo (d - glhw, cb.Bottom);
+                                       d += gridSpacing;
+                               }
+                               nbLines = cb.Height / gridSpacing;
+                               d = cb.Top + gridSpacing;
+                               for (int i = 0; i < nbLines; i++) {
+                                       gr.MoveTo (cb.X, d - glhw);
+                                       gr.LineTo (cb.Right, d - glhw);
+                                       d += gridSpacing;
+                               }
+                               gr.LineWidth = gridLineWidth;
+                               Foreground.SetAsSource (gr, cb);
+                               gr.Stroke ();
                        }
-                       gr.LineWidth = gridLineWidth;
-                       Foreground.SetAsSource (gr, cb);
+                       gr.SetSourceColor (Color.Black);
+                       gr.Rectangle (cb, 1.0 / z);
                        gr.Stroke ();
 
                        lock (imlVE.RenderMutex) {
@@ -310,14 +358,16 @@ namespace Crow.Coding
                                gr.Rectangle (hr, 1.0);
                        }
 
-                       if (SelectedItem?.Parent == null)
-                               return;
-                       hr = SelectedItem.ScreenCoordinates(SelectedItem.getSlot ());
-                       hr.Inflate (1);
-                       gr.LineWidth = 2;
-                       gr.SetSourceColor (Color.Yellow);
-                       gr.SetDash (new double[]{ 5.0, 3.0 },0.0);
-                       gr.Rectangle (hr, 1.0);
+                       if (SelectedItem?.Parent != null) {
+                               
+                               hr = SelectedItem.ScreenCoordinates (SelectedItem.getSlot ());
+                               hr.Inflate (1);
+                               gr.LineWidth = 2;
+                               gr.SetSourceColor (Color.Yellow);
+                               gr.SetDash (new double[]{ 5.0, 3.0 }, 0.0);
+                               gr.Rectangle (hr, 1.0);
+                       }
+                       gr.Restore ();
                }
 
                protected override void onDragEnter (object sender, DragDropEventArgs e)
@@ -436,6 +486,7 @@ namespace Crow.Coding
 
                }
                void WidgetMouseMove (GraphicObject go, MouseMoveEventArgs e){}
+
                public bool ProcessMouseMove(int x, int y)
                {
                        int deltaX = x - imlVE.Mouse.X;
@@ -459,22 +510,21 @@ namespace Crow.Coding
                                GraphicObject topc = null;
                                while (tmp is GraphicObject) {
                                        topc = tmp;
-                                       tmp = tmp.LogicalParent as GraphicObject;
+                                       tmp = tmp.focusParent;
                                }
                                int idxhw = imlVE.GraphicTree.IndexOf (topc);
                                if (idxhw != 0) {
                                        int i = 0;
-                                       while (i < idxhw) {
-                                               if (imlVE.GraphicTree [i].LogicalParent == imlVE.GraphicTree [i].Parent) {
-                                                       if (imlVE.GraphicTree [i].MouseIsIn (e.Position)) {
-                                                               while (imlVE.HoverWidget != null) {
-                                                                       WidgetMouseLeave (imlVE.HoverWidget, e);
-                                                                       imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as GraphicObject;
-                                                               }
-
-                                                               WidgetCheckOver (GraphicTree [i], e);
-                                                               return true;
+                                       while (i < idxhw) {                                             
+                                               if (GraphicTree [i].MouseIsIn (e.Position)) {
+                                                       while (HoverWidget != null) {
+                                                               WidgetMouseLeave (imlVE.HoverWidget, e);
+                                                               HoverWidget = HoverWidget.focusParent;
                                                        }
+
+                                                       GraphicTree [i].checkHoverWidget (e);
+                                                       WidgetMouseMove (imlVE.HoverWidget, e);
+                                                       return true;
                                                }
                                                i++;
                                        }
@@ -483,14 +533,16 @@ namespace Crow.Coding
 
                                if (imlVE.HoverWidget.MouseIsIn (e.Position)) {
                                        WidgetCheckOver (imlVE.HoverWidget, (e));
+                                       WidgetMouseMove (imlVE.HoverWidget, e);
                                        return true;
                                } else {
                                        WidgetMouseLeave (imlVE.HoverWidget, e);
                                        //seek upward from last focused graph obj's
-                                       while (imlVE.HoverWidget.LogicalParent as GraphicObject != null) {
+                                       while (imlVE.HoverWidget.focusParent != null) {
                                                imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as GraphicObject;
                                                if (imlVE.HoverWidget.MouseIsIn (e.Position)) {
                                                        WidgetCheckOver (imlVE.HoverWidget, e);
+                                                       WidgetMouseMove (imlVE.HoverWidget, e);
                                                        return true;
                                                } else
                                                        WidgetMouseLeave (imlVE.HoverWidget, e);
@@ -504,6 +556,7 @@ namespace Crow.Coding
                                        GraphicObject g = imlVE.GraphicTree [i];
                                        if (g.MouseIsIn (e.Position)) {
                                                WidgetCheckOver (g, e);
+                                               WidgetMouseMove (imlVE.HoverWidget, e);
                                                return true;
                                        }
                                }
index dfec17a3a456dbd5b19705331b774a957671017a..c193c7dbc32b8b6f75987013c381a5ec375c845b 100644 (file)
@@ -266,7 +266,7 @@ namespace Crow.Coding
                /// <param name="length">Length.</param>
                protected virtual string Peek(int length) {
                        if (eol)
-                               throw new ParserException (currentLine, currentColumn, "Unexpected End of Line");
+                               return "";//throw new ParserException (currentLine, currentColumn, "Unexpected End of Line");
                        int lg = Math.Min(length, Math.Max (buffer [currentLine].Length - currentColumn, buffer [currentLine].Length - currentColumn - length));
                        if (lg == 0)
                                return "";
diff --git a/CrowIDE/src/Editors/Parsers2/Tokenizer.cs b/CrowIDE/src/Editors/Parsers2/Tokenizer.cs
new file mode 100644 (file)
index 0000000..bcda1ec
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Tokenizer.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Crow.Text;
+using System.Collections.Generic;
+using System.Text.RegularExpressions;
+
+namespace Crow.Coding2
+{
+       public static class TokenType {
+               public const int Undefine = 0;
+               public const int WhiteSpace = 0;
+       }
+       public class Token {
+               public int ptr;
+               public int length;
+       }
+
+       public class Tokenizer
+       {
+               #region Regular Expression for validity checks
+               public Regex rxValidChar = new Regex(@"\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\p{Cf}");
+               public Regex rxNameStartChar = new Regex(@"_|\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}");
+               public Regex rxNameChar = new Regex(@"\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\p{Cf}");
+               public Regex rxNewLineChar = new Regex(@"\u000D|\u000A|\u0085|\u2028|\u2029");
+               public Regex rxWhiteSpaceChar = new Regex(@"\p{Zs}|\u0009|\u000B|\u000C");
+               public Regex rxDecimal = new Regex(@"[0-9]+");
+               public Regex rxHexadecimal = new Regex(@"[0-9a-fA-F]+");
+               #endregion
+
+               public List<Token> Tokens;
+
+               public Tokenizer (TextBuffer buffer)
+               {
+               }
+
+
+               public void Tokenize () {
+                       
+               }
+
+       }
+}
+
diff --git a/CrowIDE/src/Editors/SourceEditor.cs b/CrowIDE/src/Editors/SourceEditor.cs
new file mode 100644 (file)
index 0000000..6ebe2c1
--- /dev/null
@@ -0,0 +1,1210 @@
+//
+// ScrollingTextBox.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Xml.Serialization;
+using System.ComponentModel;
+using System.Collections;
+using Cairo;
+using System.Text;
+using System.Collections.Generic;
+using System.Text.RegularExpressions;
+using System.Linq;
+using System.Diagnostics;
+using System.IO;
+using System.Threading;
+
+namespace Crow.Coding
+{
+       /// <summary>
+       /// Scrolling text box optimized for monospace fonts, for coding
+       /// </summary>
+       public class SourceEditor : Editor
+       {               
+               #region CTOR
+               public SourceEditor (): base()
+               {
+                       formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.DarkSlateGray, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.ElementName, new TextFormatting (Color.DarkBlue, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.ElementStart, new TextFormatting (Color.Black, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.ElementEnd, new TextFormatting (Color.Black, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.ElementClosing, new TextFormatting (Color.Black, Color.Transparent));
+
+                       formatting.Add ((int)XMLParser.TokenType.AttributeValueOpening, new TextFormatting (Color.Crimson, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.AttributeValueClosing, new TextFormatting (Color.Crimson, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.AttributeValue, new TextFormatting (Color.FireBrick, Color.Transparent, false, true));
+                       formatting.Add ((int)XMLParser.TokenType.XMLDecl, new TextFormatting (Color.ForestGreen, Color.Transparent));
+
+                       formatting.Add ((int)BufferParser.TokenType.BlockComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
+                       formatting.Add ((int)BufferParser.TokenType.LineComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
+                       formatting.Add ((int)BufferParser.TokenType.OperatorOrPunctuation, new TextFormatting (Color.Black, Color.Transparent));
+                       formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.Teal, Color.Transparent));
+                       //formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent));
+
+                       parsing.Add (".crow", "Crow.Coding.XMLParser");
+                       parsing.Add (".svg", "Crow.Coding.XMLParser");
+                       parsing.Add (".template", "Crow.Coding.XMLParser");
+                       parsing.Add (".cs", "Crow.Coding.CSharpParser");
+                       parsing.Add (".style", "Crow.Coding.StyleParser");
+
+                       buffer = new CodeBuffer ();
+                       buffer.LineUpadateEvent += Buffer_LineUpadateEvent;
+                       buffer.LineAdditionEvent += Buffer_LineAdditionEvent;;
+                       buffer.LineRemoveEvent += Buffer_LineRemoveEvent;
+                       buffer.BufferCleared += Buffer_BufferCleared;
+                       buffer.SelectionChanged += Buffer_SelectionChanged;
+                       buffer.PositionChanged += Buffer_PositionChanged;
+                       buffer.FoldingEvent += Buffer_FoldingEvent;
+                       buffer.Add (new CodeLine(""));
+               }
+               #endregion
+
+               string oldSource = "";
+               //save requested position on error, and try it on next move
+               int requestedLine = 0, requestedCol = 0;
+               volatile bool isDirty = false;
+
+               const int leftMarginGap = 10;//gap between items in margin and text
+               const int foldSize = 9;//folding rectangles size
+               const int foldHSpace = 4;//folding level tabulation x
+               int foldMargin { get { return parser == null ? 0 : parser.SyntacticTreeMaxDepth * foldHSpace; }}//folding margin size
+
+               #region private and protected fields
+               bool foldingEnabled = true;
+               int leftMargin = 0;     //margin used to display line numbers, folding errors,etc...
+               int visibleLines = 1;
+               int visibleColumns = 1;
+               int firstPrintedLine = -1;
+               int printedCurrentLine = 0;//Index of the currentline in the PrintedLines array
+
+               CodeBuffer buffer;
+               BufferParser parser;
+               List<CodeLine> PrintedLines;//list of lines visible in the Editor depending on scrolling and folding
+
+               Dictionary<int, TextFormatting> formatting = new Dictionary<int, TextFormatting>();
+               Dictionary<string, string> parsing = new Dictionary<string, string>();
+
+               Color selBackground;
+               Color selForeground;
+               int selStartCol;
+               int selEndCol;
+
+               protected Rectangle rText;
+               protected FontExtents fe;
+               protected TextExtents te;
+
+               Point mouseLocalPos;
+               bool doubleClicked = false;
+               #endregion
+
+               void measureLeftMargin () {
+                       leftMargin = 0;
+                       if (PrintLineNumbers)
+                               leftMargin += (int)Math.Ceiling((double)buffer.LineCount.ToString().Length * fe.MaxXAdvance) +6;
+                       if (foldingEnabled)
+                               leftMargin += foldMargin;
+                       if (leftMargin > 0)
+                               leftMargin += leftMarginGap;                    
+                       updateVisibleColumns ();
+               }
+               void findLongestLineAndUpdateMaxScrollX() {
+                       buffer.FindLongestVisualLine ();
+                       updateMaxScrollX ();
+//                     Debug.WriteLine ("SourceEditor: Find Longest line and update maxscrollx: {0} visible cols:{1}", MaxScrollX, visibleColumns);
+               }
+               /// <summary>
+               /// Updates visible line in widget, adapt max scroll y and updatePrintedLines
+               /// </summary>
+               void updateVisibleLines(){
+                       visibleLines = (int)Math.Floor ((double)ClientRectangle.Height / (fe.Ascent+fe.Descent));
+                       NotifyValueChanged ("VisibleLines", visibleLines);
+                       updateMaxScrollY ();
+                       updatePrintedLines ();
+                       RegisterForGraphicUpdate ();
+//                     System.Diagnostics.Debug.WriteLine ("update visible lines: " + visibleLines);
+//                     System.Diagnostics.Debug.WriteLine ("update MaxScrollY: " + MaxScrollY);
+               }
+               void updateVisibleColumns(){
+                       visibleColumns = (int)Math.Floor ((double)(ClientRectangle.Width - leftMargin)/ fe.MaxXAdvance);
+                       NotifyValueChanged ("VisibleColumns", visibleColumns);
+                       updateMaxScrollX ();
+//                     System.Diagnostics.Debug.WriteLine ("update visible columns: {0} leftMargin:{1}",visibleColumns, leftMargin);
+//                     System.Diagnostics.Debug.WriteLine ("update MaxScrollX: " + MaxScrollX);
+               }
+               void updateMaxScrollX () {
+                       MaxScrollX = Math.Max (0, buffer.longestLineCharCount - visibleColumns);
+                       if (buffer.longestLineCharCount > 0)
+                               NotifyValueChanged ("ChildWidthRatio", Slot.Width * visibleColumns / buffer.longestLineCharCount);                      
+               }
+               void updateMaxScrollY () {
+                       if (parser == null || !foldingEnabled) {
+                               MaxScrollY = Math.Max (0, buffer.LineCount - visibleLines);
+                               if (buffer.UnfoldedLines > 0)
+                                       NotifyValueChanged ("ChildHeightRatio", Slot.Height * visibleLines / buffer.UnfoldedLines);                                                     
+                       } else {
+                               MaxScrollY = Math.Max (0, buffer.UnfoldedLines - visibleLines);
+                               if (buffer.UnfoldedLines > 0)
+                                       NotifyValueChanged ("ChildHeightRatio", Slot.Height * visibleLines / buffer.UnfoldedLines);                                                     
+                       }
+               }                       
+               void updatePrintedLines () {
+                       buffer.editMutex.EnterReadLock ();
+                       editorMutex.EnterWriteLock ();
+
+                       PrintedLines = new List<CodeLine> ();
+                       int curL = 0;
+                       int i = 0;
+
+                       while (curL < buffer.LineCount && i < ScrollY) {
+                               if (buffer [curL].IsFolded)
+                                       curL = buffer.GetEndNodeIndex (curL);
+                               curL++;
+                               i++;
+                       }
+
+                       firstPrintedLine = curL;
+                       i = 0;
+                       while (i < visibleLines && curL < buffer.LineCount) {
+                               PrintedLines.Add (buffer [curL]);
+
+                               if (buffer [curL].IsFolded)
+                                       curL = buffer.GetEndNodeIndex (curL);
+
+                               curL++;
+                               i++;
+                       }
+
+                       buffer.editMutex.ExitReadLock ();
+                       editorMutex.ExitWriteLock ();
+               }
+               void updateOnScreenCurLineFromBuffCurLine(){
+                       printedCurrentLine = PrintedLines.IndexOf (buffer.CurrentCodeLine);
+               }
+               void toogleFolding (int line) {
+                       if (parser == null || !foldingEnabled)
+                               return;
+                       buffer.ToogleFolding (line);
+               }
+
+               #region Editor overrides
+               protected override void updateEditorFromProjFile ()
+               {
+                       Debug.WriteLine("\t\tSourceEditor updateEditorFromProjFile");
+
+                       buffer.editMutex.EnterWriteLock ();
+                       loadSource ();
+                       buffer.editMutex.ExitWriteLock ();
+
+                       isDirty = false;
+                       oldSource = projFile.Source;
+                       CurrentLine = requestedLine;
+                       CurrentColumn = requestedCol;
+                       projFile.RegisteredEditors [this] = true;
+               }
+               protected override void updateProjFileFromEditor ()
+               {
+                       Debug.WriteLine("\t\tSourceEditor updateProjFileFromEditor");
+
+                       buffer.editMutex.EnterWriteLock ();
+                       string newsrc = buffer.FullText;
+                       buffer.editMutex.ExitWriteLock ();
+                       projFile.UpdateSource (this, newsrc);
+               }
+               protected override bool EditorIsDirty {
+                       get { return isDirty; }
+                       set { isDirty = value; }
+               }
+               protected override bool IsReady {
+                       get { return projFile != null && buffer != null; }
+               }
+               #endregion
+
+               #region Buffer events handlers
+               void Buffer_BufferCleared (object sender, EventArgs e)
+               {
+                       editorMutex.EnterWriteLock ();
+
+                       buffer.longestLineCharCount = 0;
+                       buffer.longestLineIdx = 0;
+                       measureLeftMargin ();
+                       MaxScrollX = MaxScrollY = 0;
+                       PrintedLines = null;
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+
+                       editorMutex.ExitWriteLock ();
+               }
+               void Buffer_LineAdditionEvent (object sender, CodeBufferEventArgs e)
+               {
+                       for (int i = 0; i < e.LineCount; i++) {
+                               int lptr = e.LineStart + i;
+                               int charCount = buffer[lptr].PrintableLength;
+                               if (charCount > buffer.longestLineCharCount) {
+                                       buffer.longestLineIdx = lptr;
+                                       buffer.longestLineCharCount = charCount;
+                               }else if (lptr <= buffer.longestLineIdx)
+                                       buffer.longestLineIdx++;
+                               if (parser == null)
+                                       continue;
+                               parser.TryParseBufferLine (e.LineStart + i);
+                       }
+
+                       if (parser != null)
+                               parser.reparseSource ();
+
+                       measureLeftMargin ();
+
+                       updatePrintedLines ();
+                       updateMaxScrollY ();
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+               }
+               void Buffer_LineRemoveEvent (object sender, CodeBufferEventArgs e)
+               {
+                       bool trigFindLongestLine = false;
+                       for (int i = 0; i < e.LineCount; i++) {
+                               int lptr = e.LineStart + i;
+                               if (lptr <= buffer.longestLineIdx)
+                                       trigFindLongestLine = true;
+                       }
+                       if (trigFindLongestLine)
+                               findLongestLineAndUpdateMaxScrollX ();
+
+                       measureLeftMargin ();
+                       updatePrintedLines ();
+                       updateMaxScrollY ();
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+               }
+               void Buffer_LineUpadateEvent (object sender, CodeBufferEventArgs e)
+               {
+                       bool trigFindLongestLine = false;
+                       for (int i = 0; i < e.LineCount; i++) {
+
+                               int lptr = e.LineStart + i;
+                               if (lptr == buffer.longestLineIdx)
+                                       trigFindLongestLine = true;
+                               else if (buffer[lptr].PrintableLength > buffer.longestLineCharCount) {
+                                       buffer.longestLineCharCount = buffer[lptr].PrintableLength;
+                                       buffer.longestLineIdx = lptr;
+                               }
+                       }
+                       if (trigFindLongestLine)
+                               findLongestLineAndUpdateMaxScrollX ();
+                       
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+               }
+               void Buffer_PositionChanged (object sender, EventArgs e)
+               {
+                       Console.WriteLine ("Position changes: ({0},{1})", buffer.CurrentLine, buffer.CurrentColumn);
+                       int cc = buffer.CurrentTabulatedColumn;
+
+                       if (cc > visibleColumns + ScrollX) {
+                               ScrollX = cc - visibleColumns;
+                       } else if (cc < ScrollX)
+                               ScrollX = cc;
+                       
+                       RegisterForGraphicUpdate ();
+                       updateOnScreenCurLineFromBuffCurLine ();
+                       notifyPositionChanged ();
+               }
+
+               void Buffer_SelectionChanged (object sender, EventArgs e)
+               {
+                       RegisterForGraphicUpdate ();
+               }
+               void Buffer_FoldingEvent (object sender, CodeBufferEventArgs e)
+               {
+                       updatePrintedLines ();
+                       updateOnScreenCurLineFromBuffCurLine ();
+                       updateMaxScrollY ();
+                       RegisterForGraphicUpdate ();
+               }
+               #endregion
+
+               void notifyPositionChanged (){
+                       try {                           
+                               NotifyValueChanged ("CurrentLine", buffer.CurrentLine+1);
+                               NotifyValueChanged ("CurrentColumn", buffer.CurrentColumn+1);
+                               NotifyValueChanged ("CurrentLineHasError", CurrentLineHasError);
+                               NotifyValueChanged ("CurrentLineError", CurrentLineError);
+                       } catch (Exception ex) {
+                               Console.WriteLine (ex.ToString ());
+                       }
+               }
+                       
+               #region Public Crow Properties
+               public int CurrentLine{
+                       get { return buffer == null ? 0 : buffer.CurrentLine+1; }
+                       set {
+                               try {
+                                       int l = value - 1;
+                                       if (l == buffer.CurrentLine)
+                                               return;
+                                       buffer.CurrentLine = l;
+                                       if ((bool)buffer [l]?.IsFolded)
+                                               buffer.ToogleFolding (l);                                       
+                               } catch (Exception ex) {
+                                       requestedLine = value - 1;
+                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
+                               }
+                       }
+               }
+               public int CurrentColumn{
+                       get { return buffer == null ? 0 : buffer.CurrentColumn+1; }
+                       set {
+                               try {                                   
+                                       if (value - 1 == buffer.CurrentColumn)
+                                               return;
+                                       buffer.CurrentColumn = value - 1;
+                               } catch (Exception ex) {
+                                       requestedCol = value - 1;
+                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
+                               }
+                       }
+               }
+               public bool PrintLineNumbers
+               {
+                       get { return Configuration.Global.Get<bool> ("PrintLineNumbers"); }
+                       set     {
+                               if (PrintLineNumbers == value)
+                                       return;
+                               Configuration.Global.Set ("PrintLineNumbers", value);
+                               NotifyValueChanged ("PrintLineNumbers", PrintLineNumbers);
+                               measureLeftMargin ();
+                               RegisterForGraphicUpdate ();
+                       }
+               }
+               [DefaultValue("SteelBlue")]
+               public virtual Color SelectionBackground {
+                       get { return selBackground; }
+                       set {
+                               if (value == selBackground)
+                                       return;
+                               selBackground = value;
+                               NotifyValueChanged ("SelectionBackground", selBackground);
+                               RegisterForRedraw ();
+                       }
+               }
+               [DefaultValue("White")]
+               public virtual Color SelectionForeground {
+                       get { return selForeground; }
+                       set {
+                               if (value == selForeground)
+                                       return;
+                               selForeground = value;
+                               NotifyValueChanged ("SelectionForeground", selForeground);
+                               RegisterForRedraw ();
+                       }
+               }
+               public override int ScrollY {
+                       get {
+                               return base.ScrollY;
+                       }
+                       set {
+                               if (value == base.ScrollY)
+                                       return;
+                               base.ScrollY = value;
+                               updatePrintedLines ();
+                               updateOnScreenCurLineFromBuffCurLine ();
+                               RegisterForGraphicUpdate ();
+                       }
+               }
+               public ParserException CurrentLineError {
+                       get { return buffer?.CurrentCodeLine?.exception; }
+               }
+               public bool CurrentLineHasError {
+                       get { return buffer == null ? false : buffer.CurrentCodeLine == null ? false :
+                               buffer.CurrentCodeLine.exception != null; }
+               }
+               public override ProjectFile ProjectNode {
+                       get {
+                               return base.ProjectNode;
+                       }
+                       set {
+                               base.ProjectNode = value;
+                               if (projFile != null)
+                                       parser = getParserFromExt (System.IO.Path.GetExtension (projFile.Extension));
+                       }
+               }
+               #endregion
+
+               BufferParser getParserFromExt (string extension) {
+                       if (string.IsNullOrEmpty(extension))
+                               return null;
+                       if (!parsing.ContainsKey(extension))
+                               return null;
+                       Type parserType = Type.GetType (parsing [extension]);
+                       if (parserType == null)
+                               return null;
+                       return (BufferParser)Activator.CreateInstance (parserType, buffer );
+               }
+               void loadSource () {
+
+                       try {
+
+                               if (parser == null)
+                                       buffer.Load (projFile.Source);
+                               else//parser may have special linebrk rules
+                                       buffer.Load (projFile.Source, parser.LineBrkRegex);
+
+                       } catch (Exception ex) {
+                               Debug.WriteLine (ex.ToString ());
+                       }
+
+                       projFile.RegisteredEditors [this] = true;
+
+                       updateMaxScrollY ();
+                       MaxScrollX = Math.Max (0, buffer.longestLineCharCount - visibleColumns);
+                       updatePrintedLines ();
+
+                       RegisterForGraphicUpdate ();
+               }
+
+               /// <summary>
+               /// Current editor line, when set, update buffer.CurrentLine
+               /// </summary>
+               int PrintedCurrentLine {
+                       get { return printedCurrentLine;}
+                       set {
+                               if (value < 0) {
+                                       ScrollY += value;
+                                       printedCurrentLine = 0;
+                               } else if (PrintedLines.Count < visibleLines && value >= PrintedLines.Count) {
+                                       printedCurrentLine = PrintedLines.Count - 1;
+                               }else if (value >= visibleLines) {
+                                       ScrollY += value - visibleLines + 1;
+                                       printedCurrentLine = visibleLines - 1;
+                               }else
+                                       printedCurrentLine = value;
+                               //Debug.WriteLine ("printed current line:" + printedCurrentLine.ToString ());
+                               //update position in buffer
+                               buffer.CurrentLine = buffer.IndexOf (PrintedLines[printedCurrentLine]);
+                       }
+               }
+               int getTabulatedColumn (int col, int line) {
+                       return buffer [line].Content.Substring (0, col).Replace ("\t", new String (' ', Interface.TabSize)).Length;
+               }
+               int getTabulatedColumn (Point pos) {
+                       return getTabulatedColumn (pos.X,pos.Y);
+               }
+               /// <summary>
+               /// Moves cursor one char to the left, move up if cursor reaches start of line
+               /// </summary>
+               /// <returns><c>true</c> if move succeed</returns>
+               public bool MoveLeft(){
+                       if (buffer.CurrentColumn == 0) {
+                               if (printedCurrentLine == 0)
+                                       return false;
+                               PrintedCurrentLine--;
+                               buffer.CurrentColumn = int.MaxValue;
+                       } else
+                               buffer.CurrentColumn--;
+                       return true;
+               }
+               /// <summary>
+               /// Moves cursor one char to the right, move down if cursor reaches end of line
+               /// </summary>
+               /// <returns><c>true</c> if move succeed</returns>
+               public bool MoveRight(){
+                       if (buffer.CurrentColumn >= buffer.CurrentCodeLine.Length) {
+                               if (PrintedCurrentLine == buffer.UnfoldedLines - 1)
+                                       return false;
+                               buffer.CurrentColumn = 0;
+                               PrintedCurrentLine++;
+                       } else
+                               buffer.CurrentColumn++;
+                       return true;
+               }
+
+               #region Drawing
+               void drawLine(Context gr, Rectangle cb, int i) {
+                       CodeLine cl = PrintedLines[i];
+                       int lineIndex = buffer.IndexOf(cl);
+
+                       double y = cb.Y + (fe.Ascent+fe.Descent) * i, x = cb.X;
+
+                       //Draw line numbering
+                       Color mgFg = Color.Gray;
+                       Color mgBg = Color.White;
+                       if (PrintLineNumbers){
+                               Rectangle mgR = new Rectangle ((int)x, (int)y, leftMargin - leftMarginGap, (int)Math.Ceiling((fe.Ascent+fe.Descent)));
+                               if (cl.exception != null) {
+                                       mgBg = Color.Red;
+                                       if (buffer.CurrentLine == lineIndex)
+                                               mgFg = Color.White;
+                                       else
+                                               mgFg = Color.LightGray;
+                               }else if (buffer.CurrentLine == lineIndex) {
+                                       mgFg = Color.Black;
+                                       mgBg = Color.DarkGray;
+                               }
+                               string strLN = (lineIndex+1).ToString ();
+                               gr.SetSourceColor (mgBg);
+                               gr.Rectangle (mgR);
+                               gr.Fill();
+                               gr.SetSourceColor (mgFg);
+
+                               gr.MoveTo (cb.X + (int)(gr.TextExtents (buffer.LineCount.ToString()).Width - gr.TextExtents (strLN).Width), y + fe.Ascent);
+                               gr.ShowText (strLN);
+                               gr.Fill ();
+                       }
+
+
+
+                       //draw folding
+                       if (foldingEnabled){
+
+                               Rectangle rFld = new Rectangle (cb.X + leftMargin - leftMarginGap - foldMargin,
+                                       (int)(y + (fe.Ascent + fe.Descent) / 2.0 - foldSize / 2.0), foldSize, foldSize);
+
+                               gr.SetSourceColor (Color.Black);
+                               gr.LineWidth = 1.0;
+
+                               int level = 0;
+                               bool closingNode = false;
+
+                               if (currentNode != null) {
+                                       if (cl == currentNode.EndLine) {
+                                               currentNode = currentNode.Parent;
+                                               closingNode = true;
+                                       }
+                                       if (currentNode != null)
+                                               level = currentNode.Level - 1;
+                               }
+
+                               for (int l = 0; l < level; l++) {                                       
+                                       gr.MoveTo (rFld.Center.X + 0.5, y);
+                                       gr.LineTo (rFld.Center.X + 0.5, y + fe.Ascent + fe.Descent);
+                                       rFld.Left += foldHSpace;
+                               }
+                               if (closingNode) {
+                                       gr.MoveTo (rFld.Center.X + 0.5, y);
+                                       gr.LineTo (rFld.Center.X + 0.5, y + fe.Ascent / 2 + 0.5);
+                                       gr.LineTo (rFld.Center.X + 0.5 + foldSize / 2, y + fe.Ascent / 2 + 0.5);
+                                       closingNode = false;
+                               }
+                               gr.SetDash (new double[]{ 1.5 },0.0);
+                               gr.SetSourceColor (Color.Gray);
+                               gr.Stroke ();
+                               gr.SetDash (new double[]{}, 0.0);
+
+                               if (cl.IsFoldable) {
+                                       gr.Rectangle (rFld);
+                                       gr.SetSourceColor (Color.White);
+                                       gr.Fill();
+                                       gr.SetSourceColor (Color.Black);
+                                       gr.Rectangle (rFld, 1.0);
+                                       if (cl.IsFolded) {
+                                               gr.MoveTo (rFld.Center.X + 0.5, rFld.Y + 2);
+                                               gr.LineTo (rFld.Center.X + 0.5, rFld.Bottom - 2);
+                                       }else
+                                               currentNode = cl.SyntacticNode;
+                                       
+                                       gr.MoveTo (rFld.Left + 2, rFld.Center.Y + 0.5);
+                                       gr.LineTo (rFld.Right - 2, rFld.Center.Y + 0.5);
+                                       gr.Stroke ();
+                               } 
+                       }
+
+                       gr.SetSourceColor (Foreground);
+                       x += leftMargin;
+
+                       if (cl.Tokens == null)
+                               drawRawCodeLine (gr, x, y, i, lineIndex);
+                       else
+                               drawParsedCodeLine (gr, x, y, i, lineIndex);
+               }
+               Node currentNode = null;
+//             void drawParsed(Context gr){
+//                     if (PrintedLines == null)
+//                             return;
+//
+//                     gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
+//                     gr.SetFontSize (Font.Size);
+//                     gr.FontOptions = Interface.FontRenderingOptions;
+//                     gr.Antialias = Interface.Antialias;
+//
+//                     Rectangle cb = ClientRectangle;
+//                     gr.Save ();
+//                     CairoHelpers.CairoRectangle (gr, cb, CornerRadius);
+//                     gr.Clip ();
+//
+//                     bool selectionInProgress = false;
+//
+//                     Foreground.SetAsSource (gr);
+//
+//                     #region draw text cursor
+//                     if (SelBegin != SelRelease)
+//                             selectionInProgress = true;
+//                     else if (HasFocus){
+//                             gr.LineWidth = 1.0;
+//                             double cursorX = + leftMargin + cb.X + (CurrentColumn - ScrollX) * fe.MaxXAdvance;
+//                             gr.MoveTo (0.5 + cursorX, cb.Y + printedCurrentLine * (fe.Ascent+fe.Descent));
+//                             gr.LineTo (0.5 + cursorX, cb.Y + (printedCurrentLine + 1) * (fe.Ascent+fe.Descent));
+//                             gr.Stroke();
+//                     }
+//                     #endregion
+//
+//                     for (int i = 0; i < PrintedLines.Count; i++)
+//                             drawTokenLine (gr, i, selectionInProgress, cb);
+//
+//                     gr.Restore ();
+//             }
+               void drawRawCodeLine(Context gr, double x, double y, int i, int lineIndex) {
+                       string lstr = buffer[lineIndex].PrintableContent;
+                       if (ScrollX < lstr.Length)
+                               lstr = lstr.Substring (ScrollX);
+                       else
+                               lstr = "";
+
+                       gr.MoveTo (x, y + fe.Ascent);
+                       gr.ShowText (lstr);
+                       gr.Fill ();
+
+                       if (!buffer.SelectionIsEmpty && lineIndex >= buffer.SelectionStart.Y && lineIndex <= buffer.SelectionEnd.Y) {
+                               double rLineX = x,
+                               rLineY = y,
+                               rLineW = lstr.Length * fe.MaxXAdvance;
+
+                               //System.Diagnostics.Debug.WriteLine ("sel start: " + buffer.SelectionStart + " sel end: " + buffer.SelectionEnd);
+                               if (lineIndex == buffer.SelectionStart.Y) {
+                                       rLineX += (selStartCol - ScrollX) * fe.MaxXAdvance;
+                                       rLineW -= selStartCol * fe.MaxXAdvance;
+                               }
+                               if (lineIndex == buffer.SelectionEnd.Y)
+                                       rLineW -= (lstr.Length - selEndCol) * fe.MaxXAdvance;
+
+                               gr.Save ();
+                               gr.Operator = Operator.Source;
+                               gr.Rectangle (rLineX, rLineY, rLineW, (fe.Ascent+fe.Descent));
+                               gr.SetSourceColor (SelectionBackground);
+                               gr.FillPreserve ();
+                               gr.Clip ();
+                               gr.Operator = Operator.Over;
+                               gr.SetSourceColor (SelectionForeground);
+                               gr.MoveTo (x, y + fe.Ascent);
+                               gr.ShowText (lstr);
+                               gr.Fill ();
+                               gr.Restore ();
+                       }
+               }
+               void drawParsedCodeLine (Context gr, double x, double y, int i, int lineIndex) {
+                       int lPtr = 0;
+                       CodeLine cl = PrintedLines[i];
+
+                       for (int t = 0; t < cl.Tokens.Count; t++) {
+                               string lstr = cl.Tokens [t].PrintableContent;
+                               if (lPtr < ScrollX) {
+                                       if (lPtr - ScrollX + lstr.Length <= 0) {
+                                               lPtr += lstr.Length;
+                                               continue;
+                                       }
+                                       lstr = lstr.Substring (ScrollX - lPtr);
+                                       lPtr += ScrollX - lPtr;
+                               }
+                               Color bg = this.Background;
+                               Color fg = this.Foreground;
+                               Color selbg = this.SelectionBackground;
+                               Color selfg = this.SelectionForeground;
+                               FontSlant fts = FontSlant.Normal;
+                               FontWeight ftw = FontWeight.Normal;
+
+                               if (formatting.ContainsKey ((int)cl.Tokens [t].Type)) {
+                                       TextFormatting tf = formatting [(int)cl.Tokens [t].Type];
+                                       bg = tf.Background;
+                                       fg = tf.Foreground;
+                                       if (tf.Bold)
+                                               ftw = FontWeight.Bold;
+                                       if (tf.Italic)
+                                               fts = FontSlant.Italic;
+                               }
+
+                               gr.SelectFontFace (Font.Name, fts, ftw);
+                               gr.SetSourceColor (fg);
+
+                               gr.MoveTo (x, y + fe.Ascent);
+                               gr.ShowText (lstr);
+                               gr.Fill ();
+
+                               if (buffer.SelectionInProgress && lineIndex >= buffer.SelectionStart.Y && lineIndex <= buffer.SelectionEnd.Y &&
+                                       !(lineIndex == buffer.SelectionStart.Y && lPtr + lstr.Length <= selStartCol) &&
+                                       !(lineIndex == buffer.SelectionEnd.Y && selEndCol <= lPtr)) {
+
+                                       double rLineX = x,
+                                       rLineY = y,
+                                       rLineW = lstr.Length * fe.MaxXAdvance;
+                                       double startAdjust = 0.0;
+
+                                       if ((lineIndex == buffer.SelectionStart.Y) && (selStartCol < lPtr + lstr.Length) && (selStartCol > lPtr))
+                                               startAdjust = (selStartCol - lPtr) * fe.MaxXAdvance;
+                                       rLineX += startAdjust;
+                                       if ((lineIndex == buffer.SelectionEnd.Y) && (selEndCol < lPtr + lstr.Length))
+                                               rLineW = (selEndCol - lPtr) * fe.MaxXAdvance;
+                                       rLineW -= startAdjust;
+
+                                       gr.Save ();
+                                       gr.Operator = Operator.Source;
+                                       gr.Rectangle (rLineX, rLineY, rLineW, (fe.Ascent+fe.Descent));
+                                       gr.SetSourceColor (selbg);
+                                       gr.FillPreserve ();
+                                       gr.Clip ();
+                                       gr.Operator = Operator.Over;
+                                       gr.SetSourceColor (selfg);
+                                       gr.MoveTo (x, y + fe.Ascent);
+                                       gr.ShowText (lstr);
+                                       gr.Fill ();
+                                       gr.Restore ();
+                               }
+                               x += (int)lstr.Length * fe.MaxXAdvance;
+                               lPtr += lstr.Length;
+                       }
+               }
+
+               #endregion
+
+               #region GraphicObject overrides
+               public override Font Font {
+                       get { return base.Font; }
+                       set {
+                               base.Font = value;
+
+                               using (ImageSurface img = new ImageSurface (Format.Argb32, 1, 1)) {
+                                       using (Context gr = new Context (img)) {
+                                               gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
+                                               gr.SetFontSize (Font.Size);
+
+                                               fe = gr.FontExtents;
+                                       }
+                               }
+                               MaxScrollY = 0;
+                               RegisterForGraphicUpdate ();
+                       }
+               }
+               protected override int measureRawSize(LayoutingType lt)
+               {
+                       if (lt == LayoutingType.Height)
+                               return (int)Math.Ceiling((fe.Ascent+fe.Descent) * buffer.LineCount) + Margin * 2;
+
+                       return (int)(fe.MaxXAdvance * buffer.longestLineCharCount) + Margin * 2 + leftMargin;
+               }
+               public override void OnLayoutChanges (LayoutingType layoutType)
+               {
+                       base.OnLayoutChanges (layoutType);
+
+                       if (layoutType == LayoutingType.Height)
+                               updateVisibleLines ();
+                       else if (layoutType == LayoutingType.Width)
+                               updateVisibleColumns ();
+               }
+
+               protected override void onDraw (Context gr)
+               {
+                       base.onDraw (gr);
+
+                       gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
+                       gr.SetFontSize (Font.Size);
+                       gr.FontOptions = Interface.FontRenderingOptions;
+                       gr.Antialias = Interface.Antialias;
+
+                       Rectangle cb = ClientRectangle;
+
+                       Foreground.SetAsSource (gr);
+
+                       buffer.editMutex.EnterReadLock ();
+                       editorMutex.EnterReadLock ();
+
+                       #region draw text cursor
+                       if (buffer.SelectionInProgress){
+                               selStartCol = getTabulatedColumn (buffer.SelectionStart);
+                               selEndCol = getTabulatedColumn (buffer.SelectionEnd);
+                       }else if (HasFocus && printedCurrentLine >= 0){
+                               gr.LineWidth = 1.0;
+                               double cursorX = cb.X + (getTabulatedColumn(buffer.CurrentPosition) - ScrollX) * fe.MaxXAdvance + leftMargin;
+                               gr.MoveTo (0.5 + cursorX, cb.Y + (printedCurrentLine) * (fe.Ascent+fe.Descent));
+                               gr.LineTo (0.5 + cursorX, cb.Y + (printedCurrentLine + 1) * (fe.Ascent+fe.Descent));
+                               gr.Stroke();
+                       }
+                       #endregion
+
+                       if (PrintedLines?.Count > 0) {                          
+                               int unfoldedLines = buffer.UnfoldedLines;
+                               currentNode = null;
+                               CodeLine cl = PrintedLines[0];
+                               int idx0 = buffer.IndexOf(cl);
+                               int li = idx0-1;
+                               while (li >= 0) {
+                                       if (buffer [li].IsFoldable && !buffer [li].IsFolded) {
+                                               if (buffer.IndexOf(buffer [li].SyntacticNode.EndLine) > idx0){
+                                                       currentNode = buffer [li].SyntacticNode;
+                                                       break;
+                                               }
+                                       }
+                                       li--;
+                               }
+
+                               for (int i = 0; i < visibleLines; i++) {
+                                       if (i + ScrollY >= unfoldedLines)//TODO:need optimize
+                                               break;
+                                       drawLine (gr, cb, i);
+                               }
+                       }
+
+                       editorMutex.ExitReadLock ();
+
+                       buffer.editMutex.ExitReadLock ();
+
+               }
+               #endregion
+
+               #region Mouse handling
+
+               int hoverLine = -1;
+               public int HoverLine {
+                       get { return hoverLine; }
+                       set { 
+                               if (hoverLine == value)
+                                       return;
+                               hoverLine = value;
+                               NotifyValueChanged ("HoverLine", hoverLine);                            
+                       }
+               }
+               void updateHoverLine () {
+                       int hvl = (int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)));
+                       hvl = Math.Min (PrintedLines.Count, hvl);
+                       HoverLine = buffer.IndexOf (PrintedLines[hvl]);
+               }
+               void updateCurrentPosFromMouseLocalPos(){                       
+                       PrintedCurrentLine = (int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)));
+                       int curVisualCol = ScrollX +  (int)Math.Round ((mouseLocalPos.X - leftMargin) / fe.MaxXAdvance);
+
+                       int i = 0;
+                       int buffCol = 0;
+                       while (i < curVisualCol && buffCol < buffer.CurrentCodeLine.Length) {
+                               if (buffer.CurrentCodeLine[buffCol] == '\t')
+                                       i += Interface.TabSize;
+                               else
+                                       i++;
+                               buffCol++;
+                       }
+                       buffer.CurrentColumn = buffCol;
+               }
+               public override void onMouseEnter (object sender, MouseMoveEventArgs e)
+               {
+                       base.onMouseEnter (sender, e);
+                       if (e.X - ScreenCoordinates(Slot).X < leftMargin + ClientRectangle.X)
+                               IFace.MouseCursor = XCursor.Default;
+                       else
+                               IFace.MouseCursor = XCursor.Text;
+               }
+               public override void onMouseLeave (object sender, MouseMoveEventArgs e)
+               {
+                       base.onMouseLeave (sender, e);
+                       IFace.MouseCursor = XCursor.Default;
+               }
+               public override void onMouseMove (object sender, MouseMoveEventArgs e)
+               {
+                       base.onMouseMove (sender, e);
+
+                       mouseLocalPos = e.Position - ScreenCoordinates(Slot).TopLeft - ClientRectangle.TopLeft;
+
+                       updateHoverLine ();
+
+                       if (!e.Mouse.IsButtonDown (MouseButton.Left)) {
+                               if (mouseLocalPos.X < leftMargin)
+                                       IFace.MouseCursor = XCursor.Default;
+                               else
+                                       IFace.MouseCursor = XCursor.Text;
+                               return;
+                       }
+
+                       if (!HasFocus || !buffer.SelectionInProgress)
+                               return;
+
+                       //mouse is down
+                       updateCurrentPosFromMouseLocalPos();
+                       buffer.SetSelEndPos ();
+               }
+               public override void onMouseDown (object sender, MouseButtonEventArgs e)
+               {
+                       if (!this.Focusable)
+                               return;
+
+                       if (mouseLocalPos.X >= leftMargin)
+                               base.onMouseDown (sender, e);
+
+                       if (doubleClicked) {
+                               doubleClicked = false;
+                               return;
+                       }
+
+                       if (mouseLocalPos.X < leftMargin) {
+                               toogleFolding (buffer.IndexOf (PrintedLines [(int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)))]));
+                               return;
+                       }
+
+                       updateCurrentPosFromMouseLocalPos ();
+                       buffer.SetSelStartPos ();
+               }
+               public override void onMouseUp (object sender, MouseButtonEventArgs e)
+               {
+                       base.onMouseUp (sender, e);
+
+                       if (buffer.SelectionIsEmpty)
+                               buffer.ResetSelection ();
+               }
+
+               public override void onMouseDoubleClick (object sender, MouseButtonEventArgs e)
+               {
+                       doubleClicked = true;
+                       base.onMouseDoubleClick (sender, e);
+
+                       buffer.GotoWordStart ();
+                       buffer.SetSelStartPos ();
+                       buffer.GotoWordEnd ();
+                       buffer.SetSelEndPos ();
+               }
+
+               public override void onMouseWheel (object sender, MouseWheelEventArgs e)
+               {
+                       base.onMouseWheel (sender, e);
+               }
+               #endregion
+
+               #region Keyboard handling
+               public override void onKeyDown (object sender, KeyboardKeyEventArgs e)
+               {
+                       //base.onKeyDown (sender, e);
+
+                       Key key = e.Key;
+
+                       if (e.Control) {
+                               switch (key) {
+                               case Key.S:
+                                       projFile.Save ();
+                                       break;
+                               case Key.W:
+                                       editorMutex.EnterWriteLock ();
+                                       if (e.Shift)
+                                               projFile.Redo (null);
+                                       else
+                                               projFile.Undo (null);
+                                       editorMutex.ExitWriteLock ();
+                                       break;
+                               default:
+                                       Console.WriteLine ("");
+                                       break;
+                               }
+                       }
+
+                       switch (key)
+                       {
+                       case Key.Back:
+                               buffer.DeleteChar ();
+                               break;
+                       case Key.Clear:
+                               break;
+                       case Key.Delete:
+                               if (buffer.SelectionIsEmpty)
+                                       MoveRight ();
+                               else if (e.Shift)
+                                       IFace.Clipboard = buffer.SelectedText;
+                               buffer.DeleteChar ();
+                               break;
+                       case Key.Enter:
+                       case Key.KeypadEnter:
+                               if (!buffer.SelectionIsEmpty)
+                                       buffer.DeleteChar ();
+                               buffer.InsertLineBreak ();
+                               break;
+                       case Key.Escape:
+                               buffer.ResetSelection ();
+                               break;
+                       case Key.Home:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       if (e.Control)
+                                               buffer.CurrentLine = 0;
+                                       buffer.CurrentColumn = 0;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               if (e.Control)
+                                       buffer.CurrentLine = 0;
+                               buffer.CurrentColumn = 0;
+                               break;
+                       case Key.End:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       if (e.Control)
+                                               buffer.CurrentLine = int.MaxValue;
+                                       buffer.CurrentColumn = int.MaxValue;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               if (e.Control)
+                                       buffer.CurrentLine = int.MaxValue;
+                               buffer.CurrentColumn = int.MaxValue;
+                               break;
+                       case Key.Insert:
+                               if (e.Shift)
+                                       buffer.Insert (IFace.Clipboard);
+                               else if (e.Control && !buffer.SelectionIsEmpty)
+                                       IFace.Clipboard = buffer.SelectedText;
+                               break;
+                       case Key.Left:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       if (e.Control)
+                                               buffer.GotoWordStart ();
+                                       else
+                                               MoveLeft ();
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               if (e.Control)
+                                       buffer.GotoWordStart ();
+                               else
+                                       MoveLeft();
+                               break;
+                       case Key.Right:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       if (e.Control)
+                                               buffer.GotoWordEnd ();
+                                       else
+                                               MoveRight ();
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               if (e.Control)
+                                       buffer.GotoWordEnd ();
+                               else
+                                       MoveRight ();
+                               break;
+                       case Key.Up:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       PrintedCurrentLine--;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               PrintedCurrentLine--;
+                               break;
+                       case Key.Down:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       PrintedCurrentLine++;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               PrintedCurrentLine++;
+                               break;
+                       case Key.Menu:
+                               break;
+                       case Key.NumLock:
+                               break;
+                       case Key.PageDown:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       PrintedCurrentLine += visibleLines;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               PrintedCurrentLine += visibleLines;
+                               break;
+                       case Key.PageUp:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       PrintedCurrentLine -= visibleLines;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               PrintedCurrentLine -= visibleLines;
+                               break;
+                       case Key.RWin:
+                               break;
+                       case Key.Tab:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty ||
+                                               (buffer.SelectionStart.Y == buffer.SelectionEnd.Y)) {
+                                               //TODO
+                                               break;
+                                       }
+                                       for (int i = buffer.SelectionStart.Y; i <= buffer.SelectionEnd.Y; i++)
+                                               buffer.RemoveLeadingTab (i);
+                                       buffer.SetSelectionOnFullLines ();
+                               } else {
+                                       if (buffer.SelectionIsEmpty ||
+                                               (buffer.SelectionStart.Y == buffer.SelectionEnd.Y)) {
+                                               buffer.Insert ("\t");
+                                               break;
+                                       }
+                                       for (int i = buffer.SelectionStart.Y; i <= buffer.SelectionEnd.Y; i++) {
+                                               buffer.UpdateLine (i, "\t" + buffer [i].Content);
+                                       }
+                               }
+
+                               break;
+                       case Key.F8:
+                               toogleFolding (buffer.CurrentLine);
+                               break;
+                       default:
+                               break;
+                       }
+                       RegisterForGraphicUpdate();
+               }
+               public override void onKeyPress (object sender, KeyPressEventArgs e)
+               {
+                       base.onKeyPress (sender, e);
+
+                       buffer.Insert (e.KeyChar.ToString());
+                       buffer.ResetSelection ();
+               }
+               #endregion
+       }
+}
\ No newline at end of file
index e23a41ba80ba730e31370a06c8eaa36313c9aa61..d8a9ddcd7660bc2d9de1ba9cb9e787ad93d01b5f 100644 (file)
@@ -37,7 +37,7 @@ namespace Crow.Coding
                public MembersView () : base() {}
 
                //cache property containers per type
-               Dictionary<string,PropertyContainer[]> propContainersCache = new Dictionary<string, PropertyContainer[]>();
+               //Dictionary<string,PropertyContainer[]> propContainersCache = new Dictionary<string, PropertyContainer[]>();
                Dictionary<string,List<CategoryContainer>> categoryContainersCache = new Dictionary<string,List<CategoryContainer>> ();
 
                [XmlAttributeAttribute][DefaultValue(null)]
@@ -63,7 +63,7 @@ namespace Crow.Coding
                                }       
 
                                Type it = instance.GetType ();
-                               if (!propContainersCache.ContainsKey (it.FullName)) {
+                               if (!categoryContainersCache.ContainsKey (it.FullName)) {
                                        MemberInfo[] members = it.GetMembers (BindingFlags.Public | BindingFlags.Instance);
                                        List<PropertyContainer> props = new List<PropertyContainer> ();
                                        foreach (MemberInfo m in members) {
@@ -76,20 +76,24 @@ namespace Crow.Coding
                                                        props.Add (new PropertyContainer (this, pi));
                                                }
                                        }
-                                       propContainersCache.Add (it.FullName, props.OrderBy (p => p.Name).ToArray ());
-                               }
-
-                               List<CategoryContainer> categories = new List<CategoryContainer> ();
+                                       //propContainersCache.Add (it.FullName, props.OrderBy (p => p.Name).ToArray ());
+                                       List<CategoryContainer> categories = new List<CategoryContainer> ();
 
-                               foreach (IGrouping<string,PropertyContainer> ig in propContainersCache[it.FullName].GroupBy(pc=>pc.DesignCategory)) {
-                                       categories.Add(new CategoryContainer(ig.Key, ig.ToArray()));
+                                       foreach (IGrouping<string,PropertyContainer> ig in props.OrderBy (p => p.Name).GroupBy(pc=>pc.DesignCategory)) {
+                                               categories.Add(new CategoryContainer(ig.Key, ig.ToArray()));
+                                       }
+                                       categoryContainersCache.Add (it.FullName, categories);
                                }
 
-                               Data = categories;
+
+                               Data = categoryContainersCache[it.FullName];
 
                                if (lastInst != instance) {
-                                       foreach (PropertyContainer pc in propContainersCache [it.FullName]) {
-                                               pc.NotifyValueChanged ("Value", pc.Value);
+                                       foreach (CategoryContainer cc in categoryContainersCache [it.FullName]) {
+                                               foreach (PropertyContainer pc in cc.Properties) {
+                                                       pc.NotifyValueChanged ("Value", pc.Value);
+                                                       pc.NotifyValueChanged ("LabForeground", pc.LabForeground);
+                                               }
                                        }
                                }
                        }
index 46cbbd74333581cf66ee9bf747a4dbd394da66dd..19f4ed7f4fb1c8a5bb1c9969c20e4c9a2c41a27e 100644 (file)
@@ -73,6 +73,8 @@ namespace Crow.Coding
                        }
                        set {
                                try {
+                                       if (value == Value)
+                                               return;
                                        GraphicObject g = Instance;
                                        string valstr = null, oldval = null;
 
@@ -116,12 +118,14 @@ namespace Crow.Coding
                                                }
                                        }else
                                                pi.SetValue(g, value);
-                                       
+
+                                       Debug.WriteLine("\t\tPropContainer set design_dirty to instance");
+
                                        mview.ProjectNode.Instance.design_HasChanged = true;
                                        NotifyValueChanged ("Value", value);
                                        NotifyValueChanged ("LabForeground", LabForeground);
                                } catch (Exception ex) {
-                                       System.Diagnostics.Debug.WriteLine ("Error setting property:"+ ex.ToString());
+                                       Debug.WriteLine ("Error setting property:"+ ex.ToString());
                                }
                                //
                        }
@@ -184,8 +188,10 @@ namespace Crow.Coding
                        if (!inst.design_iml_values.ContainsKey (Name))
                                return;
                        inst.design_iml_values.Remove (Name);
-                       //NotifyValueChanged ("Value", Value);
-                       mview.ProjectNode.Instance.design_HasChanged = true;
+
+                       NotifyValueChanged ("LabForeground", LabForeground);
+                       mview.ProjectNode.UpdateSource(this, mview.ProjectNode.Instance.GetIML());
+                       //mview.ProjectNode.Instance.design_HasChanged = true;
                        //should reinstantiate to get default
                }
                public void GotoStyle(){
@@ -199,6 +205,7 @@ namespace Crow.Coding
                        Solution s = mview.ProjectNode.Project.solution;
                        if (!s.OpenedItems.Contains (pf))                               
                                s.OpenedItems.AddElement (pf);
+                       Debug.WriteLine (fl);
                        pf.CurrentLine = fl.Line;
                        pf.CurrentColumn = fl.Column;
                }
index 6aeb5be7d6e70ef021c0b56b31eab36a636e0d56..2c4eda5958a5ed9cdae9fadee76a75b1aea07c4f 100644 (file)
@@ -170,8 +170,14 @@ namespace Crow.Coding
                                        switch (pn.Extension) {
                                        case ".crow":
                                        case ".template":
+                                       case ".goml":
+                                       case ".itemp":
+                                       case ".imtl":
                                                f = new ImlProjectItem (pn);
                                                break;
+                                       case ".style":
+                                               f = new StyleProjectItem (pn);
+                                               break;
                                        default:
                                                f = new ProjectFile (pn);
                                                break;
index 7ce24ad7d885a3475c6c64560121c1a4a3c728d8..0575d17792e15ef59bc953838355a33aa3d9a652 100644 (file)
@@ -41,6 +41,7 @@ namespace Crow.Coding
                #endregion
 
                GraphicObject instance;
+               Measure designWidth, designHeight;
 
                /// <summary>
                /// instance created with an instantiator from the source by a DesignInterface,
@@ -55,6 +56,26 @@ namespace Crow.Coding
                                NotifyValueChanged ("Instance", instance);
                        }
                }
+                       
+               public Measure DesignWidth {
+                       get { return designWidth; }
+                       set { 
+                               if (designWidth == value)
+                                       return;
+                               designWidth = value;
+                               NotifyValueChanged ("DesignWidth", designWidth);
+                       }
+               }
+               public Measure DesignHeight {
+                       get { return designHeight; }
+                       set {
+                               if (designHeight == value)
+                                       return;
+                               designHeight = value;
+                               NotifyValueChanged ("DesignHeight", designHeight);
+                       }
+               }
+
 
                public List<GraphicObject> GraphicTree { 
                        get { return new List<GraphicObject> (new GraphicObject[] {instance}); }
index 2c3dbbe4a63fc9d81decb1e45f14edba56ce977d..2fac2f91e9df7d20207078ff0e3eb1b27f6208c1 100644 (file)
@@ -96,12 +96,24 @@ namespace Crow.Coding
                                RegisteredEditors.Add (editor, false);
                        }
                }
-               public void UpdateSource (object sender, string newSrc){
+               public virtual void UpdateSource (object sender, string newSrc){
                        System.Diagnostics.Debug.WriteLine ("update source by {0}", sender);
                        Source = newSrc;
                        signalOtherRegisteredEditors (sender);
                }
-               void signalOtherRegisteredEditors (object sender) {
+               public void SignalEditorOfType<T> (){
+                       lock (RegisteredEditors) {
+                               object[] keys = RegisteredEditors.Keys.ToArray ();
+                               foreach (object ed in keys) {
+                                       T editor = (T)ed;
+                                       if (editor == null)
+                                               continue;
+                                       RegisteredEditors [editor] = false;
+                                       break;
+                               }
+                       }
+               }
+               protected void signalOtherRegisteredEditors (object sender) {
                        lock (RegisteredEditors) {
                                object[] keys = RegisteredEditors.Keys.ToArray ();
                                foreach (object editor in keys) {
@@ -192,7 +204,7 @@ namespace Crow.Coding
                        origSource = source;
                        NotifyValueChanged ("IsDirty", false);
                }
-               public void Save () {
+               public virtual void Save () {
                        if (!IsDirty)
                                return;
                        using (StreamWriter sw = new StreamWriter (AbsolutePath)) {
@@ -201,7 +213,7 @@ namespace Crow.Coding
                        origSource = source;
                        NotifyValueChanged ("IsDirty", false);
                }
-               public void SaveAs () {
+               public virtual void SaveAs () {
                        if (!IsDirty)
                                return;
                        using (StreamWriter sw = new StreamWriter (AbsolutePath)) {
@@ -279,7 +291,6 @@ namespace Crow.Coding
                {
                        Close ();
                }
-
                void onClickSaveAndCloseNow (object sender, EventArgs e)
                {
                        Save ();
diff --git a/CrowIDE/src/ProjectTree/StyleProjectItem.cs b/CrowIDE/src/ProjectTree/StyleProjectItem.cs
new file mode 100644 (file)
index 0000000..1de77cd
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// ProjectNodes.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Xml;
+using System.IO;
+using Crow;
+using System.Threading;
+
+namespace Crow.Coding
+{
+       public class StyleProjectItem : ProjectFile
+       {
+               #region CTOR
+               public StyleProjectItem (ProjectItem pi) : base (pi){                   
+               }
+               #endregion
+
+               public override void UpdateSource (object sender, string newSrc)
+               {
+                       base.UpdateSource (sender, newSrc);
+                       Project.solution.ReloadStyling ();
+               }
+       }
+}
+
index 1b89dc09618e84abf0cb3567655e1195b1b4c597..689228652bd0b1f753467c76f87a1582da4f8057 100644 (file)
@@ -28,6 +28,51 @@ namespace Crow.Coding{
                public string RelativePath;
                public string ProjectGuid;
        }
+       public class StyleItemContainer {
+               public object Value;
+               public string Name;
+               public StyleItemContainer(string name, object _value){
+                       Name = name;
+                       Value = _value;
+               }
+       }
+       public class StyleContainer : IValueChange {
+               #region IValueChange implementation
+               public event EventHandler<ValueChangeEventArgs> ValueChanged;
+               public virtual void NotifyValueChanged(string MemberName, object _value)
+               {
+                       ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value));
+               }
+               #endregion
+
+               Style style;
+               bool isExpanded;
+
+               public string Name;
+               public List<StyleItemContainer> Items;
+               public bool IsExpanded
+               {
+                       get { return isExpanded; }
+                       set
+                       {
+                               if (value == isExpanded)
+                                       return;
+                               isExpanded = value;
+                               NotifyValueChanged ("IsExpanded", isExpanded);
+                       }
+               }
+               public StyleContainer(string name, Style _style){
+                       Name = name;
+                       style = _style;
+
+                       Items = new List<StyleItemContainer> ();
+                       foreach (string k in style.Keys) {
+                               Items.Add(new StyleItemContainer(k, style[k]));
+                       }
+               }
+       }
+
+
        /// <summary>
 /// .sln loaded into class.
 /// </summary>
@@ -49,12 +94,21 @@ namespace Crow.Coding{
                public Dictionary<string, Style> Styling;
                public Dictionary<string, string> DefaultTemplates;
 
+               public List<Style> Styles { get { return Styling.Values.ToList(); }}
+               public List<StyleContainer> StylingContainers;
                //TODO: check project dependencies if no startup proj
 
                public void ReloadStyling () {
                        Styling = new Dictionary<string, Style> ();
                        if (StartupProject != null)
                                StartupProject.GetStyling ();
+//                     StylingContainers = new List<StyleContainer> ();
+//                     foreach (string k in Styling.Keys) {
+//                             StylingContainers.Add (new StyleContainer (k, Styling [k]));
+//                     }
+                       foreach (ImlProjectItem pf in openedItems.OfType<ImlProjectItem>()) {
+                               pf.SignalEditorOfType<ImlVisualEditor> ();
+                       }
                }
                public string[] AvailaibleStyles {
                        get { return Styling == null ? new string[] {} : Styling.Keys.ToArray();}
diff --git a/CrowIDE/ui/CategoryExp.template b/CrowIDE/ui/CategoryExp.template
new file mode 100755 (executable)
index 0000000..55bf380
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<Expandable Caption="{Name}" IsExpanded="{IsExpanded}" Background="Gray" Foreground="Black">
+       <Template>
+               <VerticalStack>
+                       <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand" Background="Gray">
+                               <Container Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+                                                                                                                       MouseEnter="{Background=LightGray}"
+                                                                                                                       MouseLeave="{Background=Transparent}">
+                                       <Image
+                                               Path="#Crow.Images.Icons.expandable.svg"
+                                               Visible="{./IsExpandable}"
+                                               SvgSub="{./IsExpanded}"/>
+                               </Container>
+                               <Label Foreground="White" Text="{./Caption}"/>
+                       </HorizontalStack>
+                       <Container Name="Content" Visible="false"/>
+               </VerticalStack>
+       </Template>
+       <VerticalStack Spacing="1" Height="Fit" Name="ItemsContainer"
+               Margin="0" VerticalAlignment="Top"/>
+</Expandable>  
\ No newline at end of file
index 2b03d1f20d0f88a51e535b6727abb05f43ea58c9..bd38532df38da26e2d136ac2de0deff5d1052a22 100644 (file)
@@ -31,7 +31,7 @@
                                                                </HorizontalStack>
                                                </Border>
                                        </Template>
-                                       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
+                                       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGray">
                                                <VerticalStack Name="ItemsContainer"/>
                                        </Border>
                                </Popper>
index 10b5d93b20cceb45143a1bcce0bd98f506f38e5b..bc2a926a628f48cbd9cd29745db75b7aa95a8a2b 100644 (file)
@@ -22,6 +22,7 @@
                                <MenuItem Command="{CMDViewSolution}"/>
                                <MenuItem Command="{CMDViewEditor}"/>
                                <MenuItem Command="{CMDViewProperties}"/>
+                               <MenuItem Command="{CMDViewStyling}"/>
                                <MenuItem Command="{CMDViewToolbox}"/>
                                <MenuItem Command="{CMDViewErrors}"/>
                                <MenuItem Command="{CMDViewGTExp}"/>
@@ -41,7 +42,7 @@
                        <DockStack />
 <!--                   <DockWindow DataSource="{CurrentSolution}" Name="winEditor" Caption="Edit View" Width="70%" Height="80%">
                                <Template>
-                                       <Border BorderWidth="1" Foreground="Jet" CornerRadius="{./CornerRadius}"
+                                       <Border BorderWidth="1" Foreground="DimGray" CornerRadius="{./CornerRadius}"
                                                                        Background="{./Background}"
                                                                        MouseEnter="./onBorderMouseEnter"
                                                                        MouseLeave="./onBorderMouseLeave">
index 1037312a40168586a876815d3f7a6bf06ca32659..a0ae10b30b1c3b38aa593ba1c7f0f5ebc7589136 100644 (file)
@@ -13,7 +13,7 @@
                                                SvgSub="{./IsExpanded}"
                                                MouseEnter="{Background=LightGray}"
                                                MouseLeave="{Background=Transparent}"/>
-                                       <Border Width="16" Height="16" Foreground="Black" Background="Jet">
+                                       <Border Width="16" Height="16" Foreground="Black" Background="DimGray">
                                                <Image Margin="2" Path="{GetIcon}" />
                                        </Border>
                                        <Label Text="{./Caption}"/>
index 31d8d9dfde40ca3931c1ef76a98984cb5de230e4..5a4ce8cff3f91d91408ca951930ccad8cbae14bc 100755 (executable)
@@ -4,7 +4,7 @@
                                MouseEnter="./onBorderMouseEnter"
                                MouseLeave="./onBorderMouseLeave">
        <VerticalStack Spacing="0">
-               <HorizontalStack Background="Teal" Margin="0" Spacing="0" Height="Fit" Width="Stretched">                               
+               <HorizontalStack Background="MediumSeaGreen" Margin="0" Spacing="0" Height="Fit" Width="Stretched">                             
                        <Label Width="Stretched" Margin="0" TextAlignment="Center" Text="{./Caption}" />
                </HorizontalStack>
                <GraphicObject Background="Black" Height="1"/>
index 0e4ad11f5d709be3969df038a5c4436784b819e8..10fa5ceda060bf02afbb6ef3b51af26630366614 100644 (file)
@@ -8,7 +8,7 @@
                                <Border Width="Stretched" Focusable="true" Foreground="Transparent">
                                        <HorizontalStack Spacing="5">
                                                <GraphicObject Width="5" Height="5"/>
-                                               <Border Width="16" Height="16" Foreground="Black" Background="Jet">
+                                               <Border Width="16" Height="16" Foreground="Black" Background="DimGray">
                                                        <Image Margin="2" Path="{GetIcon}" />
                                                </Border>
                                                <Label Text="{Name}" Width="Stretched"/>
diff --git a/CrowIDE/ui/DockWindows/winStyleView.crow b/CrowIDE/ui/DockWindows/winStyleView.crow
new file mode 100644 (file)
index 0000000..a86343e
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<DockWindow DataSource="{CurrentSolution}" Name="winStyle" Caption="Styling"  Width="20%">
+       <TreeView Data="{StylingContainers}">
+               <Template>
+                       <VerticalStack Name="ItemsContainer" Spacing="1"/>
+               </Template>
+               <ItemTemplate DataType="Crow.Coding.StyleItemContainer">
+                       <HorizontalStack Height="Fit" Spacing="1">
+                               <Label Background="White" Foreground="Jet" Text="{Name}" Width="40%"/>
+                               <Label Background="White" Foreground="Jet" Text="{Value}" Width="Stretched"/>
+                       </HorizontalStack>
+               </ItemTemplate>
+               <ItemTemplate Path="#Crow.Coding.ui.CategoryExp.template" DataType="Crow.Coding.StyleContainer" Data="Items"/>
+       </TreeView>
+</DockWindow>
+
index 6a598f5f4692ba5884ecc9e11254e0fba5949a3b..da41e0116fb0997e11cb5e85fee8506305e0a6ff 100644 (file)
@@ -7,7 +7,7 @@
                <ItemTemplate>
                        <Container Fit="true" Focusable="true" Tooltip="{DisplayName}" Margin="2" AllowDrag="true"
                                StartDrag="onStartDrag" EndDrag="onEndDrag" Drop="onDrop">
-                               <Border Foreground="Black" Background="Jet" Margin="0" BorderWidth="1"
+                               <Border Foreground="Black" Background="DimGray" Margin="0" BorderWidth="1"
                                        MouseEnter="{Foreground=White}"
                                        MouseLeave="{Foreground=Black}">
                                        <Image Path="{IconPath}" Margin="3"  Width="20" Height="20" />
index 9adcfe626956e87acc83124b51244a3ad7038cb4..4a1e106fca5ed73df6b7cb2176933f4b1599169f 100644 (file)
@@ -12,7 +12,7 @@ MemberViewHStack {
        Focusable="true";
        Height="Fit";
        Spacing="1";
-       MouseEnter="{Background=UnitedNationsBlue}";
+       MouseEnter="{Background=SteelBlue}";
        MouseLeave="{Background=Transparent}";
 }
 
@@ -24,12 +24,6 @@ IcoBut {
        Background = "White";
 }
 
-ProjTreeIcon {
-       Margin="1";
-       Width="14";
-       Height="14";
-}
-
 WinSchema {
        Template="#Crow.Coding.ui.DockWindows.WinSchemaItem.template";
        Focusable = "true";
@@ -37,3 +31,21 @@ WinSchema {
        Width = "Fit";
        Height = "Fit";
 }
+TabItem {
+       Background="Jet";
+}
+TreeItemBorder {
+       CornerRadius="2";
+       Margin="0";
+       Focusable="true";
+       Height="Fit";
+       Width="Stretched";
+       Foreground="Transparent";
+       MouseEnter="{Foreground=DimGray}";
+       MouseLeave="{Foreground=Transparent}";
+}
+TreeIcon {
+       Margin="0";
+       Width="14";
+       Height="14";
+}
index 768b80d5341124ce4498dd07f9833cdc6b3d3e70..1df1c7a0bcb680632f02adabc8c5932f0211ee4b 100755 (executable)
@@ -25,8 +25,7 @@
                                        MinimumSize="{../../MinimumPopupSize}" Fit="true">
                                        <Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
                                                MaximumSize="0,200"
-                                               HorizontalAlignment="Left"
-                                               ValueChanged="../../../_scroller_ValueChanged">
+                                               HorizontalAlignment="Left">
                                                <VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
                                                        MouseClick="../../../onMouseClick" Focusable="True"
                                                        Height="Fit" Name="ItemsContainer" Margin="0"
index b3b1e890584da7a688f5041d7df4f18798070438..b0bd671d2d449daa48eac4d099f013a699d1ac67 100755 (executable)
@@ -14,6 +14,6 @@
                                </Template>
                        </CheckBox>
                </Template>
-               <ColorPicker SelectedColor="{²Value}" Background="Onyx" Margin="5" Fit="True" />
+               <ColorPicker SelectedColor="{²Value}" Background="DimGray" Margin="5" Fit="True" />
        </Popper>
 </HorizontalStack>
\ No newline at end of file
index 945492449accbd0f4b5f1f12e204e80471d973dd..72a36fbd3134a9f45dd98feea79678e49c852011 100644 (file)
@@ -5,10 +5,10 @@
                        <Expandable>
                                <Template>
                                        <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-                                               <VerticalStack Fit="true" Margin="3" Background="Onyx"
+                                               <VerticalStack Fit="true" Margin="3" Background="DimGray"
                                                                HorizontalAlignment="Left"
                                                                MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
-                                                               MouseLeave="{Background=Onyx}">
+                                                               MouseLeave="{Background=DimGray}">
                                                        <Label Text="{FullName}" Font="droid, 8" Background="LightGray" Foreground="Black"/>
                                                        <HorizontalStack Fit="true" Spacing="10">
                                                                <Label Text="{LayoutingTries}" Foreground="SkyBlue"/>
@@ -24,7 +24,7 @@
                                                                <Label Text=" => "/>
                                                                <Label Text="{NewSlot}"/>
                                                        </HorizontalStack>
-                                                       <GraphicObject Background="Mantis" Height="3" Visible="{HasTriggeredLQIs}"/>
+                                                       <GraphicObject Background="SeaGreen" Height="3" Visible="{HasTriggeredLQIs}"/>
                                                </VerticalStack>
                                                <Container Name="Content" Visible="false" HorizontalAlignment="Left"
                                                                Fit="true"/>
index 3a9774908018bf50916048254cc7a6dea3c8acef..ef2640180df26c2d6872f66742ba42986c336325 100755 (executable)
@@ -5,28 +5,8 @@
                <TextBox Margin="1" Text="{²Value}" Height="Fit" Foreground = "{LabForeground}"/>
        </HorizontalStack>
 </ItemTemplate>
-<ItemTemplate DataType="Crow.Coding.CategoryContainer" Data="Properties" DataTest="Type">
-       <Expandable Caption="{Name}" IsExpanded="{IsExpanded}" Background="Gray" Foreground="Black">
-               <Template>
-                       <VerticalStack>
-                               <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand" Background="Gray">
-                                       <Container Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
-                                                                                                                               MouseEnter="{Background=LightGray}"
-                                                                                                                               MouseLeave="{Background=Transparent}">
-                                               <Image
-                                                       Path="#Crow.Images.Icons.expandable.svg"
-                                                       Visible="{./IsExpandable}"
-                                                       SvgSub="{./IsExpanded}"/>
-                                       </Container>
-                                       <Label Foreground="White" Text="{./Caption}"/>
-                               </HorizontalStack>
-                               <Container Name="Content" Visible="false"/>
-                       </VerticalStack>
-               </Template>
-               <VerticalStack Spacing="1" Height="Fit" Name="ItemsContainer"
-                       Margin="0" VerticalAlignment="Top"/>
-       </Expandable>
-</ItemTemplate>
+<ItemTemplate Path="#Crow.Coding.ui.CategoryExp.template" DataType="Crow.Coding.CategoryContainer"
+       Data="Properties" DataTest="Type"/>
 <ItemTemplate DataType="System.Boolean" >
        <HorizontalStack Style="MemberViewHStack" ContextCommands="{Commands}">
                <Label Style="MemberViewLabel" Text="{Name}" Foreground = "{LabForeground}"/>
index eccad164324121cdbfa82f8edc910c653f7ccccf..97ee0272b3823eb6c54905f6fd5eda5f783b7c30 100644 (file)
@@ -23,7 +23,7 @@
                        </Template>
                </CheckBox>
        </Template>
-       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
+       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
                <VerticalStack Name="ItemsContainer"/>
        </Border>
 </Popper>
index 50a814a6ba0c9dde980c33c29a8aa4e4a1d91c00..569d0100b779b26873d1187f4bc48f1c5df7ffb6 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<Window Caption="Graphic Tree" Width="20%" Height="70%" AlwaysOnTop="true">
+<Window Caption="Crow IDE Options" Width="80%" Height="70%" Background="DimGray">
        <TabView>
                <TabItem Caption="Editor">
-                       <VerticalStack>
-                               <CheckBox Caption="Print Line Numbers" IsChecked=""/>
+                       <VerticalStack Margin="10">
+                               <CheckBox Caption="Print Line Numbers" IsChecked="False"/>
                        </VerticalStack>
                </TabItem>
        </TabView>
index e449549bbba6724faf0a162b2daaa1e06941e9d4..8b9b1e571b973e54d8d9eee83d8064c0708c3c19 100644 (file)
@@ -6,10 +6,7 @@
        <Expandable Caption="{Name}" ContextCommands="{Commands}" IsExpanded="{²IsExpanded}">
                <Template>
                        <VerticalStack>
-                               <Border CornerRadius="2" Margin="0" Height="Fit" MouseDoubleClick="./onClickForExpand"                                          
-                                               Foreground="Transparent"
-                                               MouseEnter="{Foreground=DimGray}"
-                                               MouseLeave="{Foreground=Transparent}">
+                               <Border Style="TreeItemBorder" MouseDoubleClick="./onClickForExpand">
                                        <HorizontalStack Spacing="1">
                                                <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
                                                        Path="{./Image}"
@@ -17,7 +14,7 @@
                                                        SvgSub="{./IsExpanded}"
                                                        MouseEnter="{Background=LightGray}"
                                                        MouseLeave="{Background=Transparent}"/>
-                                               <Image Style="ProjTreeIcon"
+                                               <Image Style="TreeIcon"
                                                        Path="#Crow.Icons.crowproj.svg"/>
                                                <GraphicObject Width="2" Height="9" Background="Green" Visible="{IsStartupProject}"/>
                                                <Label Text="{./Caption}"/>
@@ -49,9 +46,7 @@
        </Expandable>
 </ItemTemplate>
 <ItemTemplate DataType="Folder" DataTest="Type">
-       <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder" ContextCommands="{Commands}">
                <HorizontalStack>
                        <Image Style="ProjTreeIcon"
                                Path="#Crow.Icons.folder.svg"/>
        </Border>
 </ItemTemplate>
 <ItemTemplate DataType="Reference" DataTest="Type">
-       <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder" ContextCommands="{Commands}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Style="ProjTreeIcon"
+                       <Image Style="TreeIcon"
                                Path="#Crow.Icons.assembly.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
 </ItemTemplate>
 <ItemTemplate DataType="ProjectReference" DataTest="Type">
-       <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder" ContextCommands="{Commands}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Style="ProjTreeIcon"
+                       <Image Style="TreeIcon"
                                Path="#Crow.Icons.projectRef.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
 </ItemTemplate>
 <ItemTemplate DataType="Compile" DataTest="Type">      
-       <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder" ContextCommands="{Commands}">
                <HorizontalStack>                       
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Style="ProjTreeIcon"
+                       <Image Style="TreeIcon"
                                Path="#Crow.Coding.icons.file.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
 </ItemTemplate>
 <ItemTemplate DataType="EmbeddedResource" DataTest="Type">
-       <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                       ContextCommands="{Commands}"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder" ContextCommands="{Commands}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Style="ProjTreeIcon"
+                       <Image Style="TreeIcon"
                                Path="#Crow.Coding.icons.file.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
 </ItemTemplate>
 <ItemTemplate DataType="None" DataTest="Type">
-       <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Style="ProjTreeIcon"
+                       <Image Style="TreeIcon"
                                Path="#Crow.Coding.icons.file.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
index c19e7d4a3dbcd3815908e18f995aae8fe524a675..c69cbf4b50304f81bbcfb7705b12ef2a233f552c 100644 (file)
@@ -1,9 +1,6 @@
 <?xml version="1.0"?>
 <VerticalStack>
-       <Border CornerRadius="2" Margin="0" Height="Fit" MouseDoubleClick="./onClickForExpand"
-                       Foreground="Transparent"
-                       MouseEnter="{Foreground=DimGray}"
-                       MouseLeave="{Foreground=Transparent}">
+       <Border Style="TreeItemBorder" MouseDoubleClick="./onClickForExpand">
                <HorizontalStack Spacing="5">
                        <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
                                Path="{./Image}"
@@ -11,7 +8,7 @@
                                SvgSub="{./IsExpanded}"
                                MouseEnter="{Background=LightGray}"
                                MouseLeave="{Background=Transparent}"/>
-                       <Image Margin="0" Width="16" Height="16"
+                       <Image Style="TreeIcon"
                                Path="#Crow.Coding.icons.folder.svg" SvgSub="{./IsExpanded}"/>
                        <Label Text="{./Caption}"/>
                </HorizontalStack>
index cbef652ca91e7714f39cc49d680e3214e7990df9..a24aa29068523b2b99cca7de52808f920be957aa 100644 (file)
@@ -1,15 +1,55 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <TabItem Caption="{DisplayName}" QueryClose="OnQueryClose">
        <VerticalStack>
-               <Label Width="Stretched" Margin="1" Text="{HoverWidget}"/>
-               <ImlVisualEditor Height="60%" Margin="0" MinimumSize="10,10" Foreground="SkyBlue"
-                       AllowDrop="true" UpdateEnabled="{../../IsSelected}"
-                       ProjectNode="{}" SelectedItem="{²SelectedItem}"
-                       Name="crowContainer" Background="Onyx"/>
+               <HorizontalStack Height="Fit" Margin="2" Background="DimGray" Spacing="5">
+                       <HorizontalStack Width="Fit" Spacing="1">
+                               <Label Text="Design Size:"/>
+                               <TextBox Text="{²../../../editor.DesignWidth}" Width="50" TextAlignment="Right"/>
+                               <Label Text="X"/>
+                               <TextBox Text="{²../../../editor.DesignHeight}" Width="50" TextAlignment="Right"/>
+                       </HorizontalStack>
+                       <HorizontalStack Width="Fit" Spacing="1">
+                               <Label Text="Zoom:"/>
+                               <Slider Value="{²../../../editor.Zoom}" Width="150" Height="10" Minimum="10" Maximum="400" SmallIncrement="5" LargeIncrement="50"/>
+                               <Label Text="{../../../editor.Zoom}"/>
+                       </HorizontalStack>
+                       <HorizontalStack Width="Fit" Spacing="1">                               
+                               <Label Text="{../../../editor.Width}"/>
+                               <Label Text="X"/>
+                               <Label Text="{../../../editor.Height}"/>
+                       </HorizontalStack>
+                       <HorizontalStack Width="Fit" Spacing="1">
+                               <Label Text="Grid Spacing:"/>
+                               <Slider Value="{²../../../editor.GridSpacing}" Width="150" Height="10" Minimum="1" Maximum="100"/>
+                               <TextBox Text="{../../../editor.GridSpacing}"/>
+                       </HorizontalStack>
+               </HorizontalStack>
+               <Label DataSource="{../editor.HoverWidget}" Width="Stretched" Margin="1" Text="{Name}"/>
+               <VerticalStack Height="60%" Width="Stretched" Margin="0" MinimumSize="10,10">
+                       <HorizontalStack>
+                               <Scroller Name="scroller1" 
+                                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
+                                       <ImlVisualEditor  Foreground="SkyBlue" Name="editor" Background="Gray"                                          
+                                               VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10"
+                                               Width="512" Height="512"
+                                               AllowDrop="true" UpdateEnabled="{../../../../../IsSelected}"
+                                               ProjectNode="{}" SelectedItem="{²SelectedItem}"/>
+                               </Scroller>
+                               <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
+                                       LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" CursorSize="{../scroller1.ChildHeightRatio}"
+                                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" 
+                                       Width="14" />
+                       </HorizontalStack>
+                       <!--<ScrollBar Style="HScrollBar" Name="scrollbarX" Value="{²../scroller1.ScrollX}"
+                                       Maximum="{../scroller1.MaxScrollX}" Orientation="Horizontal"
+                                       LargeIncrement="{../editor.VisibleColumns}"
+                                       CursorSize="{../editor.ChildWidthRatio}"
+                                       Height="14" />-->
+               </VerticalStack>
                <Splitter/>
                <IMLContainer Path="#Crow.Coding.ui.SourceEditor.crow"/>
-               <Label DataSource="{../crowContainer.Error}" Text="{Message}"
-                       Visible="{../crowContainer.HasError}"
+               <Label DataSource="{../editor.Error}" Text="{}"
+                       Visible="{../editor.HasError}"
                        Height="Fit" Width="Stretched" Background="DarkRed" Foreground="White"
                        TextAlignment="TopLeft" Multiline="true"/>
        </VerticalStack>
index d97bcdb263636464dca0ee5af6db01cf78d0cf23..3763702c4e4a5947ea7916a7d9683b062ca26b2f 100644 (file)
@@ -3,7 +3,7 @@
        <HorizontalStack >
                <TextEditor Focusable="true" Name="editor" Font="monospace, 12" VerticalAlignment="Top" Margin="1"
                                CurrentLine="{²CurrentLine}" CurrentColumn="{²CurrentColumn}"
-                               Foreground="Jet" Background="White" Width="Stretched" Height="Stretched"
+                               Foreground="DimGray" Background="White" Width="Stretched" Height="Stretched"
                                ProjectNode="{}"  KeyDown="textView_KeyDown"/>
                <ScrollBar Name="scrollbarY" Value="{²../editor.ScrollY}"
                                   LargeIncrement="{../editor.VisibleLines}"
index 87bc45133c460e13143d72f1d8df6c8629f98b15..a310d9b48dea502e3d4e92141676ec2f5df46dc4 100644 (file)
@@ -1,4 +1,4 @@
-<Container Margin="20" Background="Onyx">
+<Container Margin="20" Background="DimGray">
        <ImlVisualEditor Width="80%" Height="80%" Margin="0" MinimumSize="10,10" Foreground="SkyBlue"
-                       Name="crowContainer" Background="Onyx"/>
+                       Name="crowContainer" Background="DimGray"/>
 </Container>
index 54d2b974be5e4de4e77d20cae6e3211926f8102d..f1445fe5c10a77240ba7ed0ca9ee0171424ab3f3 100644 (file)
@@ -14,7 +14,7 @@ GroupBox { Caption = "Group Box"; }
 
 ControlBorder {
        BorderWidth     = "1";
-       Foreground  = "Jet";
+       Foreground  = "DimGray";
        Background      = "Transparent";
 }
 ControlCaption {
@@ -42,7 +42,7 @@ Label {
 }
 Menu {
        Margin = "1";
-       Background = "vgradient|0:DimGray|1:Onyx";
+       Background = "vgradient|0:DimGray|1:Black";
        Height = "Fit";
        Width = "Stretched";
        VerticalAlignment = "Top";
@@ -54,7 +54,7 @@ MenuItem {
        Height = "Fit";
        Background = "Transparent";
        Foreground = "LightGray";
-       MouseEnter = "{Background = vgradient|0:UnitedNationsBlue|1:Onyx;Foreground=White;}";
+       MouseEnter = "{Background = vgradient|0:SteelBlue|1:Jet;Foreground=White;}";
        MouseLeave = "{Foreground=LightGray;Background=Transparent;}";
        SelectionBackground = "Transparent";
 }
@@ -144,7 +144,7 @@ FileDialog {
        Height = "300";
 }
 ProgressBar {
-       Foreground = "vgradient|0:BlueCrayola|0.5:SkyBlue|1:BlueCrayola";
+       Foreground = "vgradient|0:DarkBlue|0.5:SkyBlue|1:DarkBlue";
 }
 ScrollBar {
        Maximum = "0";
@@ -185,7 +185,7 @@ TxtInFileDialog {
 CheckBoxAlt {
        Template= "#Crow.Templates.CheckBox2.template";
        Background = "Transparent";
-       Checked="{Background=DarkSlateGray;Foreground=LightGray;}";
+       Checked="{Background=Gray;Foreground=LightGray;}";
        Unchecked = "{Background=Transparent;Foreground=DimGray;}";
 }
 
@@ -194,12 +194,12 @@ ArrowBut {
        Height="Fit";
        Width="Fit";
        Focusable="true";
-       Foreground="Jet";
+       Foreground="Onyx";
        Background="hgradient|0:Gray|1:Jet";
-       MouseDown="{Background=hgradient|0:White|0.4:BlueCrayola|1:Jet}";
-       MouseUp="{Background=hgradient|0:Gray|1:Jet}";
+       MouseDown="{Background=hgradient|0:White|0.4:CornflowerBlue|1:Jet}";
+       MouseUp="{Background=hgradient|0:Gray|1:DimGray}";
        MouseEnter="{Foreground=Black}";
-       MouseLeave="{Foreground=Jet}";
+       MouseLeave="{Foreground=Onyx}";
 }
 HArrowBut {
        MouseRepeat="true";
@@ -207,9 +207,9 @@ HArrowBut {
        Width="Fit";
        Focusable="true";
        Foreground="Jet";
-       Background="vgradient|0:Gray|1:Jet";
-       MouseDown="{Background=vgradient|0:White|0.4:BlueCrayola|1:Jet}";
-       MouseUp="{Background=vgradient|0:Gray|1:Jet}";
+       Background="vgradient|0:Gray|1:DimGray";
+       MouseDown="{Background=vgradient|0:White|0.4:DarkBlue|1:Jet}";
+       MouseUp="{Background=vgradient|0:Gray|1:DimGray}";
        MouseEnter="{Foreground=Black}";
-       MouseLeave="{Foreground=Jet}";
+       MouseLeave="{Foreground=DimGray}";
 }
\ No newline at end of file
index f626bfea0fe174ec0192d3d725592baa87dfd809..71965850e5f87cee0a1abb7763a050763db21afb 100755 (executable)
@@ -10,7 +10,7 @@
                        </VerticalStack>
                        <VerticalStack Margin="5" Spacing="1">
                                <GraphicObject Width="34" Height="21" Background="{./SelectedColor}"/>
-                               <Label Focusable="true" Selectable="true" Width="Stretched" Text="{./HexColor}" />                              
+                               <Label Focusable="true" Selectable="true" Text="{./SelectedColor}" />                           
                                <HorizontalStack Height="Fit">
                                        <Label Text="R" Width="Fit"/>
                                        <Spinner Style="ColorSpinner" Value="{²./R}" Width="40"  />
index 45244442849cb6760df18cdc7cd33b33511f5e3c..06dbc4b9febb6a6aa3198e75dd53a9d002e21eec 100644 (file)
@@ -4,7 +4,7 @@
        Background="Red">
        <Template>
                <HorizontalStack>
-                       <Border Background="DimGray" Foreground="Jet" CornerRadius="5">
+                       <Border Background="DimGray" Foreground="DimGray" CornerRadius="5">
                        <GenericStack Orientation="{./Orientation}" Name="ItemsContainer"
                                Margin="2"/>
                        </Border>
@@ -32,7 +32,7 @@
                                                                        Font="{./Font}" />
                                                </Border>
                                        </Template>
-                                       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
+                                       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGray">
                                                <VerticalStack Name="ItemsContainer"/>
                                        </Border>
                                </Popper>
index d9f93ed4452131203b49f5491193837663e7fd92..e508b3d74d3432e97abf5216419714913a563b32 100644 (file)
@@ -16,7 +16,7 @@
                        </Border>
                        <GraphicObject Width="5"/>
                </HorizontalStack>
-               <Container Name="Content" MinimumSize="50,50" Background="Onyx">
+               <Container Name="Content" MinimumSize="50,50" Background="DimGray">
                        <VerticalStack Margin="1">
                                <HorizontalStack Height="Fit">
                                        <Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
index 57f575c5ae2e6b25080b9316dc619ee1a69c3601..d896e9225f82efb6983c00b79203666bb609fa25 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="Jet">
+<Border BorderWidth="1" Foreground="DimGray">
        <GenericStack Orientation="{./Orientation}" Spacing="0">
                <Shape Style="HArrowBut"        MouseDown="./onScrollBack" Path="M 0.5,5.5 L 10.5,0.5 L 10.5,10.5 Z"/>
                <Slider Name="Slider"                   
@@ -10,8 +10,8 @@
                        Height="{./HeightPolicy}" Width="{./WidthPolicy}"
                        LargeIncrement="{./LargeIncrement}"
                        SmallIncrement="{./SmallIncrement}"
-                       CursorColor="vgradient|0:Gray|1:Jet"
-                       Foreground="Jet"
+                       CursorColor="vgradient|0:Gray|1:DimGray"
+                       Foreground="DimGray"
                        Background="vgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
                <Shape Style="HArrowBut" MouseDown="./onScrollForth" Path="M 0.5,0.5 L 10.5,5.5 L 0.5,10.5 Z"/>
        </GenericStack>
index 57014577fbf3c656dc63fde8d7976a5b52567580..c0a1fbf70c7d5aa9e9bcdc9980948be410ab8f50 100644 (file)
@@ -21,7 +21,7 @@
                        </Template>             
                </CheckBox>
        </Template>
-       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
+       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
                <VerticalStack Name="ItemsContainer"/>
        </Border>
 </Popper>
index 3c67bfa7b8db26c375f64bfe15785dbeef433a36..93a09da0faeee840a2516c64e309b60a649b2f5e 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="Jet">
+<Border BorderWidth="1" Foreground="DimGray">
        <GenericStack Orientation="{./Orientation}" Spacing="0">
                <Shape Style="ArrowBut" MouseDown="./onScrollBack" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"/>
                <Slider Name="Slider"                   
@@ -10,8 +10,8 @@
                        Height="{./HeightPolicy}" Width="{./WidthPolicy}"
                        LargeIncrement="{./LargeIncrement}"
                        SmallIncrement="{./SmallIncrement}"
-                       CursorColor="hgradient|0:Gray|1:Jet"
-                       Foreground="Jet"
+                       CursorColor="hgradient|0:Gray|1:DimGray"
+                       Foreground="DimGray"
                        Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
                <Shape Style="ArrowBut" MouseDown="./onScrollForth" Path="M 0.5,0.5 L 10.5,0.5 L 5.5,10.5 Z"/>
        </GenericStack>
index e013594fe5a2715b3d2f610bbb87de337dd412ba..55498533207d661da67537e38189e67b0d7656bd 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <GenericStack Orientation="Vertical" Spacing="0"
-               Background="Onyx"
+               Background="{./Background}"
                MouseEnter="{/caption.Foreground=White}"
                MouseLeave="{/caption.Foreground=Gray}">
        <HorizontalStack Margin="2" Left="{./TabOffset}"
index 3c5f8c119a42bec148a30a151aee722857ce202d..f8b8c3fc53840003ff95e62cb9cfd9ca2a8833de 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<Border Fit="true" Foreground="Jet" Background="ArylideYellow">
-       <Label Margin="3" Foreground="Jet" Multiline="true" Text="{Tooltip}"/>
+<Border Fit="true" Foreground="DimGray" Background="Khaki">
+       <Label Margin="3" Foreground="DimGray" Multiline="true" Text="{Tooltip}"/>
 </Border>
index 66ee3d0a771f268ea7d65100b910ef8ead51bb1d..e17f15401abc445bf903dcccf303a8ab9eae6884 100644 (file)
@@ -140,7 +140,8 @@ namespace Tests
 
                void OnClear (object sender, MouseButtonEventArgs e) => TestList = null;
 
-               void OnLoadList (object sender, MouseButtonEventArgs e) => TestList = Color.ColorDic.Values.ToList();
+               void OnLoadList (object sender, MouseButtonEventArgs e) => TestList =
+                       Color.ColorDic.Values.OrderBy(c=>c.Hue).ToList();
 
                void command1(){
                        Console.WriteLine("command1 triggered");
@@ -159,6 +160,14 @@ namespace Tests
                {
                        base.OnLoad (e);
 
+                       foreach (Color c in Color.ColorDic.Values) {
+                               if (string.IsNullOrEmpty(c.htmlCode))
+                                       Console.WriteLine ("no htmlcode for {0}", c.Name);
+                               else if (c.htmlCode.Substring(1) != c.HtmlCode)
+                                       Console.WriteLine ("{2} orig: {0} comp: {1}",c.htmlCode, c.HtmlCode, c.Name);
+                       }
+
+
                        Commands = new List<Crow.Command> (new Crow.Command[] {
                                new Crow.Command(new Action(() => command1())) { Caption = "command1"},
                                new Crow.Command(new Action(() => command2())) { Caption = "command2"},
@@ -168,7 +177,8 @@ namespace Tests
 
                        this.KeyDown += KeyboardKeyDown1;
 
-                       testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+                       //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+                       testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
@@ -230,7 +240,7 @@ namespace Tests
                                GraphicObject obj = Load (testFiles[idx]);
                                obj.DataSource = this;
                        } catch (Exception ex) {                                
-                               MessageBox.Show (CurrentInterface, MessageBox.Type.Error, ex.Message + "\n" + ex.InnerException.Message);
+                               MessageBox.Show (CurrentInterface, MessageBox.Type.Error, ex.Message + "\n" + ex.InnerException.Message).Modal = true;
                        }
                }
 //             void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
index be2e16e6c23dbebcc99e9526cf822e5588953516..17bc958e478a119c3a326040de7563bffba9eee9 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Container Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10"  Background="Mantis"
+<Container Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10"  Background="SeaGreen"
                        MinimumSize="50,50"/>
 </Container>
\ No newline at end of file
index a8425272a196440c9b1c913179b833a1c5ba5f41..104e46f7867b61aa252e84dc431146f707d525dd 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Container Background="Teal" Margin="10" Fit="true">
-       <GraphicObject Margin="10" Width="50%" Height="50%" Background="Malachite"
+<Container Background="MediumSeaGreen" Margin="10" Fit="true">
+       <GraphicObject Margin="10" Width="50%" Height="50%" Background="DarkGreen"
                        MinimumSize="50,50"/>
 </Container>
\ No newline at end of file
index 6f21416c978696a1d1869110fa92d6dbe9a251f3..dd8afa2867b69928f88793f3a513ad7e39a32941 100755 (executable)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
-<Container Background="Onyx" Margin="10" Fit="true">
-       <Label Text="{fps}" Margin="10" Fit="true" Background="Mantis"/>
+<Container Background="DimGray" Margin="10" Fit="true">
+       <Label Text="{fps}" Margin="10" Fit="true" Background="SeaGreen"/>
 </Container>
\ No newline at end of file
index 47f36af5538d2001879d4230b740d6b7b83e5c1b..afb7db06f65f147108c2f7f1d3dbe6b14f9cac83 100755 (executable)
@@ -34,9 +34,9 @@
                                        </HorizontalStack>
                                </VerticalStack>
                        </GroupBox>
-                       <Label Width="Stretched" Margin="3" Background="Onyx"/>
+                       <Label Width="Stretched" Margin="3" Background="DimGray"/>
                        <TextBox Text="TextBox" Multiline="true" Margin="3"/>
-                       <HorizontalStack Height="Fit" Margin="5" Background="Onyx" CornerRadius="10">
+                       <HorizontalStack Height="Fit" Margin="5" Background="DimGray" CornerRadius="10">
                                <VerticalStack Spacing="5" Width="50%">
                                        <CheckBox Fit="true" Caption="test"/>
                                        <CheckBox Fit="true"/>
@@ -52,7 +52,7 @@
                        </HorizontalStack>
                        <HorizontalStack Height="Fit" Margin="5">
                                <Label Text="MouseEvents" Width="50%" Margin="3"
-                                       Background="Onyx"
+                                       Background="DimGray"
                                        Foreground="DimGray"
                                        TextAlignment="Center"
                                        MouseEnter="{Foreground=White}"
                                        MouseDown="{Background=DarkRed}"
                                        MouseClick="{Foreground=Green}"
                                        MouseDoubleClick="{Foreground=Yellow}"
-                                       MouseUp="{Background=Onyx}"/>
+                                       MouseUp="{Background=DimGray}"/>
                                <Label Text="MouseEvents" Width="50%" Margin="3"
-                                       Background="Onyx"
+                                       Background="DimGray"
                                        Foreground="DimGray"
                                        TextAlignment="Center"
                                        MouseClick="{Foreground=Green}"
                                        MouseDoubleClick="{Foreground=Yellow}"
                                        MouseEnter="{Foreground=White}"
                                        MouseLeave="{Foreground=DimGray}"
-                                       MouseDown="{Background=Mantis}"
-                                       MouseUp="{Background=Onyx}"/>
+                                       MouseDown="{Background=SeaGreen}"
+                                       MouseUp="{Background=DimGray}"/>
                        </HorizontalStack>
                        <GroupBox Caption="Templated controls" Height="Fit" Margin="5">
                                <HorizontalStack Height="Fit">
                                </Border>
                        </Popper>
                        <Slider Height="10" Width="90%"/>
-                       <Container Height="Fit" Width="200" Background="Onyx" Margin="2" CornerRadius="5">
+                       <Container Height="Fit" Width="200" Background="DimGray" Margin="2" CornerRadius="5">
                                <ProgressBar Background="DimGray" Height="10" Value="50"/>
                        </Container>
                        <Image Path="#Crow.Images.Icons.crow.svg" Width="60" Height="60" Background="LightGray" />
                                </TabItem>
                        </TabView>-->
                        <MessageBox Movable="false"/>
-                       <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="Onyx" Margin="5" Fit="True" />
+                       <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Margin="5" Fit="True" />
                        <GraphicObject Name="go" Width="100" Height="60" Background="{../../colorList.SelectedItem}"/>
-                       <Label Text="{../../colorPicker.SelectedRawColor}"/>
+                       <Label Text="{../colorPicker.SelectedColor}"/>
                </VerticalStack>
                <Splitter/>
                <VerticalStack Width="30%" Margin="5">
index 7a0f2801e0e2410139c23989be2e8d764c61bb82..fdfd8f3c1fa56d9b398796edd32a57b109dd7966 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <VerticalStack>
-       <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="Onyx" Margin="5" Fit="True" />
+       <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="DimGray" Margin="5" Fit="True" />
        <GraphicObject Name="go" Width="100" Height="60" Background="DarkBlue"/>
        <GraphicObject Name="go" Width="100" Height="60" Background="{../colorPicker.SelectedColor}"/>
-
+       <Label Text="{../colorPicker.SelectedColor}"/>
 </VerticalStack>
\ No newline at end of file
index aa283bff1908857f457d231e0f3ac1a9c2e27a3a..527424775443e8be0ff135e3d109cefc317b1b46 100755 (executable)
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<Label Margin="50" MinimumSize="10,10" Background="Onyx" Text="{PropertyLessBinding}"/>
\ No newline at end of file
+<Label Margin="50" MinimumSize="10,10" Background="DimGray" Text="{PropertyLessBinding}"/>
\ No newline at end of file
index 2c1572a4ff61d59f98394c3b660eff623acc2eb0..c75af67d7562ccb3e833d6a9ce5d59494bcceb3c 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Container Fit="true" Background="Red" Tooltip="test tooltip" >
-       <Shape Foreground="Transparent" Background="Onyx" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"
-               MouseEnter="{Background=hgradient|0:Jet|0.5:BlueCrayola|1:Black}"
-               MouseLeave="{Background=Onyx}"/>
+       <Shape Foreground="Transparent" Background="DimGray" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"
+               MouseEnter="{Background=hgradient|0:DimGray|0.5:BlueCrayola|1:Black}"
+               MouseLeave="{Background=DimGray}"/>
 </Container>
\ No newline at end of file
index 3a08829c785834c23ea0f899f550f9595ff0a15e..22dfd7490d5b9074f2aaabbf90aa89bffae3979f 100644 (file)
@@ -9,13 +9,13 @@
                        <Label Foreground="Black" Font="mono, 12" Text="."/>
                        <Label Foreground="Black" Font="mono, 12" Text="{Minor}"/>
                        <Label Foreground="Black" Font="mono, 12" Text="."/>
-                       <Label Foreground="Jet" Font="mono, 12" Text="{Build}"/>
+                       <Label Foreground="DimGray" Font="mono, 12" Text="{Build}"/>
                </HorizontalStack>
                <GraphicObject Height="30"/>
                <Label Font="20" Text="Press &lt;F2&gt; and &lt;F3&gt; to cycle into the examples"/>
                <Label Font="20" Text="Those are basic tests used to validate changes,"/>
                <GraphicObject Height="30"/>
-               <Label Foreground="Jet" Font="20" Text="&lt;F5&gt; => File dialog example"/>
-               <Label Foreground="Jet" Font="20" Text="&lt;F6&gt; => Window example"/>
+               <Label Foreground="DimGray" Font="20" Text="&lt;F5&gt; => File dialog example"/>
+               <Label Foreground="DimGray" Font="20" Text="&lt;F6&gt; => Window example"/>
        </VerticalStack>
 </Border>
\ No newline at end of file
index c36f840d2f523d5d0752b4446192c0222f2cc9f6..356fa49a7d7beb75353a044ec9d00f9ae05257a0 100755 (executable)
@@ -1,17 +1,17 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="90%" Spacing="100" Focusable="true">
-       <Container Name="source" StartDrag="{Background=Jet}" EndDrag="{Background=Mantis}" Focusable="true" Fit="true"
+<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%" Spacing="100" Focusable="true">
+       <Container Name="source" StartDrag="{Background=DimGray}" EndDrag="{Background=SeaGreen}" Focusable="true" Fit="true"
                        Drop="{../target.Background=Green}"
-                       MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}" MouseClick="{Background=Mantis}"
-                       AllowDrag="true" Width="200" Height="200" Background="Mantis">
+                       MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}" MouseClick="{Background=SeaGreen}"
+                       AllowDrag="true" Width="200" Height="200" Background="SeaGreen">
                <VerticalStack Margin="50">
                        <Label Name="txt" Text="Drag me" Foreground="Gray"/>
                        <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Gray"/>
                </VerticalStack>
        </Container>
-       <Container Name="target" DragEnter="{Background=Mantis}" DragLeave="{Background=Jet}" Focusable="true" Fit="true"
+       <Container Name="target" DragEnter="{Background=SeaGreen}" DragLeave="{Background=DimGray}" Focusable="true" Fit="true"
                        MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}"
-                       AllowDrop="true"  Background="Jet">
+                       AllowDrop="true"  Background="DimGray">
                <VerticalStack Margin="50">
                        <Label Name="txt" Text="Drop here" Foreground="Gray"/>
                        <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Gray"/>
index 742c1e07c4e31a3832e78888e32f6bc7f9d588d5..22e2dc06474f8a2a8a12c0970931f6b4b4bc10f8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <VerticalStack>
        <Docker>
-               <DockStack Background="Onyx"/>
+               <DockStack Background="DimGray"/>
                <DockWindow Width="150" Height="150" Background="DarkRed" />
                <DockWindow Width="150" Height="150" Background="DarkGreen"/>
                <DockWindow Width="150" Height="150" Background="Blue"/>
@@ -9,11 +9,11 @@
                <DockWindow Width="150" Height="150" Background="Yellow"/>
                <DockWindow Width="150" Height="150" Background="BrownWeb"/>
        </Docker>
-<!---          <DockWindow Left="400" Top="400" Width="150" Height="150" Background="Teal"/>
+<!---          <DockWindow Left="400" Top="400" Width="150" Height="150" Background="MediumSeaGreen"/>
                <DockWindow Left="450" Top="450" Width="150" Height="150" Background="Maize"/>-->
        
 </VerticalStack>
-<!--<Group Background="Jet" Margin = "0" Focusable="true" >
+<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
        <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
        <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
        <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
index 71301686b7522c7caa36a382d5f2bf0e9b7cb623..700f965cb1de4fabf18ef07cb57f524cc9f7a5da 100644 (file)
@@ -6,7 +6,7 @@
        <DockWindow Left="400" Top="400" Width="150" Height="150" Background="DarkYellow"/>
        <DockWindow Left="500" Top="500" Width="150" Height="150" Background="Yellow"/>
 </Docker>
-<!--<Group Background="Jet" Margin = "0" Focusable="true" >
+<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
        <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
        <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
        <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
index 054c3f5ff3a148a5acdeb6a7a8f85773596c6e6c..88e309dc2bffdb6859a65091f70d9fc9a8488c3b 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Window Width="600" Height="500">
-<VerticalStack Margin="20" Background="Jet" Spacing="10">
+<VerticalStack Margin="20" Background="DimGray" Spacing="10">
        <GraphicObject Height="100" Width="500" Background="Green"/>
        <Splitter/>
        <HorizontalStack>
@@ -12,7 +12,7 @@
        <GraphicObject Height="100" Width="500" Background="Green"/>
 </VerticalStack>
 </Window>
-<!--<Group Background="Jet" Margin = "0" Focusable="true" >
+<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
        <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
        <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
        <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
index 6a01cb630cb160f68a04b580c39c2289a489bd94..7fdd607f4dd023268bac24581783f61467589d6b 100755 (executable)
@@ -1,3 +1,3 @@
 <?xml version="1.0"?>
-<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
+<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
                MinimumSize="50,50"/>
\ No newline at end of file
index 14ca7961c14b3fc1493c773c8f3e3eadfaed6770..b93109a49155ff69663a2dbf457eb4aaaa4a81ca 100755 (executable)
@@ -1,3 +1,3 @@
 <?xml version="1.0"?>
-<GraphicObject Margin="10" Width="150" Height="150" Background="Mantis"
+<GraphicObject Margin="10" Width="150" Height="150" Background="SeaGreen"
                MinimumSize="50,50"/>
\ No newline at end of file
index 7eb5a0a6c38673392b20b66ddde5f439b44fce1c..9195ed4f2e09520f50153a9ee1acc3ace58802c8 100755 (executable)
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
-<Group MinimumSize="50,50" Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+<Group MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        VerticalAlignment="Top"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"                   
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"                 
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index 6f07c3f3e6cf46359f3ea87cffe6e82ae1a9fed6..4f355f9bca18c3ab1b91a1602d928b28837624c5 100755 (executable)
@@ -1,32 +1,32 @@
 <?xml version="1.0"?>
-<Group Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+<Group Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
index a7cc91ab7fba37043f1a98f4057d855cde625240..de743d3ad24929a34922465d8d697fd79a17916f 100755 (executable)
@@ -1,32 +1,32 @@
 <?xml version="1.0"?>
-<Group Background="Onyx" Margin="10" Fit="true">
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+<Group Background="DimGray" Margin="10" Fit="true">
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
index 7c0385511e18aa20aa30040a8c20ef257f2225df..e323fd082bb3357019ffa7df0cbc2fefc69f66ed 100755 (executable)
@@ -1,32 +1,32 @@
 <?xml version="1.0"?>
-<Group Background="Onyx" Margin="10" Width="70%" Height="50%">
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+<Group Background="DimGray" Margin="10" Width="70%" Height="50%">
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="100%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="100%" Height="20%" Background="SeaGreen"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Left"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
                        MinimumSize="10,10"/>
index 02c01b293933ea743315eefe568b4842337ab244..b7704d5bd5e0926df4b856dbc542b837ca1f6914 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
-<Group Background="Onyx" Margin="10" Fit="true">
+<Group Background="DimGray" Margin="10" Fit="true">
        <Label Font="droid bold,40" Text="{fps}" Margin="10"  Fit="true"/>
-       <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index ca54c72124a400b6db55b409869935d419d15160..e7eef87b3df176e9d26fa09949cb84b0b1f4544c 100755 (executable)
@@ -19,7 +19,7 @@
        </Border>
        <Splitter Thickness="3"/>
        <Border Width="45%" CornerRadius="10" BorderWidth="1">
-               <VerticalStack Width="50%" Height="50%" Background="Onyx">
+               <VerticalStack Width="50%" Height="50%" Background="DimGray">
                        <RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
                        <RadioButton IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
                        <RadioButton IsChecked="true" Caption="Choice 3"  Background="hgradient|0:DarkRed|1:Transparent"/>
index 63290f9e6b2327d5c09eaa2f45233c8d245a9a31..467a063edb2495a840903907f8119c35a618fd41 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<VerticalStack MinimumSize="50,50" Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+<VerticalStack MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
 </VerticalStack>
\ No newline at end of file
index 170bbed442a2750548b50c6a40c774c9a4d0fbe7..95ef13598cfc362d00189424e3ecc30eff453578 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<HorizontalStack MinimumSize="50,50" Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+<HorizontalStack MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
 </HorizontalStack>
\ No newline at end of file
index a0ac28c90f503bebcd86e7298cdeec2a963fe51e..8a6a3c3c8a945e0f2eeab73e1b71257b8368ad4b 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<VerticalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
+<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
 </VerticalStack>
\ No newline at end of file
index 7d97bd2c5b664109bd22b7179daa1b4c2e088608..c8ea266d02878de93aa71cb1def301704cf4a6cc 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
+<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
 </HorizontalStack>
\ No newline at end of file
index 6d8c9ad686a48671db1944fd02960f74b3ddf172..a3f2c019c015a019cfad830733259224eea89e7e 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<VerticalStack Background="Onyx" Margin="10" Width="90%" Height="100%">
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="100%">
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
 </VerticalStack>
\ No newline at end of file
index de1c36fe3a2ba1ba543118cb4cc4923702bbdada..faa5956c251b67d9d7548e587191238e2846e942 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="100%">
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="100%">
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
                        MinimumSize="10,10"/>
-       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
 </HorizontalStack>
\ No newline at end of file
index e46a5fff6ba1c8f18d4a8ab0d413b582bc2762be..b7784b908edbcccb67d159a5c79b3dc76df2c75b 100755 (executable)
@@ -1,45 +1,45 @@
 <?xml version="1.0"?>
-<VerticalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
 </VerticalStack>
\ No newline at end of file
index 3a1d77dc34e74810a0c4874be55114806a1577ab..620cdeeee686e735f6bd3154cc37f35cec9f4108 100755 (executable)
@@ -1,45 +1,45 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
-       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
+       <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
 </HorizontalStack>
\ No newline at end of file
index 8e1f757bd8a6851d4a20ffe997425b7095741754..6a7f2da7fcdb4a190af59b7a5e5c12538926f05a 100755 (executable)
@@ -1,27 +1,27 @@
 <?xml version="1.0"?>
 <VerticalStack>
-       <HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="20%">
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Width="100%" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
+       <HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="20%">
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Width="100%" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
        </HorizontalStack>
-       <HorizontalStack Background="Onyx" Margin="10" Width="Fit" Height="20%">
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Width="100%" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
-               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="Mantis"/>
+       <HorizontalStack Background="DimGray" Margin="10" Width="Fit" Height="20%">
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Width="100%" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
+               <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
        </HorizontalStack>
 </VerticalStack>
\ No newline at end of file
index 63e31cce6f2cbb6e8c736bfeab5e9f05f63e849f..df580a857e68c5f331a5173fc5e2f5176bd36843 100644 (file)
@@ -18,7 +18,7 @@
                </Border>
        </HorizontalStack>
        <Container Margin="20">
-               <Container Background="Jet" Name="Content"/>
+               <Container Background="DimGray" Name="Content"/>
        </Container>
 </GenericStack>
 
index 0c37d3357be41f5a1db6dcd7f7f6a677ad84a149..195b981b1679d1cd91f867e3eaf67072c880cdb5 100755 (executable)
@@ -5,7 +5,7 @@
                        <CheckBox Name="chk2" IsChecked="true"/>
                        <CheckBox Name="chk3" />
                        <CheckBox Name="chk4" />
-                       <HorizontalStack Fit="true" Margin="2" Background="Mantis">
+                       <HorizontalStack Fit="true" Margin="2" Background="SeaGreen">
                                <Label Name="captionFps" Text="Fps:" Width="30" TextAlignment="Right"/>
                                <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="Fit" TextAlignment="Center" Background="AoEnglish"/>
                        </HorizontalStack>
index b262aa337573d0b8a28dfc000417aa3586194a45..c9e211f8fcbc23cc9f8c67b31b838497f0e48b04 100644 (file)
@@ -5,8 +5,8 @@
                <Label Text="Selected Tab:"/>
                <Label Text="{../../tabview1.SelectedTab}"/>
        </HorizontalStack>
-       <TabView Name="tabview1" Background="Onyx" Orientation="Horizontal">
-               <TabItem Name="TabItem1" Caption="tab item 1" Background="Onyx">
+       <TabView Name="tabview1" Background="DimGray" Orientation="Horizontal">
+               <TabItem Name="TabItem1" Caption="tab item 1" Background="DimGray">
                        <VerticalStack Margin="20">
                                <CheckBox/>
                                <CheckBox/>
@@ -14,7 +14,7 @@
                                <CheckBox/>
                        </VerticalStack>
                </TabItem>
-               <TabItem Name="TabItem2" Caption="tab item 2" Background="Onyx">
+               <TabItem Name="TabItem2" Caption="tab item 2" Background="DimGray">
                        <VerticalStack Height="Fit" Margin="10">
                                <RadioButton Fit="true"/>
                                <RadioButton/>
                                <RadioButton/>
                        </VerticalStack>
                </TabItem>
-               <TabItem Name="TabItem3" Background="Onyx" Caption="tab item 3">
+               <TabItem Name="TabItem3" Background="DimGray" Caption="tab item 3">
                        <Container Margin="5" CornerRadius="2" >
                                <TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                        </Container>
                </TabItem>
-               <TabItem Name="TabItem4" Background="Onyx" Caption="tab item 4" Margin="0">
+               <TabItem Name="TabItem4" Background="DimGray" Caption="tab item 4" Margin="0">
                        <TextBox/>
                </TabItem>
        </TabView>
index 7e32078a70ceba188e82a1ecd1125c426237eb77..c02e991ab3f634e4d02e7c8f38c9b1a339fba617 100644 (file)
@@ -5,8 +5,8 @@
                        <Label Text="Selected Tab:"/>
                        <Label Text="{../../tabview1.SelectedTab}"/>
                </HorizontalStack>
-               <TabView Name="tabview1" Background="Onyx" Orientation="Horizontal" Margin="5" >
-                       <TabItem Name="TabItem1" Caption="tab-1.1" Background="Onyx">
+               <TabView Name="tabview1" Background="DimGray" Orientation="Horizontal" Margin="5" >
+                       <TabItem Name="TabItem1" Caption="tab-1.1" Background="DimGray">
                                <VerticalStack Margin="20">
                                        <CheckBox/>
                                        <CheckBox/>
@@ -14,7 +14,7 @@
                                        <CheckBox/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab-1.2" Background="Onyx">
+                       <TabItem Name="TabItem2" Caption="tab-1.2" Background="DimGray">
                                <VerticalStack Height="Fit" Margin="10">
                                        <RadioButton Fit="true"/>
                                        <RadioButton/>
@@ -22,7 +22,7 @@
                                        <RadioButton/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem3" Background="Onyx" Caption="tab-1.3">
+                       <TabItem Name="TabItem3" Background="DimGray" Caption="tab-1.3">
                                <Container Margin="5" CornerRadius="2" >
                                        <TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                                </Container>
@@ -36,8 +36,8 @@
                        <Label Text="Selected Tab:"/>
                        <Label Text="{../../tabview2.SelectedTab}"/>
                </HorizontalStack>
-               <TabView Name="tabview2" Background="Onyx" Orientation="Horizontal" >
-                       <TabItem Name="TabItem1" Caption="tab-2.1" Background="Onyx">
+               <TabView Name="tabview2" Background="DimGray" Orientation="Horizontal" >
+                       <TabItem Name="TabItem1" Caption="tab-2.1" Background="DimGray">
                                <VerticalStack Margin="20">
                                        <CheckBox/>
                                        <CheckBox/>
@@ -45,7 +45,7 @@
                                        <CheckBox/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab-2.2" Background="Onyx">
+                       <TabItem Name="TabItem2" Caption="tab-2.2" Background="DimGray">
                                <VerticalStack Height="Fit" Margin="10">
                                        <RadioButton Fit="true"/>
                                        <RadioButton/>
@@ -53,7 +53,7 @@
                                        <RadioButton/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem3" Background="Onyx" Caption="tab-2.3">
+                       <TabItem Name="TabItem3" Background="DimGray" Caption="tab-2.3">
                                <Container Margin="5" CornerRadius="2" >
                                        <TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                                </Container>
index 2ef6d3912269aea26783bd681b1af0a3a9ece8ae..3ef27acec4293c9b4439b06aa26ecbd932ee6abe 100755 (executable)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
-<Container Background="Onyx" Width="300">
+<Container Background="DimGray" Width="300">
        <ComboBox  Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/>
 </Container>
\ No newline at end of file
index ab8a993a0585718c967d1838f2d496ab196c7e32..0fcdcc78e2447131d3f4d2b7d35074dc33fb700f 100755 (executable)
@@ -1,14 +1,14 @@
 <?xml version="1.0"?>
 <Window Caption="Vertical Wrapper" Width="50%" Height="50%">
-       <Wrapper Orientation="Vertical" Height="Fit" Width="90%" Margin="5" Background="Teal" Spacing="1" >
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
+       <Wrapper Orientation="Vertical" Height="Fit" Width="90%" Margin="5" Background="MediumSeaGreen" Spacing="1" >
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
        </Wrapper>
 </Window>
\ No newline at end of file
index e8ffd6b24f22eeec877a8e5873965854448c8986..15446890b9ab1457e2c3d513f57882dd5247beec 100755 (executable)
@@ -1,14 +1,14 @@
 <?xml version="1.0"?>
 <Window Caption="Vertical Wrapper" Width="50%" Height="50%">
-       <Wrapper Orientation="Vertical" Height="Fit" Width="Fit" Margin="5" Background="Teal" Spacing="1" >
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
+       <Wrapper Orientation="Vertical" Height="Fit" Width="Fit" Margin="5" Background="MediumSeaGreen" Spacing="1" >
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
        </Wrapper>
 </Window>
\ No newline at end of file
index a5ce996bdba088f90e693837fd1556fd5fb51411..4ec1de32020a4c35886b4bc196e610021f8b8804 100755 (executable)
@@ -1,14 +1,14 @@
 <?xml version="1.0"?>
 <Window Caption="Horizontal Wrapper" Width="50%" Height="50%">
-       <Wrapper Orientation="Horizontal" Height="90%" Width="Fit" Margin="5" Background="Teal" Spacing="1" >
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
+       <Wrapper Orientation="Horizontal" Height="90%" Width="Fit" Margin="5" Background="MediumSeaGreen" Spacing="1" >
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
        </Wrapper>
 </Window>
\ No newline at end of file
index ce4f3f1813d3144e1135258a8153f1b86064c9ab..ceeae253df19ec1f9f78727a21085c551b718017 100755 (executable)
@@ -2,34 +2,34 @@
 <Window Caption="Horizontal Wrapper" Width="50%" Height="50%">
        <VerticalStack Margin="1">
                <Scroller Name="scroller1" ScrollX="{../scrollbar1.Value}" VerticalScrolling="False" HorizontalScrolling="true" Margin="1" Background="BlueCrayola">
-                       <Wrapper HorizontalAlignment="Left" Orientation="Horizontal" Height="100%" Width="Fit" Margin="0" Background="Teal" Spacing="1" >
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-                               <GraphicObject Width="50" Height="50" Background="Mantis"/>
+                       <Wrapper HorizontalAlignment="Left" Orientation="Horizontal" Height="100%" Width="Fit" Margin="0" Background="MediumSeaGreen" Spacing="1" >
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+                               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
                        </Wrapper>
                </Scroller>
                <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollX}" 
index 14b005e879d79408d088b41280b6bb295542c1d8..9f505ba38632379ea4e1f5e596eaae7ad19b04ff 100755 (executable)
@@ -1,14 +1,14 @@
 <?xml version="1.0"?>
 <Window Caption="Horizontal Wrapper" Width="50%" Height="50%">
-       <Wrapper Orientation="Horizontal" Height="Fit" Width="Fit" Margin="5" Background="Teal" Spacing="1" >
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50%" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50%" Background="Mantis"/>
-               <GraphicObject Width="50" Height="50" Background="Mantis"/>
+       <Wrapper Orientation="Horizontal" Height="Fit" Width="Fit" Margin="5" Background="MediumSeaGreen" Spacing="1" >
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50%" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50%" Background="SeaGreen"/>
+               <GraphicObject Width="50" Height="50" Background="SeaGreen"/>
        </Wrapper>
 </Window>
\ No newline at end of file
index c7a87eb2320a80ec5ad1710399908a92424261e8..c86ff9cb203835ef88bdc57effb1bf92cb111a43 100644 (file)
@@ -29,7 +29,7 @@
     <ConsolePause>false</ConsolePause>
     <DefineConstants>DEBUG;TRACE;MEASURE_TIME</DefineConstants>
     <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
-    <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
+    <OutputPath>$(SolutionDir)build\Debug</OutputPath>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>
@@ -37,7 +37,7 @@
     <WarningLevel>0</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
-    <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
+    <OutputPath>$(SolutionDir)build\Release</OutputPath>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
     <StartAction>Program</StartAction>
index 2b9ec57671b2515667c75f1839b43e1416c68f66..d909843e1ba2e43d5cdf740de6a4dc0bca597744 100644 (file)
@@ -42,7 +42,7 @@ namespace Tutorials
                        AddWidget (new SimpleGauge (CurrentInterface) {
                                Level = 40,
                                Width = 30, Height = "50%",
-                               Foreground = Color.UnitedNationsBlue, Background = Color.Jet
+                               Foreground = Color.DarkBlue, Background = Color.DimGray
                        });
                }
 
index e9709b2c28bcdba5235c4fd86474a962b372880f..bbe53513333f02ef393ad0dea5eed4928e1523d5 100644 (file)
@@ -3,26 +3,26 @@
        Font = "droid, 10";
        Margin = "0";
        TextAlignment = "Center";
-       Background = "Onyx";
+       Background = "DimGray";
 }
 FpsDisp {
        Font = "droid bold, 10";
        Width = "50%";
        Margin = "0";
        TextAlignment = "Center";
-       Background = "Teal";
+       Background = "MediumSeaGreen";
 }
 CheckBox2 {
        Template= "#Tests.Interfaces.CheckBox2.imlt";
-       Background = "Onyx";
-       Checked="{Background=Mantis;Font=droid bold, 10}";
-       Unchecked = "{Background=Onyx;Font=droid,10}";
+       Background = "DimGray";
+       Checked="{Background=MediumSeaGreen;Font=droid bold, 10}";
+       Unchecked = "{Background=DarkGray;Font=droid,10}";
 }
 RadioButton2 {
        Template="#Tests.Interfaces.CheckBox2.imlt";
-       Background = "Onyx";
-       Checked = "{Background=Mantis;Font=droid bold, 10}";
-       Unchecked = "{Background=Onyx;Font=droid,10}";
+       Background = "DimGray";
+       Checked = "{Background=MediumSeaGreen;Font=droid bold, 10}";
+       Unchecked = "{Background=DimGray;Font=droid,10}";
 }
 labPerf {
        Font = "droid, 8";
index 20353e3321121c8883165a11550ca0aa6f989544..bfb234ad6148c627db302dfa22ef26b0232084d6 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="Onyx" Margin="5">
+<HorizontalStack Background="Jet" Margin="5">
        <DirectoryView Name="dv" CurrentDirectory="Interfaces" Width="25%" SelectedItemChanged="Dv_SelectedItemChanged"/>
        <Splitter Width="6"/>
        <VerticalStack>
-               <Container Name="CrowContainer" Height="60%" Background="SmokyBlack"/>
+               <Container Name="CrowContainer" Height="60%" Background="DimGray"/>
                <Splitter/>
                <HorizontalStack>
                        <Scroller Name="scroller1" Background="White"
index 9a0e22c085f82c0a88b88d46d1bc1b718193473d..64ba349e11a8b60dc700ae7f76548e8426bcc72f 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Window Font="droid bold, 10" Caption="Open GL" HorizontalAlignment="Left" Width="30%" Height="90%">
        <VerticalStack>
-               <HorizontalStack Background="Jet" Height="Fit" Width="Stretched"  Margin="2">
+               <HorizontalStack Background="DimGray" Height="Fit" Width="Stretched"  Margin="2">
                        <Popper Caption="File" Template="#Tests.ui.Popper.template" Width="Fit">
-                               <Border Fit="True" Foreground="Gray" Background="Jet">
+                               <Border Fit="True" Foreground="Gray" Background="DimGray">
                                        <VerticalStack Height="Fit" Width="Fit" Margin="2">
                                                <Label Text="New File" Style="#Tests.ui.MenuItem.style" />
                                                <Label Text="Open..." Style="#Tests.ui.MenuItem.style"/>
index e62abb7511b4fc24cc7dab6cc64350ee35907f71..6bc380ccc5985ac4e0a97c6da38e75634fe18198 100644 (file)
@@ -50,6 +50,8 @@ namespace Crow
                        R = _R.Clamp(0,1);
                        G = _G.Clamp(0,1);
                        B = _B.Clamp(0,1);
+                       predefinied = false;
+                       htmlCode = "";
                        Name = "";
                }
                internal Color(double _R, double _G, double _B, double _A, string _name)
@@ -58,7 +60,20 @@ namespace Crow
                        R = _R;
                        G = _G;
                        B = _B;
+                       predefinied = false;
                        Name = _name;
+                       htmlCode = "";
+                       ColorDic.Add(_name,this);
+               }
+               internal Color(int _R, int _G, int _B, string _name, string _code)
+               {
+                       A = 1.0;
+                       R = _R / 255.0;
+                       G = _G / 255.0;
+                       B = _B / 255.0;
+                       Name = _name;
+                       htmlCode = _code;
+                       predefinied = true;
                        ColorDic.Add(_name,this);
                }
                #endregion
@@ -68,7 +83,9 @@ namespace Crow
                /// </summary>
                public static Dictionary<string, Color> ColorDic = new Dictionary<string, Color>();
 
-               internal string Name;
+               public string Name;
+               public string htmlCode;
+               internal bool predefinied;
 
                #region public fields
         public double A;
@@ -86,15 +103,24 @@ namespace Crow
                {
                        if (string.IsNullOrEmpty(s))
                                return White;
+                       Color cc = default(Color);
+                       if (s.StartsWith ("#")) {
+                               cc.R = int.Parse (s.Substring (1, 2), System.Globalization.NumberStyles.HexNumber) / 255.0;
+                               cc.G = int.Parse (s.Substring (3, 2), System.Globalization.NumberStyles.HexNumber) / 255.0;
+                               cc.B = int.Parse (s.Substring (5, 2), System.Globalization.NumberStyles.HexNumber) / 255.0;
+                               if (s.Length > 7)
+                                       cc.A = int.Parse (s.Substring (7, 2), System.Globalization.NumberStyles.HexNumber) / 255.0;
+                               return cc;
+                       }
 
-                       string[] c = s.Split(new char[] { ',' });
-
-                       if (c.Length == 1)
-                       {
+                       if (char.IsLetter(s[0])){
                                if (ColorDic.ContainsKey (s))
                                        return ColorDic[s];
                                throw new Exception ("Unknown color name: " + s);
                        }
+
+                       string[] c = s.Split(new char[] { ',' });
+                                                       
                        return new Color(
                                double.Parse(c[0]),
                                double.Parse(c[1]),
@@ -114,6 +140,8 @@ namespace Crow
 
                public static bool operator ==(Color left, Color right)
                {
+                       if (left.predefinied & right.predefinied)
+                               return left.htmlCode == right.htmlCode;
                        return left.A != right.A ? false :
                                left.R != right.R ? false :
                                left.G != right.G ? false :
@@ -121,6 +149,8 @@ namespace Crow
                }
                public static bool operator !=(Color left, Color right)
                {
+                       if (left.predefinied & right.predefinied)
+                               return left.htmlCode != right.htmlCode;
                        return left.A == right.A ? false :
                                left.R == right.R ? false :
                                left.G == right.G ? false :
@@ -129,11 +159,15 @@ namespace Crow
                }
                public static bool operator ==(Color c, string n)
                {
-                       return string.Equals(c.Name, n, StringComparison.Ordinal);
+                       return n.StartsWith("#") ?
+                               string.Equals(c.HtmlCode, n, StringComparison.Ordinal) :
+                               string.Equals(c.Name, n, StringComparison.Ordinal);
                }
                public static bool operator !=(Color c, string n)
                {
-                       return !string.Equals(c.Name, n, StringComparison.Ordinal);
+                       return n.StartsWith("#") ?
+                               !string.Equals(c.HtmlCode, n, StringComparison.Ordinal) :
+                               !string.Equals(c.Name, n, StringComparison.Ordinal);
                }
                public static bool operator ==(string n, Color c)
                {
@@ -210,7 +244,17 @@ namespace Crow
                                return diff == 0 ? 0 : diff / max;
                        }
                }
-
+               public string HtmlCode {
+                       get { 
+                               string tmp = "#" +
+                                       ((int)Math.Round (R * 255.0)).ToString ("X2") +
+                                       ((int)Math.Round (G * 255.0)).ToString ("X2") +
+                                       ((int)Math.Round (B * 255.0)).ToString ("X2");
+                               if (A < 1.0)
+                                       tmp += ((int)Math.Round(A * 255.0)).ToString ("X2");
+                               return tmp;
+                       }
+               }
                public float[] floatArray
                {
                        get { return new float[]{ (float)R, (float)G, (float)B, (float)A }; }
@@ -226,896 +270,163 @@ namespace Crow
                }
                public void ResetName(){
                        Name = "";
+                       htmlCode = "";
                }
 
                #region Predefined colors
         public static readonly Color Transparent = new Color(0, 0, 0, 0, "Transparent");
                public static readonly Color Clear = new Color(-1, -1, -1, -1, "Clear");
-               public static readonly Color Green = new Color(0, 1.0, 0, 1.0, "Green");
-               public static readonly Color AirForceBlueRaf = new Color(0.364705882352941,0.541176470588235,0.658823529411765,1.0,"AirForceBlueRaf");
-               public static readonly Color AirForceBlueUsaf = new Color(0,0.188235294117647,0.56078431372549,1.0,"AirForceBlueUsaf");
-               public static readonly Color AirSuperiorityBlue = new Color(0.447058823529412,0.627450980392157,0.756862745098039,1.0,"AirSuperiorityBlue");
-               public static readonly Color AlabamaCrimson = new Color(0.63921568627451,0.149019607843137,0.219607843137255,1.0,"AlabamaCrimson");
-               public static readonly Color AliceBlue = new Color(0.941176470588235,0.972549019607843,1,1.0,"AliceBlue");
-               public static readonly Color AlizarinCrimson = new Color(0.890196078431373,0.149019607843137,0.211764705882353,1.0,"AlizarinCrimson");
-               public static readonly Color AlloyOrange = new Color(0.768627450980392,0.384313725490196,0.0627450980392157,1.0,"AlloyOrange");
-               public static readonly Color Almond = new Color(0.937254901960784,0.870588235294118,0.803921568627451,1.0,"Almond");
-               public static readonly Color Amaranth = new Color(0.898039215686275,0.168627450980392,0.313725490196078,1.0,"Amaranth");
-               public static readonly Color Amber = new Color(1,0.749019607843137,0,1.0,"Amber");
-               public static readonly Color AmberSaeEce = new Color(1,0.494117647058824,0,1.0,"AmberSaeEce");
-               public static readonly Color AmericanRose = new Color(1,0.0117647058823529,0.243137254901961,1.0,"AmericanRose");
-               public static readonly Color Amethyst = new Color(0.6,0.4,0.8,1.0,"Amethyst");
-               public static readonly Color AndroidGreen = new Color(0.643137254901961,0.776470588235294,0.223529411764706,1.0,"AndroidGreen");
-               public static readonly Color AntiFlashWhite = new Color(0.949019607843137,0.952941176470588,0.956862745098039,1.0,"AntiFlashWhite");
-               public static readonly Color AntiqueBrass = new Color(0.803921568627451,0.584313725490196,0.458823529411765,1.0,"AntiqueBrass");
-               public static readonly Color AntiqueFuchsia = new Color(0.568627450980392,0.36078431372549,0.513725490196078,1.0,"AntiqueFuchsia");
-               public static readonly Color AntiqueRuby = new Color(0.517647058823529,0.105882352941176,0.176470588235294,1.0,"AntiqueRuby");
-               public static readonly Color AntiqueWhite = new Color(0.980392156862745,0.92156862745098,0.843137254901961,1.0,"AntiqueWhite");
-               public static readonly Color AoEnglish = new Color(0,0.501960784313725,0,1.0,"AoEnglish");
-               public static readonly Color AppleGreen = new Color(0.552941176470588,0.713725490196078,0,1.0,"AppleGreen");
-               public static readonly Color Apricot = new Color(0.984313725490196,0.807843137254902,0.694117647058824,1.0,"Apricot");
-               public static readonly Color Aqua = new Color(0,1,1,1.0,"Aqua");
-               public static readonly Color Aquamarine = new Color(0.498039215686275,1,0.831372549019608,1.0,"Aquamarine");
-               public static readonly Color ArmyGreen = new Color(0.294117647058824,0.325490196078431,0.125490196078431,1.0,"ArmyGreen");
-               public static readonly Color Arsenic = new Color(0.231372549019608,0.266666666666667,0.294117647058824,1.0,"Arsenic");
-               public static readonly Color ArylideYellow = new Color(0.913725490196078,0.83921568627451,0.419607843137255,1.0,"ArylideYellow");
-               public static readonly Color AshGrey = new Color(0.698039215686274,0.745098039215686,0.709803921568627,1.0,"AshGrey");
-               public static readonly Color Asparagus = new Color(0.529411764705882,0.662745098039216,0.419607843137255,1.0,"Asparagus");
-               public static readonly Color AtomicTangerine = new Color(1,0.6,0.4,1.0,"AtomicTangerine");
-               public static readonly Color Auburn = new Color(0.647058823529412,0.164705882352941,0.164705882352941,1.0,"Auburn");
-               public static readonly Color Aureolin = new Color(0.992156862745098,0.933333333333333,0,1.0,"Aureolin");
-               public static readonly Color Aurometalsaurus = new Color(0.431372549019608,0.498039215686275,0.501960784313725,1.0,"Aurometalsaurus");
-               public static readonly Color Avocado = new Color(0.337254901960784,0.509803921568627,0.0117647058823529,1.0,"Avocado");
-               public static readonly Color Azure = new Color(0,0.498039215686275,1,1.0,"Azure");
-               public static readonly Color AzureMistWeb = new Color(0.941176470588235,1,1,1.0,"AzureMistWeb");
-               public static readonly Color BabyBlue = new Color(0.537254901960784,0.811764705882353,0.941176470588235,1.0,"BabyBlue");
-               public static readonly Color BabyBlueEyes = new Color(0.631372549019608,0.792156862745098,0.945098039215686,1.0,"BabyBlueEyes");
-               public static readonly Color BabyPink = new Color(0.956862745098039,0.76078431372549,0.76078431372549,1.0,"BabyPink");
-               public static readonly Color BallBlue = new Color(0.129411764705882,0.670588235294118,0.803921568627451,1.0,"BallBlue");
-               public static readonly Color BananaMania = new Color(0.980392156862745,0.905882352941176,0.709803921568627,1.0,"BananaMania");
-               public static readonly Color BananaYellow = new Color(1,0.882352941176471,0.207843137254902,1.0,"BananaYellow");
-               public static readonly Color BarnRed = new Color(0.486274509803922,0.0392156862745098,0.00784313725490196,1.0,"BarnRed");
-               public static readonly Color BattleshipGrey = new Color(0.517647058823529,0.517647058823529,0.509803921568627,1.0,"BattleshipGrey");
-               public static readonly Color Bazaar = new Color(0.596078431372549,0.466666666666667,0.482352941176471,1.0,"Bazaar");
-               public static readonly Color BeauBlue = new Color(0.737254901960784,0.831372549019608,0.901960784313726,1.0,"BeauBlue");
-               public static readonly Color Beaver = new Color(0.623529411764706,0.505882352941176,0.43921568627451,1.0,"Beaver");
-               public static readonly Color Beige = new Color(0.96078431372549,0.96078431372549,0.862745098039216,1.0,"Beige");
-               public static readonly Color BigDipORuby = new Color(0.611764705882353,0.145098039215686,0.258823529411765,1.0,"BigDipORuby");
-               public static readonly Color Bisque = new Color(1,0.894117647058824,0.768627450980392,1.0,"Bisque");
-               public static readonly Color Bistre = new Color(0.23921568627451,0.168627450980392,0.12156862745098,1.0,"Bistre");
-               public static readonly Color Bittersweet = new Color(0.996078431372549,0.435294117647059,0.368627450980392,1.0,"Bittersweet");
-               public static readonly Color BittersweetShimmer = new Color(0.749019607843137,0.309803921568627,0.317647058823529,1.0,"BittersweetShimmer");
-               public static readonly Color Black = new Color(0,0,0,1.0,"Black");
-               public static readonly Color BlackBean = new Color(0.23921568627451,0.0470588235294118,0.00784313725490196,1.0,"BlackBean");
-               public static readonly Color BlackLeatherJacket = new Color(0.145098039215686,0.207843137254902,0.16078431372549,1.0,"BlackLeatherJacket");
-               public static readonly Color BlackOlive = new Color(0.231372549019608,0.235294117647059,0.211764705882353,1.0,"BlackOlive");
-               public static readonly Color BlanchedAlmond = new Color(1,0.92156862745098,0.803921568627451,1.0,"BlanchedAlmond");
-               public static readonly Color BlastOffBronze = new Color(0.647058823529412,0.443137254901961,0.392156862745098,1.0,"BlastOffBronze");
-               public static readonly Color BleuDeFrance = new Color(0.192156862745098,0.549019607843137,0.905882352941176,1.0,"BleuDeFrance");
-               public static readonly Color BlizzardBlue = new Color(0.674509803921569,0.898039215686275,0.933333333333333,1.0,"BlizzardBlue");
-               public static readonly Color Blond = new Color(0.980392156862745,0.941176470588235,0.745098039215686,1.0,"Blond");
-               public static readonly Color Blue = new Color(0,0,1,1.0,"Blue");
-               public static readonly Color BlueBell = new Color(0.635294117647059,0.635294117647059,0.815686274509804,1.0,"BlueBell");
-               public static readonly Color BlueCrayola = new Color(0.12156862745098,0.458823529411765,0.996078431372549,1.0,"BlueCrayola");
-               public static readonly Color BlueGray = new Color(0.4,0.6,0.8,1.0,"BlueGray");
-               public static readonly Color BlueGreen = new Color(0.0509803921568627,0.596078431372549,0.729411764705882,1.0,"BlueGreen");
-               public static readonly Color BlueMunsell = new Color(0,0.576470588235294,0.686274509803922,1.0,"BlueMunsell");
-               public static readonly Color BlueNcs = new Color(0,0.529411764705882,0.741176470588235,1.0,"BlueNcs");
-               public static readonly Color BluePigment = new Color(0.2,0.2,0.6,1.0,"BluePigment");
-               public static readonly Color BlueRyb = new Color(0.00784313725490196,0.27843137254902,0.996078431372549,1.0,"BlueRyb");
-               public static readonly Color BlueSapphire = new Color(0.0705882352941176,0.380392156862745,0.501960784313725,1.0,"BlueSapphire");
-               public static readonly Color BlueViolet = new Color(0.541176470588235,0.168627450980392,0.886274509803922,1.0,"BlueViolet");
-               public static readonly Color Blush = new Color(0.870588235294118,0.364705882352941,0.513725490196078,1.0,"Blush");
-               public static readonly Color Bole = new Color(0.474509803921569,0.266666666666667,0.231372549019608,1.0,"Bole");
-               public static readonly Color BondiBlue = new Color(0,0.584313725490196,0.713725490196078,1.0,"BondiBlue");
-               public static readonly Color Bone = new Color(0.890196078431373,0.854901960784314,0.788235294117647,1.0,"Bone");
-               public static readonly Color BostonUniversityRed = new Color(0.8,0,0,1.0,"BostonUniversityRed");
-               public static readonly Color BottleGreen = new Color(0,0.415686274509804,0.305882352941176,1.0,"BottleGreen");
-               public static readonly Color Boysenberry = new Color(0.529411764705882,0.196078431372549,0.376470588235294,1.0,"Boysenberry");
-               public static readonly Color BrandeisBlue = new Color(0,0.43921568627451,1,1.0,"BrandeisBlue");
-               public static readonly Color Brass = new Color(0.709803921568627,0.650980392156863,0.258823529411765,1.0,"Brass");
-               public static readonly Color BrickRed = new Color(0.796078431372549,0.254901960784314,0.329411764705882,1.0,"BrickRed");
-               public static readonly Color BrightCerulean = new Color(0.113725490196078,0.674509803921569,0.83921568627451,1.0,"BrightCerulean");
-               public static readonly Color BrightGreen = new Color(0.4,1,0,1.0,"BrightGreen");
-               public static readonly Color BrightLavender = new Color(0.749019607843137,0.580392156862745,0.894117647058824,1.0,"BrightLavender");
-               public static readonly Color BrightMaroon = new Color(0.764705882352941,0.129411764705882,0.282352941176471,1.0,"BrightMaroon");
-               public static readonly Color BrightPink = new Color(1,0,0.498039215686275,1.0,"BrightPink");
-               public static readonly Color BrightTurquoise = new Color(0.0313725490196078,0.909803921568627,0.870588235294118,1.0,"BrightTurquoise");
-               public static readonly Color BrightUbe = new Color(0.819607843137255,0.623529411764706,0.909803921568627,1.0,"BrightUbe");
-               public static readonly Color BrilliantLavender = new Color(0.956862745098039,0.733333333333333,1,1.0,"BrilliantLavender");
-               public static readonly Color BrilliantRose = new Color(1,0.333333333333333,0.63921568627451,1.0,"BrilliantRose");
-               public static readonly Color BrinkPink = new Color(0.984313725490196,0.376470588235294,0.498039215686275,1.0,"BrinkPink");
-               public static readonly Color BritishRacingGreen = new Color(0,0.258823529411765,0.145098039215686,1.0,"BritishRacingGreen");
-               public static readonly Color Bronze = new Color(0.803921568627451,0.498039215686275,0.196078431372549,1.0,"Bronze");
-               public static readonly Color BrownTraditional = new Color(0.588235294117647,0.294117647058824,0,1.0,"BrownTraditional");
-               public static readonly Color BrownWeb = new Color(0.647058823529412,0.164705882352941,0.164705882352941,1.0,"BrownWeb");
-               public static readonly Color BubbleGum = new Color(1,0.756862745098039,0.8,1.0,"BubbleGum");
-               public static readonly Color Bubbles = new Color(0.905882352941176,0.996078431372549,1,1.0,"Bubbles");
-               public static readonly Color Buff = new Color(0.941176470588235,0.862745098039216,0.509803921568627,1.0,"Buff");
-               public static readonly Color BulgarianRose = new Color(0.282352941176471,0.0235294117647059,0.0274509803921569,1.0,"BulgarianRose");
-               public static readonly Color Burgundy = new Color(0.501960784313725,0,0.125490196078431,1.0,"Burgundy");
-               public static readonly Color Burlywood = new Color(0.870588235294118,0.72156862745098,0.529411764705882,1.0,"Burlywood");
-               public static readonly Color BurntOrange = new Color(0.8,0.333333333333333,0,1.0,"BurntOrange");
-               public static readonly Color BurntSienna = new Color(0.913725490196078,0.454901960784314,0.317647058823529,1.0,"BurntSienna");
-               public static readonly Color BurntUmber = new Color(0.541176470588235,0.2,0.141176470588235,1.0,"BurntUmber");
-               public static readonly Color Byzantine = new Color(0.741176470588235,0.2,0.643137254901961,1.0,"Byzantine");
-               public static readonly Color Byzantium = new Color(0.43921568627451,0.16078431372549,0.388235294117647,1.0,"Byzantium");
-               public static readonly Color Cadet = new Color(0.325490196078431,0.407843137254902,0.447058823529412,1.0,"Cadet");
-               public static readonly Color CadetBlue = new Color(0.372549019607843,0.619607843137255,0.627450980392157,1.0,"CadetBlue");
-               public static readonly Color CadetGrey = new Color(0.568627450980392,0.63921568627451,0.690196078431373,1.0,"CadetGrey");
-               public static readonly Color CadmiumGreen = new Color(0,0.419607843137255,0.235294117647059,1.0,"CadmiumGreen");
-               public static readonly Color CadmiumOrange = new Color(0.929411764705882,0.529411764705882,0.176470588235294,1.0,"CadmiumOrange");
-               public static readonly Color CadmiumRed = new Color(0.890196078431373,0,0.133333333333333,1.0,"CadmiumRed");
-               public static readonly Color CadmiumYellow = new Color(1,0.964705882352941,0,1.0,"CadmiumYellow");
-               public static readonly Color CafAuLait = new Color(0.650980392156863,0.482352941176471,0.356862745098039,1.0,"CafAuLait");
-               public static readonly Color CafNoir = new Color(0.294117647058824,0.211764705882353,0.129411764705882,1.0,"CafNoir");
-               public static readonly Color CalPolyGreen = new Color(0.117647058823529,0.301960784313725,0.168627450980392,1.0,"CalPolyGreen");
-               public static readonly Color CambridgeBlue = new Color(0.63921568627451,0.756862745098039,0.67843137254902,1.0,"CambridgeBlue");
-               public static readonly Color Camel = new Color(0.756862745098039,0.603921568627451,0.419607843137255,1.0,"Camel");
-               public static readonly Color CameoPink = new Color(0.937254901960784,0.733333333333333,0.8,1.0,"CameoPink");
-               public static readonly Color CamouflageGreen = new Color(0.470588235294118,0.525490196078431,0.419607843137255,1.0,"CamouflageGreen");
-               public static readonly Color CanaryYellow = new Color(1,0.937254901960784,0,1.0,"CanaryYellow");
-               public static readonly Color CandyAppleRed = new Color(1,0.0313725490196078,0,1.0,"CandyAppleRed");
-               public static readonly Color CandyPink = new Color(0.894117647058824,0.443137254901961,0.47843137254902,1.0,"CandyPink");
-               public static readonly Color Capri = new Color(0,0.749019607843137,1,1.0,"Capri");
-               public static readonly Color CaputMortuum = new Color(0.349019607843137,0.152941176470588,0.125490196078431,1.0,"CaputMortuum");
-               public static readonly Color Cardinal = new Color(0.768627450980392,0.117647058823529,0.227450980392157,1.0,"Cardinal");
-               public static readonly Color CaribbeanGreen = new Color(0,0.8,0.6,1.0,"CaribbeanGreen");
-               public static readonly Color Carmine = new Color(0.588235294117647,0,0.0941176470588235,1.0,"Carmine");
-               public static readonly Color CarmineMP = new Color(0.843137254901961,0,0.250980392156863,1.0,"CarmineMP");
-               public static readonly Color CarminePink = new Color(0.92156862745098,0.298039215686275,0.258823529411765,1.0,"CarminePink");
-               public static readonly Color CarmineRed = new Color(1,0,0.219607843137255,1.0,"CarmineRed");
-               public static readonly Color CarnationPink = new Color(1,0.650980392156863,0.788235294117647,1.0,"CarnationPink");
-               public static readonly Color Carnelian = new Color(0.701960784313725,0.105882352941176,0.105882352941176,1.0,"Carnelian");
-               public static readonly Color CarolinaBlue = new Color(0.6,0.729411764705882,0.866666666666667,1.0,"CarolinaBlue");
-               public static readonly Color CarrotOrange = new Color(0.929411764705882,0.568627450980392,0.129411764705882,1.0,"CarrotOrange");
-               public static readonly Color CatalinaBlue = new Color(0.0235294117647059,0.164705882352941,0.470588235294118,1.0,"CatalinaBlue");
-               public static readonly Color Ceil = new Color(0.572549019607843,0.631372549019608,0.811764705882353,1.0,"Ceil");
-               public static readonly Color Celadon = new Color(0.674509803921569,0.882352941176471,0.686274509803922,1.0,"Celadon");
-               public static readonly Color CeladonBlue = new Color(0,0.482352941176471,0.654901960784314,1.0,"CeladonBlue");
-               public static readonly Color CeladonGreen = new Color(0.184313725490196,0.517647058823529,0.486274509803922,1.0,"CeladonGreen");
-               public static readonly Color CelesteColour = new Color(0.698039215686274,1,1,1.0,"CelesteColour");
-               public static readonly Color CelestialBlue = new Color(0.286274509803922,0.592156862745098,0.815686274509804,1.0,"CelestialBlue");
-               public static readonly Color Cerise = new Color(0.870588235294118,0.192156862745098,0.388235294117647,1.0,"Cerise");
-               public static readonly Color CerisePink = new Color(0.925490196078431,0.231372549019608,0.513725490196078,1.0,"CerisePink");
-               public static readonly Color Cerulean = new Color(0,0.482352941176471,0.654901960784314,1.0,"Cerulean");
-               public static readonly Color CeruleanBlue = new Color(0.164705882352941,0.32156862745098,0.745098039215686,1.0,"CeruleanBlue");
-               public static readonly Color CeruleanFrost = new Color(0.427450980392157,0.607843137254902,0.764705882352941,1.0,"CeruleanFrost");
-               public static readonly Color CgBlue = new Color(0,0.47843137254902,0.647058823529412,1.0,"CgBlue");
-               public static readonly Color CgRed = new Color(0.87843137254902,0.235294117647059,0.192156862745098,1.0,"CgRed");
-               public static readonly Color Chamoisee = new Color(0.627450980392157,0.470588235294118,0.352941176470588,1.0,"Chamoisee");
-               public static readonly Color Champagne = new Color(0.980392156862745,0.83921568627451,0.647058823529412,1.0,"Champagne");
-               public static readonly Color Charcoal = new Color(0.211764705882353,0.270588235294118,0.309803921568627,1.0,"Charcoal");
-               public static readonly Color CharmPink = new Color(0.901960784313726,0.56078431372549,0.674509803921569,1.0,"CharmPink");
-               public static readonly Color ChartreuseTraditional = new Color(0.874509803921569,1,0,1.0,"ChartreuseTraditional");
-               public static readonly Color ChartreuseWeb = new Color(0.498039215686275,1,0,1.0,"ChartreuseWeb");
-               public static readonly Color Cherry = new Color(0.870588235294118,0.192156862745098,0.388235294117647,1.0,"Cherry");
-               public static readonly Color CherryBlossomPink = new Color(1,0.717647058823529,0.772549019607843,1.0,"CherryBlossomPink");
-               public static readonly Color Chestnut = new Color(0.803921568627451,0.36078431372549,0.36078431372549,1.0,"Chestnut");
-               public static readonly Color ChinaPink = new Color(0.870588235294118,0.435294117647059,0.631372549019608,1.0,"ChinaPink");
-               public static readonly Color ChinaRose = new Color(0.658823529411765,0.317647058823529,0.431372549019608,1.0,"ChinaRose");
-               public static readonly Color ChineseRed = new Color(0.666666666666667,0.219607843137255,0.117647058823529,1.0,"ChineseRed");
-               public static readonly Color ChocolateTraditional = new Color(0.482352941176471,0.247058823529412,0,1.0,"ChocolateTraditional");
-               public static readonly Color ChocolateWeb = new Color(0.823529411764706,0.411764705882353,0.117647058823529,1.0,"ChocolateWeb");
-               public static readonly Color ChromeYellow = new Color(1,0.654901960784314,0,1.0,"ChromeYellow");
-               public static readonly Color Cinereous = new Color(0.596078431372549,0.505882352941176,0.482352941176471,1.0,"Cinereous");
-               public static readonly Color Cinnabar = new Color(0.890196078431373,0.258823529411765,0.203921568627451,1.0,"Cinnabar");
-               public static readonly Color Cinnamon = new Color(0.823529411764706,0.411764705882353,0.117647058823529,1.0,"Cinnamon");
-               public static readonly Color Citrine = new Color(0.894117647058824,0.815686274509804,0.0392156862745098,1.0,"Citrine");
-               public static readonly Color ClassicRose = new Color(0.984313725490196,0.8,0.905882352941176,1.0,"ClassicRose");
-               public static readonly Color Cobalt = new Color(0,0.27843137254902,0.670588235294118,1.0,"Cobalt");
-               public static readonly Color CocoaBrown = new Color(0.823529411764706,0.411764705882353,0.117647058823529,1.0,"CocoaBrown");
-               public static readonly Color Coffee = new Color(0.435294117647059,0.305882352941176,0.215686274509804,1.0,"Coffee");
-               public static readonly Color ColumbiaBlue = new Color(0.607843137254902,0.866666666666667,1,1.0,"ColumbiaBlue");
-               public static readonly Color CongoPink = new Color(0.972549019607843,0.513725490196078,0.474509803921569,1.0,"CongoPink");
-               public static readonly Color CoolBlack = new Color(0,0.180392156862745,0.388235294117647,1.0,"CoolBlack");
-               public static readonly Color CoolGrey = new Color(0.549019607843137,0.572549019607843,0.674509803921569,1.0,"CoolGrey");
-               public static readonly Color Copper = new Color(0.72156862745098,0.450980392156863,0.2,1.0,"Copper");
-               public static readonly Color CopperCrayola = new Color(0.854901960784314,0.541176470588235,0.403921568627451,1.0,"CopperCrayola");
-               public static readonly Color CopperPenny = new Color(0.67843137254902,0.435294117647059,0.411764705882353,1.0,"CopperPenny");
-               public static readonly Color CopperRed = new Color(0.796078431372549,0.427450980392157,0.317647058823529,1.0,"CopperRed");
-               public static readonly Color CopperRose = new Color(0.6,0.4,0.4,1.0,"CopperRose");
-               public static readonly Color Coquelicot = new Color(1,0.219607843137255,0,1.0,"Coquelicot");
-               public static readonly Color Coral = new Color(1,0.498039215686275,0.313725490196078,1.0,"Coral");
-               public static readonly Color CoralPink = new Color(0.972549019607843,0.513725490196078,0.474509803921569,1.0,"CoralPink");
-               public static readonly Color CoralRed = new Color(1,0.250980392156863,0.250980392156863,1.0,"CoralRed");
-               public static readonly Color Cordovan = new Color(0.537254901960784,0.247058823529412,0.270588235294118,1.0,"Cordovan");
-               public static readonly Color Corn = new Color(0.984313725490196,0.925490196078431,0.364705882352941,1.0,"Corn");
-               public static readonly Color CornellRed = new Color(0.701960784313725,0.105882352941176,0.105882352941176,1.0,"CornellRed");
-               public static readonly Color CornflowerBlue = new Color(0.392156862745098,0.584313725490196,0.929411764705882,1.0,"CornflowerBlue");
-               public static readonly Color Cornsilk = new Color(1,0.972549019607843,0.862745098039216,1.0,"Cornsilk");
-               public static readonly Color CosmicLatte = new Color(1,0.972549019607843,0.905882352941176,1.0,"CosmicLatte");
-               public static readonly Color CottonCandy = new Color(1,0.737254901960784,0.850980392156863,1.0,"CottonCandy");
-               public static readonly Color Cream = new Color(1,0.992156862745098,0.815686274509804,1.0,"Cream");
-               public static readonly Color Crimson = new Color(0.862745098039216,0.0784313725490196,0.235294117647059,1.0,"Crimson");
-               public static readonly Color CrimsonGlory = new Color(0.745098039215686,0,0.196078431372549,1.0,"CrimsonGlory");
-               public static readonly Color Cyan = new Color(0,1,1,1.0,"Cyan");
-               public static readonly Color CyanProcess = new Color(0,0.717647058823529,0.92156862745098,1.0,"CyanProcess");
-               public static readonly Color Daffodil = new Color(1,1,0.192156862745098,1.0,"Daffodil");
-               public static readonly Color Dandelion = new Color(0.941176470588235,0.882352941176471,0.188235294117647,1.0,"Dandelion");
-               public static readonly Color DarkBlue = new Color(0,0,0.545098039215686,1.0,"DarkBlue");
-               public static readonly Color DarkBrown = new Color(0.396078431372549,0.262745098039216,0.129411764705882,1.0,"DarkBrown");
-               public static readonly Color DarkByzantium = new Color(0.364705882352941,0.223529411764706,0.329411764705882,1.0,"DarkByzantium");
-               public static readonly Color DarkCandyAppleRed = new Color(0.643137254901961,0,0,1.0,"DarkCandyAppleRed");
-               public static readonly Color DarkCerulean = new Color(0.0313725490196078,0.270588235294118,0.494117647058824,1.0,"DarkCerulean");
-               public static readonly Color DarkChestnut = new Color(0.596078431372549,0.411764705882353,0.376470588235294,1.0,"DarkChestnut");
-               public static readonly Color DarkCoral = new Color(0.803921568627451,0.356862745098039,0.270588235294118,1.0,"DarkCoral");
-               public static readonly Color DarkCyan = new Color(0,0.545098039215686,0.545098039215686,1.0,"DarkCyan");
-               public static readonly Color DarkElectricBlue = new Color(0.325490196078431,0.407843137254902,0.470588235294118,1.0,"DarkElectricBlue");
-               public static readonly Color DarkGoldenrod = new Color(0.72156862745098,0.525490196078431,0.0431372549019608,1.0,"DarkGoldenrod");
-               public static readonly Color DarkGray = new Color(0.662745098039216,0.662745098039216,0.662745098039216,1.0,"DarkGray");
-               public static readonly Color DarkGreen = new Color(0.00392156862745098,0.196078431372549,0.125490196078431,1.0,"DarkGreen");
-               public static readonly Color DarkImperialBlue = new Color(0,0.254901960784314,0.415686274509804,1.0,"DarkImperialBlue");
-               public static readonly Color DarkJungleGreen = new Color(0.101960784313725,0.141176470588235,0.129411764705882,1.0,"DarkJungleGreen");
-               public static readonly Color DarkKhaki = new Color(0.741176470588235,0.717647058823529,0.419607843137255,1.0,"DarkKhaki");
-               public static readonly Color DarkLava = new Color(0.282352941176471,0.235294117647059,0.196078431372549,1.0,"DarkLava");
-               public static readonly Color DarkLavender = new Color(0.450980392156863,0.309803921568627,0.588235294117647,1.0,"DarkLavender");
-               public static readonly Color DarkMagenta = new Color(0.545098039215686,0,0.545098039215686,1.0,"DarkMagenta");
-               public static readonly Color DarkMidnightBlue = new Color(0,0.2,0.4,1.0,"DarkMidnightBlue");
-               public static readonly Color DarkOliveGreen = new Color(0.333333333333333,0.419607843137255,0.184313725490196,1.0,"DarkOliveGreen");
-               public static readonly Color DarkOrange = new Color(1,0.549019607843137,0,1.0,"DarkOrange");
-               public static readonly Color DarkOrchid = new Color(0.6,0.196078431372549,0.8,1.0,"DarkOrchid");
-               public static readonly Color DarkPastelBlue = new Color(0.466666666666667,0.619607843137255,0.796078431372549,1.0,"DarkPastelBlue");
-               public static readonly Color DarkPastelGreen = new Color(0.0117647058823529,0.752941176470588,0.235294117647059,1.0,"DarkPastelGreen");
-               public static readonly Color DarkPastelPurple = new Color(0.588235294117647,0.435294117647059,0.83921568627451,1.0,"DarkPastelPurple");
-               public static readonly Color DarkPastelRed = new Color(0.76078431372549,0.231372549019608,0.133333333333333,1.0,"DarkPastelRed");
-               public static readonly Color DarkPink = new Color(0.905882352941176,0.329411764705882,0.501960784313725,1.0,"DarkPink");
-               public static readonly Color DarkPowderBlue = new Color(0,0.2,0.6,1.0,"DarkPowderBlue");
-               public static readonly Color DarkRaspberry = new Color(0.529411764705882,0.149019607843137,0.341176470588235,1.0,"DarkRaspberry");
-               public static readonly Color DarkRed = new Color(0.545098039215686,0,0,1.0,"DarkRed");
-               public static readonly Color DarkSalmon = new Color(0.913725490196078,0.588235294117647,0.47843137254902,1.0,"DarkSalmon");
-               public static readonly Color DarkScarlet = new Color(0.337254901960784,0.0117647058823529,0.0980392156862745,1.0,"DarkScarlet");
-               public static readonly Color DarkSeaGreen = new Color(0.56078431372549,0.737254901960784,0.56078431372549,1.0,"DarkSeaGreen");
-               public static readonly Color DarkSienna = new Color(0.235294117647059,0.0784313725490196,0.0784313725490196,1.0,"DarkSienna");
-               public static readonly Color DarkSlateBlue = new Color(0.282352941176471,0.23921568627451,0.545098039215686,1.0,"DarkSlateBlue");
-               public static readonly Color DarkSlateGray = new Color(0.184313725490196,0.309803921568627,0.309803921568627,1.0,"DarkSlateGray");
-               public static readonly Color DarkSpringGreen = new Color(0.0901960784313725,0.447058823529412,0.270588235294118,1.0,"DarkSpringGreen");
-               public static readonly Color DarkTan = new Color(0.568627450980392,0.505882352941176,0.317647058823529,1.0,"DarkTan");
-               public static readonly Color DarkTangerine = new Color(1,0.658823529411765,0.0705882352941176,1.0,"DarkTangerine");
-               public static readonly Color DarkTaupe = new Color(0.282352941176471,0.235294117647059,0.196078431372549,1.0,"DarkTaupe");
-               public static readonly Color DarkTerraCotta = new Color(0.8,0.305882352941176,0.36078431372549,1.0,"DarkTerraCotta");
-               public static readonly Color DarkTurquoise = new Color(0,0.807843137254902,0.819607843137255,1.0,"DarkTurquoise");
-               public static readonly Color DarkViolet = new Color(0.580392156862745,0,0.827450980392157,1.0,"DarkViolet");
-               public static readonly Color DarkYellow = new Color(0.607843137254902,0.529411764705882,0.0470588235294118,1.0,"DarkYellow");
-               public static readonly Color DartmouthGreen = new Color(0,0.43921568627451,0.235294117647059,1.0,"DartmouthGreen");
-               public static readonly Color DavySGrey = new Color(0.333333333333333,0.333333333333333,0.333333333333333,1.0,"DavySGrey");
-               public static readonly Color DebianRed = new Color(0.843137254901961,0.0392156862745098,0.325490196078431,1.0,"DebianRed");
-               public static readonly Color DeepCarmine = new Color(0.662745098039216,0.125490196078431,0.243137254901961,1.0,"DeepCarmine");
-               public static readonly Color DeepCarminePink = new Color(0.937254901960784,0.188235294117647,0.219607843137255,1.0,"DeepCarminePink");
-               public static readonly Color DeepCarrotOrange = new Color(0.913725490196078,0.411764705882353,0.172549019607843,1.0,"DeepCarrotOrange");
-               public static readonly Color DeepCerise = new Color(0.854901960784314,0.196078431372549,0.529411764705882,1.0,"DeepCerise");
-               public static readonly Color DeepChampagne = new Color(0.980392156862745,0.83921568627451,0.647058823529412,1.0,"DeepChampagne");
-               public static readonly Color DeepChestnut = new Color(0.725490196078431,0.305882352941176,0.282352941176471,1.0,"DeepChestnut");
-               public static readonly Color DeepCoffee = new Color(0.43921568627451,0.258823529411765,0.254901960784314,1.0,"DeepCoffee");
-               public static readonly Color DeepFuchsia = new Color(0.756862745098039,0.329411764705882,0.756862745098039,1.0,"DeepFuchsia");
-               public static readonly Color DeepJungleGreen = new Color(0,0.294117647058824,0.286274509803922,1.0,"DeepJungleGreen");
-               public static readonly Color DeepLilac = new Color(0.6,0.333333333333333,0.733333333333333,1.0,"DeepLilac");
-               public static readonly Color DeepMagenta = new Color(0.8,0,0.8,1.0,"DeepMagenta");
-               public static readonly Color DeepPeach = new Color(1,0.796078431372549,0.643137254901961,1.0,"DeepPeach");
-               public static readonly Color DeepPink = new Color(1,0.0784313725490196,0.576470588235294,1.0,"DeepPink");
-               public static readonly Color DeepRuby = new Color(0.517647058823529,0.247058823529412,0.356862745098039,1.0,"DeepRuby");
-               public static readonly Color DeepSaffron = new Color(1,0.6,0.2,1.0,"DeepSaffron");
-               public static readonly Color DeepSkyBlue = new Color(0,0.749019607843137,1,1.0,"DeepSkyBlue");
-               public static readonly Color DeepTuscanRed = new Color(0.4,0.258823529411765,0.301960784313725,1.0,"DeepTuscanRed");
-               public static readonly Color Denim = new Color(0.0823529411764706,0.376470588235294,0.741176470588235,1.0,"Denim");
-               public static readonly Color Desert = new Color(0.756862745098039,0.603921568627451,0.419607843137255,1.0,"Desert");
-               public static readonly Color DesertSand = new Color(0.929411764705882,0.788235294117647,0.686274509803922,1.0,"DesertSand");
-               public static readonly Color DimGray = new Color(0.411764705882353,0.411764705882353,0.411764705882353,1.0,"DimGray");
-               public static readonly Color DodgerBlue = new Color(0.117647058823529,0.564705882352941,1,1.0,"DodgerBlue");
-               public static readonly Color DogwoodRose = new Color(0.843137254901961,0.0941176470588235,0.407843137254902,1.0,"DogwoodRose");
-               public static readonly Color DollarBill = new Color(0.52156862745098,0.733333333333333,0.396078431372549,1.0,"DollarBill");
-               public static readonly Color Drab = new Color(0.588235294117647,0.443137254901961,0.0901960784313725,1.0,"Drab");
-               public static readonly Color DukeBlue = new Color(0,0,0.611764705882353,1.0,"DukeBlue");
-               public static readonly Color EarthYellow = new Color(0.882352941176471,0.662745098039216,0.372549019607843,1.0,"EarthYellow");
-               public static readonly Color Ebony = new Color(0.333333333333333,0.364705882352941,0.313725490196078,1.0,"Ebony");
-               public static readonly Color Ecru = new Color(0.76078431372549,0.698039215686274,0.501960784313725,1.0,"Ecru");
-               public static readonly Color Eggplant = new Color(0.380392156862745,0.250980392156863,0.317647058823529,1.0,"Eggplant");
-               public static readonly Color Eggshell = new Color(0.941176470588235,0.917647058823529,0.83921568627451,1.0,"Eggshell");
-               public static readonly Color EgyptianBlue = new Color(0.0627450980392157,0.203921568627451,0.650980392156863,1.0,"EgyptianBlue");
-               public static readonly Color ElectricBlue = new Color(0.490196078431373,0.976470588235294,1,1.0,"ElectricBlue");
-               public static readonly Color ElectricCrimson = new Color(1,0,0.247058823529412,1.0,"ElectricCrimson");
-               public static readonly Color ElectricCyan = new Color(0,1,1,1.0,"ElectricCyan");
-               public static readonly Color ElectricGreen = new Color(0,1,0,1.0,"ElectricGreen");
-               public static readonly Color ElectricIndigo = new Color(0.435294117647059,0,1,1.0,"ElectricIndigo");
-               public static readonly Color ElectricLavender = new Color(0.956862745098039,0.733333333333333,1,1.0,"ElectricLavender");
-               public static readonly Color ElectricLime = new Color(0.8,1,0,1.0,"ElectricLime");
-               public static readonly Color ElectricPurple = new Color(0.749019607843137,0,1,1.0,"ElectricPurple");
-               public static readonly Color ElectricUltramarine = new Color(0.247058823529412,0,1,1.0,"ElectricUltramarine");
-               public static readonly Color ElectricViolet = new Color(0.56078431372549,0,1,1.0,"ElectricViolet");
-               public static readonly Color ElectricYellow = new Color(1,1,0,1.0,"ElectricYellow");
-               public static readonly Color Emerald = new Color(0.313725490196078,0.784313725490196,0.470588235294118,1.0,"Emerald");
-               public static readonly Color EnglishLavender = new Color(0.705882352941177,0.513725490196078,0.584313725490196,1.0,"EnglishLavender");
-               public static readonly Color EtonBlue = new Color(0.588235294117647,0.784313725490196,0.635294117647059,1.0,"EtonBlue");
-               public static readonly Color Fallow = new Color(0.756862745098039,0.603921568627451,0.419607843137255,1.0,"Fallow");
-               public static readonly Color FaluRed = new Color(0.501960784313725,0.0941176470588235,0.0941176470588235,1.0,"FaluRed");
-               public static readonly Color Fandango = new Color(0.709803921568627,0.2,0.537254901960784,1.0,"Fandango");
-               public static readonly Color FashionFuchsia = new Color(0.956862745098039,0,0.631372549019608,1.0,"FashionFuchsia");
-               public static readonly Color Fawn = new Color(0.898039215686275,0.666666666666667,0.43921568627451,1.0,"Fawn");
-               public static readonly Color Feldgrau = new Color(0.301960784313725,0.364705882352941,0.325490196078431,1.0,"Feldgrau");
-               public static readonly Color FernGreen = new Color(0.309803921568627,0.474509803921569,0.258823529411765,1.0,"FernGreen");
-               public static readonly Color FerrariRed = new Color(1,0.156862745098039,0,1.0,"FerrariRed");
-               public static readonly Color FieldDrab = new Color(0.423529411764706,0.329411764705882,0.117647058823529,1.0,"FieldDrab");
-               public static readonly Color FireEngineRed = new Color(0.807843137254902,0.125490196078431,0.16078431372549,1.0,"FireEngineRed");
-               public static readonly Color Firebrick = new Color(0.698039215686274,0.133333333333333,0.133333333333333,1.0,"Firebrick");
-               public static readonly Color Flame = new Color(0.886274509803922,0.345098039215686,0.133333333333333,1.0,"Flame");
-               public static readonly Color FlamingoPink = new Color(0.988235294117647,0.556862745098039,0.674509803921569,1.0,"FlamingoPink");
-               public static readonly Color Flavescent = new Color(0.968627450980392,0.913725490196078,0.556862745098039,1.0,"Flavescent");
-               public static readonly Color Flax = new Color(0.933333333333333,0.862745098039216,0.509803921568627,1.0,"Flax");
-               public static readonly Color FloralWhite = new Color(1,0.980392156862745,0.941176470588235,1.0,"FloralWhite");
-               public static readonly Color FluorescentOrange = new Color(1,0.749019607843137,0,1.0,"FluorescentOrange");
-               public static readonly Color FluorescentPink = new Color(1,0.0784313725490196,0.576470588235294,1.0,"FluorescentPink");
-               public static readonly Color FluorescentYellow = new Color(0.8,1,0,1.0,"FluorescentYellow");
-               public static readonly Color Folly = new Color(1,0,0.309803921568627,1.0,"Folly");
-               public static readonly Color ForestGreenTraditional = new Color(0.00392156862745098,0.266666666666667,0.129411764705882,1.0,"ForestGreenTraditional");
-               public static readonly Color ForestGreenWeb = new Color(0.133333333333333,0.545098039215686,0.133333333333333,1.0,"ForestGreenWeb");
-               public static readonly Color FrenchBeige = new Color(0.650980392156863,0.482352941176471,0.356862745098039,1.0,"FrenchBeige");
-               public static readonly Color FrenchBlue = new Color(0,0.447058823529412,0.733333333333333,1.0,"FrenchBlue");
-               public static readonly Color FrenchLilac = new Color(0.525490196078431,0.376470588235294,0.556862745098039,1.0,"FrenchLilac");
-               public static readonly Color FrenchLime = new Color(0.8,1,0,1.0,"FrenchLime");
-               public static readonly Color FrenchRaspberry = new Color(0.780392156862745,0.172549019607843,0.282352941176471,1.0,"FrenchRaspberry");
-               public static readonly Color FrenchRose = new Color(0.964705882352941,0.290196078431373,0.541176470588235,1.0,"FrenchRose");
-               public static readonly Color Fuchsia = new Color(1,0,1,1.0,"Fuchsia");
-               public static readonly Color FuchsiaCrayola = new Color(0.756862745098039,0.329411764705882,0.756862745098039,1.0,"FuchsiaCrayola");
-               public static readonly Color FuchsiaPink = new Color(1,0.466666666666667,1,1.0,"FuchsiaPink");
-               public static readonly Color FuchsiaRose = new Color(0.780392156862745,0.262745098039216,0.458823529411765,1.0,"FuchsiaRose");
-               public static readonly Color Fulvous = new Color(0.894117647058824,0.517647058823529,0,1.0,"Fulvous");
-               public static readonly Color FuzzyWuzzy = new Color(0.8,0.4,0.4,1.0,"FuzzyWuzzy");
-               public static readonly Color Gainsboro = new Color(0.862745098039216,0.862745098039216,0.862745098039216,1.0,"Gainsboro");
-               public static readonly Color Gamboge = new Color(0.894117647058824,0.607843137254902,0.0588235294117647,1.0,"Gamboge");
-               public static readonly Color GhostWhite = new Color(0.972549019607843,0.972549019607843,1,1.0,"GhostWhite");
-               public static readonly Color Ginger = new Color(0.690196078431373,0.396078431372549,0,1.0,"Ginger");
-               public static readonly Color Glaucous = new Color(0.376470588235294,0.509803921568627,0.713725490196078,1.0,"Glaucous");
-               public static readonly Color Glitter = new Color(0.901960784313726,0.909803921568627,0.980392156862745,1.0,"Glitter");
-               public static readonly Color GoldMetallic = new Color(0.831372549019608,0.686274509803922,0.215686274509804,1.0,"GoldMetallic");
-               public static readonly Color GoldWebGolden = new Color(1,0.843137254901961,0,1.0,"GoldWebGolden");
-               public static readonly Color GoldenBrown = new Color(0.6,0.396078431372549,0.0823529411764706,1.0,"GoldenBrown");
-               public static readonly Color GoldenPoppy = new Color(0.988235294117647,0.76078431372549,0,1.0,"GoldenPoppy");
-               public static readonly Color GoldenYellow = new Color(1,0.874509803921569,0,1.0,"GoldenYellow");
-               public static readonly Color Goldenrod = new Color(0.854901960784314,0.647058823529412,0.125490196078431,1.0,"Goldenrod");
-               public static readonly Color GrannySmithApple = new Color(0.658823529411765,0.894117647058824,0.627450980392157,1.0,"GrannySmithApple");
-               public static readonly Color Gray = new Color(0.501960784313725,0.501960784313725,0.501960784313725,1.0,"Gray");
-               public static readonly Color GrayAsparagus = new Color(0.274509803921569,0.349019607843137,0.270588235294118,1.0,"GrayAsparagus");
-               public static readonly Color GrayHtmlCssGray = new Color(0.501960784313725,0.501960784313725,0.501960784313725,1.0,"GrayHtmlCssGray");
-               public static readonly Color GrayX11Gray = new Color(0.745098039215686,0.745098039215686,0.745098039215686,1.0,"GrayX11Gray");
-               public static readonly Color GreenColorWheelX11Green = new Color(0,1,0,1.0,"GreenColorWheelX11Green");
-               public static readonly Color GreenCrayola = new Color(0.109803921568627,0.674509803921569,0.470588235294118,1.0,"GreenCrayola");
-               public static readonly Color GreenHtmlCssGreen = new Color(0,0.501960784313725,0,1.0,"GreenHtmlCssGreen");
-               public static readonly Color GreenMunsell = new Color(0,0.658823529411765,0.466666666666667,1.0,"GreenMunsell");
-               public static readonly Color GreenNcs = new Color(0,0.623529411764706,0.419607843137255,1.0,"GreenNcs");
-               public static readonly Color GreenPigment = new Color(0,0.647058823529412,0.313725490196078,1.0,"GreenPigment");
-               public static readonly Color GreenRyb = new Color(0.4,0.690196078431373,0.196078431372549,1.0,"GreenRyb");
-               public static readonly Color GreenYellow = new Color(0.67843137254902,1,0.184313725490196,1.0,"GreenYellow");
-               public static readonly Color Grullo = new Color(0.662745098039216,0.603921568627451,0.525490196078431,1.0,"Grullo");
-               public static readonly Color GuppieGreen = new Color(0,1,0.498039215686275,1.0,"GuppieGreen");
-               public static readonly Color HalayBe = new Color(0.4,0.219607843137255,0.329411764705882,1.0,"HalayBe");
-               public static readonly Color HanBlue = new Color(0.266666666666667,0.423529411764706,0.811764705882353,1.0,"HanBlue");
-               public static readonly Color HanPurple = new Color(0.32156862745098,0.0941176470588235,0.980392156862745,1.0,"HanPurple");
-               public static readonly Color HansaYellow = new Color(0.913725490196078,0.83921568627451,0.419607843137255,1.0,"HansaYellow");
-               public static readonly Color Harlequin = new Color(0.247058823529412,1,0,1.0,"Harlequin");
-               public static readonly Color HarvardCrimson = new Color(0.788235294117647,0,0.0862745098039216,1.0,"HarvardCrimson");
-               public static readonly Color HarvestGold = new Color(0.854901960784314,0.568627450980392,0,1.0,"HarvestGold");
-               public static readonly Color HeartGold = new Color(0.501960784313725,0.501960784313725,0,1.0,"HeartGold");
-               public static readonly Color Heliotrope = new Color(0.874509803921569,0.450980392156863,1,1.0,"Heliotrope");
-               public static readonly Color HollywoodCerise = new Color(0.956862745098039,0,0.631372549019608,1.0,"HollywoodCerise");
-               public static readonly Color Honeydew = new Color(0.941176470588235,1,0.941176470588235,1.0,"Honeydew");
-               public static readonly Color HonoluluBlue = new Color(0,0.498039215686275,0.749019607843137,1.0,"HonoluluBlue");
-               public static readonly Color HookerSGreen = new Color(0.286274509803922,0.474509803921569,0.419607843137255,1.0,"HookerSGreen");
-               public static readonly Color HotMagenta = new Color(1,0.113725490196078,0.807843137254902,1.0,"HotMagenta");
-               public static readonly Color HotPink = new Color(1,0.411764705882353,0.705882352941177,1.0,"HotPink");
-               public static readonly Color HunterGreen = new Color(0.207843137254902,0.368627450980392,0.231372549019608,1.0,"HunterGreen");
-               public static readonly Color Iceberg = new Color(0.443137254901961,0.650980392156863,0.823529411764706,1.0,"Iceberg");
-               public static readonly Color Icterine = new Color(0.988235294117647,0.968627450980392,0.368627450980392,1.0,"Icterine");
-               public static readonly Color ImperialBlue = new Color(0,0.137254901960784,0.584313725490196,1.0,"ImperialBlue");
-               public static readonly Color Inchworm = new Color(0.698039215686274,0.925490196078431,0.364705882352941,1.0,"Inchworm");
-               public static readonly Color IndiaGreen = new Color(0.0745098039215686,0.533333333333333,0.0313725490196078,1.0,"IndiaGreen");
-               public static readonly Color IndianRed = new Color(0.803921568627451,0.36078431372549,0.36078431372549,1.0,"IndianRed");
-               public static readonly Color IndianYellow = new Color(0.890196078431373,0.658823529411765,0.341176470588235,1.0,"IndianYellow");
-               public static readonly Color Indigo = new Color(0.435294117647059,0,1,1.0,"Indigo");
-               public static readonly Color IndigoDye = new Color(0,0.254901960784314,0.415686274509804,1.0,"IndigoDye");
-               public static readonly Color IndigoWeb = new Color(0.294117647058824,0,0.509803921568627,1.0,"IndigoWeb");
-               public static readonly Color InternationalKleinBlue = new Color(0,0.184313725490196,0.654901960784314,1.0,"InternationalKleinBlue");
-               public static readonly Color InternationalOrangeAerospace = new Color(1,0.309803921568627,0,1.0,"InternationalOrangeAerospace");
-               public static readonly Color InternationalOrangeEngineering = new Color(0.729411764705882,0.0862745098039216,0.0470588235294118,1.0,"InternationalOrangeEngineering");
-               public static readonly Color InternationalOrangeGoldenGateBridge = new Color(0.752941176470588,0.211764705882353,0.172549019607843,1.0,"InternationalOrangeGoldenGateBridge");
-               public static readonly Color Iris = new Color(0.352941176470588,0.309803921568627,0.811764705882353,1.0,"Iris");
-               public static readonly Color Isabelline = new Color(0.956862745098039,0.941176470588235,0.925490196078431,1.0,"Isabelline");
-               public static readonly Color IslamicGreen = new Color(0,0.564705882352941,0,1.0,"IslamicGreen");
-               public static readonly Color Ivory = new Color(1,1,0.941176470588235,1.0,"Ivory");
-               public static readonly Color Jade = new Color(0,0.658823529411765,0.419607843137255,1.0,"Jade");
-               public static readonly Color Jasmine = new Color(0.972549019607843,0.870588235294118,0.494117647058824,1.0,"Jasmine");
-               public static readonly Color Jasper = new Color(0.843137254901961,0.231372549019608,0.243137254901961,1.0,"Jasper");
-               public static readonly Color JazzberryJam = new Color(0.647058823529412,0.0431372549019608,0.368627450980392,1.0,"JazzberryJam");
-               public static readonly Color Jet = new Color(0.203921568627451,0.203921568627451,0.203921568627451,1.0,"Jet");
-               public static readonly Color Jonquil = new Color(0.980392156862745,0.854901960784314,0.368627450980392,1.0,"Jonquil");
-               public static readonly Color JuneBud = new Color(0.741176470588235,0.854901960784314,0.341176470588235,1.0,"JuneBud");
-               public static readonly Color JungleGreen = new Color(0.16078431372549,0.670588235294118,0.529411764705882,1.0,"JungleGreen");
-               public static readonly Color KellyGreen = new Color(0.298039215686275,0.733333333333333,0.0901960784313725,1.0,"KellyGreen");
-               public static readonly Color KenyanCopper = new Color(0.486274509803922,0.109803921568627,0.0196078431372549,1.0,"KenyanCopper");
-               public static readonly Color KhakiHtmlCssKhaki = new Color(0.764705882352941,0.690196078431373,0.568627450980392,1.0,"KhakiHtmlCssKhaki");
-               public static readonly Color KhakiX11LightKhaki = new Color(0.941176470588235,0.901960784313726,0.549019607843137,1.0,"KhakiX11LightKhaki");
-               public static readonly Color KuCrimson = new Color(0.909803921568627,0,0.0509803921568627,1.0,"KuCrimson");
-               public static readonly Color LaSalleGreen = new Color(0.0313725490196078,0.470588235294118,0.188235294117647,1.0,"LaSalleGreen");
-               public static readonly Color LanguidLavender = new Color(0.83921568627451,0.792156862745098,0.866666666666667,1.0,"LanguidLavender");
-               public static readonly Color LapisLazuli = new Color(0.149019607843137,0.380392156862745,0.611764705882353,1.0,"LapisLazuli");
-               public static readonly Color LaserLemon = new Color(0.996078431372549,0.996078431372549,0.133333333333333,1.0,"LaserLemon");
-               public static readonly Color LaurelGreen = new Color(0.662745098039216,0.729411764705882,0.615686274509804,1.0,"LaurelGreen");
-               public static readonly Color Lava = new Color(0.811764705882353,0.0627450980392157,0.125490196078431,1.0,"Lava");
-               public static readonly Color LavenderBlue = new Color(0.8,0.8,1,1.0,"LavenderBlue");
-               public static readonly Color LavenderBlush = new Color(1,0.941176470588235,0.96078431372549,1.0,"LavenderBlush");
-               public static readonly Color LavenderFloral = new Color(0.709803921568627,0.494117647058824,0.862745098039216,1.0,"LavenderFloral");
-               public static readonly Color LavenderGray = new Color(0.768627450980392,0.764705882352941,0.815686274509804,1.0,"LavenderGray");
-               public static readonly Color LavenderIndigo = new Color(0.580392156862745,0.341176470588235,0.92156862745098,1.0,"LavenderIndigo");
-               public static readonly Color LavenderMagenta = new Color(0.933333333333333,0.509803921568627,0.933333333333333,1.0,"LavenderMagenta");
-               public static readonly Color LavenderMist = new Color(0.901960784313726,0.901960784313726,0.980392156862745,1.0,"LavenderMist");
-               public static readonly Color LavenderPink = new Color(0.984313725490196,0.682352941176471,0.823529411764706,1.0,"LavenderPink");
-               public static readonly Color LavenderPurple = new Color(0.588235294117647,0.482352941176471,0.713725490196078,1.0,"LavenderPurple");
-               public static readonly Color LavenderRose = new Color(0.984313725490196,0.627450980392157,0.890196078431373,1.0,"LavenderRose");
-               public static readonly Color LavenderWeb = new Color(0.901960784313726,0.901960784313726,0.980392156862745,1.0,"LavenderWeb");
-               public static readonly Color LawnGreen = new Color(0.486274509803922,0.988235294117647,0,1.0,"LawnGreen");
-               public static readonly Color Lemon = new Color(1,0.968627450980392,0,1.0,"Lemon");
-               public static readonly Color LemonChiffon = new Color(1,0.980392156862745,0.803921568627451,1.0,"LemonChiffon");
-               public static readonly Color LemonLime = new Color(0.890196078431373,1,0,1.0,"LemonLime");
-               public static readonly Color Licorice = new Color(0.101960784313725,0.0666666666666667,0.0627450980392157,1.0,"Licorice");
-               public static readonly Color LightApricot = new Color(0.992156862745098,0.835294117647059,0.694117647058824,1.0,"LightApricot");
-               public static readonly Color LightBlue = new Color(0.67843137254902,0.847058823529412,0.901960784313726,1.0,"LightBlue");
-               public static readonly Color LightBrown = new Color(0.709803921568627,0.396078431372549,0.113725490196078,1.0,"LightBrown");
-               public static readonly Color LightCarminePink = new Color(0.901960784313726,0.403921568627451,0.443137254901961,1.0,"LightCarminePink");
-               public static readonly Color LightCoral = new Color(0.941176470588235,0.501960784313725,0.501960784313725,1.0,"LightCoral");
-               public static readonly Color LightCornflowerBlue = new Color(0.576470588235294,0.8,0.917647058823529,1.0,"LightCornflowerBlue");
-               public static readonly Color LightCrimson = new Color(0.96078431372549,0.411764705882353,0.568627450980392,1.0,"LightCrimson");
-               public static readonly Color LightCyan = new Color(0.87843137254902,1,1,1.0,"LightCyan");
-               public static readonly Color LightFuchsiaPink = new Color(0.976470588235294,0.517647058823529,0.937254901960784,1.0,"LightFuchsiaPink");
-               public static readonly Color LightGoldenrodYellow = new Color(0.980392156862745,0.980392156862745,0.823529411764706,1.0,"LightGoldenrodYellow");
-               public static readonly Color LightGray = new Color(0.827450980392157,0.827450980392157,0.827450980392157,1.0,"LightGray");
-               public static readonly Color LightGreen = new Color(0.564705882352941,0.933333333333333,0.564705882352941,1.0,"LightGreen");
-               public static readonly Color LightKhaki = new Color(0.941176470588235,0.901960784313726,0.549019607843137,1.0,"LightKhaki");
-               public static readonly Color LightPastelPurple = new Color(0.694117647058824,0.611764705882353,0.850980392156863,1.0,"LightPastelPurple");
-               public static readonly Color LightPink = new Color(1,0.713725490196078,0.756862745098039,1.0,"LightPink");
-               public static readonly Color LightRedOchre = new Color(0.913725490196078,0.454901960784314,0.317647058823529,1.0,"LightRedOchre");
-               public static readonly Color LightSalmon = new Color(1,0.627450980392157,0.47843137254902,1.0,"LightSalmon");
-               public static readonly Color LightSalmonPink = new Color(1,0.6,0.6,1.0,"LightSalmonPink");
-               public static readonly Color LightSeaGreen = new Color(0.125490196078431,0.698039215686274,0.666666666666667,1.0,"LightSeaGreen");
-               public static readonly Color LightSkyBlue = new Color(0.529411764705882,0.807843137254902,0.980392156862745,1.0,"LightSkyBlue");
-               public static readonly Color LightSlateGray = new Color(0.466666666666667,0.533333333333333,0.6,1.0,"LightSlateGray");
-               public static readonly Color LightTaupe = new Color(0.701960784313725,0.545098039215686,0.427450980392157,1.0,"LightTaupe");
-               public static readonly Color LightThulianPink = new Color(0.901960784313726,0.56078431372549,0.674509803921569,1.0,"LightThulianPink");
-               public static readonly Color LightYellow = new Color(1,1,0.87843137254902,1.0,"LightYellow");
-               public static readonly Color Lilac = new Color(0.784313725490196,0.635294117647059,0.784313725490196,1.0,"Lilac");
-               public static readonly Color LimeColorWheel = new Color(0.749019607843137,1,0,1.0,"LimeColorWheel");
-               public static readonly Color LimeGreen = new Color(0.196078431372549,0.803921568627451,0.196078431372549,1.0,"LimeGreen");
-               public static readonly Color LimeWebX11Green = new Color(0,1,0,1.0,"LimeWebX11Green");
-               public static readonly Color Limerick = new Color(0.615686274509804,0.76078431372549,0.0352941176470588,1.0,"Limerick");
-               public static readonly Color LincolnGreen = new Color(0.0980392156862745,0.349019607843137,0.0196078431372549,1.0,"LincolnGreen");
-               public static readonly Color Linen = new Color(0.980392156862745,0.941176470588235,0.901960784313726,1.0,"Linen");
-               public static readonly Color Lion = new Color(0.756862745098039,0.603921568627451,0.419607843137255,1.0,"Lion");
-               public static readonly Color LittleBoyBlue = new Color(0.423529411764706,0.627450980392157,0.862745098039216,1.0,"LittleBoyBlue");
-               public static readonly Color Liver = new Color(0.325490196078431,0.294117647058824,0.309803921568627,1.0,"Liver");
-               public static readonly Color Lust = new Color(0.901960784313726,0.125490196078431,0.125490196078431,1.0,"Lust");
-               public static readonly Color Magenta = new Color(1,0,1,1.0,"Magenta");
-               public static readonly Color MagentaDye = new Color(0.792156862745098,0.12156862745098,0.482352941176471,1.0,"MagentaDye");
-               public static readonly Color MagentaProcess = new Color(1,0,0.564705882352941,1.0,"MagentaProcess");
-               public static readonly Color MagicMint = new Color(0.666666666666667,0.941176470588235,0.819607843137255,1.0,"MagicMint");
-               public static readonly Color Magnolia = new Color(0.972549019607843,0.956862745098039,1,1.0,"Magnolia");
-               public static readonly Color Mahogany = new Color(0.752941176470588,0.250980392156863,0,1.0,"Mahogany");
-               public static readonly Color Maize = new Color(0.984313725490196,0.925490196078431,0.364705882352941,1.0,"Maize");
-               public static readonly Color MajorelleBlue = new Color(0.376470588235294,0.313725490196078,0.862745098039216,1.0,"MajorelleBlue");
-               public static readonly Color Malachite = new Color(0.0431372549019608,0.854901960784314,0.317647058823529,1.0,"Malachite");
-               public static readonly Color Manatee = new Color(0.592156862745098,0.603921568627451,0.666666666666667,1.0,"Manatee");
-               public static readonly Color MangoTango = new Color(1,0.509803921568627,0.262745098039216,1.0,"MangoTango");
-               public static readonly Color Mantis = new Color(0.454901960784314,0.764705882352941,0.396078431372549,1.0,"Mantis");
-               public static readonly Color MardiGras = new Color(0.533333333333333,0,0.52156862745098,1.0,"MardiGras");
-               public static readonly Color MaroonCrayola = new Color(0.764705882352941,0.129411764705882,0.282352941176471,1.0,"MaroonCrayola");
-               public static readonly Color MaroonHtmlCss = new Color(0.501960784313725,0,0,1.0,"MaroonHtmlCss");
-               public static readonly Color MaroonX11 = new Color(0.690196078431373,0.188235294117647,0.376470588235294,1.0,"MaroonX11");
-               public static readonly Color Mauve = new Color(0.87843137254902,0.690196078431373,1,1.0,"Mauve");
-               public static readonly Color MauveTaupe = new Color(0.568627450980392,0.372549019607843,0.427450980392157,1.0,"MauveTaupe");
-               public static readonly Color Mauvelous = new Color(0.937254901960784,0.596078431372549,0.666666666666667,1.0,"Mauvelous");
-               public static readonly Color MayaBlue = new Color(0.450980392156863,0.76078431372549,0.984313725490196,1.0,"MayaBlue");
-               public static readonly Color MeatBrown = new Color(0.898039215686275,0.717647058823529,0.231372549019608,1.0,"MeatBrown");
-               public static readonly Color MediumAquamarine = new Color(0.4,0.866666666666667,0.666666666666667,1.0,"MediumAquamarine");
-               public static readonly Color MediumBlue = new Color(0,0,0.803921568627451,1.0,"MediumBlue");
-               public static readonly Color MediumCandyAppleRed = new Color(0.886274509803922,0.0235294117647059,0.172549019607843,1.0,"MediumCandyAppleRed");
-               public static readonly Color MediumCarmine = new Color(0.686274509803922,0.250980392156863,0.207843137254902,1.0,"MediumCarmine");
-               public static readonly Color MediumChampagne = new Color(0.952941176470588,0.898039215686275,0.670588235294118,1.0,"MediumChampagne");
-               public static readonly Color MediumElectricBlue = new Color(0.0117647058823529,0.313725490196078,0.588235294117647,1.0,"MediumElectricBlue");
-               public static readonly Color MediumJungleGreen = new Color(0.109803921568627,0.207843137254902,0.176470588235294,1.0,"MediumJungleGreen");
-               public static readonly Color MediumLavenderMagenta = new Color(0.866666666666667,0.627450980392157,0.866666666666667,1.0,"MediumLavenderMagenta");
-               public static readonly Color MediumOrchid = new Color(0.729411764705882,0.333333333333333,0.827450980392157,1.0,"MediumOrchid");
-               public static readonly Color MediumPersianBlue = new Color(0,0.403921568627451,0.647058823529412,1.0,"MediumPersianBlue");
-               public static readonly Color MediumPurple = new Color(0.576470588235294,0.43921568627451,0.858823529411765,1.0,"MediumPurple");
-               public static readonly Color MediumRedViolet = new Color(0.733333333333333,0.2,0.52156862745098,1.0,"MediumRedViolet");
-               public static readonly Color MediumRuby = new Color(0.666666666666667,0.250980392156863,0.411764705882353,1.0,"MediumRuby");
-               public static readonly Color MediumSeaGreen = new Color(0.235294117647059,0.701960784313725,0.443137254901961,1.0,"MediumSeaGreen");
-               public static readonly Color MediumSlateBlue = new Color(0.482352941176471,0.407843137254902,0.933333333333333,1.0,"MediumSlateBlue");
-               public static readonly Color MediumSpringBud = new Color(0.788235294117647,0.862745098039216,0.529411764705882,1.0,"MediumSpringBud");
-               public static readonly Color MediumSpringGreen = new Color(0,0.980392156862745,0.603921568627451,1.0,"MediumSpringGreen");
-               public static readonly Color MediumTaupe = new Color(0.403921568627451,0.298039215686275,0.27843137254902,1.0,"MediumTaupe");
-               public static readonly Color MediumTurquoise = new Color(0.282352941176471,0.819607843137255,0.8,1.0,"MediumTurquoise");
-               public static readonly Color MediumTuscanRed = new Color(0.474509803921569,0.266666666666667,0.231372549019608,1.0,"MediumTuscanRed");
-               public static readonly Color MediumVermilion = new Color(0.850980392156863,0.376470588235294,0.231372549019608,1.0,"MediumVermilion");
-               public static readonly Color MediumVioletRed = new Color(0.780392156862745,0.0823529411764706,0.52156862745098,1.0,"MediumVioletRed");
-               public static readonly Color MellowApricot = new Color(0.972549019607843,0.72156862745098,0.470588235294118,1.0,"MellowApricot");
-               public static readonly Color MellowYellow = new Color(0.972549019607843,0.870588235294118,0.494117647058824,1.0,"MellowYellow");
-               public static readonly Color Melon = new Color(0.992156862745098,0.737254901960784,0.705882352941177,1.0,"Melon");
-               public static readonly Color MidnightBlue = new Color(0.0980392156862745,0.0980392156862745,0.43921568627451,1.0,"MidnightBlue");
-               public static readonly Color MidnightGreenEagleGreen = new Color(0,0.286274509803922,0.325490196078431,1.0,"MidnightGreenEagleGreen");
-               public static readonly Color MikadoYellow = new Color(1,0.768627450980392,0.0470588235294118,1.0,"MikadoYellow");
-               public static readonly Color Mint = new Color(0.243137254901961,0.705882352941177,0.537254901960784,1.0,"Mint");
-               public static readonly Color MintCream = new Color(0.96078431372549,1,0.980392156862745,1.0,"MintCream");
-               public static readonly Color MintGreen = new Color(0.596078431372549,1,0.596078431372549,1.0,"MintGreen");
-               public static readonly Color MistyRose = new Color(1,0.894117647058824,0.882352941176471,1.0,"MistyRose");
-               public static readonly Color Moccasin = new Color(0.980392156862745,0.92156862745098,0.843137254901961,1.0,"Moccasin");
-               public static readonly Color ModeBeige = new Color(0.588235294117647,0.443137254901961,0.0901960784313725,1.0,"ModeBeige");
-               public static readonly Color MoonstoneBlue = new Color(0.450980392156863,0.662745098039216,0.76078431372549,1.0,"MoonstoneBlue");
-               public static readonly Color MordantRed19 = new Color(0.682352941176471,0.0470588235294118,0,1.0,"MordantRed19");
-               public static readonly Color MossGreen = new Color(0.67843137254902,0.874509803921569,0.67843137254902,1.0,"MossGreen");
-               public static readonly Color MountainMeadow = new Color(0.188235294117647,0.729411764705882,0.56078431372549,1.0,"MountainMeadow");
-               public static readonly Color MountbattenPink = new Color(0.6,0.47843137254902,0.552941176470588,1.0,"MountbattenPink");
-               public static readonly Color MsuGreen = new Color(0.0941176470588235,0.270588235294118,0.231372549019608,1.0,"MsuGreen");
-               public static readonly Color Mulberry = new Color(0.772549019607843,0.294117647058824,0.549019607843137,1.0,"Mulberry");
-               public static readonly Color Mustard = new Color(1,0.858823529411765,0.345098039215686,1.0,"Mustard");
-               public static readonly Color Myrtle = new Color(0.129411764705882,0.258823529411765,0.117647058823529,1.0,"Myrtle");
-               public static readonly Color NadeshikoPink = new Color(0.964705882352941,0.67843137254902,0.776470588235294,1.0,"NadeshikoPink");
-               public static readonly Color NapierGreen = new Color(0.164705882352941,0.501960784313725,0,1.0,"NapierGreen");
-               public static readonly Color NaplesYellow = new Color(0.980392156862745,0.854901960784314,0.368627450980392,1.0,"NaplesYellow");
-               public static readonly Color NavajoWhite = new Color(1,0.870588235294118,0.67843137254902,1.0,"NavajoWhite");
-               public static readonly Color NavyBlue = new Color(0,0,0.501960784313725,1.0,"NavyBlue");
-               public static readonly Color NeonCarrot = new Color(1,0.63921568627451,0.262745098039216,1.0,"NeonCarrot");
-               public static readonly Color NeonFuchsia = new Color(0.996078431372549,0.254901960784314,0.392156862745098,1.0,"NeonFuchsia");
-               public static readonly Color NeonGreen = new Color(0.223529411764706,1,0.0784313725490196,1.0,"NeonGreen");
-               public static readonly Color NewYorkPink = new Color(0.843137254901961,0.513725490196078,0.498039215686275,1.0,"NewYorkPink");
-               public static readonly Color NonPhotoBlue = new Color(0.643137254901961,0.866666666666667,0.929411764705882,1.0,"NonPhotoBlue");
-               public static readonly Color NorthTexasGreen = new Color(0.0196078431372549,0.564705882352941,0.2,1.0,"NorthTexasGreen");
-               public static readonly Color OceanBoatBlue = new Color(0,0.466666666666667,0.745098039215686,1.0,"OceanBoatBlue");
-               public static readonly Color Ochre = new Color(0.8,0.466666666666667,0.133333333333333,1.0,"Ochre");
-               public static readonly Color OfficeGreen = new Color(0,0.501960784313725,0,1.0,"OfficeGreen");
-               public static readonly Color OldGold = new Color(0.811764705882353,0.709803921568627,0.231372549019608,1.0,"OldGold");
-               public static readonly Color OldLace = new Color(0.992156862745098,0.96078431372549,0.901960784313726,1.0,"OldLace");
-               public static readonly Color OldLavender = new Color(0.474509803921569,0.407843137254902,0.470588235294118,1.0,"OldLavender");
-               public static readonly Color OldMauve = new Color(0.403921568627451,0.192156862745098,0.27843137254902,1.0,"OldMauve");
-               public static readonly Color OldRose = new Color(0.752941176470588,0.501960784313725,0.505882352941176,1.0,"OldRose");
-               public static readonly Color Olive = new Color(0.501960784313725,0.501960784313725,0,1.0,"Olive");
-               public static readonly Color OliveDrab7 = new Color(0.235294117647059,0.203921568627451,0.12156862745098,1.0,"OliveDrab7");
-               public static readonly Color OliveDrabWebOliveDrab3 = new Color(0.419607843137255,0.556862745098039,0.137254901960784,1.0,"OliveDrabWebOliveDrab3");
-               public static readonly Color Olivine = new Color(0.603921568627451,0.725490196078431,0.450980392156863,1.0,"Olivine");
-               public static readonly Color Onyx = new Color(0.207843137254902,0.219607843137255,0.223529411764706,1.0,"Onyx");
-               public static readonly Color OperaMauve = new Color(0.717647058823529,0.517647058823529,0.654901960784314,1.0,"OperaMauve");
-               public static readonly Color OrangeColorWheel = new Color(1,0.498039215686275,0,1.0,"OrangeColorWheel");
-               public static readonly Color OrangePeel = new Color(1,0.623529411764706,0,1.0,"OrangePeel");
-               public static readonly Color OrangeRed = new Color(1,0.270588235294118,0,1.0,"OrangeRed");
-               public static readonly Color OrangeRyb = new Color(0.984313725490196,0.6,0.00784313725490196,1.0,"OrangeRyb");
-               public static readonly Color OrangeWebColor = new Color(1,0.647058823529412,0,1.0,"OrangeWebColor");
-               public static readonly Color Orchid = new Color(0.854901960784314,0.43921568627451,0.83921568627451,1.0,"Orchid");
-               public static readonly Color OtterBrown = new Color(0.396078431372549,0.262745098039216,0.129411764705882,1.0,"OtterBrown");
-               public static readonly Color OuCrimsonRed = new Color(0.6,0,0,1.0,"OuCrimsonRed");
-               public static readonly Color OuterSpace = new Color(0.254901960784314,0.290196078431373,0.298039215686275,1.0,"OuterSpace");
-               public static readonly Color OutrageousOrange = new Color(1,0.431372549019608,0.290196078431373,1.0,"OutrageousOrange");
-               public static readonly Color OxfordBlue = new Color(0,0.129411764705882,0.27843137254902,1.0,"OxfordBlue");
-               public static readonly Color PakistanGreen = new Color(0,0.4,0,1.0,"PakistanGreen");
-               public static readonly Color PalatinateBlue = new Color(0.152941176470588,0.231372549019608,0.886274509803922,1.0,"PalatinateBlue");
-               public static readonly Color PalatinatePurple = new Color(0.407843137254902,0.156862745098039,0.376470588235294,1.0,"PalatinatePurple");
-               public static readonly Color PaleAqua = new Color(0.737254901960784,0.831372549019608,0.901960784313726,1.0,"PaleAqua");
-               public static readonly Color PaleBlue = new Color(0.686274509803922,0.933333333333333,0.933333333333333,1.0,"PaleBlue");
-               public static readonly Color PaleBrown = new Color(0.596078431372549,0.462745098039216,0.329411764705882,1.0,"PaleBrown");
-               public static readonly Color PaleCarmine = new Color(0.686274509803922,0.250980392156863,0.207843137254902,1.0,"PaleCarmine");
-               public static readonly Color PaleCerulean = new Color(0.607843137254902,0.768627450980392,0.886274509803922,1.0,"PaleCerulean");
-               public static readonly Color PaleChestnut = new Color(0.866666666666667,0.67843137254902,0.686274509803922,1.0,"PaleChestnut");
-               public static readonly Color PaleCopper = new Color(0.854901960784314,0.541176470588235,0.403921568627451,1.0,"PaleCopper");
-               public static readonly Color PaleCornflowerBlue = new Color(0.670588235294118,0.803921568627451,0.937254901960784,1.0,"PaleCornflowerBlue");
-               public static readonly Color PaleGold = new Color(0.901960784313726,0.745098039215686,0.541176470588235,1.0,"PaleGold");
-               public static readonly Color PaleGoldenrod = new Color(0.933333333333333,0.909803921568627,0.666666666666667,1.0,"PaleGoldenrod");
-               public static readonly Color PaleGreen = new Color(0.596078431372549,0.984313725490196,0.596078431372549,1.0,"PaleGreen");
-               public static readonly Color PaleLavender = new Color(0.862745098039216,0.815686274509804,1,1.0,"PaleLavender");
-               public static readonly Color PaleMagenta = new Color(0.976470588235294,0.517647058823529,0.898039215686275,1.0,"PaleMagenta");
-               public static readonly Color PalePink = new Color(0.980392156862745,0.854901960784314,0.866666666666667,1.0,"PalePink");
-               public static readonly Color PalePlum = new Color(0.866666666666667,0.627450980392157,0.866666666666667,1.0,"PalePlum");
-               public static readonly Color PaleRedViolet = new Color(0.858823529411765,0.43921568627451,0.576470588235294,1.0,"PaleRedViolet");
-               public static readonly Color PaleRobinEggBlue = new Color(0.588235294117647,0.870588235294118,0.819607843137255,1.0,"PaleRobinEggBlue");
-               public static readonly Color PaleSilver = new Color(0.788235294117647,0.752941176470588,0.733333333333333,1.0,"PaleSilver");
-               public static readonly Color PaleSpringBud = new Color(0.925490196078431,0.92156862745098,0.741176470588235,1.0,"PaleSpringBud");
-               public static readonly Color PaleTaupe = new Color(0.737254901960784,0.596078431372549,0.494117647058824,1.0,"PaleTaupe");
-               public static readonly Color PaleVioletRed = new Color(0.858823529411765,0.43921568627451,0.576470588235294,1.0,"PaleVioletRed");
-               public static readonly Color PansyPurple = new Color(0.470588235294118,0.0941176470588235,0.290196078431373,1.0,"PansyPurple");
-               public static readonly Color PapayaWhip = new Color(1,0.937254901960784,0.835294117647059,1.0,"PapayaWhip");
-               public static readonly Color ParisGreen = new Color(0.313725490196078,0.784313725490196,0.470588235294118,1.0,"ParisGreen");
-               public static readonly Color PastelBlue = new Color(0.682352941176471,0.776470588235294,0.811764705882353,1.0,"PastelBlue");
-               public static readonly Color PastelBrown = new Color(0.513725490196078,0.411764705882353,0.325490196078431,1.0,"PastelBrown");
-               public static readonly Color PastelGray = new Color(0.811764705882353,0.811764705882353,0.768627450980392,1.0,"PastelGray");
-               public static readonly Color PastelGreen = new Color(0.466666666666667,0.866666666666667,0.466666666666667,1.0,"PastelGreen");
-               public static readonly Color PastelMagenta = new Color(0.956862745098039,0.603921568627451,0.76078431372549,1.0,"PastelMagenta");
-               public static readonly Color PastelOrange = new Color(1,0.701960784313725,0.27843137254902,1.0,"PastelOrange");
-               public static readonly Color PastelPink = new Color(0.870588235294118,0.647058823529412,0.643137254901961,1.0,"PastelPink");
-               public static readonly Color PastelPurple = new Color(0.701960784313725,0.619607843137255,0.709803921568627,1.0,"PastelPurple");
-               public static readonly Color PastelRed = new Color(1,0.411764705882353,0.380392156862745,1.0,"PastelRed");
-               public static readonly Color PastelViolet = new Color(0.796078431372549,0.6,0.788235294117647,1.0,"PastelViolet");
-               public static readonly Color PastelYellow = new Color(0.992156862745098,0.992156862745098,0.588235294117647,1.0,"PastelYellow");
-               public static readonly Color Patriarch = new Color(0.501960784313725,0,0.501960784313725,1.0,"Patriarch");
-               public static readonly Color PayneSGrey = new Color(0.325490196078431,0.407843137254902,0.470588235294118,1.0,"PayneSGrey");
-               public static readonly Color Peach = new Color(1,0.898039215686275,0.705882352941177,1.0,"Peach");
-               public static readonly Color PeachCrayola = new Color(1,0.796078431372549,0.643137254901961,1.0,"PeachCrayola");
-               public static readonly Color PeachOrange = new Color(1,0.8,0.6,1.0,"PeachOrange");
-               public static readonly Color PeachPuff = new Color(1,0.854901960784314,0.725490196078431,1.0,"PeachPuff");
-               public static readonly Color PeachYellow = new Color(0.980392156862745,0.874509803921569,0.67843137254902,1.0,"PeachYellow");
-               public static readonly Color Pear = new Color(0.819607843137255,0.886274509803922,0.192156862745098,1.0,"Pear");
-               public static readonly Color Pearl = new Color(0.917647058823529,0.87843137254902,0.784313725490196,1.0,"Pearl");
-               public static readonly Color PearlAqua = new Color(0.533333333333333,0.847058823529412,0.752941176470588,1.0,"PearlAqua");
-               public static readonly Color PearlyPurple = new Color(0.717647058823529,0.407843137254902,0.635294117647059,1.0,"PearlyPurple");
-               public static readonly Color Peridot = new Color(0.901960784313726,0.886274509803922,0,1.0,"Peridot");
-               public static readonly Color Periwinkle = new Color(0.8,0.8,1,1.0,"Periwinkle");
-               public static readonly Color PersianBlue = new Color(0.109803921568627,0.223529411764706,0.733333333333333,1.0,"PersianBlue");
-               public static readonly Color PersianGreen = new Color(0,0.650980392156863,0.576470588235294,1.0,"PersianGreen");
-               public static readonly Color PersianIndigo = new Color(0.196078431372549,0.0705882352941176,0.47843137254902,1.0,"PersianIndigo");
-               public static readonly Color PersianOrange = new Color(0.850980392156863,0.564705882352941,0.345098039215686,1.0,"PersianOrange");
-               public static readonly Color PersianPink = new Color(0.968627450980392,0.498039215686275,0.745098039215686,1.0,"PersianPink");
-               public static readonly Color PersianPlum = new Color(0.43921568627451,0.109803921568627,0.109803921568627,1.0,"PersianPlum");
-               public static readonly Color PersianRed = new Color(0.8,0.2,0.2,1.0,"PersianRed");
-               public static readonly Color PersianRose = new Color(0.996078431372549,0.156862745098039,0.635294117647059,1.0,"PersianRose");
-               public static readonly Color Persimmon = new Color(0.925490196078431,0.345098039215686,0,1.0,"Persimmon");
-               public static readonly Color Peru = new Color(0.803921568627451,0.52156862745098,0.247058823529412,1.0,"Peru");
-               public static readonly Color Phlox = new Color(0.874509803921569,0,1,1.0,"Phlox");
-               public static readonly Color PhthaloBlue = new Color(0,0.0588235294117647,0.537254901960784,1.0,"PhthaloBlue");
-               public static readonly Color PhthaloGreen = new Color(0.0705882352941176,0.207843137254902,0.141176470588235,1.0,"PhthaloGreen");
-               public static readonly Color PiggyPink = new Color(0.992156862745098,0.866666666666667,0.901960784313726,1.0,"PiggyPink");
-               public static readonly Color PineGreen = new Color(0.00392156862745098,0.474509803921569,0.435294117647059,1.0,"PineGreen");
-               public static readonly Color Pink = new Color(1,0.752941176470588,0.796078431372549,1.0,"Pink");
-               public static readonly Color PinkLace = new Color(1,0.866666666666667,0.956862745098039,1.0,"PinkLace");
-               public static readonly Color PinkOrange = new Color(1,0.6,0.4,1.0,"PinkOrange");
-               public static readonly Color PinkPearl = new Color(0.905882352941176,0.674509803921569,0.811764705882353,1.0,"PinkPearl");
-               public static readonly Color PinkSherbet = new Color(0.968627450980392,0.56078431372549,0.654901960784314,1.0,"PinkSherbet");
-               public static readonly Color Pistachio = new Color(0.576470588235294,0.772549019607843,0.447058823529412,1.0,"Pistachio");
-               public static readonly Color Platinum = new Color(0.898039215686275,0.894117647058824,0.886274509803922,1.0,"Platinum");
-               public static readonly Color PlumTraditional = new Color(0.556862745098039,0.270588235294118,0.52156862745098,1.0,"PlumTraditional");
-               public static readonly Color PlumWeb = new Color(0.866666666666667,0.627450980392157,0.866666666666667,1.0,"PlumWeb");
-               public static readonly Color PortlandOrange = new Color(1,0.352941176470588,0.211764705882353,1.0,"PortlandOrange");
-               public static readonly Color PowderBlueWeb = new Color(0.690196078431373,0.87843137254902,0.901960784313726,1.0,"PowderBlueWeb");
-               public static readonly Color PrincetonOrange = new Color(1,0.56078431372549,0,1.0,"PrincetonOrange");
-               public static readonly Color Prune = new Color(0.43921568627451,0.109803921568627,0.109803921568627,1.0,"Prune");
-               public static readonly Color PrussianBlue = new Color(0,0.192156862745098,0.325490196078431,1.0,"PrussianBlue");
-               public static readonly Color PsychedelicPurple = new Color(0.874509803921569,0,1,1.0,"PsychedelicPurple");
-               public static readonly Color Puce = new Color(0.8,0.533333333333333,0.6,1.0,"Puce");
-               public static readonly Color Pumpkin = new Color(1,0.458823529411765,0.0941176470588235,1.0,"Pumpkin");
-               public static readonly Color PurpleHeart = new Color(0.411764705882353,0.207843137254902,0.611764705882353,1.0,"PurpleHeart");
-               public static readonly Color PurpleHtmlCss = new Color(0.501960784313725,0,0.501960784313725,1.0,"PurpleHtmlCss");
-               public static readonly Color PurpleMountainMajesty = new Color(0.588235294117647,0.470588235294118,0.713725490196078,1.0,"PurpleMountainMajesty");
-               public static readonly Color PurpleMunsell = new Color(0.623529411764706,0,0.772549019607843,1.0,"PurpleMunsell");
-               public static readonly Color PurplePizzazz = new Color(0.996078431372549,0.305882352941176,0.854901960784314,1.0,"PurplePizzazz");
-               public static readonly Color PurpleTaupe = new Color(0.313725490196078,0.250980392156863,0.301960784313725,1.0,"PurpleTaupe");
-               public static readonly Color PurpleX11 = new Color(0.627450980392157,0.125490196078431,0.941176470588235,1.0,"PurpleX11");
-               public static readonly Color Quartz = new Color(0.317647058823529,0.282352941176471,0.309803921568627,1.0,"Quartz");
-               public static readonly Color Rackley = new Color(0.364705882352941,0.541176470588235,0.658823529411765,1.0,"Rackley");
-               public static readonly Color RadicalRed = new Color(1,0.207843137254902,0.368627450980392,1.0,"RadicalRed");
-               public static readonly Color Rajah = new Color(0.984313725490196,0.670588235294118,0.376470588235294,1.0,"Rajah");
-               public static readonly Color Raspberry = new Color(0.890196078431373,0.0431372549019608,0.364705882352941,1.0,"Raspberry");
-               public static readonly Color RaspberryGlace = new Color(0.568627450980392,0.372549019607843,0.427450980392157,1.0,"RaspberryGlace");
-               public static readonly Color RaspberryPink = new Color(0.886274509803922,0.313725490196078,0.596078431372549,1.0,"RaspberryPink");
-               public static readonly Color RaspberryRose = new Color(0.701960784313725,0.266666666666667,0.423529411764706,1.0,"RaspberryRose");
-               public static readonly Color RawUmber = new Color(0.509803921568627,0.4,0.266666666666667,1.0,"RawUmber");
-               public static readonly Color RazzleDazzleRose = new Color(1,0.2,0.8,1.0,"RazzleDazzleRose");
-               public static readonly Color Razzmatazz = new Color(0.890196078431373,0.145098039215686,0.419607843137255,1.0,"Razzmatazz");
-               public static readonly Color Red = new Color(1,0,0,1.0,"Red");
-               public static readonly Color RedBrown = new Color(0.647058823529412,0.164705882352941,0.164705882352941,1.0,"RedBrown");
-               public static readonly Color RedDevil = new Color(0.525490196078431,0.00392156862745098,0.0666666666666667,1.0,"RedDevil");
-               public static readonly Color RedMunsell = new Color(0.949019607843137,0,0.235294117647059,1.0,"RedMunsell");
-               public static readonly Color RedNcs = new Color(0.768627450980392,0.00784313725490196,0.2,1.0,"RedNcs");
-               public static readonly Color RedOrange = new Color(1,0.325490196078431,0.286274509803922,1.0,"RedOrange");
-               public static readonly Color RedPigment = new Color(0.929411764705882,0.109803921568627,0.141176470588235,1.0,"RedPigment");
-               public static readonly Color RedRyb = new Color(0.996078431372549,0.152941176470588,0.0705882352941176,1.0,"RedRyb");
-               public static readonly Color RedViolet = new Color(0.780392156862745,0.0823529411764706,0.52156862745098,1.0,"RedViolet");
-               public static readonly Color Redwood = new Color(0.670588235294118,0.305882352941176,0.32156862745098,1.0,"Redwood");
-               public static readonly Color Regalia = new Color(0.32156862745098,0.176470588235294,0.501960784313725,1.0,"Regalia");
-               public static readonly Color ResolutionBlue = new Color(0,0.137254901960784,0.529411764705882,1.0,"ResolutionBlue");
-               public static readonly Color RichBlack = new Color(0,0.250980392156863,0.250980392156863,1.0,"RichBlack");
-               public static readonly Color RichBrilliantLavender = new Color(0.945098039215686,0.654901960784314,0.996078431372549,1.0,"RichBrilliantLavender");
-               public static readonly Color RichCarmine = new Color(0.843137254901961,0,0.250980392156863,1.0,"RichCarmine");
-               public static readonly Color RichElectricBlue = new Color(0.0313725490196078,0.572549019607843,0.815686274509804,1.0,"RichElectricBlue");
-               public static readonly Color RichLavender = new Color(0.654901960784314,0.419607843137255,0.811764705882353,1.0,"RichLavender");
-               public static readonly Color RichLilac = new Color(0.713725490196078,0.4,0.823529411764706,1.0,"RichLilac");
-               public static readonly Color RichMaroon = new Color(0.690196078431373,0.188235294117647,0.376470588235294,1.0,"RichMaroon");
-               public static readonly Color RifleGreen = new Color(0.254901960784314,0.282352941176471,0.2,1.0,"RifleGreen");
-               public static readonly Color RobinEggBlue = new Color(0,0.8,0.8,1.0,"RobinEggBlue");
-               public static readonly Color Rose = new Color(1,0,0.498039215686275,1.0,"Rose");
-               public static readonly Color RoseBonbon = new Color(0.976470588235294,0.258823529411765,0.619607843137255,1.0,"RoseBonbon");
-               public static readonly Color RoseEbony = new Color(0.403921568627451,0.282352941176471,0.274509803921569,1.0,"RoseEbony");
-               public static readonly Color RoseGold = new Color(0.717647058823529,0.431372549019608,0.474509803921569,1.0,"RoseGold");
-               public static readonly Color RoseMadder = new Color(0.890196078431373,0.149019607843137,0.211764705882353,1.0,"RoseMadder");
-               public static readonly Color RosePink = new Color(1,0.4,0.8,1.0,"RosePink");
-               public static readonly Color RoseQuartz = new Color(0.666666666666667,0.596078431372549,0.662745098039216,1.0,"RoseQuartz");
-               public static readonly Color RoseTaupe = new Color(0.564705882352941,0.364705882352941,0.364705882352941,1.0,"RoseTaupe");
-               public static readonly Color RoseVale = new Color(0.670588235294118,0.305882352941176,0.32156862745098,1.0,"RoseVale");
-               public static readonly Color Rosewood = new Color(0.396078431372549,0,0.0431372549019608,1.0,"Rosewood");
-               public static readonly Color RossoCorsa = new Color(0.831372549019608,0,0,1.0,"RossoCorsa");
-               public static readonly Color RosyBrown = new Color(0.737254901960784,0.56078431372549,0.56078431372549,1.0,"RosyBrown");
-               public static readonly Color RoyalAzure = new Color(0,0.219607843137255,0.658823529411765,1.0,"RoyalAzure");
-               public static readonly Color RoyalBlueTraditional = new Color(0,0.137254901960784,0.4,1.0,"RoyalBlueTraditional");
-               public static readonly Color RoyalBlueWeb = new Color(0.254901960784314,0.411764705882353,0.882352941176471,1.0,"RoyalBlueWeb");
-               public static readonly Color RoyalFuchsia = new Color(0.792156862745098,0.172549019607843,0.572549019607843,1.0,"RoyalFuchsia");
-               public static readonly Color RoyalPurple = new Color(0.470588235294118,0.317647058823529,0.662745098039216,1.0,"RoyalPurple");
-               public static readonly Color RoyalYellow = new Color(0.980392156862745,0.854901960784314,0.368627450980392,1.0,"RoyalYellow");
-               public static readonly Color RubineRed = new Color(0.819607843137255,0,0.337254901960784,1.0,"RubineRed");
-               public static readonly Color Ruby = new Color(0.87843137254902,0.0666666666666667,0.372549019607843,1.0,"Ruby");
-               public static readonly Color RubyRed = new Color(0.607843137254902,0.0666666666666667,0.117647058823529,1.0,"RubyRed");
-               public static readonly Color Ruddy = new Color(1,0,0.156862745098039,1.0,"Ruddy");
-               public static readonly Color RuddyBrown = new Color(0.733333333333333,0.396078431372549,0.156862745098039,1.0,"RuddyBrown");
-               public static readonly Color RuddyPink = new Color(0.882352941176471,0.556862745098039,0.588235294117647,1.0,"RuddyPink");
-               public static readonly Color Rufous = new Color(0.658823529411765,0.109803921568627,0.0274509803921569,1.0,"Rufous");
-               public static readonly Color Russet = new Color(0.501960784313725,0.274509803921569,0.105882352941176,1.0,"Russet");
-               public static readonly Color Rust = new Color(0.717647058823529,0.254901960784314,0.0549019607843137,1.0,"Rust");
-               public static readonly Color RustyRed = new Color(0.854901960784314,0.172549019607843,0.262745098039216,1.0,"RustyRed");
-               public static readonly Color SacramentoStateGreen = new Color(0,0.337254901960784,0.247058823529412,1.0,"SacramentoStateGreen");
-               public static readonly Color SaddleBrown = new Color(0.545098039215686,0.270588235294118,0.0745098039215686,1.0,"SaddleBrown");
-               public static readonly Color SafetyOrangeBlazeOrange = new Color(1,0.403921568627451,0,1.0,"SafetyOrangeBlazeOrange");
-               public static readonly Color Saffron = new Color(0.956862745098039,0.768627450980392,0.188235294117647,1.0,"Saffron");
-               public static readonly Color Salmon = new Color(1,0.549019607843137,0.411764705882353,1.0,"Salmon");
-               public static readonly Color SalmonPink = new Color(1,0.568627450980392,0.643137254901961,1.0,"SalmonPink");
-               public static readonly Color Sand = new Color(0.76078431372549,0.698039215686274,0.501960784313725,1.0,"Sand");
-               public static readonly Color SandDune = new Color(0.588235294117647,0.443137254901961,0.0901960784313725,1.0,"SandDune");
-               public static readonly Color Sandstorm = new Color(0.925490196078431,0.835294117647059,0.250980392156863,1.0,"Sandstorm");
-               public static readonly Color SandyBrown = new Color(0.956862745098039,0.643137254901961,0.376470588235294,1.0,"SandyBrown");
-               public static readonly Color SandyTaupe = new Color(0.588235294117647,0.443137254901961,0.0901960784313725,1.0,"SandyTaupe");
-               public static readonly Color Sangria = new Color(0.572549019607843,0,0.0392156862745098,1.0,"Sangria");
-               public static readonly Color SapGreen = new Color(0.313725490196078,0.490196078431373,0.164705882352941,1.0,"SapGreen");
-               public static readonly Color Sapphire = new Color(0.0588235294117647,0.32156862745098,0.729411764705882,1.0,"Sapphire");
-               public static readonly Color SapphireBlue = new Color(0,0.403921568627451,0.647058823529412,1.0,"SapphireBlue");
-               public static readonly Color SatinSheenGold = new Color(0.796078431372549,0.631372549019608,0.207843137254902,1.0,"SatinSheenGold");
-               public static readonly Color Scarlet = new Color(1,0.141176470588235,0,1.0,"Scarlet");
-               public static readonly Color ScarletCrayola = new Color(0.992156862745098,0.0549019607843137,0.207843137254902,1.0,"ScarletCrayola");
-               public static readonly Color SchoolBusYellow = new Color(1,0.847058823529412,0,1.0,"SchoolBusYellow");
-               public static readonly Color ScreaminGreen = new Color(0.462745098039216,1,0.47843137254902,1.0,"ScreaminGreen");
-               public static readonly Color SeaBlue = new Color(0,0.411764705882353,0.580392156862745,1.0,"SeaBlue");
-               public static readonly Color SeaGreen = new Color(0.180392156862745,0.545098039215686,0.341176470588235,1.0,"SeaGreen");
-               public static readonly Color SealBrown = new Color(0.196078431372549,0.0784313725490196,0.0784313725490196,1.0,"SealBrown");
-               public static readonly Color Seashell = new Color(1,0.96078431372549,0.933333333333333,1.0,"Seashell");
-               public static readonly Color SelectiveYellow = new Color(1,0.729411764705882,0,1.0,"SelectiveYellow");
-               public static readonly Color Sepia = new Color(0.43921568627451,0.258823529411765,0.0784313725490196,1.0,"Sepia");
-               public static readonly Color Shadow = new Color(0.541176470588235,0.474509803921569,0.364705882352941,1.0,"Shadow");
-               public static readonly Color ShamrockGreen = new Color(0,0.619607843137255,0.376470588235294,1.0,"ShamrockGreen");
-               public static readonly Color ShockingPink = new Color(0.988235294117647,0.0588235294117647,0.752941176470588,1.0,"ShockingPink");
-               public static readonly Color ShockingPinkCrayola = new Color(1,0.435294117647059,1,1.0,"ShockingPinkCrayola");
-               public static readonly Color Sienna = new Color(0.533333333333333,0.176470588235294,0.0901960784313725,1.0,"Sienna");
-               public static readonly Color Silver = new Color(0.752941176470588,0.752941176470588,0.752941176470588,1.0,"Silver");
-               public static readonly Color Sinopia = new Color(0.796078431372549,0.254901960784314,0.0431372549019608,1.0,"Sinopia");
-               public static readonly Color Skobeloff = new Color(0,0.454901960784314,0.454901960784314,1.0,"Skobeloff");
-               public static readonly Color SkyBlue = new Color(0.529411764705882,0.807843137254902,0.92156862745098,1.0,"SkyBlue");
-               public static readonly Color SkyMagenta = new Color(0.811764705882353,0.443137254901961,0.686274509803922,1.0,"SkyMagenta");
-               public static readonly Color SlateBlue = new Color(0.415686274509804,0.352941176470588,0.803921568627451,1.0,"SlateBlue");
-               public static readonly Color SlateGray = new Color(0.43921568627451,0.501960784313725,0.564705882352941,1.0,"SlateGray");
-               public static readonly Color SmaltDarkPowderBlue = new Color(0,0.2,0.6,1.0,"SmaltDarkPowderBlue");
-               public static readonly Color SmokeyTopaz = new Color(0.576470588235294,0.23921568627451,0.254901960784314,1.0,"SmokeyTopaz");
-               public static readonly Color SmokyBlack = new Color(0.0627450980392157,0.0470588235294118,0.0313725490196078,1.0,"SmokyBlack");
-               public static readonly Color Snow = new Color(1,0.980392156862745,0.980392156862745,1.0,"Snow");
-               public static readonly Color SpiroDiscoBall = new Color(0.0588235294117647,0.752941176470588,0.988235294117647,1.0,"SpiroDiscoBall");
-               public static readonly Color SpringBud = new Color(0.654901960784314,0.988235294117647,0,1.0,"SpringBud");
-               public static readonly Color SpringGreen = new Color(0,1,0.498039215686275,1.0,"SpringGreen");
-               public static readonly Color StPatrickSBlue = new Color(0.137254901960784,0.16078431372549,0.47843137254902,1.0,"StPatrickSBlue");
-               public static readonly Color SteelBlue = new Color(0.274509803921569,0.509803921568627,0.705882352941177,1.0,"SteelBlue");
-               public static readonly Color StilDeGrainYellow = new Color(0.980392156862745,0.854901960784314,0.368627450980392,1.0,"StilDeGrainYellow");
-               public static readonly Color Stizza = new Color(0.6,0,0,1.0,"Stizza");
-               public static readonly Color Stormcloud = new Color(0.309803921568627,0.4,0.415686274509804,1.0,"Stormcloud");
-               public static readonly Color Straw = new Color(0.894117647058824,0.850980392156863,0.435294117647059,1.0,"Straw");
-               public static readonly Color Sunglow = new Color(1,0.8,0.2,1.0,"Sunglow");
-               public static readonly Color Sunset = new Color(0.980392156862745,0.83921568627451,0.647058823529412,1.0,"Sunset");
-               public static readonly Color Tan = new Color(0.823529411764706,0.705882352941177,0.549019607843137,1.0,"Tan");
-               public static readonly Color Tangelo = new Color(0.976470588235294,0.301960784313725,0,1.0,"Tangelo");
-               public static readonly Color Tangerine = new Color(0.949019607843137,0.52156862745098,0,1.0,"Tangerine");
-               public static readonly Color TangerineYellow = new Color(1,0.8,0,1.0,"TangerineYellow");
-               public static readonly Color TangoPink = new Color(0.894117647058824,0.443137254901961,0.47843137254902,1.0,"TangoPink");
-               public static readonly Color Taupe = new Color(0.282352941176471,0.235294117647059,0.196078431372549,1.0,"Taupe");
-               public static readonly Color TaupeGray = new Color(0.545098039215686,0.52156862745098,0.537254901960784,1.0,"TaupeGray");
-               public static readonly Color TeaGreen = new Color(0.815686274509804,0.941176470588235,0.752941176470588,1.0,"TeaGreen");
-               public static readonly Color TeaRoseOrange = new Color(0.972549019607843,0.513725490196078,0.474509803921569,1.0,"TeaRoseOrange");
-               public static readonly Color TeaRoseRose = new Color(0.956862745098039,0.76078431372549,0.76078431372549,1.0,"TeaRoseRose");
-               public static readonly Color Teal = new Color(0,0.501960784313725,0.501960784313725,1.0,"Teal");
-               public static readonly Color TealBlue = new Color(0.211764705882353,0.458823529411765,0.533333333333333,1.0,"TealBlue");
-               public static readonly Color TealGreen = new Color(0,0.509803921568627,0.498039215686275,1.0,"TealGreen");
-               public static readonly Color Telemagenta = new Color(0.811764705882353,0.203921568627451,0.462745098039216,1.0,"Telemagenta");
-               public static readonly Color TennTawny = new Color(0.803921568627451,0.341176470588235,0,1.0,"TennTawny");
-               public static readonly Color TerraCotta = new Color(0.886274509803922,0.447058823529412,0.356862745098039,1.0,"TerraCotta");
-               public static readonly Color Thistle = new Color(0.847058823529412,0.749019607843137,0.847058823529412,1.0,"Thistle");
-               public static readonly Color ThulianPink = new Color(0.870588235294118,0.435294117647059,0.631372549019608,1.0,"ThulianPink");
-               public static readonly Color TickleMePink = new Color(0.988235294117647,0.537254901960784,0.674509803921569,1.0,"TickleMePink");
-               public static readonly Color TiffanyBlue = new Color(0.0392156862745098,0.729411764705882,0.709803921568627,1.0,"TiffanyBlue");
-               public static readonly Color TigerSEye = new Color(0.87843137254902,0.552941176470588,0.235294117647059,1.0,"TigerSEye");
-               public static readonly Color Timberwolf = new Color(0.858823529411765,0.843137254901961,0.823529411764706,1.0,"Timberwolf");
-               public static readonly Color TitaniumYellow = new Color(0.933333333333333,0.901960784313726,0,1.0,"TitaniumYellow");
-               public static readonly Color Tomato = new Color(1,0.388235294117647,0.27843137254902,1.0,"Tomato");
-               public static readonly Color Toolbox = new Color(0.454901960784314,0.423529411764706,0.752941176470588,1.0,"Toolbox");
-               public static readonly Color Topaz = new Color(1,0.784313725490196,0.486274509803922,1.0,"Topaz");
-               public static readonly Color TractorRed = new Color(0.992156862745098,0.0549019607843137,0.207843137254902,1.0,"TractorRed");
-               public static readonly Color TrolleyGrey = new Color(0.501960784313725,0.501960784313725,0.501960784313725,1.0,"TrolleyGrey");
-               public static readonly Color TropicalRainForest = new Color(0,0.458823529411765,0.368627450980392,1.0,"TropicalRainForest");
-               public static readonly Color TrueBlue = new Color(0,0.450980392156863,0.811764705882353,1.0,"TrueBlue");
-               public static readonly Color TuftsBlue = new Color(0.254901960784314,0.490196078431373,0.756862745098039,1.0,"TuftsBlue");
-               public static readonly Color Tumbleweed = new Color(0.870588235294118,0.666666666666667,0.533333333333333,1.0,"Tumbleweed");
-               public static readonly Color TurkishRose = new Color(0.709803921568627,0.447058823529412,0.505882352941176,1.0,"TurkishRose");
-               public static readonly Color Turquoise = new Color(0.188235294117647,0.835294117647059,0.784313725490196,1.0,"Turquoise");
-               public static readonly Color TurquoiseBlue = new Color(0,1,0.937254901960784,1.0,"TurquoiseBlue");
-               public static readonly Color TurquoiseGreen = new Color(0.627450980392157,0.83921568627451,0.705882352941177,1.0,"TurquoiseGreen");
-               public static readonly Color TuscanRed = new Color(0.486274509803922,0.282352941176471,0.282352941176471,1.0,"TuscanRed");
-               public static readonly Color TwilightLavender = new Color(0.541176470588235,0.286274509803922,0.419607843137255,1.0,"TwilightLavender");
-               public static readonly Color TyrianPurple = new Color(0.4,0.00784313725490196,0.235294117647059,1.0,"TyrianPurple");
-               public static readonly Color UaBlue = new Color(0,0.2,0.666666666666667,1.0,"UaBlue");
-               public static readonly Color UaRed = new Color(0.850980392156863,0,0.298039215686275,1.0,"UaRed");
-               public static readonly Color Ube = new Color(0.533333333333333,0.470588235294118,0.764705882352941,1.0,"Ube");
-               public static readonly Color UclaBlue = new Color(0.325490196078431,0.407843137254902,0.584313725490196,1.0,"UclaBlue");
-               public static readonly Color UclaGold = new Color(1,0.701960784313725,0,1.0,"UclaGold");
-               public static readonly Color UfoGreen = new Color(0.235294117647059,0.815686274509804,0.43921568627451,1.0,"UfoGreen");
-               public static readonly Color UltraPink = new Color(1,0.435294117647059,1,1.0,"UltraPink");
-               public static readonly Color Ultramarine = new Color(0.0705882352941176,0.0392156862745098,0.56078431372549,1.0,"Ultramarine");
-               public static readonly Color UltramarineBlue = new Color(0.254901960784314,0.4,0.96078431372549,1.0,"UltramarineBlue");
-               public static readonly Color Umber = new Color(0.388235294117647,0.317647058823529,0.27843137254902,1.0,"Umber");
-               public static readonly Color UnbleachedSilk = new Color(1,0.866666666666667,0.792156862745098,1.0,"UnbleachedSilk");
-               public static readonly Color UnitedNationsBlue = new Color(0.356862745098039,0.572549019607843,0.898039215686275,1.0,"UnitedNationsBlue");
-               public static readonly Color UniversityOfCaliforniaGold = new Color(0.717647058823529,0.529411764705882,0.152941176470588,1.0,"UniversityOfCaliforniaGold");
-               public static readonly Color UnmellowYellow = new Color(1,1,0.4,1.0,"UnmellowYellow");
-               public static readonly Color UpForestGreen = new Color(0.00392156862745098,0.266666666666667,0.129411764705882,1.0,"UpForestGreen");
-               public static readonly Color UpMaroon = new Color(0.482352941176471,0.0666666666666667,0.0745098039215686,1.0,"UpMaroon");
-               public static readonly Color UpsdellRed = new Color(0.682352941176471,0.125490196078431,0.16078431372549,1.0,"UpsdellRed");
-               public static readonly Color Urobilin = new Color(0.882352941176471,0.67843137254902,0.129411764705882,1.0,"Urobilin");
-               public static readonly Color UsafaBlue = new Color(0,0.309803921568627,0.596078431372549,1.0,"UsafaBlue");
-               public static readonly Color UscCardinal = new Color(0.6,0,0,1.0,"UscCardinal");
-               public static readonly Color UscGold = new Color(1,0.8,0,1.0,"UscGold");
-               public static readonly Color UtahCrimson = new Color(0.827450980392157,0,0.247058823529412,1.0,"UtahCrimson");
-               public static readonly Color Vanilla = new Color(0.952941176470588,0.898039215686275,0.670588235294118,1.0,"Vanilla");
-               public static readonly Color VegasGold = new Color(0.772549019607843,0.701960784313725,0.345098039215686,1.0,"VegasGold");
-               public static readonly Color VenetianRed = new Color(0.784313725490196,0.0313725490196078,0.0823529411764706,1.0,"VenetianRed");
-               public static readonly Color Verdigris = new Color(0.262745098039216,0.701960784313725,0.682352941176471,1.0,"Verdigris");
-               public static readonly Color VermilionCinnabar = new Color(0.890196078431373,0.258823529411765,0.203921568627451,1.0,"VermilionCinnabar");
-               public static readonly Color VermilionPlochere = new Color(0.850980392156863,0.376470588235294,0.231372549019608,1.0,"VermilionPlochere");
-               public static readonly Color Veronica = new Color(0.627450980392157,0.125490196078431,0.941176470588235,1.0,"Veronica");
-               public static readonly Color Violet = new Color(0.56078431372549,0,1,1.0,"Violet");
-               public static readonly Color VioletBlue = new Color(0.196078431372549,0.290196078431373,0.698039215686274,1.0,"VioletBlue");
-               public static readonly Color VioletColorWheel = new Color(0.498039215686275,0,1,1.0,"VioletColorWheel");
-               public static readonly Color VioletRyb = new Color(0.525490196078431,0.00392156862745098,0.686274509803922,1.0,"VioletRyb");
-               public static readonly Color VioletWeb = new Color(0.933333333333333,0.509803921568627,0.933333333333333,1.0,"VioletWeb");
-               public static readonly Color Viridian = new Color(0.250980392156863,0.509803921568627,0.427450980392157,1.0,"Viridian");
-               public static readonly Color VividAuburn = new Color(0.572549019607843,0.152941176470588,0.141176470588235,1.0,"VividAuburn");
-               public static readonly Color VividBurgundy = new Color(0.623529411764706,0.113725490196078,0.207843137254902,1.0,"VividBurgundy");
-               public static readonly Color VividCerise = new Color(0.854901960784314,0.113725490196078,0.505882352941176,1.0,"VividCerise");
-               public static readonly Color VividTangerine = new Color(1,0.627450980392157,0.537254901960784,1.0,"VividTangerine");
-               public static readonly Color VividViolet = new Color(0.623529411764706,0,1,1.0,"VividViolet");
-               public static readonly Color WarmBlack = new Color(0,0.258823529411765,0.258823529411765,1.0,"WarmBlack");
-               public static readonly Color Waterspout = new Color(0.643137254901961,0.956862745098039,0.976470588235294,1.0,"Waterspout");
-               public static readonly Color Wenge = new Color(0.392156862745098,0.329411764705882,0.32156862745098,1.0,"Wenge");
-               public static readonly Color Wheat = new Color(0.96078431372549,0.870588235294118,0.701960784313725,1.0,"Wheat");
-               public static readonly Color White = new Color(1,1,1,1.0,"White");
-               public static readonly Color WhiteSmoke = new Color(0.96078431372549,0.96078431372549,0.96078431372549,1.0,"WhiteSmoke");
-               public static readonly Color WildBlueYonder = new Color(0.635294117647059,0.67843137254902,0.815686274509804,1.0,"WildBlueYonder");
-               public static readonly Color WildStrawberry = new Color(1,0.262745098039216,0.643137254901961,1.0,"WildStrawberry");
-               public static readonly Color WildWatermelon = new Color(0.988235294117647,0.423529411764706,0.52156862745098,1.0,"WildWatermelon");
-               public static readonly Color Wine = new Color(0.447058823529412,0.184313725490196,0.215686274509804,1.0,"Wine");
-               public static readonly Color WineDregs = new Color(0.403921568627451,0.192156862745098,0.27843137254902,1.0,"WineDregs");
-               public static readonly Color Wisteria = new Color(0.788235294117647,0.627450980392157,0.862745098039216,1.0,"Wisteria");
-               public static readonly Color WoodBrown = new Color(0.756862745098039,0.603921568627451,0.419607843137255,1.0,"WoodBrown");
-               public static readonly Color Xanadu = new Color(0.450980392156863,0.525490196078431,0.470588235294118,1.0,"Xanadu");
-               public static readonly Color YaleBlue = new Color(0.0588235294117647,0.301960784313725,0.572549019607843,1.0,"YaleBlue");
-               public static readonly Color Yellow = new Color(1,1,0,1.0,"Yellow");
-               public static readonly Color YellowGreen = new Color(0.603921568627451,0.803921568627451,0.196078431372549,1.0,"YellowGreen");
-               public static readonly Color YellowMunsell = new Color(0.937254901960784,0.8,0,1.0,"YellowMunsell");
-               public static readonly Color YellowNcs = new Color(1,0.827450980392157,0,1.0,"YellowNcs");
-               public static readonly Color YellowOrange = new Color(1,0.682352941176471,0.258823529411765,1.0,"YellowOrange");
-               public static readonly Color YellowProcess = new Color(1,0.937254901960784,0,1.0,"YellowProcess");
-               public static readonly Color YellowRyb = new Color(0.996078431372549,0.996078431372549,0.2,1.0,"YellowRyb");
-               public static readonly Color Zaffre = new Color(0,0.0784313725490196,0.658823529411765,1.0,"Zaffre");
-               public static readonly Color ZinnwalditeBrown = new Color(0.172549019607843,0.0862745098039216,0.0313725490196078,1.0,"ZinnwalditeBrown");
-               #endregion
+               public static readonly Color AliceBlue = new Color(240,248,255,"AliceBlue","#F0F8FF");
+               public static readonly Color AntiqueWhite = new Color(250,235,215,"AntiqueWhite","#FAEBD7");
+               public static readonly Color Aqua = new Color(0,255,255,"Aqua","#00FFFF");
+               public static readonly Color Aquamarine = new Color(127,255,212,"Aquamarine","#7FFFD4");
+               public static readonly Color Azure = new Color(240,255,255,"Azure","#F0FFFF");
+               public static readonly Color Beige = new Color(245,245,220,"Beige","#F5F5DC");
+               public static readonly Color Bisque = new Color(255,228,196,"Bisque","#FFE4C4");
+               public static readonly Color Black = new Color(0,0,0,"Black","#000000");
+               public static readonly Color BlanchedAlmond = new Color(255,235,205,"BlanchedAlmond","#FFEBCD");
+               public static readonly Color Blue = new Color(0,0,255,"Blue","#0000FF");
+               public static readonly Color BlueViolet = new Color(138,43,226,"BlueViolet","#8A2BE2");
+               public static readonly Color Brown = new Color(165,42,42,"Brown","#A52A2A");
+               public static readonly Color BurlyWood = new Color(222,184,135,"BurlyWood","#DEB887");
+               public static readonly Color CadetBlue = new Color(95,158,160,"CadetBlue","#5F9EA0");
+               public static readonly Color Chartreuse = new Color(127,255,0,"Chartreuse","#7FFF00");
+               public static readonly Color Chocolate = new Color(210,105,30,"Chocolate","#D2691E");
+               public static readonly Color Coral = new Color(255,127,80,"Coral","#FF7F50");
+               public static readonly Color CornflowerBlue = new Color(100,149,237,"CornflowerBlue","#6495ED");
+               public static readonly Color Cornsilk = new Color(255,248,220,"Cornsilk","#FFF8DC");
+               public static readonly Color Crimson = new Color(220,20,60,"Crimson","#DC143C");
+               public static readonly Color Cyan = new Color(0,255,255,"Cyan","#00FFFF");
+               public static readonly Color DarkBlue = new Color(0,0,139,"DarkBlue","#00008B");
+               public static readonly Color DarkCyan = new Color(0,139,139,"DarkCyan","#008B8B");
+               public static readonly Color DarkGoldenRod = new Color(184,134,11,"DarkGoldenRod","#B8860B");
+               public static readonly Color DarkGray = new Color(169,169,169,"DarkGray","#A9A9A9");
+               public static readonly Color DarkGrey = new Color(169,169,169,"DarkGrey","#A9A9A9");
+               public static readonly Color DarkGreen = new Color(0,100,0,"DarkGreen","#006400");
+               public static readonly Color DarkKhaki = new Color(189,183,107,"DarkKhaki","#BDB76B");
+               public static readonly Color DarkMagenta = new Color(139,0,139,"DarkMagenta","#8B008B");
+               public static readonly Color DarkOliveGreen = new Color(85,107,47,"DarkOliveGreen","#556B2F");
+               public static readonly Color DarkOrange = new Color(255,140,0,"DarkOrange","#FF8C00");
+               public static readonly Color DarkOrchid = new Color(153,50,204,"DarkOrchid","#9932CC");
+               public static readonly Color DarkRed = new Color(139,0,0,"DarkRed","#8B0000");
+               public static readonly Color DarkSalmon = new Color(233,150,122,"DarkSalmon","#E9967A");
+               public static readonly Color DarkSeaGreen = new Color(143,188,143,"DarkSeaGreen","#8FBC8F");
+               public static readonly Color DarkSlateBlue = new Color(72,61,139,"DarkSlateBlue","#483D8B");
+               public static readonly Color DarkSlateGray = new Color(47,79,79,"DarkSlateGray","#2F4F4F");
+               public static readonly Color DarkSlateGrey = new Color(47,79,79,"DarkSlateGrey","#2F4F4F");
+               public static readonly Color DarkTurquoise = new Color(0,206,209,"DarkTurquoise","#00CED1");
+               public static readonly Color DarkViolet = new Color(148,0,211,"DarkViolet","#9400D3");
+               public static readonly Color DeepPink = new Color(255,20,147,"DeepPink","#FF1493");
+               public static readonly Color DeepSkyBlue = new Color(0,191,255,"DeepSkyBlue","#00BFFF");
+               public static readonly Color DimGray = new Color(105,105,105,"DimGray","#696969");
+               public static readonly Color DimGrey = new Color(105,105,105,"DimGrey","#696969");
+               public static readonly Color DodgerBlue = new Color(30,144,255,"DodgerBlue","#1E90FF");
+               public static readonly Color FireBrick = new Color(178,34,34,"FireBrick","#B22222");
+               public static readonly Color FloralWhite = new Color(255,250,240,"FloralWhite","#FFFAF0");
+               public static readonly Color ForestGreen = new Color(34,139,34,"ForestGreen","#228B22");
+               public static readonly Color Fuchsia = new Color(255,0,255,"Fuchsia","#FF00FF");
+               public static readonly Color Gainsboro = new Color(220,220,220,"Gainsboro","#DCDCDC");
+               public static readonly Color GhostWhite = new Color(248,248,255,"GhostWhite","#F8F8FF");
+               public static readonly Color Gold = new Color(255,215,0,"Gold","#FFD700");
+               public static readonly Color GoldenRod = new Color(218,165,32,"GoldenRod","#DAA520");
+               public static readonly Color Gray = new Color(128,128,128,"Gray","#808080");
+               public static readonly Color Grey = new Color(128,128,128,"Grey","#808080");
+               public static readonly Color Green = new Color(0,128,0,"Green","#008000");
+               public static readonly Color GreenYellow = new Color(173,255,47,"GreenYellow","#ADFF2F");
+               public static readonly Color HoneyDew = new Color(240,255,240,"HoneyDew","#F0FFF0");
+               public static readonly Color HotPink = new Color(255,105,180,"HotPink","#FF69B4");
+               public static readonly Color IndianRed = new Color(205,92,92,"IndianRed","#CD5C5C");
+               public static readonly Color Indigo = new Color(75,0,130,"Indigo","#4B0082");
+               public static readonly Color Ivory = new Color(255,255,240,"Ivory","#FFFFF0");
+               public static readonly Color Jet = new Color(52,52,52,"Jet","#343434");
+               public static readonly Color Khaki = new Color(240,230,140,"Khaki","#F0E68C");
+               public static readonly Color Lavender = new Color(230,230,250,"Lavender","#E6E6FA");
+               public static readonly Color LavenderBlush = new Color(255,240,245,"LavenderBlush","#FFF0F5");
+               public static readonly Color LawnGreen = new Color(124,252,0,"LawnGreen","#7CFC00");
+               public static readonly Color LemonChiffon = new Color(255,250,205,"LemonChiffon","#FFFACD");
+               public static readonly Color LightBlue = new Color(173,216,230,"LightBlue","#ADD8E6");
+               public static readonly Color LightCoral = new Color(240,128,128,"LightCoral","#F08080");
+               public static readonly Color LightCyan = new Color(224,255,255,"LightCyan","#E0FFFF");
+               public static readonly Color LightGoldenRodYellow = new Color(250,250,210,"LightGoldenRodYellow","#FAFAD2");
+               public static readonly Color LightGray = new Color(211,211,211,"LightGray","#D3D3D3");
+               public static readonly Color LightGrey = new Color(211,211,211,"LightGrey","#D3D3D3");
+               public static readonly Color LightGreen = new Color(144,238,144,"LightGreen","#90EE90");
+               public static readonly Color LightPink = new Color(255,182,193,"LightPink","#FFB6C1");
+               public static readonly Color LightSalmon = new Color(255,160,122,"LightSalmon","#FFA07A");
+               public static readonly Color LightSeaGreen = new Color(32,178,170,"LightSeaGreen","#20B2AA");
+               public static readonly Color LightSkyBlue = new Color(135,206,250,"LightSkyBlue","#87CEFA");
+               public static readonly Color LightSlateGray = new Color(119,136,153,"LightSlateGray","#778899");
+               public static readonly Color LightSlateGrey = new Color(119,136,153,"LightSlateGrey","#778899");
+               public static readonly Color LightSteelBlue = new Color(176,196,222,"LightSteelBlue","#B0C4DE");
+               public static readonly Color LightYellow = new Color(255,255,224,"LightYellow","#FFFFE0");
+               public static readonly Color Lime = new Color(0,255,0,"Lime","#00FF00");
+               public static readonly Color LimeGreen = new Color(50,205,50,"LimeGreen","#32CD32");
+               public static readonly Color Linen = new Color(250,240,230,"Linen","#FAF0E6");
+               public static readonly Color Magenta = new Color(255,0,255,"Magenta","#FF00FF");
+               public static readonly Color Maroon = new Color(128,0,0,"Maroon","#800000");
+               public static readonly Color MediumAquaMarine = new Color(102,205,170,"MediumAquaMarine","#66CDAA");
+               public static readonly Color MediumBlue = new Color(0,0,205,"MediumBlue","#0000CD");
+               public static readonly Color MediumOrchid = new Color(186,85,211,"MediumOrchid","#BA55D3");
+               public static readonly Color MediumPurple = new Color(147,112,219,"MediumPurple","#9370DB");
+               public static readonly Color MediumSeaGreen = new Color(60,179,113,"MediumSeaGreen","#3CB371");
+               public static readonly Color MediumSlateBlue = new Color(123,104,238,"MediumSlateBlue","#7B68EE");
+               public static readonly Color MediumSpringGreen = new Color(0,250,154,"MediumSpringGreen","#00FA9A");
+               public static readonly Color MediumTurquoise = new Color(72,209,204,"MediumTurquoise","#48D1CC");
+               public static readonly Color MediumVioletRed = new Color(199,21,133,"MediumVioletRed","#C71585");
+               public static readonly Color MidnightBlue = new Color(25,25,112,"MidnightBlue","#191970");
+               public static readonly Color MintCream = new Color(245,255,250,"MintCream","#F5FFFA");
+               public static readonly Color MistyRose = new Color(255,228,225,"MistyRose","#FFE4E1");
+               public static readonly Color Moccasin = new Color(255,228,181,"Moccasin","#FFE4B5");
+               public static readonly Color NavajoWhite = new Color(255,222,173,"NavajoWhite","#FFDEAD");
+               public static readonly Color Navy = new Color(0,0,128,"Navy","#000080");
+               public static readonly Color OldLace = new Color(253,245,230,"OldLace","#FDF5E6");
+               public static readonly Color Olive = new Color(128,128,0,"Olive","#808000");
+               public static readonly Color OliveDrab = new Color(107,142,35,"OliveDrab","#6B8E23");
+               public static readonly Color Onyx = new Color(53,56,57,"Onyx","#353839");
+               public static readonly Color Orange = new Color(255,165,0,"Orange","#FFA500");
+               public static readonly Color OrangeRed = new Color(255,69,0,"OrangeRed","#FF4500");
+               public static readonly Color Orchid = new Color(218,112,214,"Orchid","#DA70D6");
+               public static readonly Color PaleGoldenRod = new Color(238,232,170,"PaleGoldenRod","#EEE8AA");
+               public static readonly Color PaleGreen = new Color(152,251,152,"PaleGreen","#98FB98");
+               public static readonly Color PaleTurquoise = new Color(175,238,238,"PaleTurquoise","#AFEEEE");
+               public static readonly Color PaleVioletRed = new Color(219,112,147,"PaleVioletRed","#DB7093");
+               public static readonly Color PapayaWhip = new Color(255,239,213,"PapayaWhip","#FFEFD5");
+               public static readonly Color PeachPuff = new Color(255,218,185,"PeachPuff","#FFDAB9");
+               public static readonly Color Peru = new Color(205,133,63,"Peru","#CD853F");
+               public static readonly Color Pink = new Color(255,192,203,"Pink","#FFC0CB");
+               public static readonly Color Plum = new Color(221,160,221,"Plum","#DDA0DD");
+               public static readonly Color PowderBlue = new Color(176,224,230,"PowderBlue","#B0E0E6");
+               public static readonly Color Purple = new Color(128,0,128,"Purple","#800080");
+               public static readonly Color RebeccaPurple = new Color(102,51,153,"RebeccaPurple","#663399");
+               public static readonly Color Red = new Color(255,0,0,"Red","#FF0000");
+               public static readonly Color RosyBrown = new Color(188,143,143,"RosyBrown","#BC8F8F");
+               public static readonly Color RoyalBlue = new Color(65,105,225,"RoyalBlue","#4169E1");
+               public static readonly Color SaddleBrown = new Color(139,69,19,"SaddleBrown","#8B4513");
+               public static readonly Color Salmon = new Color(250,128,114,"Salmon","#FA8072");
+               public static readonly Color SandyBrown = new Color(244,164,96,"SandyBrown","#F4A460");
+               public static readonly Color SeaGreen = new Color(46,139,87,"SeaGreen","#2E8B57");
+               public static readonly Color SeaShell = new Color(255,245,238,"SeaShell","#FFF5EE");
+               public static readonly Color Sienna = new Color(160,82,45,"Sienna","#A0522D");
+               public static readonly Color Silver = new Color(192,192,192,"Silver","#C0C0C0");
+               public static readonly Color SkyBlue = new Color(135,206,235,"SkyBlue","#87CEEB");
+               public static readonly Color SlateBlue = new Color(106,90,205,"SlateBlue","#6A5ACD");
+               public static readonly Color SlateGray = new Color(112,128,144,"SlateGray","#708090");
+               public static readonly Color SlateGrey = new Color(112,128,144,"SlateGrey","#708090");
+               public static readonly Color Snow = new Color(255,250,250,"Snow","#FFFAFA");
+               public static readonly Color SpringGreen = new Color(0,255,127,"SpringGreen","#00FF7F");
+               public static readonly Color SteelBlue = new Color(70,130,180,"SteelBlue","#4682B4");
+               public static readonly Color Tan = new Color(210,180,140,"Tan","#D2B48C");
+               public static readonly Color Teal = new Color(0,128,128,"Teal","#008080");
+               public static readonly Color Thistle = new Color(216,191,216,"Thistle","#D8BFD8");
+               public static readonly Color Tomato = new Color(255,99,71,"Tomato","#FF6347");
+               public static readonly Color Turquoise = new Color(64,224,208,"Turquoise","#40E0D0");
+               public static readonly Color Violet = new Color(238,130,238,"Violet","#EE82EE");
+               public static readonly Color Wheat = new Color(245,222,179,"Wheat","#F5DEB3");
+               public static readonly Color White = new Color(255,255,255,"White","#FFFFFF");
+               public static readonly Color WhiteSmoke = new Color(245,245,245,"WhiteSmoke","#F5F5F5");
+               public static readonly Color Yellow = new Color(255,255,0,"Yellow","#FFFF00");
+               public static readonly Color YellowGreen = new Color(154,205,50,"YellowGreen","#9ACD32");
 
-               #region IXmlSerializable
-               public void ReadXml(System.Xml.XmlReader reader)
-        {
-                       string[] c = reader["Color"].Split(new char[] { ',' });
-                       R = double.Parse(c[0]);
-                       G = double.Parse(c[1]);
-                       B = double.Parse(c[2]);
-                       A = double.Parse(c[3]);
-        }
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            writer.WriteAttributeString("Color", this.ToString());
-        }
-        public System.Xml.Schema.XmlSchema GetSchema()
-        {
-            return null;
-        }
                #endregion
 
                public override int GetHashCode ()
@@ -1141,11 +452,11 @@ namespace Crow
                {
                        if (!string.IsNullOrEmpty(Name))
                                return Name;
-                       Color tc = this;
-                       if (ColorDic.ContainsValue (this))
-                               return ColorDic.FirstOrDefault (c => c.Value == tc).Key;
-
-                       return string.Format("{0},{1},{2},{3}", R, G, B, A);
+                       if (!string.IsNullOrEmpty (htmlCode))
+                               return htmlCode;
+                       string hc = HtmlCode;
+                       Color pc = ColorDic.Values.FirstOrDefault (c => c.htmlCode == hc);
+                       return pc.predefinied ? pc.Name : hc;
                }
 
         public static object Parse(string s)
index f2be5993c50a765fdeff1671f2ee7bb77fbe3b76..adeb32e70a9903abbc784cfce03af5b9cfe6a435 100644 (file)
@@ -55,7 +55,7 @@ namespace Crow
                int _borderWidth;
                BorderStyle _borderStyle;
                Fill raisedColor = Color.Gray;
-               Fill sunkenColor = Color.Jet;
+               Fill sunkenColor = Color.DimGray;
                #endregion
 
                #region public properties
index ee0d31daaadba10b89c199de0fa7bd13886535b3..cc955191f542e9cf08d86c6835a0a53392933317 100644 (file)
@@ -165,11 +165,12 @@ namespace Crow
                                NotifyValueChanged ("SelectedColorName", n);
                        else
                                NotifyValueChanged ("SelectedColorName", "-");
-                       NotifyValueChanged ("HexColor",
-                               ((int)Math.Round(R)).ToString ("X2") +
-                               ((int)Math.Round(G)).ToString ("X2") +
-                               ((int)Math.Round(B)).ToString ("X2") +
-                               ((int)Math.Round(A)).ToString ("X2"));
+                       string tmp = ((int)Math.Round (R)).ToString ("X2") +
+                                    ((int)Math.Round (G)).ToString ("X2") +
+                                    ((int)Math.Round (B)).ToString ("X2");
+                       if (curColor.A < 1.0)
+                               tmp += ((int)Math.Round (A)).ToString ("X2");
+                       NotifyValueChanged ("HexColor", tmp);
                }
                void notifyRGBAHasChanged(){
                        NotifyValueChanged ("R", R);
index 83d919566a4069b9a41f25b06a4717a90b4e36ac..1920a8fe202b8e0b10fa2ed08a4b3e97f02002b9 100644 (file)
@@ -90,7 +90,7 @@ namespace Crow
 
                                bool isExp = IsExpandable;
                                NotifyValueChanged ("IsExpandable", isExp);
-                               if (!(HasContent & isExp))
+                               if (!isExp)
                                        _isExpanded = false;
 
                                NotifyValueChanged ("IsExpanded", _isExpanded);
index 5b6438c2168846fbd6b307dd4234f6edf67380e3..9e5e440195c74fbcf67865bff22fbdcfe4ddf765 100644 (file)
@@ -184,7 +184,7 @@ namespace Crow
                internal ulong uid = 0;
 
                internal bool isPopup = false;
-               internal GraphicObject focusParent {
+               public GraphicObject focusParent {
                        get { return (isPopup ? LogicalParent : parent) as GraphicObject; }
                }
 
index 62070aa0d98305576995dd8a4b78047798f5aa69..0e0d9fe19ee0262ad4711e2740372cd54263826c 100644 (file)
@@ -87,7 +87,7 @@ namespace Crow
                protected TextExtents te;
                #endregion
 
-               [XmlAttributeAttribute][DefaultValue("BlueGray")]
+               [XmlAttributeAttribute][DefaultValue("SteelBlue")]
                public virtual Color SelectionBackground {
                        get { return selBackground; }
                        set {
index 6f93f718348160f1404a29679f996ccbc830acef..485a33d2e027615e971bc4da3f22fecba21bfc36 100644 (file)
@@ -102,7 +102,7 @@ namespace Crow
 
                        ctx.Translate (rb.X, rb.Y);
 
-                       ctx.SetSourceColor (Color.Jet);
+                       ctx.SetSourceColor (Color.DimGrey);
                        ctx.Arc (mousePos.X, mousePos.Y, 3.5, 0, Math.PI * 2.0);
                        ctx.LineWidth = 0.5;
                        ctx.Stroke ();
index d95f3d75c173d631d8643108e652d9f29ba2eb23..56632ff3a8e2fcab5af7c31b4107e1c2d67c5283 100644 (file)
@@ -52,7 +52,7 @@ namespace Crow
                bool modal;
                protected bool hoverBorder = false;
                bool alwaysOnTop = false;
-               Fill titleBarBackground = Color.UnitedNationsBlue;
+               Fill titleBarBackground = Color.SteelBlue;
                Fill titleBarForeground = Color.White;
 
                Rectangle savedBounds;
@@ -97,7 +97,7 @@ namespace Crow
                /// <summary>
                /// Background of the title bar if any.
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue("vgradient|0:Onyx|1:UnitedNationsBlue")]
+               [XmlAttributeAttribute][DefaultValue("vgradient|0:Onyx|1:SteelBlue")]
                public virtual Fill TitleBarBackground {
                        get { return titleBarBackground; }
                        set {
index 3eab819a417f665e03a622176fd8ad52457dfac2..001832b108ca79997f9bb4a970688498657e66ff 100644 (file)
@@ -145,13 +145,9 @@ namespace Crow.IML
                /// <param name="fragment">IML string</param>
                public static Instantiator CreateFromImlFragment (Interface _iface, string fragment)
                {
-//                     try {
-                               using (Stream s = new MemoryStream (Encoding.UTF8.GetBytes (fragment))) {
-                                       return new Instantiator (_iface, s);
-                               }
-//                     } catch (Exception ex) {
-//                             throw new Exception ("IML Error: " + ex.Message);
-//                     }
+                       using (Stream s = new MemoryStream (Encoding.UTF8.GetBytes (fragment))) {
+                               return new Instantiator (_iface, s);
+                       }
                }
                #endregion
 
index 349243b26ac2422ce9bf08a0dfb174464058d82c..cc62a1aa82f02518d51d010d22c2c672802e58e6 100644 (file)
@@ -421,7 +421,7 @@ namespace Crow
                /// </summary>
                /// <returns>new Instantiator</returns>
                /// <param name="path">path of the iml file to load</param>
-               public virtual Instantiator GetInstantiator(string path){
+               public Instantiator GetInstantiator(string path){
                        if (!Instantiators.ContainsKey(path))
                                Instantiators [path] = new Instantiator(this, path);
                        return Instantiators [path];
@@ -899,7 +899,7 @@ namespace Crow
                                GraphicObject topc = null;
                                while (tmp is GraphicObject) {
                                        topc = tmp;
-                                       tmp = tmp.LogicalParent as GraphicObject;
+                                       tmp = tmp.focusParent;
                                }
                                int idxhw = GraphicTree.IndexOf (topc);
                                if (idxhw != 0) {
index c3d49e23bfe5392163b3b35f13bd5a5be47efe1f..96bfccc995e8d6598f831ed3d202d5796720bb01 100644 (file)
@@ -37,6 +37,7 @@ namespace Crow
                        ListAdd.Raise (this, new ListChangedEventArg (this.Count - 1, elem));
                }
                public void RemoveElement (T elem) {
+                       System.Diagnostics.Debug.WriteLine ("remove elem:" + elem);
                        int idx = this.IndexOf (elem);
                        this.RemoveAt (idx);
                        ListRemove.Raise (this, new ListChangedEventArg (idx, elem));
index ccd1ab312566995a3d8aa7d4bdb56996c6f0f40a..891c1fb5f231f4bc3f900015458a584a4485ede6 100644 (file)
@@ -163,6 +163,14 @@ namespace Crow
         {
             return new Size(s.Width + i, s.Height + i);
         }
+               public static Size operator *(Size s, int i)
+               {
+                       return new Size(s.Width * i, s.Height * i);
+               }
+               public static Size operator /(Size s, int i)
+               {
+                       return new Size(s.Width / i, s.Height / i);
+               }
                #endregion
 
                public override int GetHashCode ()
index e8a3ca136398088c628cfde6dfebdf69e7c1242e..458b785663268d577ebb08a216a3fca76c1dba4d 100644 (file)
@@ -183,18 +183,18 @@ namespace Crow
                        }
                }
 
-               public override int Read ()
-               {                       
-                       int tmp = base.Read ();
-                       char c = (char)tmp;
-                       if (c == '\n') {
-                               line++;
-                               column = 1;
-                       } else if (c == '\t')
-                               column += Interface.TabSize;
-                       else if (c != '\r')
-                               column++;
-                       return tmp;
-               }
+//             public override int Read ()
+//             {                       
+//                     int tmp = base.Read ();
+//                     char c = (char)tmp;
+//                     if (c == '\n') {
+//                             line++;
+//                             column = 1;
+//                     } else if (c == '\t')
+//                             column += Interface.TabSize;
+//                     else if (c != '\r')
+//                             column++;
+//                     return tmp;
+//             }
        }
 }