]> O.S.I.I.S - jp/crow.git/commitdiff
test with simpler text buffer
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 12 Mar 2018 13:17:43 +0000 (14:17 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 12 Mar 2018 13:17:43 +0000 (14:17 +0100)
41 files changed:
CrowIDE/CrowIDE.csproj
CrowIDE/icons/binding.svg
CrowIDE/icons/curly-brackets.svg
CrowIDE/icons/edit.svg
CrowIDE/icons/eraser.svg
CrowIDE/icons/expand-arrows-1.svg
CrowIDE/icons/file.svg [new file with mode: 0644]
CrowIDE/icons/folder.svg [new file with mode: 0644]
CrowIDE/icons/light-bulb.svg
CrowIDE/icons/magic-wand.svg
CrowIDE/icons/magnet.svg
CrowIDE/icons/move-arrows.svg
CrowIDE/icons/open-folder-1.svg [new file with mode: 0644]
CrowIDE/icons/paint-brush.svg
CrowIDE/icons/palette.svg
CrowIDE/icons/pin.svg
CrowIDE/icons/redo.svg
CrowIDE/icons/search.svg
CrowIDE/icons/text-file.svg
CrowIDE/icons/tools.svg
CrowIDE/icons/trash.svg
CrowIDE/icons/undo.svg
CrowIDE/icons/zoom-in.svg
CrowIDE/icons/zoom-out.svg
CrowIDE/src/CrowIDE.cs
CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs
CrowIDE/src/Editors/CodeBuffer/TextBuffer.cs [new file with mode: 0644]
CrowIDE/src/Editors/CodeBuffer/TextEditor.cs [new file with mode: 0644]
CrowIDE/src/Editors/Editor.cs
CrowIDE/src/Editors/ImlSchematicEditor.cs [new file with mode: 0644]
CrowIDE/src/Editors/ImlVisualEditor.cs
CrowIDE/ui/CSProjExplorer.crow [deleted file]
CrowIDE/ui/CrowIDE.crow
CrowIDE/ui/DockWindows/WinSchemaItem.template [new file with mode: 0755]
CrowIDE/ui/DockWindows/winSchema.crow [new file with mode: 0644]
CrowIDE/ui/IDE.style
CrowIDE/ui/ProjectProperties.crow
CrowIDE/ui/ProjectTree.template
CrowIDE/ui/TreeExpandable.template
CrowIDE/ui/editors/EditPaneItems.template
CrowIDE/ui/editors/TextEditor.crow [new file with mode: 0644]

index 205e7f192754d4e967432a0c177230b10a88cfca..6f423c09f5ab2f0e5ac7adc0ac522141bf74fabd 100644 (file)
     <Compile Include="src\ProjectTree\ProjectReference.cs" />
     <Compile Include="src\ProjectTree\ProjectFile.cs" />
     <Compile Include="src\ProjectTree\ImlProjectItem.cs" />
+    <Compile Include="src\Editors\CodeBuffer\TextBuffer.cs" />
+    <Compile Include="src\Editors\CodeBuffer\TextEditor.cs" />
+    <Compile Include="src\Editors\ImlSchematicEditor.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="ui\" />
     </EmbeddedResource>
     <EmbeddedResource Include="ui\LQIsExplorer.crow" />
     <EmbeddedResource Include="ui\MemberView.crow" />
-    <EmbeddedResource Include="ui\CSProjExplorer.crow" />
     <EmbeddedResource Include="ui\ProjectProperties.crow" />
     <EmbeddedResource Include="ui\TreeExpandable.template">
       <LogicalName>Crow.TreeExpandable.template</LogicalName>
     <EmbeddedResource Include="icons\text-file.svg" />
     <EmbeddedResource Include="icons\undo.svg" />
     <EmbeddedResource Include="icons\redo.svg" />
+    <EmbeddedResource Include="icons\folder.svg" />
+    <EmbeddedResource Include="icons\file.svg" />
     <EmbeddedResource Include="ui\ContextMenu.template">
       <LogicalName>Crow.ContextMenu.template</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="icons\save.svg" />
     <EmbeddedResource Include="icons\open.svg" />
     <EmbeddedResource Include="ui\NewFile.crow" />
+    <EmbeddedResource Include="ui\DockWindows\winSchema.crow" />
+    <EmbeddedResource Include="ui\DockWindows\WinSchemaItem.template" />
+    <EmbeddedResource Include="ui\editors\TextEditor.crow">
+      <LogicalName>Crow.Coding.ui.TextEditor.crow</LogicalName>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <None Include="ui\test.crow">
index 3d825c65843cd1bd8c9ca07adbad787bbbdd602b..04f669ecad77a14cbd717835a81b087f5deed73e 100644 (file)
@@ -2,6 +2,6 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M14.9 1.1c-1.4-1.4-3.7-1.4-5.1 0l-4.4 4.3c-1.4 1.5-1.4 3.7 0 5.2 0.1 0.1 0.3 0.2 0.4 0.3l1.5-1.5c-0.1-0.1-0.3-0.2-0.4-0.3-0.6-0.6-0.6-1.6 0-2.2l4.4-4.4c0.6-0.6 1.6-0.6 2.2 0s0.6 1.6 0 2.2l-1.3 1.3c0.4 0.8 0.5 1.7 0.4 2.5l2.3-2.3c1.5-1.4 1.5-3.7 0-5.1z"></path>
-<path fill="#444444" d="M10.2 5.1l-1.5 1.5c0 0 0.3 0.2 0.4 0.3 0.6 0.6 0.6 1.6 0 2.2l-4.4 4.4c-0.6 0.6-1.6 0.6-2.2 0s-0.6-1.6 0-2.2l1.3-1.3c-0.4-0.8-0.1-1.3-0.4-2.5l-2.3 2.3c-1.4 1.4-1.4 3.7 0 5.1s3.7 1.4 5.1 0l4.4-4.4c1.4-1.4 1.4-3.7 0-5.1-0.2-0.1-0.4-0.3-0.4-0.3z"></path>
+<path fill="#dddddd" d="M14.9 1.1c-1.4-1.4-3.7-1.4-5.1 0l-4.4 4.3c-1.4 1.5-1.4 3.7 0 5.2 0.1 0.1 0.3 0.2 0.4 0.3l1.5-1.5c-0.1-0.1-0.3-0.2-0.4-0.3-0.6-0.6-0.6-1.6 0-2.2l4.4-4.4c0.6-0.6 1.6-0.6 2.2 0s0.6 1.6 0 2.2l-1.3 1.3c0.4 0.8 0.5 1.7 0.4 2.5l2.3-2.3c1.5-1.4 1.5-3.7 0-5.1z"></path>
+<path fill="#dddddd" d="M10.2 5.1l-1.5 1.5c0 0 0.3 0.2 0.4 0.3 0.6 0.6 0.6 1.6 0 2.2l-4.4 4.4c-0.6 0.6-1.6 0.6-2.2 0s-0.6-1.6 0-2.2l1.3-1.3c-0.4-0.8-0.1-1.3-0.4-2.5l-2.3 2.3c-1.4 1.4-1.4 3.7 0 5.1s3.7 1.4 5.1 0l4.4-4.4c1.4-1.4 1.4-3.7 0-5.1-0.2-0.1-0.4-0.3-0.4-0.3z"></path>
 </svg>
index f70fe9fad6a1de2deda2e5a1c1adaf05fc9295df..89ef798c4aef4fe64f9239face1728c679e09cbd 100644 (file)
@@ -2,6 +2,6 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M2.1 3.1c0.2 1.3 0.4 1.6 0.4 2.9 0 0.8-1.5 1.5-1.5 1.5v1c0 0 1.5 0.7 1.5 1.5 0 1.3-0.2 1.6-0.4 2.9-0.3 2.1 0.8 3.1 1.8 3.1s2.1 0 2.1 0v-2c0 0-1.8 0.2-1.8-1 0-0.9 0.2-0.9 0.4-2.9 0.1-0.9-0.5-1.6-1.1-2.1 0.6-0.5 1.2-1.1 1.1-2-0.3-2-0.4-2-0.4-2.9 0-1.2 1.8-1.1 1.8-1.1v-2c0 0-1 0-2.1 0s-2.1 1-1.8 3.1z"></path>
-<path fill="#444444" d="M13.9 3.1c-0.2 1.3-0.4 1.6-0.4 2.9 0 0.8 1.5 1.5 1.5 1.5v1c0 0-1.5 0.7-1.5 1.5 0 1.3 0.2 1.6 0.4 2.9 0.3 2.1-0.8 3.1-1.8 3.1s-2.1 0-2.1 0v-2c0 0 1.8 0.2 1.8-1 0-0.9-0.2-0.9-0.4-2.9-0.1-0.9 0.5-1.6 1.1-2.1-0.6-0.5-1.2-1.1-1.1-2 0.2-2 0.4-2 0.4-2.9 0-1.2-1.8-1.1-1.8-1.1v-2c0 0 1 0 2.1 0s2.1 1 1.8 3.1z"></path>
+<path fill="#dddddd" d="M2.1 3.1c0.2 1.3 0.4 1.6 0.4 2.9 0 0.8-1.5 1.5-1.5 1.5v1c0 0 1.5 0.7 1.5 1.5 0 1.3-0.2 1.6-0.4 2.9-0.3 2.1 0.8 3.1 1.8 3.1s2.1 0 2.1 0v-2c0 0-1.8 0.2-1.8-1 0-0.9 0.2-0.9 0.4-2.9 0.1-0.9-0.5-1.6-1.1-2.1 0.6-0.5 1.2-1.1 1.1-2-0.3-2-0.4-2-0.4-2.9 0-1.2 1.8-1.1 1.8-1.1v-2c0 0-1 0-2.1 0s-2.1 1-1.8 3.1z"></path>
+<path fill="#dddddd" d="M13.9 3.1c-0.2 1.3-0.4 1.6-0.4 2.9 0 0.8 1.5 1.5 1.5 1.5v1c0 0-1.5 0.7-1.5 1.5 0 1.3 0.2 1.6 0.4 2.9 0.3 2.1-0.8 3.1-1.8 3.1s-2.1 0-2.1 0v-2c0 0 1.8 0.2 1.8-1 0-0.9-0.2-0.9-0.4-2.9-0.1-0.9 0.5-1.6 1.1-2.1-0.6-0.5-1.2-1.1-1.1-2 0.2-2 0.4-2 0.4-2.9 0-1.2-1.8-1.1-1.8-1.1v-2c0 0 1 0 2.1 0s2.1 1 1.8 3.1z"></path>
 </svg>
index f4b3190cee573faa47b6cefe69945e8bd090f03e..366862c7cda86cfcb2522c5d32d5ce79eabbc21d 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M16 4c0 0 0-1-1-2s-1.9-1-1.9-1l-1.1 1.1v-2.1h-12v16h12v-8l4-4zM6.3 11.4l-0.6-0.6 0.3-1.1 1.5 1.5-1.2 0.2zM7.2 9.5l-0.6-0.6 5.2-5.2c0.2 0.1 0.4 0.3 0.6 0.5zM14.1 2.5l-0.9 1c-0.2-0.2-0.4-0.3-0.6-0.5l0.9-0.9c0.1 0.1 0.3 0.2 0.6 0.4zM11 15h-10v-14h10v2.1l-5.9 5.9-1.1 4.1 4.1-1.1 2.9-3v6z"></path>
+<path fill="#dddddd" d="M16 4c0 0 0-1-1-2s-1.9-1-1.9-1l-1.1 1.1v-2.1h-12v16h12v-8l4-4zM6.3 11.4l-0.6-0.6 0.3-1.1 1.5 1.5-1.2 0.2zM7.2 9.5l-0.6-0.6 5.2-5.2c0.2 0.1 0.4 0.3 0.6 0.5zM14.1 2.5l-0.9 1c-0.2-0.2-0.4-0.3-0.6-0.5l0.9-0.9c0.1 0.1 0.3 0.2 0.6 0.4zM11 15h-10v-14h10v2.1l-5.9 5.9-1.1 4.1 4.1-1.1 2.9-3v6z"></path>
 </svg>
index ae4c190fe74f2f974757123391534ee2d4568064..5dd73bac9602779003adbda59499c808c4cd6ae2 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M8.1 14l6.4-7.2c0.6-0.7 0.6-1.8-0.1-2.5l-2.7-2.7c-0.3-0.4-0.8-0.6-1.3-0.6h-1.8c-0.5 0-1 0.2-1.4 0.6l-6.7 7.6c-0.6 0.7-0.6 1.9 0.1 2.5l2.7 2.7c0.3 0.4 0.8 0.6 1.3 0.6h11.4v-1h-7.9zM6.8 13.9c0 0 0-0.1 0 0l-2.7-2.7c-0.4-0.4-0.4-0.9 0-1.3l3.4-3.9h-1l-3 3.3c-0.6 0.7-0.6 1.7 0.1 2.4l2.3 2.3h-1.3c-0.2 0-0.4-0.1-0.6-0.2l-2.8-2.8c-0.3-0.3-0.3-0.8 0-1.1l3.5-3.9h1.8l3.5-4h1l-3.5 4 3.1 3.7-3.5 4c-0.1 0.1-0.2 0.1-0.3 0.2z"></path>
+<path fill="#dddddd" d="M8.1 14l6.4-7.2c0.6-0.7 0.6-1.8-0.1-2.5l-2.7-2.7c-0.3-0.4-0.8-0.6-1.3-0.6h-1.8c-0.5 0-1 0.2-1.4 0.6l-6.7 7.6c-0.6 0.7-0.6 1.9 0.1 2.5l2.7 2.7c0.3 0.4 0.8 0.6 1.3 0.6h11.4v-1h-7.9zM6.8 13.9c0 0 0-0.1 0 0l-2.7-2.7c-0.4-0.4-0.4-0.9 0-1.3l3.4-3.9h-1l-3 3.3c-0.6 0.7-0.6 1.7 0.1 2.4l2.3 2.3h-1.3c-0.2 0-0.4-0.1-0.6-0.2l-2.8-2.8c-0.3-0.3-0.3-0.8 0-1.1l3.5-3.9h1.8l3.5-4h1l-3.5 4 3.1 3.7-3.5 4c-0.1 0.1-0.2 0.1-0.3 0.2z"></path>
 </svg>
index d96d2ec9b9b0be8e93ad3bc3e989ec7d4fc634c5..5a77b1d1f0868e77a7d277ec481d9da056702b96 100644 (file)
@@ -2,8 +2,8 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M5.3 6.7l1.4-1.4-3-3 1.3-1.3h-4v4l1.3-1.3z"></path>
-<path fill="#444444" d="M6.7 10.7l-1.4-1.4-3 3-1.3-1.3v4h4l-1.3-1.3z"></path>
-<path fill="#444444" d="M10.7 9.3l-1.4 1.4 3 3-1.3 1.3h4v-4l-1.3 1.3z"></path>
-<path fill="#444444" d="M11 1l1.3 1.3-3 3 1.4 1.4 3-3 1.3 1.3v-4z"></path>
+<path fill="#dddddd" d="M5.3 6.7l1.4-1.4-3-3 1.3-1.3h-4v4l1.3-1.3z"></path>
+<path fill="#dddddd" d="M6.7 10.7l-1.4-1.4-3 3-1.3-1.3v4h4l-1.3-1.3z"></path>
+<path fill="#dddddd" d="M10.7 9.3l-1.4 1.4 3 3-1.3 1.3h4v-4l-1.3 1.3z"></path>
+<path fill="#dddddd" d="M11 1l1.3 1.3-3 3 1.4 1.4 3-3 1.3 1.3v-4z"></path>
 </svg>
diff --git a/CrowIDE/icons/file.svg b/CrowIDE/icons/file.svg
new file mode 100644 (file)
index 0000000..9d06b00
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generated by IcoMoon.io -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
+<path fill="#dddddd" d="M9 5h5v11h-12v-16h7v5zM10 4v-4l4 4h-4z"></path>
+</svg>
diff --git a/CrowIDE/icons/folder.svg b/CrowIDE/icons/folder.svg
new file mode 100644 (file)
index 0000000..f59e2da
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generated by IcoMoon.io -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
+  <g id="False">
+    <path fill="#dddddd" d="M7 4l-1-2h-4l-1 2h-1v11h16v-11h-9zM15 14h-14v-9h0.6l1-2h2.6l1.2 2h8.6v9z"></path>
+  </g>
+  <g id="True">
+    <path fill="#dddddd" d="M14 6v-2h-7l-1-2h-4l-1 2h-1v11h14l2-9h-2zM14.9 7l-1.6 7-11.9-0.1 2.3-6.9h11.2zM1 5h0.6l1-2h2.6l1.2 2h6.6v1h-10l-2 5.9v-6.9z"></path>
+  </g>
+</svg>
index c7df82aa525767ff8c34c9fb76c72f5a6318e255..89ff2364a801c9611421751a017189102bba4658 100644 (file)
@@ -2,6 +2,6 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M11.7 1.9c-1-1.2-2.6-1.9-4.2-1.9s-3.2 0.7-4.2 1.9c-1 1.1-1.4 2.6-1.2 4 0.2 1.5 0.8 2.6 2.1 3.7 0.5 0.4 0.7 0.8 0.9 1.2 0 0.1 0.1 0.2 0.1 0.3-0.1 0.1-0.2 0.2-0.2 0.4 0 0.3 0.2 0.5 0.5 0.5-0.3 0-0.5 0.2-0.5 0.5s0.2 0.5 0.5 0.5c-0.3 0-0.5 0.2-0.5 0.5s0.2 0.5 0.5 0.5c-0.3 0-0.5 0.2-0.5 0.5s0.2 0.5 0.5 0.5h0.5c0 0.5 0.7 1 1.5 1s1.5-0.5 1.5-1h0.5c0.3 0 0.5-0.2 0.5-0.5s-0.2-0.5-0.5-0.5c0.3 0 0.5-0.2 0.5-0.5s-0.2-0.5-0.5-0.5c0.3 0 0.5-0.2 0.5-0.5s-0.2-0.5-0.5-0.5c0.3 0 0.5-0.2 0.5-0.5 0-0.2-0.1-0.3-0.2-0.4 0-0.1 0.1-0.1 0.1-0.2 0.2-0.4 0.4-0.8 0.9-1.2 1.3-1.1 1.9-2.2 2.1-3.8 0.2-1.4-0.2-2.8-1.2-4zM12 5.8c-0.2 1.3-0.7 2.2-1.8 3.2-0.6 0.5-0.9 1-1.2 1.4-0.2 0.5-0.3 0.6-0.5 0.6h-2c-0.2 0-0.3-0.1-0.5-0.6-0.2-0.4-0.5-1-1.1-1.6-1.3-1.1-1.6-2-1.8-3-0.2-1.1 0.2-2.3 0.9-3.2 0.9-1 2.2-1.6 3.5-1.6s2.6 0.6 3.5 1.6c0.7 0.9 1.1 2.1 1 3.2z"></path>
-<path fill="#444444" d="M11 5h-1c0-0.7-0.8-2-2-2v-1c1.8 0 3 1.8 3 3z"></path>
+<path fill="#dddddd" d="M11.7 1.9c-1-1.2-2.6-1.9-4.2-1.9s-3.2 0.7-4.2 1.9c-1 1.1-1.4 2.6-1.2 4 0.2 1.5 0.8 2.6 2.1 3.7 0.5 0.4 0.7 0.8 0.9 1.2 0 0.1 0.1 0.2 0.1 0.3-0.1 0.1-0.2 0.2-0.2 0.4 0 0.3 0.2 0.5 0.5 0.5-0.3 0-0.5 0.2-0.5 0.5s0.2 0.5 0.5 0.5c-0.3 0-0.5 0.2-0.5 0.5s0.2 0.5 0.5 0.5c-0.3 0-0.5 0.2-0.5 0.5s0.2 0.5 0.5 0.5h0.5c0 0.5 0.7 1 1.5 1s1.5-0.5 1.5-1h0.5c0.3 0 0.5-0.2 0.5-0.5s-0.2-0.5-0.5-0.5c0.3 0 0.5-0.2 0.5-0.5s-0.2-0.5-0.5-0.5c0.3 0 0.5-0.2 0.5-0.5s-0.2-0.5-0.5-0.5c0.3 0 0.5-0.2 0.5-0.5 0-0.2-0.1-0.3-0.2-0.4 0-0.1 0.1-0.1 0.1-0.2 0.2-0.4 0.4-0.8 0.9-1.2 1.3-1.1 1.9-2.2 2.1-3.8 0.2-1.4-0.2-2.8-1.2-4zM12 5.8c-0.2 1.3-0.7 2.2-1.8 3.2-0.6 0.5-0.9 1-1.2 1.4-0.2 0.5-0.3 0.6-0.5 0.6h-2c-0.2 0-0.3-0.1-0.5-0.6-0.2-0.4-0.5-1-1.1-1.6-1.3-1.1-1.6-2-1.8-3-0.2-1.1 0.2-2.3 0.9-3.2 0.9-1 2.2-1.6 3.5-1.6s2.6 0.6 3.5 1.6c0.7 0.9 1.1 2.1 1 3.2z"></path>
+<path fill="#dddddd" d="M11 5h-1c0-0.7-0.8-2-2-2v-1c1.8 0 3 1.8 3 3z"></path>
 </svg>
index 0196115d65b2855bcb837729ffe2f4e02f0a6db5..8b406918349044b6a89813ef8ba6f13281592ebc 100644 (file)
@@ -2,12 +2,12 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M0 5h3v1h-3v-1z"></path>
-<path fill="#444444" d="M5 0h1v3h-1v-3z"></path>
-<path fill="#444444" d="M6 11h-1v-2.5l1 1z"></path>
-<path fill="#444444" d="M11 6h-1.5l-1-1h2.5z"></path>
-<path fill="#444444" d="M3.131 7.161l0.707 0.707-2.97 2.97-0.707-0.707 2.97-2.97z"></path>
-<path fill="#444444" d="M10.131 0.161l0.707 0.707-2.97 2.97-0.707-0.707 2.97-2.97z"></path>
-<path fill="#444444" d="M0.836 0.199l3.465 3.465-0.707 0.707-3.465-3.465 0.707-0.707z"></path>
-<path fill="#444444" d="M6.1 4.1l-2.1 2 9.8 9.9 2.2-2.1-9.9-9.8zM6.1 5.5l2.4 2.5-0.6 0.6-2.5-2.5 0.7-0.6z"></path>
+<path fill="#dddddd" d="M0 5h3v1h-3v-1z"></path>
+<path fill="#dddddd" d="M5 0h1v3h-1v-3z"></path>
+<path fill="#dddddd" d="M6 11h-1v-2.5l1 1z"></path>
+<path fill="#dddddd" d="M11 6h-1.5l-1-1h2.5z"></path>
+<path fill="#dddddd" d="M3.131 7.161l0.707 0.707-2.97 2.97-0.707-0.707 2.97-2.97z"></path>
+<path fill="#dddddd" d="M10.131 0.161l0.707 0.707-2.97 2.97-0.707-0.707 2.97-2.97z"></path>
+<path fill="#dddddd" d="M0.836 0.199l3.465 3.465-0.707 0.707-3.465-3.465 0.707-0.707z"></path>
+<path fill="#dddddd" d="M6.1 4.1l-2.1 2 9.8 9.9 2.2-2.1-9.9-9.8zM6.1 5.5l2.4 2.5-0.6 0.6-2.5-2.5 0.7-0.6z"></path>
 </svg>
index 613fe7bb900a97e73d3ea6e6d6813a2d8c6a15d9..10335f69588147722c113d60b3ae14a66c17f7d6 100644 (file)
@@ -2,7 +2,7 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M11 0h5v4h-5v-4z"></path>
-<path fill="#444444" d="M11 5v3c0 1.6-1.4 3-3 3s-3-1.4-3-3v-3h-5v3c0 4.4 3.6 8 8 8s8-3.6 8-8v-3h-5z"></path>
-<path fill="#444444" d="M0 0h5v4h-5v-4z"></path>
+<path fill="#dddddd" d="M11 0h5v4h-5v-4z"></path>
+<path fill="#dddddd" d="M11 5v3c0 1.6-1.4 3-3 3s-3-1.4-3-3v-3h-5v3c0 4.4 3.6 8 8 8s8-3.6 8-8v-3h-5z"></path>
+<path fill="#dddddd" d="M0 0h5v4h-5v-4z"></path>
 </svg>
index 2100ea28dd7f19eec6e27bbf7e3ab68f2d1c4b76..ecbb2f915cb31fead30558d923e5537339f8c9d5 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M16 8l-3-3v2h-4v-4h2l-3-3-3 3h2v4h-4v-2l-3 3 3 3v-2h4v4h-2l3 3 3-3h-2v-4h4v2z"></path>
+<path fill="#dddddd" d="M16 8l-3-3v2h-4v-4h2l-3-3-3 3h2v4h-4v-2l-3 3 3 3v-2h4v4h-2l3 3 3-3h-2v-4h4v2z"></path>
 </svg>
diff --git a/CrowIDE/icons/open-folder-1.svg b/CrowIDE/icons/open-folder-1.svg
new file mode 100644 (file)
index 0000000..9029469
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generated by IcoMoon.io -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
+<path fill="#dddddd" d="M14 6v-2h-7l-1-2h-4l-1 2h-1v11h14l2-9h-2zM14.9 7l-1.6 7-11.9-0.1 2.3-6.9h11.2zM1 5h0.6l1-2h2.6l1.2 2h6.6v1h-10l-2 5.9v-6.9z"></path>
+</svg>
index b98eb856bdaeceffc3575d1c11dc269bd0e653d4..2bdd5bed4f4245ab69cf54a69a437622c02ce913 100644 (file)
@@ -2,7 +2,7 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M5.6 11.6l-1.2-1.2c-0.8-0.2-2-0.1-2.7 1-0.8 1.1-0.3 2.8-1.7 4.6 0 0 3.5 0 4.8-1.3 1.2-1.2 1.2-2.2 1-3l-0.2-0.1z"></path>
-<path fill="#444444" d="M5.8 8.1c-0.2 0.3-0.5 0.7-0.7 1 0 0.2-0.1 0.3-0.2 0.4l1.5 1.5c0.1-0.1 0.3-0.2 0.4-0.3 0.3-0.2 0.7-0.4 1-0.7 0.4 0 0.6-0.2 0.8-0.4l-2.2-2.2c-0.2 0.2-0.4 0.4-0.6 0.7z"></path>
-<path fill="#444444" d="M15.8 0.2c-0.3-0.3-0.7-0.3-1-0.1 0 0-3 2.5-5.9 5.1-0.4 0.4-0.7 0.7-1.1 1-0.2 0.2-0.4 0.4-0.6 0.5l2.1 2.1c0.2-0.2 0.4-0.4 0.5-0.7 0.3-0.4 0.6-0.7 0.9-1.1 2.5-3 5.1-5.9 5.1-5.9 0.3-0.2 0.3-0.6 0-0.9z"></path>
+<path fill="#dddddd" d="M5.6 11.6l-1.2-1.2c-0.8-0.2-2-0.1-2.7 1-0.8 1.1-0.3 2.8-1.7 4.6 0 0 3.5 0 4.8-1.3 1.2-1.2 1.2-2.2 1-3l-0.2-0.1z"></path>
+<path fill="#dddddd" d="M5.8 8.1c-0.2 0.3-0.5 0.7-0.7 1 0 0.2-0.1 0.3-0.2 0.4l1.5 1.5c0.1-0.1 0.3-0.2 0.4-0.3 0.3-0.2 0.7-0.4 1-0.7 0.4 0 0.6-0.2 0.8-0.4l-2.2-2.2c-0.2 0.2-0.4 0.4-0.6 0.7z"></path>
+<path fill="#dddddd" d="M15.8 0.2c-0.3-0.3-0.7-0.3-1-0.1 0 0-3 2.5-5.9 5.1-0.4 0.4-0.7 0.7-1.1 1-0.2 0.2-0.4 0.4-0.6 0.5l2.1 2.1c0.2-0.2 0.4-0.4 0.5-0.7 0.3-0.4 0.6-0.7 0.9-1.1 2.5-3 5.1-5.9 5.1-5.9 0.3-0.2 0.3-0.6 0-0.9z"></path>
 </svg>
index 79137cd4da454893d9708cbe96ccab6100f7328b..8e425f70c6727f734c2300230054e922377e39cf 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M16 7.1c0-2.7-1.3-7.1-7.3-7.1s-8.5 7.4-7.5 9.9c0.8 1.9 2.5 0.1 3.1 1 1.8 2.5-2 3.8 0.1 4.7 2.5 1.1 11.6 0.4 11.6-8.5zM4.5 9c-0.9 0-1.5-0.7-1.5-1.5s0.6-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5zM6 3.5c0-0.8 0.6-1.5 1.5-1.5s1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5-1.5-0.7-1.5-1.5zM8.5 14c-0.9 0-1.5-0.7-1.5-1.5s0.6-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5zM11 4.5c0-0.8 0.6-1.5 1.5-1.5s1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5-1.5-0.7-1.5-1.5zM12.5 11c-0.8 0-1.5-0.7-1.5-1.5s0.6-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5z"></path>
+<path fill="#dddddd" d="M16 7.1c0-2.7-1.3-7.1-7.3-7.1s-8.5 7.4-7.5 9.9c0.8 1.9 2.5 0.1 3.1 1 1.8 2.5-2 3.8 0.1 4.7 2.5 1.1 11.6 0.4 11.6-8.5zM4.5 9c-0.9 0-1.5-0.7-1.5-1.5s0.6-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5zM6 3.5c0-0.8 0.6-1.5 1.5-1.5s1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5-1.5-0.7-1.5-1.5zM8.5 14c-0.9 0-1.5-0.7-1.5-1.5s0.6-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5zM11 4.5c0-0.8 0.6-1.5 1.5-1.5s1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5-1.5-0.7-1.5-1.5zM12.5 11c-0.8 0-1.5-0.7-1.5-1.5s0.6-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5z"></path>
 </svg>
index 0c66eb39d09e119f56aa0d233418884f61017f5b..b36340b89010a130532aee3799faff2efc8fb47e 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M11 6.5v-5.5h1v-1h-8v1h1v5.5c0 0-2 1.5-2 3.5 0 0.5 1.9 0.7 4 0.7v2.2c0 0.7 0.2 1.4 0.5 2.1l0.5 1 0.5-1c0.3-0.6 0.5-1.3 0.5-2.1v-2.2c2.1 0 4-0.3 4-0.7 0-2-2-3.5-2-3.5zM7 6.6c0 0-0.5 0.3-1.6 1.4-1 1-1.5 1.9-1.5 1.9s0.1-1 0.8-1.9c0.9-1.1 1.3-1.4 1.3-1.4v-5.6h1v5.6z"></path>
+<path fill="#dddddd" d="M11 6.5v-5.5h1v-1h-8v1h1v5.5c0 0-2 1.5-2 3.5 0 0.5 1.9 0.7 4 0.7v2.2c0 0.7 0.2 1.4 0.5 2.1l0.5 1 0.5-1c0.3-0.6 0.5-1.3 0.5-2.1v-2.2c2.1 0 4-0.3 4-0.7 0-2-2-3.5-2-3.5zM7 6.6c0 0-0.5 0.3-1.6 1.4-1 1-1.5 1.9-1.5 1.9s0.1-1 0.8-1.9c0.9-1.1 1.3-1.4 1.3-1.4v-5.6h1v5.6z"></path>
 </svg>
index 5c177f00c6227a170ca79b6bf5a2ae68f27c1628..59fcc904da5c2a8b13b649ad05d590d8ba03e846 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M16 7.9l-6-4.9v3c-0.5 0-1.1 0-2 0-8 0-8 8-8 8s1-4 7.8-4c1.1 0 1.8 0 2.2 0v2.9l6-5z"></path>
+<path fill="#dddddd" d="M16 7.9l-6-4.9v3c-0.5 0-1.1 0-2 0-8 0-8 8-8 8s1-4 7.8-4c1.1 0 1.8 0 2.2 0v2.9l6-5z"></path>
 </svg>
index 3b13c1300fc2f7235e01603cd7555aa4b61815f7..f3eb3682dc8c45d8663080d88a92f543b1d78ae8 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M15.7 14.3l-4.2-4.2c-0.2-0.2-0.5-0.3-0.8-0.3 0.8-1 1.3-2.4 1.3-3.8 0-3.3-2.7-6-6-6s-6 2.7-6 6 2.7 6 6 6c1.4 0 2.8-0.5 3.8-1.4 0 0.3 0 0.6 0.3 0.8l4.2 4.2c0.2 0.2 0.5 0.3 0.7 0.3s0.5-0.1 0.7-0.3c0.4-0.3 0.4-0.9 0-1.3zM6 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"></path>
+<path fill="#dddddd" d="M15.7 14.3l-4.2-4.2c-0.2-0.2-0.5-0.3-0.8-0.3 0.8-1 1.3-2.4 1.3-3.8 0-3.3-2.7-6-6-6s-6 2.7-6 6 2.7 6 6 6c1.4 0 2.8-0.5 3.8-1.4 0 0.3 0 0.6 0.3 0.8l4.2 4.2c0.2 0.2 0.5 0.3 0.7 0.3s0.5-0.1 0.7-0.3c0.4-0.3 0.4-0.9 0-1.3zM6 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"></path>
 </svg>
index 88fe97987cdcb16fedbcd997cbef5a859cc690d9..826bc326adf3f55f6d95c6eb4358dece42015b7a 100644 (file)
@@ -2,8 +2,8 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M10 0h-8v16h12v-12l-4-4zM9 5h4v10h-10v-14h6v4zM10 4v-3l3 3h-3z"></path>
-<path fill="#444444" d="M4 7h8v1h-8v-1z"></path>
-<path fill="#444444" d="M4 9h8v1h-8v-1z"></path>
-<path fill="#444444" d="M4 11h8v1h-8v-1z"></path>
+<path fill="#dddddd" d="M10 0h-8v16h12v-12l-4-4zM9 5h4v10h-10v-14h6v4zM10 4v-3l3 3h-3z"></path>
+<path fill="#dddddd" d="M4 7h8v1h-8v-1z"></path>
+<path fill="#dddddd" d="M4 9h8v1h-8v-1z"></path>
+<path fill="#dddddd" d="M4 11h8v1h-8v-1z"></path>
 </svg>
index 8fa643b082ac8eff237ba71c4b389573ba33bff3..5ad8a8d95ba407686eb6f45b4519c45114478a02 100644 (file)
@@ -2,7 +2,7 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M10.3 8.2l-0.9 0.9 0.9 0.9-1.2 1.2 4.3 4.3c0.6 0.6 1.5 0.6 2.1 0s0.6-1.5 0-2.1l-5.2-5.2zM14.2 15c-0.4 0-0.8-0.3-0.8-0.8 0-0.4 0.3-0.8 0.8-0.8s0.8 0.3 0.8 0.8c0 0.5-0.3 0.8-0.8 0.8z"></path>
-<path fill="#444444" d="M3.6 8l0.9-0.6 1.5-1.7 0.9 0.9 0.9-0.9-0.1-0.1c0.2-0.5 0.3-1 0.3-1.6 0-2.2-1.8-4-4-4-0.6 0-1.1 0.1-1.6 0.3l2.9 2.9-2.1 2.1-2.9-2.9c-0.2 0.5-0.3 1-0.3 1.6 0 2.1 1.6 3.7 3.6 4z"></path>
-<path fill="#444444" d="M8 10.8l0.9-0.8-0.9-0.9 5.7-5.7 1.2-0.4 1.1-2.2-0.7-0.7-2.3 1-0.5 1.2-5.6 5.7-0.9-0.9-0.8 0.9c0 0 0.8 0.6-0.1 1.5-0.5 0.5-1.3-0.1-2.8 1.4-0.5 0.5-2.1 2.1-2.1 2.1s-0.6 1 0.6 2.2 2.2 0.6 2.2 0.6 1.6-1.6 2.1-2.1c1.4-1.4 0.9-2.3 1.3-2.7 0.9-0.9 1.6-0.2 1.6-0.2zM4.9 10.4l0.7 0.7-3.8 3.8-0.7-0.7z"></path>
+<path fill="#dddddd" d="M10.3 8.2l-0.9 0.9 0.9 0.9-1.2 1.2 4.3 4.3c0.6 0.6 1.5 0.6 2.1 0s0.6-1.5 0-2.1l-5.2-5.2zM14.2 15c-0.4 0-0.8-0.3-0.8-0.8 0-0.4 0.3-0.8 0.8-0.8s0.8 0.3 0.8 0.8c0 0.5-0.3 0.8-0.8 0.8z"></path>
+<path fill="#dddddd" d="M3.6 8l0.9-0.6 1.5-1.7 0.9 0.9 0.9-0.9-0.1-0.1c0.2-0.5 0.3-1 0.3-1.6 0-2.2-1.8-4-4-4-0.6 0-1.1 0.1-1.6 0.3l2.9 2.9-2.1 2.1-2.9-2.9c-0.2 0.5-0.3 1-0.3 1.6 0 2.1 1.6 3.7 3.6 4z"></path>
+<path fill="#dddddd" d="M8 10.8l0.9-0.8-0.9-0.9 5.7-5.7 1.2-0.4 1.1-2.2-0.7-0.7-2.3 1-0.5 1.2-5.6 5.7-0.9-0.9-0.8 0.9c0 0 0.8 0.6-0.1 1.5-0.5 0.5-1.3-0.1-2.8 1.4-0.5 0.5-2.1 2.1-2.1 2.1s-0.6 1 0.6 2.2 2.2 0.6 2.2 0.6 1.6-1.6 2.1-2.1c1.4-1.4 0.9-2.3 1.3-2.7 0.9-0.9 1.6-0.2 1.6-0.2zM4.9 10.4l0.7 0.7-3.8 3.8-0.7-0.7z"></path>
 </svg>
index cf7f72843424e8d73f0d07e5ea4f483462af86e6..e73a5e33153b8eb6409fe6e2bf7d38468934d3df 100644 (file)
@@ -2,6 +2,6 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M2 5v1h1v9c0 0 1.1 1 4.5 1s4.5-1 4.5-1v-9h1v-1h-11zM6 14h-1v-7h1v7zM8 14h-1v-7h1v7zM10 14h-1v-7h1v7z"></path>
-<path fill="#444444" d="M12 3c0 0 0-0.5-2-0.8v-0.7c0-0.8-0.7-1.5-1.5-1.5h-2c-0.8 0-1.5 0.7-1.5 1.5v0.7c-1.6 0.3-2 0.8-2 0.8h-1v1h11v-1h-1zM6 1.5c0-0.3 0.2-0.5 0.5-0.5h2c0.2 0 0.5 0.2 0.5 0.5v0.6c0-0.1-0.9-0.1-1.5-0.1s-1.1 0-1.5 0.1v-0.6z"></path>
+<path fill="#dddddd" d="M2 5v1h1v9c0 0 1.1 1 4.5 1s4.5-1 4.5-1v-9h1v-1h-11zM6 14h-1v-7h1v7zM8 14h-1v-7h1v7zM10 14h-1v-7h1v7z"></path>
+<path fill="#dddddd" d="M12 3c0 0 0-0.5-2-0.8v-0.7c0-0.8-0.7-1.5-1.5-1.5h-2c-0.8 0-1.5 0.7-1.5 1.5v0.7c-1.6 0.3-2 0.8-2 0.8h-1v1h11v-1h-1zM6 1.5c0-0.3 0.2-0.5 0.5-0.5h2c0.2 0 0.5 0.2 0.5 0.5v0.6c0-0.1-0.9-0.1-1.5-0.1s-1.1 0-1.5 0.1v-0.6z"></path>
 </svg>
index 955b767aba8492719196b480d9180b41c4e07bd1..f78f13498b5e200b74df5087172c49e1ca333d09 100644 (file)
@@ -2,5 +2,5 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M0 7.9l6-4.9v3c0 0 1.1 0 2 0 8 0 8 8 8 8s-1-4-7.8-4c-1.1 0-1.8 0-2.2 0v2.9l-6-5z"></path>
+<path fill="#dddddd" d="M0 7.9l6-4.9v3c0 0 1.1 0 2 0 8 0 8 8 8 8s-1-4-7.8-4c-1.1 0-1.8 0-2.2 0v2.9l-6-5z"></path>
 </svg>
index 1ec25bb66ea2547fa3abe8ea0df7a0bb30e48a00..540a93bba57d33a64ce6226ad13396c4fd12387d 100644 (file)
@@ -2,6 +2,6 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M15.7 14.3l-4.2-4.2c-0.2-0.2-0.5-0.3-0.8-0.3 0.8-1 1.3-2.4 1.3-3.8 0-3.3-2.7-6-6-6s-6 2.7-6 6 2.7 6 6 6c1.4 0 2.8-0.5 3.8-1.4 0 0.3 0 0.6 0.3 0.8l4.2 4.2c0.2 0.2 0.5 0.3 0.7 0.3s0.5-0.1 0.7-0.3c0.4-0.3 0.4-0.9 0-1.3zM6 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"></path>
-<path fill="#444444" d="M7 3h-2v2h-2v2h2v2h2v-2h2v-2h-2z"></path>
+<path fill="#dddddd" d="M15.7 14.3l-4.2-4.2c-0.2-0.2-0.5-0.3-0.8-0.3 0.8-1 1.3-2.4 1.3-3.8 0-3.3-2.7-6-6-6s-6 2.7-6 6 2.7 6 6 6c1.4 0 2.8-0.5 3.8-1.4 0 0.3 0 0.6 0.3 0.8l4.2 4.2c0.2 0.2 0.5 0.3 0.7 0.3s0.5-0.1 0.7-0.3c0.4-0.3 0.4-0.9 0-1.3zM6 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"></path>
+<path fill="#dddddd" d="M7 3h-2v2h-2v2h2v2h2v-2h2v-2h-2z"></path>
 </svg>
index 414cf9dfa8074fb3a31bd13894601d9bcdb50b56..6bd256f9c2015a133b818ca9278014a5ad1c62e6 100644 (file)
@@ -2,6 +2,6 @@
 <!-- Generated by IcoMoon.io -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
-<path fill="#444444" d="M15.7 14.3l-4.2-4.2c-0.2-0.2-0.5-0.3-0.8-0.3 0.8-1 1.3-2.4 1.3-3.8 0-3.3-2.7-6-6-6s-6 2.7-6 6 2.7 6 6 6c1.4 0 2.8-0.5 3.8-1.4 0 0.3 0 0.6 0.3 0.8l4.2 4.2c0.2 0.2 0.5 0.3 0.7 0.3s0.5-0.1 0.7-0.3c0.4-0.3 0.4-0.9 0-1.3zM6 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"></path>
-<path fill="#444444" d="M3 5h6v2h-6v-2z"></path>
+<path fill="#dddddd" d="M15.7 14.3l-4.2-4.2c-0.2-0.2-0.5-0.3-0.8-0.3 0.8-1 1.3-2.4 1.3-3.8 0-3.3-2.7-6-6-6s-6 2.7-6 6 2.7 6 6 6c1.4 0 2.8-0.5 3.8-1.4 0 0.3 0 0.6 0.3 0.8l4.2 4.2c0.2 0.2 0.5 0.3 0.7 0.3s0.5-0.1 0.7-0.3c0.4-0.3 0.4-0.9 0-1.3zM6 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"></path>
+<path fill="#dddddd" d="M3 5h6v2h-6v-2z"></path>
 </svg>
index 1be7d1addf7cc1f366033d830e1817970db3ba10..12664f1b37ac65eca14db5c1a7647851a40a07d8 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,
+               CMDViewToolbox, CMDViewSchema,
                CMDCompile;
 
                void initCommands () {
@@ -59,24 +59,28 @@ namespace Crow.Coding
                        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")};
 
-                       cmdCloseSolution = new Command(new Action(() => closeSolution())) { Caption = "Close Solution", Icon = new SvgPicture("#Crow.Coding.ui.icons.paste-on-document.svg"), CanExecute = true};
+                       cmdCloseSolution = new Command(new Action(() => closeSolution()))
+                       { Caption = "Close Solution", Icon = new SvgPicture("#Crow.Coding.ui.icons.paste-on-document.svg"), CanExecute = false};
 
                        CMDViewErrors = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winErrors.crow")))
                        { Caption = "Errors pane"};
                        CMDViewSolution = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winSolution.crow")))
-                       { Caption = "Solution Tree"};
+                       { Caption = "Solution Tree", CanExecute = false};
                        CMDViewEditor = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winEditor.crow")))
                        { Caption = "Editor Pane"};
                        CMDViewProperties = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winProperties.crow")))
                        { Caption = "Properties"};
                        CMDViewToolbox = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winToolbox.crow")))
-                       { Caption = "Toolbox"};
-
-                       CMDViewGTExp = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winGTExplorer.crow"))) { Caption = "Graphic Tree Explorer"};
-                       CMDViewProps = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.MemberView.crow"))) { Caption = "Properties View"};
-                       CMDCompile = new Command(new Action(() => compileSolution())) { Caption = "Compile"};
-                       CMDViewProj = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.CSProjExplorer.crow"))) { Caption = "Project Explorer"};
-                       CMDViewProjProps = new Command(new Action(loadProjProps) ){ Caption = "Project Properties"};
+                       { Caption = "Toolbox", CanExecute = false};
+                       CMDViewSchema = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winSchema.crow")))
+                       { Caption = "IML Shematic View", CanExecute = true};
+                               
+                       CMDViewGTExp = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winGTExplorer.crow")))
+                       { Caption = "Graphic Tree Explorer", CanExecute = false};
+                       CMDCompile = new Command(new Action(() => compileSolution()))
+                       { Caption = "Compile", CanExecute = false};
+                       CMDViewProjProps = new Command(new Action(loadProjProps))
+                       { Caption = "Project Properties", CanExecute = false};
                }
 
                void openFileDialog () {                        
@@ -109,6 +113,7 @@ namespace Crow.Coding
 
                Instantiator instFileDlg;
                Solution currentSolution;
+               Project currentProject;
                Docker mainDock;
 
                public static Interface MainIFace;
@@ -152,7 +157,7 @@ namespace Crow.Coding
                }
 
                void loadProjProps () {
-                       //loadWindow ("#Crow.Coding.ui.ProjectProperties.crow", currentProject);
+                       loadWindow ("#Crow.Coding.ui.ProjectProperties.crow");
                }
                void compileSolution () {
                        //ProjectItem pi = CurrentSolution.SelectedItem;
@@ -173,12 +178,32 @@ namespace Crow.Coding
                        set {
                                if (currentSolution == value)
                                        return;
+                               
                                currentSolution = value;
+
+                               CMDCompile.CanExecute = (currentSolution != null);
+                               cmdCloseSolution.CanExecute = (currentSolution != null);
+                               CMDViewSolution.CanExecute = (currentSolution != null);
+                               
                                lock (MainIFace) {
                                        NotifyValueChanged ("CurrentSolution", currentSolution);
                                }
                        }
                }
+               public Project CurrentProject {
+                       get { return currentProject; }
+                       set {
+                               if (currentProject == value)
+                                       return;
+                               currentProject = value;
+
+                               CMDViewProjProps.CanExecute = (currentProject != null);
+                               
+                               lock (MainIFace) {
+                                       NotifyValueChanged ("CurrentProject", currentProject);
+                               }
+                       }
+               }
 
                public string LastOpenSolution {
                        get { return Crow.Configuration.Global.Get<string>("LastOpenSolution");}
index 72e916eb7df49a026120b63668c33f34bd0a8fba..48d634b3b557593790af37024363425c37a8f237 100644 (file)
@@ -234,7 +234,7 @@ namespace Crow.Coding
                        set { isDirty = value; }
                }
                protected override bool IsReady {
-                       get { return buffer != null; }
+                       get { return projFile != null && buffer != null; }
                }
                #endregion
 
diff --git a/CrowIDE/src/Editors/CodeBuffer/TextBuffer.cs b/CrowIDE/src/Editors/CodeBuffer/TextBuffer.cs
new file mode 100644 (file)
index 0000000..a98aa08
--- /dev/null
@@ -0,0 +1,527 @@
+//
+//  CodeTextBuffer.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+//  Copyright (c) 2017 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Diagnostics;
+using System.Threading;
+using System.Text;
+
+namespace Crow.Coding
+{
+       /// <summary>
+       /// Code buffer, lines are arranged in a List<string>, new line chars are removed during string.split on '\n...',
+       /// </summary>
+       public class TextBuffer
+       {
+               public ReaderWriterLockSlim editMutex = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
+               static Regex slb = new Regex ("\\n");//single char line break used internaly
+               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 BufferCleared;
+               public event EventHandler SelectionChanged;
+               public event EventHandler PositionChanged;
+               #endregion
+
+               StringBuilder buffer = new StringBuilder();
+               string lineBreak = Interface.LineBreak;//detected linebreak kind in original source
+               List<int> lineLength = new List<int>();//line length table
+               /// <summary>
+               /// real position in char arrays, tab = 1 char
+               /// </summary>
+               int _currentLine = 0;
+               int _currentCol = 0;
+
+               /// <summary>
+               /// Gets the total line count.
+               /// </summary>
+               public int LineCount { get { return lineLength.Count;}}
+
+               /// <summary>
+               /// get a substring in the buffer
+               /// </summary>
+               /// <returns>a new string</returns>
+               /// <param name="idx">absolute index in the buffer</param>
+               /// <param name="length">length of the substring</param>
+               public string GetSubString (int idx, int length){
+                       return buffer.ToString (idx, length);
+               }
+               /// <summary>
+               /// Gets length of a line.
+               /// </summary>
+               /// <returns>length of line</returns>
+               /// <param name="lineIdx">line nuber</param>
+               public int GetLineLength (int lineIdx) {
+                       return lineLength [lineIdx];
+               }
+               /// <summary>
+               /// get a single charactere in the buffer
+               /// </summary>
+               /// <returns>a single char</returns>
+               /// <param name="idx">absolute index in the buffer</param>
+               public char GetCharAt (int idx){
+                       return buffer [idx];
+               }
+               /// <summary>
+               /// return full text with original line breaks
+               /// </summary>
+               /// <value>a string containing the full text</value>
+               public string FullText {
+                       get { return buffer.Replace("\n", lineBreak).ToString (); }
+                       set {
+                               Load (value);
+                       }
+               }
+               /// <summary>
+               /// Gets the buffer pointer of a line
+               /// </summary>
+               /// <returns>absolute index of the line in the buffer</returns>
+               /// <param name="i">line number</param>
+               public int GetBufferIndexOfLine (int i) {
+                       int ptr = 0;
+                       editMutex.EnterReadLock ();
+                       for (int j = 0; j < i; j++) {
+                               ptr += lineLength [j];
+                       }
+                       editMutex.ExitReadLock ();
+                       return ptr;
+               }
+               /// <summary>
+               /// Gets the buffer pointer for the current position 
+               /// </summary>
+               /// <value>absolute index in the buffer of current position</value>
+               public int BufferIndexOfCurrentPosition {
+                       get {return GetBufferIndexOfLine (_currentLine) + _currentCol;}
+               }
+               public int this[int i]
+               {
+                       get {                           
+                               int ptr = 0;
+                               editMutex.EnterReadLock ();
+                               for (int j = 0; j < i; j++) {
+                                       ptr += lineLength [j];
+                               }
+                               editMutex.ExitReadLock ();
+                               return ptr; 
+                       }
+               }
+               /// <summary>
+               /// remove line number i
+               /// </summary>
+               /// <param name="i">index of the line</param>
+               public void RemoveLine(int i){
+                       editMutex.EnterWriteLock ();
+                       buffer.Remove (GetBufferIndexOfLine (i), lineLength [i]);
+                       lineLength.RemoveAt (i);
+                       editMutex.ExitWriteLock ();
+                       LineRemoveEvent.Raise (this, new CodeBufferEventArgs (i));
+               }
+               /// <summary>
+               /// insert string without linebreaks at position i in buff
+               /// </summary>
+               /// <param name="i">absolute index in the buffer</param>
+               /// <param name="str">linebreak free string</param>
+               public void InsertAt(int i, string str){
+                       editMutex.EnterWriteLock ();
+                       buffer.Insert (this [i], str);
+                       lineLength.Insert (i, str.Length);
+                       editMutex.ExitWriteLock ();
+                       LineAdditionEvent.Raise (this, new CodeBufferEventArgs (i));
+               }
+               public void AddLine(string str){
+                       editMutex.EnterWriteLock ();
+                       if (lineLength.LastOrDefault() == 0) {
+                               buffer.Append (str);
+                               lineLength [lineLength.Count - 1] = str.Length;
+                               lineLength.Add (0);
+                       }
+                       editMutex.ExitWriteLock ();
+                       LineAdditionEvent.Raise (this, new CodeBufferEventArgs (lineLength.Count - 1));
+               }
+               public void AddRange (string[] items){
+                       int start = lineLength.Count;
+                       editMutex.EnterWriteLock ();
+                       for (int i = 0; i < items.Length; i++)
+                               AddLine (items [i]);
+                       editMutex.ExitWriteLock ();
+                       LineAdditionEvent.Raise (this, new CodeBufferEventArgs (start, items.Length));
+               }
+               public void Clear () {
+                       editMutex.EnterWriteLock ();
+                       lineLength.Clear ();
+                       buffer.Clear ();
+                       editMutex.ExitWriteLock ();
+                       BufferCleared.Raise (this, null);
+               }
+               public void UpdateLine(int i, string newContent){
+                       editMutex.EnterWriteLock ();
+                       int ptrL = this [i];
+                       buffer.Remove (ptrL, lineLength [i]);
+                       buffer.Insert (ptrL, newContent);
+                       lineLength [i] = newContent.Length;
+                       editMutex.ExitWriteLock ();
+                       LineUpadateEvent.Raise (this, new CodeBufferEventArgs (i));
+               }
+               public void AppenedLine(int i, string newContent){
+                       editMutex.EnterWriteLock ();
+                       int ptr = this [i] + lineLength [i];
+                       if (i < LineCount - 1)
+                               ptr--;
+                       buffer.Insert(ptr, newContent);
+                       lineLength [i] += newContent.Length;
+                       editMutex.ExitWriteLock ();
+                       LineUpadateEvent.Raise (this, new CodeBufferEventArgs (i));
+               }
+               /// <summary>
+               /// Insert new string at caret position, should be sure no line break is inside.
+               /// </summary>
+               /// <param name="str">String.</param>
+               public void InsertAt(string str)
+               {
+                       if (!SelectionIsEmpty)
+                               this.Delete ();
+
+                       editMutex.EnterWriteLock ();
+
+                       string tmp = reghexLineBrk.Replace (str, "\n");//use single char line break in buffer
+                       int buffPtr = this [CurrentLine] + CurrentColumn;
+                       buffer.Insert (buffPtr, tmp);
+
+                       int lPtr = CurrentLine, strPtr = 0;
+                       int remainingLength = lineLength [lPtr] - CurrentColumn;
+                       lineLength [lPtr] = CurrentColumn;
+                       foreach (Match match in slb.Matches(tmp))
+                       {
+                               lineLength [lPtr] += match.Index + 1 - strPtr;
+                               lPtr++;
+                               lineLength.Insert (lPtr, 0);
+                               strPtr = match.Index + 1;
+                               //CurrentLine++;
+                       }
+                       remainingLength += tmp.Length - strPtr; 
+                       lineLength [lPtr] += remainingLength;
+
+                       CurrentLine = lPtr;
+                       if (strPtr == 0)
+                               CurrentColumn += tmp.Length;
+                       else
+                               CurrentColumn = tmp.Length - strPtr;
+
+                       editMutex.ExitWriteLock ();
+                       if (strPtr>0)
+                               LineAdditionEvent.Raise (this, null);
+                       else
+                               LineUpadateEvent.Raise (this, null);
+               }
+               /// <summary>
+               /// Insert a line break.
+               /// </summary>
+               public void InsertLineBreak()
+               {
+                       editMutex.EnterWriteLock ();
+                       buffer.Insert (this [CurrentLine] + CurrentColumn, '\n');
+                       int lgdiff = lineLength [CurrentLine] - CurrentColumn;
+                       lineLength.Insert (CurrentLine + 1, lineLength [CurrentLine] - CurrentColumn);
+                       lineLength [CurrentLine] = CurrentColumn + 1;
+                       editMutex.ExitWriteLock ();
+                       LineAdditionEvent.Raise (this, null);
+                       CurrentColumn = 0;
+                       CurrentLine++;
+               }
+               public void Delete()
+               {
+                       editMutex.EnterWriteLock ();
+                       if (SelectionIsEmpty) {
+                               if (CurrentColumn == 0) {
+                                       if (CurrentLine == 0) {
+                                               editMutex.ExitWriteLock ();
+                                               return;
+                                       }
+
+                                       buffer.Remove (this [CurrentLine] - 1, 1);
+
+                                       int col = lineLength [CurrentLine - 1] - 1;
+                                       lineLength [CurrentLine - 1] += lineLength [CurrentLine] - 1;
+                                       lineLength.RemoveAt (CurrentLine);
+
+                                       CurrentLine--;
+                                       CurrentColumn = col;
+
+                                       editMutex.ExitWriteLock ();
+                                       LineRemoveEvent.Raise (this, null);
+                                       return;
+                               }
+                               CurrentColumn--;
+                               buffer.Remove (this [CurrentLine] + CurrentColumn, 1);
+                               lineLength [CurrentLine]--;
+                       } else {
+                               int linesToRemove = SelectionEnd.Y - SelectionStart.Y;
+                               int ptr = this [SelectionStart.Y] + SelectionStart.X;
+                               int length = lineLength [SelectionStart.Y] - SelectionStart.X;
+                               int l = 1;
+                               while (l <= linesToRemove ) {
+                                       length += lineLength [SelectionStart.Y + l];
+                                       l++;
+                               }
+                               length -= lineLength [SelectionEnd.Y] - SelectionEnd.X;
+                               buffer.Remove (ptr, length);
+                               lineLength [SelectionStart.Y] = SelectionStart.X + lineLength [SelectionEnd.Y] - SelectionEnd.X;
+                               lineLength.RemoveRange (SelectionStart.Y + 1, linesToRemove);
+
+                               CurrentLine = SelectionStart.Y;
+                               CurrentColumn = SelectionStart.X;
+                               ResetSelection ();
+
+                               if (linesToRemove > 0)
+                                       LineRemoveEvent.Raise (this, null);
+                               else
+                                       LineUpadateEvent.Raise (this, null);
+                       }
+                       editMutex.ExitWriteLock ();
+               }
+               public void Load(string rawSource) {
+                       this.Clear();
+
+                       if (string.IsNullOrEmpty (rawSource))
+                               return;
+
+                       lineBreak = reghexLineBrk.Match (rawSource).Value;//store original line break
+                       string tmp = reghexLineBrk.Replace (rawSource, "\n");//use single char line break in buffer
+                       int ptr = 0;
+                       foreach (Match match in slb.Matches(tmp))
+                       {
+                               int l = match.Index + 1;
+                               int lg = l - ptr;
+                               lineLength.Add (lg);
+                               ptr = l;
+                       }
+                       lineLength.Add (0);
+
+                       buffer = new StringBuilder (tmp);
+               }
+
+//             public int CurrentTabulatedColumn {
+//                     get {
+////                           return lines [_currentLine].Content.Substring (0, _currentCol).
+////                                   Replace ("\t", new String (' ', Interface.TabSize)).Length;
+//                     }
+//             }
+
+               #region moving cursor an selection
+               Point selStartPos = -1; //selection start (row,column)
+               Point selEndPos = -1;   //selection end (row,column)
+
+               public bool SelectionInProgress { get { return selStartPos >= 0; }}
+               public void SetSelStartPos () {
+                       selStartPos = selEndPos = CurrentPosition;
+                       SelectionChanged.Raise (this, null);
+               }
+               public void SetSelEndPos () {
+                       selEndPos = CurrentPosition;
+                       SelectionChanged.Raise (this, null);
+               }
+               /// <summary>
+               /// Set selection in buffer to -1, empty selection
+               /// </summary>
+               public void ResetSelection () {
+                       selStartPos = selEndPos = -1;
+                       SelectionChanged.Raise (this, null);
+               }
+               /// <summary>
+               /// ordered selection start and end positions in char units
+               /// </summary>
+               public Point SelectionStart     {
+                       get { return selEndPos < 0 || selStartPos.Y < selEndPos.Y ? selStartPos :
+                                       selStartPos.Y > selEndPos.Y ? selEndPos :
+                                       selStartPos.X < selEndPos.X ? selStartPos : selEndPos; }
+               }
+               public Point SelectionEnd {
+                       get { return selEndPos < 0 || selStartPos.Y > selEndPos.Y ? selStartPos :
+                                       selStartPos.Y < selEndPos.Y ? selEndPos :
+                                       selStartPos.X > selEndPos.X ? selStartPos : selEndPos; }
+               }
+               public bool SelectionIsEmpty
+               { get { return selEndPos == selStartPos; } }
+               /// <summary>
+               /// Current column in buffer coordinate, tabulation = 1 char
+               /// </summary>
+               public int CurrentColumn{
+                       get { return _currentCol; }
+                       set {
+                               if (value == _currentCol)
+                                       return;
+
+                               editMutex.EnterWriteLock ();
+
+                               if (value < 0)
+                                       _currentCol = 0;
+                               else if (value >= lineLength [_currentLine]) {
+                                       if (_currentLine < LineCount -1 && value > lineLength [_currentLine] - 1)
+                                               _currentCol = lineLength [_currentLine] - 1;
+                                       else
+                                               _currentCol = lineLength [_currentLine];
+                               }else
+                                       _currentCol = value;
+
+                               editMutex.ExitWriteLock ();
+
+                               PositionChanged.Raise (this, null);
+                       }
+               }
+               /// <summary>
+               /// Current row in buffer coordinate, tabulation = 1 char
+               /// </summary>
+               public int CurrentLine{
+                       get { return _currentLine; }
+                       set {
+                               if (value == _currentLine)
+                                       return;
+
+                               editMutex.EnterWriteLock ();
+
+                               if (value >= lineLength.Count)
+                                       _currentLine = lineLength.Count-1;
+                               else if (value < 0)
+                                       _currentLine = 0;
+                               else
+                                       _currentLine = value;
+
+                               int c = _currentCol;
+                               _currentCol = 0;
+                               CurrentColumn = c;
+
+                               editMutex.ExitWriteLock();
+
+                               PositionChanged.Raise (this, null);
+                       }
+               }
+               /// <summary>
+               /// Current position in buffer coordinate, tabulation = 1 char
+               /// </summary>
+               public Point CurrentPosition {
+                       get { return new Point(CurrentColumn, CurrentLine); }
+               }
+               /// <summary>
+               /// get char at current position in buffer
+               /// </summary>
+               protected Char CurrentChar { get { return buffer[this [CurrentLine]]; } }
+               public string SelectedText {
+                       get {
+                               if (SelectionIsEmpty)
+                                       return "";
+                               Point selStart = SelectionStart;
+                               Point selEnd = SelectionEnd;
+
+                               int ptr = this [selStart.Y] + selStart.X;
+                               int length = lineLength[selStart.Y] - selStart.X;
+                               for (int i = selStart.Y+1; i <= selEnd.Y; i++) 
+                                       length += lineLength [i];
+                               length -= lineLength[selEnd.Y] - selEnd.X;
+
+                               return buffer.ToString (ptr, length);
+                       }
+               }
+
+               public void GotoWordStart(){
+                       if (_currentCol == 0)
+                               MoveLeft ();
+                       if (_currentCol == 0)
+                               return;
+                       int ptrStart = BufferIndexOfCurrentPosition;
+                       int ptr = ptrStart;
+                       char c;
+                       //skip white spaces
+                       do {
+                               ptr--;
+                               c = this.GetCharAt (ptr);
+                       } while (!char.IsLetterOrDigit (c) && c != '\n' && ptr > 1);
+                               
+                       do {
+                               ptr--;
+                               c = this.GetCharAt (ptr);
+                       } while (char.IsLetterOrDigit (c) && c != '\n' && ptr > 1);
+
+                       if (ptr == 0)
+                               CurrentColumn = 0;
+                       else
+                               CurrentColumn -= ptrStart - ptr - 1;            
+               }
+               public void GotoWordEnd(){
+                       int limx = GetLineLength (_currentLine);
+                       if (_currentLine < lineLength.Count - 1)
+                               limx--;
+                       
+                       if (_currentCol == limx) {
+                               MoveRight ();
+                               limx = GetLineLength (_currentLine);
+                               if (_currentLine < lineLength.Count - 1)
+                                       limx--;                         
+                       }
+
+                       int ptrLine = GetBufferIndexOfLine(_currentLine);
+                       int ptrCol = _currentCol;
+
+                       char c;
+                       //skip white spaces
+                       do {                            
+                               c = GetCharAt (ptrLine+ptrCol);
+                               ptrCol++;
+                       } while (!char.IsLetterOrDigit (c) && ptrCol < limx);
+
+                       do {
+                               c = GetCharAt (ptrLine + ptrCol);
+                               ptrCol++;
+                       } while (char.IsLetterOrDigit (c) && ptrCol < limx);
+                       CurrentColumn = ptrCol - 1;
+               }
+               /// <summary>
+               /// Moves cursor one char to the left, move up if cursor reaches start of line
+               /// </summary>
+               public void MoveLeft(){
+                       if (CurrentColumn == 0) {
+                               CurrentLine--;
+                               CurrentColumn = int.MaxValue;
+                       } else
+                               CurrentColumn--;                        
+               }
+               /// <summary>
+               /// Moves cursor one char to the right, move down if cursor reaches end of line
+               /// </summary>
+               public void MoveRight(){
+                       if (_currentLine < LineCount -1){
+                               if (CurrentColumn >= lineLength [CurrentLine] - 1) {
+                                       CurrentColumn = 0;
+                                       CurrentLine++;
+                                       return;
+                               }
+                       }
+                       CurrentColumn++;
+               }
+
+               #endregion
+       }
+}
+
diff --git a/CrowIDE/src/Editors/CodeBuffer/TextEditor.cs b/CrowIDE/src/Editors/CodeBuffer/TextEditor.cs
new file mode 100644 (file)
index 0000000..69233e1
--- /dev/null
@@ -0,0 +1,712 @@
+//
+// 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 TextEditor : Editor
+       {               
+               #region CTOR
+               public TextEditor (): base()
+               {                       
+                       buffer = new TextBuffer ();
+                       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.Add ("");
+               }
+               #endregion
+
+               string oldSource = "";
+               volatile bool isDirty = false;
+
+               #region private and protected fields
+               int visibleLines = 1;
+               int visibleColumns = 1;
+
+               TextBuffer buffer;
+
+               Color selBackground;
+               Color selForeground;
+               int selStartCol;
+               int selEndCol;
+
+               protected Rectangle rText;
+               protected FontExtents fe;
+               protected TextExtents te;
+
+               Point mouseLocalPos;
+               bool doubleClicked = false;
+               #endregion
+
+               /// <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 ();
+                       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)/ fe.MaxXAdvance);
+                       NotifyValueChanged ("VisibleColumns", visibleColumns);
+                       RegisterForGraphicUpdate ();
+//                     System.Diagnostics.Debug.WriteLine ("update visible columns: {0} leftMargin:{1}",visibleColumns, leftMargin);
+//                     System.Diagnostics.Debug.WriteLine ("update MaxScrollX: " + MaxScrollX);
+               }
+               void updateMaxScrollX (int longestTabulatedLineLength) {                        
+                       MaxScrollX = Math.Max (0, longestTabulatedLineLength - visibleColumns);
+                       if (longestTabulatedLineLength > 0)
+                               NotifyValueChanged ("ChildWidthRatio", Slot.Width * visibleColumns / longestTabulatedLineLength);
+               }
+               void updateMaxScrollY () {                      
+                       int lc = buffer.LineCount;
+                       MaxScrollY = Math.Max (0, lc - visibleLines);
+                       if (lc > 0)
+                               NotifyValueChanged ("ChildHeightRatio", Slot.Height * visibleLines / lc);
+                       
+               }                       
+
+
+
+               #region Editor overrides
+               protected override void updateEditorFromProjFile ()
+               {
+                       buffer.editMutex.EnterWriteLock ();
+                       loadSource ();
+                       buffer.editMutex.ExitWriteLock ();
+
+                       isDirty = false;
+                       oldSource = projFile.Source;
+                       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 ();
+
+                       MaxScrollX = MaxScrollY = 0;
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+
+                       editorMutex.ExitWriteLock ();
+               }
+               void Buffer_LineAdditionEvent (object sender, CodeBufferEventArgs e)
+               {
+                       updateMaxScrollY ();
+                       RegisterForGraphicUpdate ();
+                       isDirty = true;
+               }
+               void Buffer_LineRemoveEvent (object sender, CodeBufferEventArgs e)
+               {
+                       updateMaxScrollY ();
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+               }
+               void Buffer_LineUpadateEvent (object sender, CodeBufferEventArgs e)
+               {
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+                       isDirty = true;
+               }
+               void Buffer_PositionChanged (object sender, EventArgs e)
+               {                       
+                       int cc = getTabulatedColumn (buffer.CurrentPosition);
+
+                       if (cc > visibleColumns + ScrollX) {
+                               ScrollX = cc - visibleColumns;
+                       } else if (cc < ScrollX)
+                               ScrollX = cc;
+
+                       if (buffer.CurrentLine >= visibleLines + ScrollY - 1)
+                               ScrollY = buffer.CurrentLine - visibleLines + 1;
+                       else if (buffer.CurrentLine < ScrollY)
+                               ScrollY = buffer.CurrentLine;
+                       
+                       RegisterForGraphicUpdate ();
+                       notifyPositionChanged ();
+               }
+
+               void Buffer_SelectionChanged (object sender, EventArgs e)
+               {
+                       RegisterForGraphicUpdate ();
+               }
+               #endregion
+
+               void notifyPositionChanged (){
+                       try {                           
+                               NotifyValueChanged ("CurrentLine", buffer.CurrentLine+1);
+                               NotifyValueChanged ("CurrentColumn", buffer.CurrentColumn+1);
+                       } 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;                                                                 
+                               } catch (Exception ex) {                                        
+                                       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) {                                        
+                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
+                               }
+                       }
+               }
+               [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;
+                               editorMutex.EnterWriteLock ();
+                               base.ScrollY = value;
+                               editorMutex.ExitWriteLock ();
+                               RegisterForGraphicUpdate ();
+                       }
+               }
+               #endregion
+
+
+               void loadSource () {
+                       buffer.Load (projFile.Source);
+                       projFile.RegisteredEditors [this] = true;
+                       updateMaxScrollY ();
+                       RegisterForGraphicUpdate ();
+               }
+
+               int getTabulatedColumn (int col, int line) {
+                       return buffer.GetSubString (buffer [line],
+                               buffer.GetLineLength (line)).Substring(0,col).Replace ("\t", new String (' ', Interface.TabSize)).Length;
+               }
+               int getTabulatedColumn (Point pos) {
+                       return getTabulatedColumn (pos.X,pos.Y);
+               }
+
+               #region Drawing
+               void drawLines(Context gr, Rectangle cb) {
+                       int longestTabulatedLine = 0;
+                       for (int i = 0; i < visibleLines; i++) {
+                               int lineIndex = i + ScrollY;
+                               if (lineIndex >= buffer.LineCount)//TODO:need optimize
+                                       break;                                                  
+
+                               double y = cb.Y + (fe.Ascent+fe.Descent) * i, x = cb.X;
+
+                               int lineLength = buffer.GetLineLength (lineIndex);
+                               if (lineIndex < buffer.LineCount - 1)//dont print line break
+                                       lineLength--;
+                               string lstr = buffer.GetSubString (buffer [lineIndex],
+                                       lineLength).Replace ("\t", new String (' ', Interface.TabSize));
+
+                               int lstrLength = lstr.Length;
+                               if (lstrLength > longestTabulatedLine)
+                                       longestTabulatedLine = lstrLength;
+                               
+                               if (ScrollX < lstrLength)
+                                       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;
+
+                                       if (lineIndex == buffer.SelectionStart.Y) {
+                                               rLineX += (selStartCol - ScrollX) * fe.MaxXAdvance;
+                                               rLineW -= (selStartCol - ScrollX) * fe.MaxXAdvance;
+                                       }
+                                       if (lineIndex == buffer.SelectionEnd.Y)
+                                               rLineW -= (lstr.Length - selEndCol + ScrollX) * 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 ();
+                               }       
+                       
+                       
+                       }               
+               
+                       updateMaxScrollX(longestTabulatedLine);
+               }
+               #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 0;// (int)(fe.MaxXAdvance * buffer.GetLineLength(buffer.longestLineIdx)) + Margin * 2;
+               }
+               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 && CurrentLine >= 0){
+                               gr.LineWidth = 1.0;
+                               double cursorX = cb.X + (getTabulatedColumn(buffer.CurrentPosition) - ScrollX) * fe.MaxXAdvance ;
+                               double cursorY = cb.Y + (buffer.CurrentLine - ScrollY) * (fe.Ascent+fe.Descent);
+                               gr.MoveTo (0.5 + cursorX, cursorY);
+                               gr.LineTo (0.5 + cursorX, cursorY + fe.Ascent+fe.Descent);
+                               gr.Stroke();
+                       }
+                       #endregion
+
+                       drawLines (gr, cb);
+
+                       editorMutex.ExitReadLock ();
+
+                       buffer.editMutex.ExitReadLock ();
+
+               }
+               #endregion
+
+               int getBufferColFromVisualCol (int line, int column) {
+                       int i = 0;
+                       int buffCol = 0;
+                       int buffPtr = buffer [line];
+                       while (i < column && buffCol < buffer.GetLineLength(line)) {
+                               if (buffer.GetCharAt(buffPtr + buffCol) == '\t')
+                                       i += Interface.TabSize;
+                               else
+                                       i++;
+                               buffCol++;
+                       }
+                       return buffCol;
+               }
+
+
+               #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(){                       
+                       
+                       buffer.CurrentLine = ScrollY + (int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)));
+                       int curVisualCol = ScrollX +  (int)Math.Round ((mouseLocalPos.X) / fe.MaxXAdvance);
+                       buffer.CurrentColumn = getBufferColFromVisualCol (buffer.CurrentLine, curVisualCol);
+               }
+
+               public override void onMouseEnter (object sender, MouseMoveEventArgs e)
+               {
+                       base.onMouseEnter (sender, e);
+                       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.LeftButton == ButtonState.Released || !buffer.SelectionInProgress)
+                               return;
+
+                       //mouse is down
+                       updateCurrentPosFromMouseLocalPos();
+                       buffer.SetSelEndPos ();
+               }
+               public override void onMouseDown (object sender, MouseButtonEventArgs e)
+               {
+                       if (!this.Focusable)
+                               return;
+
+                       base.onMouseDown (sender, e);
+
+                       if (doubleClicked) {
+                               doubleClicked = false;
+                               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.Delete ();
+                               break;
+                       case Key.Clear:
+                               break;
+                       case Key.Delete:
+                               if (buffer.SelectionIsEmpty)
+                                       buffer.MoveRight ();
+//                             else if (e.Shift)
+//                                     IFace.Clipboard = buffer.SelectedText;
+                               buffer.Delete ();
+                               break;
+                       case Key.Enter:
+                       case Key.KeypadEnter:
+                               if (!buffer.SelectionIsEmpty)
+                                       buffer.Delete ();
+                               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.InsertAt (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
+                                               buffer.MoveLeft ();
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               if (e.Control)
+                                       buffer.GotoWordStart ();
+                               else
+                                       buffer.MoveLeft();
+                               break;
+                       case Key.Right:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       if (e.Control)
+                                               buffer.GotoWordEnd ();
+                                       else
+                                               buffer.MoveRight ();
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               if (e.Control)
+                                       buffer.GotoWordEnd ();
+                               else
+                                       buffer.MoveRight ();
+                               break;
+                       case Key.Up:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       CurrentLine--;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               CurrentLine--;
+                               break;
+                       case Key.Down:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       CurrentLine++;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               CurrentLine++;
+                               break;
+                       case Key.Menu:
+                               break;
+                       case Key.NumLock:
+                               break;
+                       case Key.PageDown:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       CurrentLine += visibleLines;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               CurrentLine += visibleLines;
+                               break;
+                       case Key.PageUp:
+                               if (e.Shift) {
+                                       if (buffer.SelectionIsEmpty)
+                                               buffer.SetSelStartPos ();
+                                       CurrentLine -= visibleLines;
+                                       buffer.SetSelEndPos ();
+                                       break;
+                               }
+                               buffer.ResetSelection ();
+                               CurrentLine -= visibleLines;
+                               break;
+                       case Key.RWin:
+                               break;
+                       case Key.Tab:
+                               buffer.InsertAt ("\t");
+                               break;
+                       default:
+                               break;
+                       }
+                       RegisterForGraphicUpdate();
+               }
+               public override void onKeyPress (object sender, KeyPressEventArgs e)
+               {
+                       base.onKeyPress (sender, e);
+
+                       buffer.InsertAt (e.KeyChar.ToString());
+                       buffer.ResetSelection ();
+               }
+               #endregion
+       }
+}
\ No newline at end of file
index 88cab8e928b42c64a972b18489126b7d8a023acc..2cd34412594c32ffb84c80c650028c25a9316629 100644 (file)
@@ -84,17 +84,15 @@ namespace Crow.Coding
 
                protected void backgroundThreadFunc () {
                        while (true) {
-                               if (IsReady) {
-                                       if (projFile != null) {
-                                               if (!projFile.RegisteredEditors [this]) {
-                                                       projFile.RegisteredEditors [this] = true;
-                                                       updateEditorFromProjFile ();
-                                               } else if (EditorIsDirty) {
-                                                       EditorIsDirty = false;
-                                                       updateProjFileFromEditor ();
-                                               }
-                                               updateCheckPostProcess ();
+                               if (IsReady) {                          
+                                       if (!projFile.RegisteredEditors [this]) {
+                                               projFile.RegisteredEditors [this] = true;
+                                               updateEditorFromProjFile ();
+                                       } else if (EditorIsDirty) {
+                                               EditorIsDirty = false;
+                                               updateProjFileFromEditor ();
                                        }
+                                       updateCheckPostProcess ();
                                }
                                Thread.Sleep (10);
                        }       
diff --git a/CrowIDE/src/Editors/ImlSchematicEditor.cs b/CrowIDE/src/Editors/ImlSchematicEditor.cs
new file mode 100644 (file)
index 0000000..f7b1bb6
--- /dev/null
@@ -0,0 +1,132 @@
+//
+//  ImlVisualEditor.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+//  Copyright (c) 2016 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+using System;
+using Crow;
+using System.Threading;
+using System.Xml.Serialization;
+using System.ComponentModel;
+using System.IO;
+using System.Collections.Generic;
+using Crow.IML;
+using System.Text;
+using System.Xml;
+
+namespace Crow.Coding
+{
+       public class ImlSchematicEditor : TemplatedGroup
+       {
+               #region CTOR
+               public ImlSchematicEditor ()
+               {                       
+               }
+               #endregion
+
+               ProjectFile projNode;
+               GraphicObject selectedItem;
+               ImlProjectItem imlProjFile;
+               Exception imlError = null;
+
+               bool drawGrid, snapToGrid;
+               int gridSpacing;
+
+               [DefaultValue(true)]
+               public bool DrawGrid {
+                       get { return drawGrid; }
+                       set {
+                               if (drawGrid == value)
+                                       return;
+                               drawGrid = value;
+                               NotifyValueChanged ("DrawGrid", drawGrid);
+                               RegisterForRedraw ();
+                       }
+               }
+               [DefaultValue(true)]
+               public bool SnapToGrid {
+                       get { return snapToGrid; }
+                       set {
+                               if (snapToGrid == value)
+                                       return;
+                               snapToGrid = value;
+                               NotifyValueChanged ("SnapToGrid", snapToGrid);
+                       }
+               }
+               [DefaultValue(10)]
+               public int GridSpacing {
+                       get { return gridSpacing; }
+                       set {
+                               if (gridSpacing == value)
+                                       return;
+                               gridSpacing = value;
+                               NotifyValueChanged ("GridSpacing", gridSpacing);
+                               RegisterForRedraw ();
+                       }
+               }
+               [XmlAttributeAttribute]public GraphicObject SelectedItem {
+                       get { return selectedItem; }
+                       set {
+                               if (selectedItem == value)
+                                       return;
+                               selectedItem = value;
+                               NotifyValueChanged ("SelectedItem", selectedItem);
+                               RegisterForRedraw ();
+                       }
+               }
+//             public override ProjectFile ProjectNode {
+//                     get {
+//                             return projNode;
+//                     }
+//                     set {
+//                             if (projNode == value)
+//                                     return;                         
+//                             projNode = value;
+//                             NotifyValueChanged ("ProjectNode", projNode);
+//
+//                             if (projNode is ImlProjectItem)
+//                                     imlProjFile = projNode as ImlProjectItem;
+//                             else
+//                                     imlProjFile = null;
+//                     }
+//             }
+
+
+//             protected override bool EditorIsDirty {
+//                     get {
+//                             throw new NotImplementedException ();
+//                     }
+//                     set {
+//                             throw new NotImplementedException ();
+//                     }
+//             }
+//             protected override void updateProjFileFromEditor ()
+//             {
+//
+//             }
+//             protected override void updateEditorFromProjFile () {
+//                     
+//             }                       
+//             protected override void updateCheckPostProcess ()
+//             {
+//
+//             }
+
+
+       }
+}
index 1ba6c559fa67ad85765774f2e26e8c69e744ab94..7a7a888bf92972ca3af7faf3eadeb58a0bdc8baf 100644 (file)
@@ -47,6 +47,7 @@ namespace Crow.Coding
 
                bool drawGrid, snapToGrid;
                int gridSpacing;
+               bool updateEnabled;
 
                [DefaultValue(true)]
                public bool DrawGrid {
@@ -80,7 +81,7 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute]public GraphicObject SelectedItem {
+               public GraphicObject SelectedItem {
                        get { return selectedItem; }
                        set {
                                if (selectedItem == value)
@@ -90,6 +91,18 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
+               /// <summary>
+               /// use to disable update if tab is not the visible one
+               /// </summary>
+               public bool UpdateEnabled {
+                       get { return updateEnabled; }
+                       set { 
+                               if (value == updateEnabled)
+                                       return;
+                               updateEnabled = value;
+                               NotifyValueChanged ("UpdateEnabled", updateEnabled);
+                       }
+               }
                /// <summary>PoinprojFilever the widget</summary>
                public virtual GraphicObject HoverWidget
                {
@@ -107,6 +120,11 @@ namespace Crow.Coding
                        get { return imlVE.LQIs; }
                }
 
+               public List<GraphicObject> GraphicTree {
+                       get { return imlVE.GraphicTree; }
+               }
+
+               #region editor overrides
                public override ProjectFile ProjectNode {
                        get {
                                return base.ProjectNode;
@@ -117,10 +135,18 @@ namespace Crow.Coding
                                imlVE.ProjFile = imlProjFile;
                        }
                }
-
-               public List<GraphicObject> GraphicTree {
-                       get { return imlVE.GraphicTree; }
+               protected override bool EditorIsDirty {
+                       get { return imlProjFile == null ? false :
+                               imlProjFile.Instance == null ? false : imlProjFile.Instance.design_HasChanged; }
+                       set {
+                               if (GraphicTree [0] != null)
+                                       GraphicTree [0].design_HasChanged = value;                      
+                       }
+               }
+               protected override bool IsReady {
+                       get { return updateEnabled && imlVE != null && imlProjFile != null; }
                }
+
                protected override void updateProjFileFromEditor ()
                {
                        try {
@@ -175,31 +201,6 @@ namespace Crow.Coding
                                        Monitor.Exit (imlVE.UpdateMutex);
                        }
                }
-
-               protected override bool EditorIsDirty {
-                       get { return imlProjFile == null ? false :
-                               imlProjFile.Instance == null ? false : imlProjFile.Instance.design_HasChanged; }
-                       set {
-                               if (GraphicTree [0] != null)
-                                       GraphicTree [0].design_HasChanged = value;                      
-                       }
-               }
-               protected override bool IsReady {
-                       get { return updateEnabled && imlVE != null && imlProjFile != null; }
-               }
-               bool updateEnabled;
-               /// <summary>
-               /// use to disable update if tab is not the visible one
-               /// </summary>
-               public bool UpdateEnabled {
-                       get { return updateEnabled; }
-                       set { 
-                               if (value == updateEnabled)
-                                       return;
-                               updateEnabled = value;
-                               NotifyValueChanged ("UpdateEnabled", updateEnabled);
-                       }
-               }
                protected override void updateCheckPostProcess ()
                {
                        imlVE.Update ();
@@ -213,6 +214,7 @@ namespace Crow.Coding
                                        RegisterForRedraw ();
                        }
                }
+               #endregion
 
                #region GraphicObject overrides
                public override void OnLayoutChanges (LayoutingType layoutType)
@@ -398,7 +400,6 @@ namespace Crow.Coding
                }
                #endregion
 
-
                void WidgetCheckOver (GraphicObject go, MouseMoveEventArgs e){
                        Type tGo = go.GetType();
                        if (typeof(TemplatedGroup).IsAssignableFrom (tGo)) {
diff --git a/CrowIDE/ui/CSProjExplorer.crow b/CrowIDE/ui/CSProjExplorer.crow
deleted file mode 100644 (file)
index 5f9f994..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<Window Caption="Graphic Tree" Width="20%" Height="70%" AlwaysOnTop="true">
-       <TreeView DataSource="{CSProj}" IsRoot="true" Name="treeView" Data="{ItemGroups}">
-       <ItemTemplate DataType="ItemGroupTypeItemReference">
-               <HorizontalStack>
-                       <Label Text="Reference"/>
-                       <Label Text="{Include}"/>
-               </HorizontalStack>
-       </ItemTemplate>
-       <ItemTemplate DataType="ItemGroupTypeItemCompile">
-               <HorizontalStack>
-                       <Label Text="Compile"/>
-                       <Label Text="{Include}"/>
-               </HorizontalStack>
-       </ItemTemplate>
-       <ItemTemplate DataType="ItemGroupTypeItemNone">
-               <HorizontalStack>
-                       <Label Text="None"/>
-                       <Label Text="{Include}"/>
-               </HorizontalStack>
-       </ItemTemplate>
-<!--   <ItemTemplate DataType="System.Object" Data="Items">
-               <HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" >
-                       <Label Text="{}" Width="Stretched"
-                               MouseEnter="{Background=vgradient|0:White|0.05:UnitedNationsBlue|1:Jet}"
-                               MouseLeave="{Background=Transparent}"/>
-               </HorizontalStack>
-       </ItemTemplate>-->
-       <ItemTemplate DataType="ItemGroup" Data="Items">
-               <Expandable Caption="ItemGroup" >
-<!--                   <Template>
-                               <VerticalStack>
-                                       <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand"
-                                                       MouseEnter="{Background=vgradient|0:White|0.05:UnitedNationsBlue|1:Jet}"
-                                                       MouseLeave="{Background=Transparent}">
-                                               <Container Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
-                                                       MouseEnter="{Background=LightGray}"
-                                                       MouseLeave="{Background=Transparent}">
-                                                       <Image
-                                                               Path="{./Image}"
-                                                               Visible="{./IsExpandable}"
-                                                               SvgSub="{./IsExpanded}"/>
-                                               </Container>
-                                               <Image Margin="2" Width="14" Height="14"
-                                                       Path="#Crow.Images.Icons.folder.svg"/>
-                                               <Label Text="{./Caption}"/>
-                                       </HorizontalStack>
-                                       <Container Name="Content" Visible="false"/>
-                               </VerticalStack>
-                       </Template>-->
-                       <HorizontalStack Height="Fit">
-                               <GraphicObject Width="12" Height="10"/>
-                               <TreeView Name="List" Height="Fit"
-                                       Template="#Crow.Templates.treeList.template" />
-                       </HorizontalStack>
-               </Expandable>
-       </ItemTemplate>
-</TreeView>
-</Window>
index 94a57e718eb7648628b6381fad999a51441b777f..10b5d93b20cceb45143a1bcce0bd98f506f38e5b 100644 (file)
@@ -25,8 +25,7 @@
                                <MenuItem Command="{CMDViewToolbox}"/>
                                <MenuItem Command="{CMDViewErrors}"/>
                                <MenuItem Command="{CMDViewGTExp}"/>
-                               <MenuItem Command="{CMDViewProps}"/>
-                               <MenuItem Command="{CMDViewProj}"/>
+                               <MenuItem Command="{CMDViewSchema}"/>
                        </MenuItem>
                        <MenuItem Caption="Project" Fit="true" PopWidth="120">
                                <MenuItem Command="{CMDCompile}"/>
diff --git a/CrowIDE/ui/DockWindows/WinSchemaItem.template b/CrowIDE/ui/DockWindows/WinSchemaItem.template
new file mode 100755 (executable)
index 0000000..31d8d9d
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="Black" CornerRadius="10"
+                               Background="Gray"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Spacing="0">
+               <HorizontalStack Background="Teal" Margin="0" Spacing="0" Height="Fit" Width="Stretched">                               
+                       <Label Width="Stretched" Margin="0" TextAlignment="Center" Text="{./Caption}" />
+               </HorizontalStack>
+               <GraphicObject Background="Black" Height="1"/>
+               <Container Margin="5" Name="Content" Width="Fit"/>
+       </VerticalStack>
+</Border>
diff --git a/CrowIDE/ui/DockWindows/winSchema.crow b/CrowIDE/ui/DockWindows/winSchema.crow
new file mode 100644 (file)
index 0000000..463c97a
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<DockWindow DataSource="{CurrentSolution}" Name="winSchema" Caption="IML Schematic View" Height="60%" Width="80%">
+       <ImlSchematicEditor DataSource="{SelectedItem}" Data="{GraphicTree}">
+               <Template>
+                       <Group Name="ItemsContainer"/>
+               </Template>
+               <ItemTemplate DataType="Crow.GraphicObject">
+                       <Window Style="WinSchema" Caption="{Name}">
+                               <Label Text="test"/>
+                       </Window>
+               </ItemTemplate>
+               <ItemTemplate DataType="Crow.Container" >
+                       <Window Style="WinSchema" Caption="{Name}">
+                               <Label Text="test"/>
+                       </Window>
+               </ItemTemplate>
+       </ImlSchematicEditor>
+</DockWindow>
index e7b96c17df9802643e1b295b1307975d418a5122..9adcfe626956e87acc83124b51244a3ad7038cb4 100644 (file)
@@ -23,3 +23,17 @@ IcoBut {
        Height = "14";
        Background = "White";
 }
+
+ProjTreeIcon {
+       Margin="1";
+       Width="14";
+       Height="14";
+}
+
+WinSchema {
+       Template="#Crow.Coding.ui.DockWindows.WinSchemaItem.template";
+       Focusable = "true";
+       MinimumSize="150,50";
+       Width = "Fit";
+       Height = "Fit";
+}
index e4366b1e33843eecfe365c9d62a26999503d0c9f..9a6ba39b0e714ead88042e181490e13aa4bcfcb0 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Window Caption="Project Properties" Width="60%" Height="70%" AlwaysOnTop="true">
+<Window Caption="Project Properties" Width="60%" Height="70%" Modal="true">
        <HorizontalStack>
                <VerticalStack Height="Fit" Width="50%">
                        <HorizontalStack>
index 55e7e8289a88da59180333e39b743c6b13df87d9..e449549bbba6724faf0a162b2daaa1e06941e9d4 100644 (file)
@@ -17,7 +17,7 @@
                                                        SvgSub="{./IsExpanded}"
                                                        MouseEnter="{Background=LightGray}"
                                                        MouseLeave="{Background=Transparent}"/>
-                                               <Image Margin="1" Width="14" Height="14"
+                                               <Image Style="ProjTreeIcon"
                                                        Path="#Crow.Icons.crowproj.svg"/>
                                                <GraphicObject Width="2" Height="9" Background="Green" Visible="{IsStartupProject}"/>
                                                <Label Text="{./Caption}"/>
@@ -53,7 +53,7 @@
                        MouseEnter="{Foreground=DimGray}"
                        MouseLeave="{Foreground=Transparent}">
                <HorizontalStack>
-                       <Image Margin="1" Width="14" Height="14"
+                       <Image Style="ProjTreeIcon"
                                Path="#Crow.Icons.folder.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
@@ -65,7 +65,7 @@
                        MouseLeave="{Foreground=Transparent}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Margin="1" Width="14" Height="14"
+                       <Image Style="ProjTreeIcon"
                                Path="#Crow.Icons.assembly.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
@@ -77,7 +77,7 @@
                        MouseLeave="{Foreground=Transparent}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Margin="1" Width="14" Height="14"
+                       <Image Style="ProjTreeIcon"
                                Path="#Crow.Icons.projectRef.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
@@ -89,8 +89,8 @@
                        MouseLeave="{Foreground=Transparent}">
                <HorizontalStack>                       
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Margin="1" Width="14" Height="14"
-                               Path="#Crow.Icons.file.svg"/>
+                       <Image Style="ProjTreeIcon"
+                               Path="#Crow.Coding.icons.file.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
                        MouseLeave="{Foreground=Transparent}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Margin="1" Width="14" Height="14"
-                               Path="#Crow.Icons.file.svg"/>
+                       <Image Style="ProjTreeIcon"
+                               Path="#Crow.Coding.icons.file.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
                        MouseLeave="{Foreground=Transparent}">
                <HorizontalStack>
                        <GraphicObject Width="5" Height="5"/>
-                       <Image Margin="1" Width="14" Height="14"
-                               Path="#Crow.Icons.file.svg"/>
+                       <Image Style="ProjTreeIcon"
+                               Path="#Crow.Coding.icons.file.svg"/>
                        <Label Text="{DisplayName}" Width="Stretched"/>
                </HorizontalStack>
        </Border>
index a2d14acd7c99db66789dbb80691fad1e9647634f..c19e7d4a3dbcd3815908e18f995aae8fe524a675 100644 (file)
@@ -4,15 +4,15 @@
                        Foreground="Transparent"
                        MouseEnter="{Foreground=DimGray}"
                        MouseLeave="{Foreground=Transparent}">
-               <HorizontalStack Spacing="1">
+               <HorizontalStack Spacing="5">
                        <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
                                Path="{./Image}"
                                Visible="{./IsExpandable}"
                                SvgSub="{./IsExpanded}"
                                MouseEnter="{Background=LightGray}"
                                MouseLeave="{Background=Transparent}"/>
-                       <Image Margin="1" Width="14" Height="14"
-                               Path="#Crow.Icons.folder.svg"/>
+                       <Image Margin="0" Width="16" Height="16"
+                               Path="#Crow.Coding.icons.folder.svg" SvgSub="{./IsExpanded}"/>
                        <Label Text="{./Caption}"/>
                </HorizontalStack>
        </Border>
index 9cc1880df41c03ff86780c737188d0d859276309..4f5cb021f18a9a8747f0a9b9a282efbdb248739f 100644 (file)
@@ -9,3 +9,9 @@
 <ItemTemplate Path="#Crow.Coding.ui.SrcEdit.itemp" DataType=".style"/>
 <ItemTemplate Path="#Crow.Coding.ui.IMLEdit.itemp" DataType=".crow"/>
 <ItemTemplate Path="#Crow.Coding.ui.IMLEdit.itemp" DataType=".template"/>
+<ItemTemplate DataType=".goml">
+       <TabItem Caption="{DisplayName}" QueryClose="OnQueryClose">
+               <IMLContainer Path="#Crow.Coding.ui.TextEditor.crow"/>
+       </TabItem>
+</ItemTemplate>
+
diff --git a/CrowIDE/ui/editors/TextEditor.crow b/CrowIDE/ui/editors/TextEditor.crow
new file mode 100644 (file)
index 0000000..d97bcdb
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<VerticalStack>
+       <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"
+                               ProjectNode="{}"  KeyDown="textView_KeyDown"/>
+               <ScrollBar Name="scrollbarY" Value="{²../editor.ScrollY}"
+                                  LargeIncrement="{../editor.VisibleLines}"
+                                  CursorSize="{../editor.ChildHeightRatio}"
+                       Maximum="{../editor.MaxScrollY}" Orientation="Vertical"
+                       Width="14" />
+       </HorizontalStack>
+       <ScrollBar Style="HScrollBar" Name="scrollbarX" Value="{²../editor.ScrollX}"
+                       Maximum="{../editor.MaxScrollX}" Orientation="Horizontal"
+                       LargeIncrement="{../editor.VisibleColumns}"
+                       CursorSize="{../editor.ChildWidthRatio}"
+                       Height="14" />                  
+       <HorizontalStack Height="Fit">
+               <GraphicObject Height="5" Width="Stretched"/>
+               <GraphicObject Background="Red" Width="5" Height="5" Visible="{IsDirty}"/>
+               <Label Text="Line:" Foreground="Gray"/>
+               <Label Text="{CurrentLine}"/>
+               <GraphicObject Height="5" Width="10"/>
+               <Label Text="column:" Foreground="Gray"/>
+               <Label Text="{CurrentColumn}"/>
+               <GraphicObject Height="5" Width="10"/>
+               <Label Text="ScrollX:" Foreground="Gray"/>
+               <Label Text="{../../editor.ScrollX}"/>
+       </HorizontalStack>
+</VerticalStack>