]> O.S.I.I.S - jp/crow.git/commitdiff
editor abstract base class, svgeditor base
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 9 Mar 2018 14:37:09 +0000 (15:37 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 9 Mar 2018 14:37:09 +0000 (15:37 +0100)
51 files changed:
CrowIDE/CrowIDE.csproj
CrowIDE/icons/binding.svg [new file with mode: 0644]
CrowIDE/icons/compile.svg [new file with mode: 0644]
CrowIDE/icons/curly-brackets.svg [new file with mode: 0644]
CrowIDE/icons/edit.svg [new file with mode: 0644]
CrowIDE/icons/eraser.svg [new file with mode: 0644]
CrowIDE/icons/light-bulb.svg [new file with mode: 0644]
CrowIDE/icons/magic-wand.svg [new file with mode: 0644]
CrowIDE/icons/magnet.svg [new file with mode: 0644]
CrowIDE/icons/move-arrows.svg [new file with mode: 0644]
CrowIDE/icons/paint-brush.svg [new file with mode: 0644]
CrowIDE/icons/palette.svg [new file with mode: 0644]
CrowIDE/icons/pin.svg [new file with mode: 0644]
CrowIDE/icons/search.svg [new file with mode: 0644]
CrowIDE/icons/text-file.svg [new file with mode: 0644]
CrowIDE/icons/toolbox/Crow.RadioButton.svg
CrowIDE/icons/toolbox/curly-brackets.svg [deleted file]
CrowIDE/icons/toolbox/dot-inside-a-circle.svg [deleted file]
CrowIDE/icons/toolbox/edit.svg [deleted file]
CrowIDE/icons/toolbox/eraser.svg [deleted file]
CrowIDE/icons/toolbox/gear.svg [deleted file]
CrowIDE/icons/toolbox/light-bulb.svg [deleted file]
CrowIDE/icons/toolbox/move-arrows.svg [deleted file]
CrowIDE/icons/toolbox/options.svg [new file with mode: 0644]
CrowIDE/icons/toolbox/paint-brush.svg [deleted file]
CrowIDE/icons/toolbox/pin.svg [deleted file]
CrowIDE/icons/toolbox/search.svg [deleted file]
CrowIDE/icons/toolbox/text-file.svg [deleted file]
CrowIDE/icons/toolbox/tools.svg [deleted file]
CrowIDE/icons/toolbox/trash.svg [deleted file]
CrowIDE/icons/toolbox/zoom-in.svg [deleted file]
CrowIDE/icons/toolbox/zoom-out.svg [deleted file]
CrowIDE/icons/tools.svg [new file with mode: 0644]
CrowIDE/icons/trash.svg [new file with mode: 0644]
CrowIDE/icons/zoom-in.svg [new file with mode: 0644]
CrowIDE/icons/zoom-out.svg [new file with mode: 0644]
CrowIDE/src/Editor.cs [new file with mode: 0644]
CrowIDE/src/ImlVisualEditor.cs
CrowIDE/src/Project.cs
CrowIDE/src/ProjectNodes.cs
CrowIDE/src/SourceEditor/CodeLine.cs
CrowIDE/src/SourceEditor/SourceEditor.cs
CrowIDE/src/SvgEditor.cs [new file with mode: 0644]
CrowIDE/ui/EditPaneItems.template
CrowIDE/ui/IMLEdit.itemp
CrowIDE/ui/SourceEditor.crow [new file with mode: 0644]
CrowIDE/ui/SrcEdit.itemp
Default.style
src/Interface.cs
src/ParsingException.cs
src/SvgPicture.cs

index 6b720536cf6a54d40272a76119f5d5df13fb6900..1779b1d22b912b68fe1b1eef2994421065bbdeef 100644 (file)
     <Compile Include="src\MemberView\PropertyContainer.cs" />
     <Compile Include="src\MemberView\CategoryContainer.cs" />
     <Compile Include="src\GraphicObjectDesignContainer.cs" />
+    <Compile Include="src\Editor.cs" />
+    <Compile Include="src\SvgEditor.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="ui\" />
     <EmbeddedResource Include="icons\toolbox\bullets.svg" />
     <EmbeddedResource Include="icons\toolbox\calendar.svg" />
     <EmbeddedResource Include="icons\toolbox\check-square-1.svg" />
-    <EmbeddedResource Include="icons\toolbox\curly-brackets.svg" />
     <EmbeddedResource Include="icons\toolbox\database.svg" />
     <EmbeddedResource Include="icons\toolbox\ellipsis.svg" />
-    <EmbeddedResource Include="icons\toolbox\eraser.svg" />
     <EmbeddedResource Include="icons\toolbox\file-code.svg" />
-    <EmbeddedResource Include="icons\toolbox\gear.svg" />
     <EmbeddedResource Include="icons\toolbox\grab.svg" />
     <EmbeddedResource Include="icons\toolbox\hash.svg" />
-    <EmbeddedResource Include="icons\toolbox\light-bulb.svg" />
     <EmbeddedResource Include="icons\toolbox\line-list.svg" />
     <EmbeddedResource Include="icons\toolbox\list.svg" />
-    <EmbeddedResource Include="icons\toolbox\move-arrows.svg" />
     <EmbeddedResource Include="icons\toolbox\package.svg" />
-    <EmbeddedResource Include="icons\toolbox\paint-brush.svg" />
-    <EmbeddedResource Include="icons\toolbox\pin.svg" />
     <EmbeddedResource Include="icons\toolbox\pointer.svg" />
     <EmbeddedResource Include="icons\toolbox\puzzle-piece.svg" />
     <EmbeddedResource Include="icons\toolbox\refresh-file.svg" />
-    <EmbeddedResource Include="icons\toolbox\search.svg" />
     <EmbeddedResource Include="icons\toolbox\sliders.svg" />
     <EmbeddedResource Include="icons\toolbox\split-browser-1.svg" />
     <EmbeddedResource Include="icons\toolbox\table.svg" />
     <EmbeddedResource Include="icons\toolbox\tasks.svg" />
-    <EmbeddedResource Include="icons\toolbox\tools.svg" />
-    <EmbeddedResource Include="icons\toolbox\trash.svg" />
-    <EmbeddedResource Include="icons\toolbox\zoom-in.svg" />
-    <EmbeddedResource Include="icons\toolbox\zoom-out.svg" />
-    <EmbeddedResource Include="icons\toolbox\dot-inside-a-circle.svg" />
-    <EmbeddedResource Include="icons\toolbox\edit.svg" />
     <EmbeddedResource Include="icons\toolbox\picture-file.svg" />
-    <EmbeddedResource Include="icons\toolbox\text-file.svg" />
     <EmbeddedResource Include="icons\toolbox\warning.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.Button.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.TextBox.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.Label.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.CheckBox.svg" />
-    <EmbeddedResource Include="icons\toolbox\Crow.RadioButton.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.Spinner.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.Container.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.Group.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.Expandable.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.DirectoryView.svg" />
     <EmbeddedResource Include="icons\toolbox\Crow.MessageBox.svg" />
+    <EmbeddedResource Include="icons\toolbox\options.svg" />
+    <EmbeddedResource Include="icons\toolbox\Crow.RadioButton.svg" />
+    <EmbeddedResource Include="icons\move-arrows.svg" />
+    <EmbeddedResource Include="icons\eraser.svg" />
+    <EmbeddedResource Include="icons\light-bulb.svg" />
+    <EmbeddedResource Include="icons\pin.svg" />
+    <EmbeddedResource Include="icons\paint-brush.svg" />
+    <EmbeddedResource Include="icons\tools.svg" />
+    <EmbeddedResource Include="icons\trash.svg" />
+    <EmbeddedResource Include="icons\zoom-in.svg" />
+    <EmbeddedResource Include="icons\zoom-out.svg" />
+    <EmbeddedResource Include="icons\search.svg" />
+    <EmbeddedResource Include="icons\curly-brackets.svg" />
+    <EmbeddedResource Include="icons\compile.svg" />
+    <EmbeddedResource Include="icons\edit.svg" />
+    <EmbeddedResource Include="icons\text-file.svg" />
+    <EmbeddedResource Include="ui\SourceEditor.crow" />
   </ItemGroup>
   <ItemGroup>
     <None Include="ui\test.crow">
diff --git a/CrowIDE/icons/binding.svg b/CrowIDE/icons/binding.svg
new file mode 100644 (file)
index 0000000..3d825c6
--- /dev/null
@@ -0,0 +1,7 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/compile.svg b/CrowIDE/icons/compile.svg
new file mode 100644 (file)
index 0000000..3f6ed2b
--- /dev/null
@@ -0,0 +1,9 @@
+<?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="#444444" d="M12 7v-2l-1.2-0.4c-0.1-0.3-0.2-0.7-0.4-1l0.6-1.2-1.5-1.3-1.1 0.5c-0.3-0.2-0.6-0.3-1-0.4l-0.4-1.2h-2l-0.4 1.2c-0.3 0.1-0.7 0.2-1 0.4l-1.1-0.5-1.4 1.4 0.6 1.2c-0.2 0.3-0.3 0.6-0.4 1l-1.3 0.3v2l1.2 0.4c0.1 0.3 0.2 0.7 0.4 1l-0.5 1.1 1.4 1.4 1.2-0.6c0.3 0.2 0.6 0.3 1 0.4l0.3 1.3h2l0.4-1.2c0.3-0.1 0.7-0.2 1-0.4l1.2 0.6 1.4-1.4-0.6-1.2c0.2-0.3 0.3-0.6 0.4-1l1.2-0.4zM3 6c0-1.7 1.3-3 3-3s3 1.3 3 3c0 1.7-1.3 3-3 3s-3-1.3-3-3z"></path>
+<path fill="#444444" d="M7.5 6c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path>
+<path fill="#444444" d="M16 3v-1h-0.6c0-0.2-0.1-0.4-0.2-0.5l0.4-0.4-0.7-0.7-0.4 0.4c-0.2-0.1-0.3-0.2-0.5-0.2v-0.6h-1v0.6c-0.2 0-0.4 0.1-0.5 0.2l-0.4-0.4-0.7 0.7 0.4 0.4c-0.1 0.2-0.2 0.3-0.2 0.5h-0.6v1h0.6c0 0.2 0.1 0.4 0.2 0.5l-0.4 0.4 0.7 0.7 0.4-0.4c0.2 0.1 0.3 0.2 0.5 0.2v0.6h1v-0.6c0.2 0 0.4-0.1 0.5-0.2l0.4 0.4 0.7-0.7-0.4-0.4c0.1-0.2 0.2-0.3 0.2-0.5h0.6zM13.5 3.5c-0.6 0-1-0.4-1-1s0.4-1 1-1 1 0.4 1 1c0 0.6-0.4 1-1 1z"></path>
+<path fill="#444444" d="M15.4 11.8c-0.1-0.3-0.2-0.6-0.4-0.9l0.3-0.6-0.7-0.7-0.5 0.4c-0.3-0.2-0.6-0.3-0.9-0.4l-0.2-0.6h-1l-0.2 0.6c-0.3 0.1-0.6 0.2-0.9 0.4l-0.6-0.3-0.7 0.7 0.3 0.6c-0.2 0.3-0.3 0.6-0.4 0.9l-0.5 0.1v1l0.6 0.2c0.1 0.3 0.2 0.6 0.4 0.9l-0.3 0.6 0.7 0.7 0.6-0.3c0.3 0.2 0.6 0.3 0.9 0.4l0.1 0.5h1l0.2-0.6c0.3-0.1 0.6-0.2 0.9-0.4l0.6 0.3 0.7-0.7-0.4-0.5c0.2-0.3 0.3-0.6 0.4-0.9l0.6-0.2v-1l-0.6-0.2zM12.5 14c-0.8 0-1.5-0.7-1.5-1.5s0.7-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5z"></path>
+</svg>
diff --git a/CrowIDE/icons/curly-brackets.svg b/CrowIDE/icons/curly-brackets.svg
new file mode 100644 (file)
index 0000000..f70fe9f
--- /dev/null
@@ -0,0 +1,7 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/edit.svg b/CrowIDE/icons/edit.svg
new file mode 100644 (file)
index 0000000..f4b3190
--- /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="#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>
+</svg>
diff --git a/CrowIDE/icons/eraser.svg b/CrowIDE/icons/eraser.svg
new file mode 100644 (file)
index 0000000..ae4c190
--- /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="#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>
+</svg>
diff --git a/CrowIDE/icons/light-bulb.svg b/CrowIDE/icons/light-bulb.svg
new file mode 100644 (file)
index 0000000..c7df82a
--- /dev/null
@@ -0,0 +1,7 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/magic-wand.svg b/CrowIDE/icons/magic-wand.svg
new file mode 100644 (file)
index 0000000..0196115
--- /dev/null
@@ -0,0 +1,13 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/magnet.svg b/CrowIDE/icons/magnet.svg
new file mode 100644 (file)
index 0000000..613fe7b
--- /dev/null
@@ -0,0 +1,8 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/move-arrows.svg b/CrowIDE/icons/move-arrows.svg
new file mode 100644 (file)
index 0000000..2100ea2
--- /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="#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>
+</svg>
diff --git a/CrowIDE/icons/paint-brush.svg b/CrowIDE/icons/paint-brush.svg
new file mode 100644 (file)
index 0000000..b98eb85
--- /dev/null
@@ -0,0 +1,8 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/palette.svg b/CrowIDE/icons/palette.svg
new file mode 100644 (file)
index 0000000..79137cd
--- /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="#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>
+</svg>
diff --git a/CrowIDE/icons/pin.svg b/CrowIDE/icons/pin.svg
new file mode 100644 (file)
index 0000000..0c66eb3
--- /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="#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>
+</svg>
diff --git a/CrowIDE/icons/search.svg b/CrowIDE/icons/search.svg
new file mode 100644 (file)
index 0000000..3b13c13
--- /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="#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>
+</svg>
diff --git a/CrowIDE/icons/text-file.svg b/CrowIDE/icons/text-file.svg
new file mode 100644 (file)
index 0000000..88fe979
--- /dev/null
@@ -0,0 +1,9 @@
+<?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="#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>
+</svg>
index a149a350f122935e97d66d33f26054423dbb26b1..c84374afc3264421fb8a5d6010a2a10c830fc4d3 100644 (file)
@@ -2,9 +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="M5 3.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path>
-<path fill="#444444" d="M3.5 0c-1.9 0-3.5 1.6-3.5 3.5s1.6 3.5 3.5 3.5 3.5-1.6 3.5-3.5-1.6-3.5-3.5-3.5zM3.5 6c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5c0 1.4-1.1 2.5-2.5 2.5z"></path>
-<path fill="#444444" d="M3.5 8c-1.9 0-3.5 1.6-3.5 3.5s1.6 3.5 3.5 3.5 3.5-1.6 3.5-3.5c0-1.9-1.6-3.5-3.5-3.5zM3.5 14c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5c0 1.4-1.1 2.5-2.5 2.5z"></path>
-<path fill="#444444" d="M8 2h8v3h-8v-3z"></path>
-<path fill="#444444" d="M8 10h8v3h-8v-3z"></path>
+<path fill="#444444" d="M8 4c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"></path>
+<path fill="#444444" d="M8 1c3.9 0 7 3.1 7 7s-3.1 7-7 7-7-3.1-7-7 3.1-7 7-7zM8 0c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8v0z"></path>
 </svg>
diff --git a/CrowIDE/icons/toolbox/curly-brackets.svg b/CrowIDE/icons/toolbox/curly-brackets.svg
deleted file mode 100644 (file)
index f70fe9f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/dot-inside-a-circle.svg b/CrowIDE/icons/toolbox/dot-inside-a-circle.svg
deleted file mode 100644 (file)
index c84374a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="#444444" d="M8 4c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"></path>
-<path fill="#444444" d="M8 1c3.9 0 7 3.1 7 7s-3.1 7-7 7-7-3.1-7-7 3.1-7 7-7zM8 0c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8v0z"></path>
-</svg>
diff --git a/CrowIDE/icons/toolbox/edit.svg b/CrowIDE/icons/toolbox/edit.svg
deleted file mode 100644 (file)
index f4b3190..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/eraser.svg b/CrowIDE/icons/toolbox/eraser.svg
deleted file mode 100644 (file)
index ae4c190..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/gear.svg b/CrowIDE/icons/toolbox/gear.svg
deleted file mode 100644 (file)
index 3f6ed2b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?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="#444444" d="M12 7v-2l-1.2-0.4c-0.1-0.3-0.2-0.7-0.4-1l0.6-1.2-1.5-1.3-1.1 0.5c-0.3-0.2-0.6-0.3-1-0.4l-0.4-1.2h-2l-0.4 1.2c-0.3 0.1-0.7 0.2-1 0.4l-1.1-0.5-1.4 1.4 0.6 1.2c-0.2 0.3-0.3 0.6-0.4 1l-1.3 0.3v2l1.2 0.4c0.1 0.3 0.2 0.7 0.4 1l-0.5 1.1 1.4 1.4 1.2-0.6c0.3 0.2 0.6 0.3 1 0.4l0.3 1.3h2l0.4-1.2c0.3-0.1 0.7-0.2 1-0.4l1.2 0.6 1.4-1.4-0.6-1.2c0.2-0.3 0.3-0.6 0.4-1l1.2-0.4zM3 6c0-1.7 1.3-3 3-3s3 1.3 3 3c0 1.7-1.3 3-3 3s-3-1.3-3-3z"></path>
-<path fill="#444444" d="M7.5 6c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path>
-<path fill="#444444" d="M16 3v-1h-0.6c0-0.2-0.1-0.4-0.2-0.5l0.4-0.4-0.7-0.7-0.4 0.4c-0.2-0.1-0.3-0.2-0.5-0.2v-0.6h-1v0.6c-0.2 0-0.4 0.1-0.5 0.2l-0.4-0.4-0.7 0.7 0.4 0.4c-0.1 0.2-0.2 0.3-0.2 0.5h-0.6v1h0.6c0 0.2 0.1 0.4 0.2 0.5l-0.4 0.4 0.7 0.7 0.4-0.4c0.2 0.1 0.3 0.2 0.5 0.2v0.6h1v-0.6c0.2 0 0.4-0.1 0.5-0.2l0.4 0.4 0.7-0.7-0.4-0.4c0.1-0.2 0.2-0.3 0.2-0.5h0.6zM13.5 3.5c-0.6 0-1-0.4-1-1s0.4-1 1-1 1 0.4 1 1c0 0.6-0.4 1-1 1z"></path>
-<path fill="#444444" d="M15.4 11.8c-0.1-0.3-0.2-0.6-0.4-0.9l0.3-0.6-0.7-0.7-0.5 0.4c-0.3-0.2-0.6-0.3-0.9-0.4l-0.2-0.6h-1l-0.2 0.6c-0.3 0.1-0.6 0.2-0.9 0.4l-0.6-0.3-0.7 0.7 0.3 0.6c-0.2 0.3-0.3 0.6-0.4 0.9l-0.5 0.1v1l0.6 0.2c0.1 0.3 0.2 0.6 0.4 0.9l-0.3 0.6 0.7 0.7 0.6-0.3c0.3 0.2 0.6 0.3 0.9 0.4l0.1 0.5h1l0.2-0.6c0.3-0.1 0.6-0.2 0.9-0.4l0.6 0.3 0.7-0.7-0.4-0.5c0.2-0.3 0.3-0.6 0.4-0.9l0.6-0.2v-1l-0.6-0.2zM12.5 14c-0.8 0-1.5-0.7-1.5-1.5s0.7-1.5 1.5-1.5 1.5 0.7 1.5 1.5-0.7 1.5-1.5 1.5z"></path>
-</svg>
diff --git a/CrowIDE/icons/toolbox/light-bulb.svg b/CrowIDE/icons/toolbox/light-bulb.svg
deleted file mode 100644 (file)
index c7df82a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/move-arrows.svg b/CrowIDE/icons/toolbox/move-arrows.svg
deleted file mode 100644 (file)
index 2100ea2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/options.svg b/CrowIDE/icons/toolbox/options.svg
new file mode 100644 (file)
index 0000000..a149a35
--- /dev/null
@@ -0,0 +1,10 @@
+<?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="#444444" d="M5 3.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path>
+<path fill="#444444" d="M3.5 0c-1.9 0-3.5 1.6-3.5 3.5s1.6 3.5 3.5 3.5 3.5-1.6 3.5-3.5-1.6-3.5-3.5-3.5zM3.5 6c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5c0 1.4-1.1 2.5-2.5 2.5z"></path>
+<path fill="#444444" d="M3.5 8c-1.9 0-3.5 1.6-3.5 3.5s1.6 3.5 3.5 3.5 3.5-1.6 3.5-3.5c0-1.9-1.6-3.5-3.5-3.5zM3.5 14c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5c0 1.4-1.1 2.5-2.5 2.5z"></path>
+<path fill="#444444" d="M8 2h8v3h-8v-3z"></path>
+<path fill="#444444" d="M8 10h8v3h-8v-3z"></path>
+</svg>
diff --git a/CrowIDE/icons/toolbox/paint-brush.svg b/CrowIDE/icons/toolbox/paint-brush.svg
deleted file mode 100644 (file)
index b98eb85..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/pin.svg b/CrowIDE/icons/toolbox/pin.svg
deleted file mode 100644 (file)
index 0c66eb3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/search.svg b/CrowIDE/icons/toolbox/search.svg
deleted file mode 100644 (file)
index 3b13c13..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/text-file.svg b/CrowIDE/icons/toolbox/text-file.svg
deleted file mode 100644 (file)
index 88fe979..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/tools.svg b/CrowIDE/icons/toolbox/tools.svg
deleted file mode 100644 (file)
index 8fa643b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/trash.svg b/CrowIDE/icons/toolbox/trash.svg
deleted file mode 100644 (file)
index cf7f728..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/zoom-in.svg b/CrowIDE/icons/toolbox/zoom-in.svg
deleted file mode 100644 (file)
index 1ec25bb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/toolbox/zoom-out.svg b/CrowIDE/icons/toolbox/zoom-out.svg
deleted file mode 100644 (file)
index 414cf9d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="#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>
-</svg>
diff --git a/CrowIDE/icons/tools.svg b/CrowIDE/icons/tools.svg
new file mode 100644 (file)
index 0000000..8fa643b
--- /dev/null
@@ -0,0 +1,8 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/trash.svg b/CrowIDE/icons/trash.svg
new file mode 100644 (file)
index 0000000..cf7f728
--- /dev/null
@@ -0,0 +1,7 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/zoom-in.svg b/CrowIDE/icons/zoom-in.svg
new file mode 100644 (file)
index 0000000..1ec25bb
--- /dev/null
@@ -0,0 +1,7 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/icons/zoom-out.svg b/CrowIDE/icons/zoom-out.svg
new file mode 100644 (file)
index 0000000..414cf9d
--- /dev/null
@@ -0,0 +1,7 @@
+<?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="#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>
+</svg>
diff --git a/CrowIDE/src/Editor.cs b/CrowIDE/src/Editor.cs
new file mode 100644 (file)
index 0000000..41aa606
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// Editor.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.Threading;
+using System.Xml.Serialization;
+
+namespace Crow.Coding
+{
+       public abstract class Editor : ScrollingObject
+       {
+               #region CTOR
+               protected Editor ():base(){
+                       Thread t = new Thread (backgroundThreadFunc);
+                       t.IsBackground = true;
+                       t.Start ();
+               }
+               #endregion
+
+               protected ReaderWriterLockSlim editorMutex = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
+               protected ProjectFile projFile = null;
+               Exception error = null;
+
+               public virtual ProjectFile ProjectNode
+               {
+                       get { return projFile; }
+                       set
+                       {
+                               if (projFile == value)
+                                       return;
+
+                               if (projFile != null)
+                                       projFile.UnregisterEditor (this);
+
+                               projFile = value;
+
+                               if (projFile != null)                                   
+                                       projFile.RegisterEditor (this);
+
+                               NotifyValueChanged ("ProjectNode", projFile);
+                       }
+               }
+               [XmlIgnore]public Exception Error {
+                       get { return error; }
+                       set {
+                               if (error == value)
+                                       return;
+                               error = value;
+                               NotifyValueChanged ("Error", error);
+                               NotifyValueChanged ("HasError", HasError);
+                       }
+               }
+               [XmlIgnore]public bool HasError {
+                       get { return error != null; }
+               }
+
+               protected abstract void updateEditorFromProjFile ();
+               protected abstract void updateProjFileFromEditor ();
+               protected abstract bool EditorIsDirty { get; set; }
+               protected virtual bool IsReady { get { return true; }}
+               protected virtual void updateCheckPostProcess () {}
+
+               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 ();
+                                       }
+                               }
+                               Thread.Sleep (50);
+                       }       
+               }
+       }
+}
+
index 88ee2ffe2935742b86cfce6e482422c07c913469..d084904ef6ffe2688309c2da6c0d42ca0f5dfbc0 100644 (file)
@@ -26,30 +26,29 @@ using System.ComponentModel;
 using System.IO;
 using System.Collections.Generic;
 using Crow.IML;
+using System.Text;
+using System.Xml;
 
 namespace Crow.Coding
 {
-       public class ImlVisualEditor : GraphicObject
+       public class ImlVisualEditor : Editor
        {
                #region CTOR
                public ImlVisualEditor () : base()
                {
                        imlVE = new DesignInterface ();
-                       Thread t = new Thread (interfaceThread);
-                       t.IsBackground = true;
-                       t.Start ();
                }
                #endregion
 
                DesignInterface imlVE;
                GraphicObject selectedItem;
-               ImlProjectItem projFile;
+               ImlProjectItem imlProjFile;
                Exception imlError = null;
 
-               bool drawGrid;
+               bool drawGrid, snapToGrid;
                int gridSpacing;
 
-               [XmlAttributeAttribute][DefaultValue(true)]
+               [DefaultValue(true)]
                public bool DrawGrid {
                        get { return drawGrid; }
                        set {
@@ -60,7 +59,17 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(10)]
+               [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 {
@@ -81,7 +90,7 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
-               /// <summary>Pointer is over the widget</summary>
+               /// <summary>PoinprojFilever the widget</summary>
                public virtual GraphicObject HoverWidget
                {
                        get { return imlVE.HoverWidget; }
@@ -97,89 +106,97 @@ namespace Crow.Coding
                [XmlIgnore]public List<LQIList> LQIs {
                        get { return imlVE.LQIs; }
                }
-                       
-               public ProjectNode ProjectNode {
-                       get { return projFile; }
-                       set {
-                               if (projFile == value)
-                                       return;
-
-                               if (projFile != null)
-                                       projFile.UnregisterEditor (this);
-                               
-                               projFile = value as ImlProjectItem;
-
-                               imlVE.ProjFile = projFile;
 
-                               if (projFile != null)
-                                       projFile.RegisterEditor (this);
-
-                               NotifyValueChanged ("ProjectNode", projFile);
+               public override ProjectFile ProjectNode {
+                       get {
+                               return base.ProjectNode;
                        }
-               }
-
-               [XmlIgnore]public Exception IMLError {
-                       get { return imlError; }
                        set {
-                               if (imlError == value)
-                                       return;
-                               imlError = value;
-                               NotifyValueChanged ("IMLError", imlError);
-                               NotifyValueChanged ("HasError", HasError);
+                               base.ProjectNode = value;
+                               imlProjFile = projFile as ImlProjectItem;
+                               imlVE.ProjFile = imlProjFile;
                        }
                }
-               [XmlIgnore]public bool HasError {
-                       get { return imlError != null; }
-               }
 
                public List<GraphicObject> GraphicTree {
                        get { return imlVE.GraphicTree; }
                }
-
-               void interfaceThread()
+               protected override void updateProjFileFromEditor ()
                {
-                       while (true) {
-                               try {
-                                       if (!projFile.RegisteredEditors[this]){
-                                               string selItemDesignID = null;
-                                               if (SelectedItem!=null)
-                                                       selItemDesignID = SelectedItem.design_id;
-                                               imlVE.ClearInterface();
-                                               Instantiator.NextInstantiatorID = 0;
-                                               imlVE.Styling = projFile.Project.solution.Styling;
-                                               imlVE.DefaultValuesLoader.Clear();
-                                               imlVE.DefaultTemplates = projFile.Project.solution.DefaultTemplates;
-                                               imlVE.Instantiators = new Dictionary<string, Instantiator>();
-                                               imlVE.LoadIMLFragment(projFile.Source);
-                                               projFile.Instance = imlVE.GraphicTree[0];
-                                               GraphicObject go = null;
-                                               if (selItemDesignID!=null)
-                                                       projFile.Instance.FindByDesignID(selItemDesignID,out go);                                               
-                                               SelectedItem = go;
-                                               IMLError = null;
-                                               projFile.RegisteredEditors[this] = true;
-                                       }else if ((bool)projFile.Instance?.design_HasChanged){
-                                               projFile.UpdateSource(this, projFile.Instance.GetIML());
+                       try {
+                               projFile.UpdateSource(this, imlProjFile.Instance.GetIML());
+                       } catch (Exception ex) {
+                               Error = ex.InnerException;
+                               if (Monitor.IsEntered(imlVE.UpdateMutex))
+                                       Monitor.Exit (imlVE.UpdateMutex);
+                       }
+               }
+               protected override void updateEditorFromProjFile () {
+                       try {
+                               string selItemDesignID = null;
+                               if (SelectedItem!=null)
+                                       selItemDesignID = SelectedItem.design_id;
+                               imlVE.ClearInterface();
+                               Instantiator.NextInstantiatorID = 0;
+                               imlVE.Styling = projFile.Project.solution.Styling;
+                               imlVE.DefaultValuesLoader.Clear();
+                               imlVE.DefaultTemplates = projFile.Project.solution.DefaultTemplates;
+                               imlVE.Instantiators = new Dictionary<string, Instantiator>();
+
+                               //prevent error on empty file
+                               bool emptyFile = true;
+                               string src = projFile.Source;
+                               using (Stream s = new MemoryStream (Encoding.UTF8.GetBytes (src))) {
+                                       using (XmlReader itr = XmlReader.Create (s)) {
+                                               while(itr.Read()){
+                                                       if (itr.NodeType == XmlNodeType.Element){
+                                                               emptyFile = false;
+                                                               break;
+                                                       }
+                                               }
                                        }
-                                       imlVE.Update ();
-                               } catch (Exception ex) {
-                                       IMLError = ex.InnerException;
-                                       if (Monitor.IsEntered(imlVE.UpdateMutex))
-                                               Monitor.Exit (imlVE.UpdateMutex);
                                }
+                               GraphicObject go = null;
+                               Error = null;
 
+                               if (emptyFile){
+                                       imlProjFile.Instance = null;
+                               }else{
+                                       imlVE.LoadIMLFragment(src);
+                                       imlProjFile.Instance = imlVE.GraphicTree[0];
+                                       if (selItemDesignID!=null)
+                                               imlProjFile.Instance.FindByDesignID(selItemDesignID,out go);                                            
 
-                               bool isDirty = false;
+                               }
+                               SelectedItem = go;
+                       } catch (Exception ex) {
+                               Error = ex.InnerException;
+                               if (Monitor.IsEntered(imlVE.UpdateMutex))
+                                       Monitor.Exit (imlVE.UpdateMutex);
+                       }
+               }
 
-                               lock (imlVE.RenderMutex)
-                                       isDirty = imlVE.IsDirty;
+               protected override bool EditorIsDirty {
+                       get { return (bool)imlProjFile.Instance?.design_HasChanged; }
+                       set {
+                               if (GraphicTree [0] != null)
+                                       GraphicTree [0].design_HasChanged = value;                      
+                       }
+               }
+               protected override bool IsReady {
+                       get { return imlVE != null && imlProjFile != null; }
+               }
+               protected override void updateCheckPostProcess ()
+               {
+                       imlVE.Update ();
+                       bool isDirty = false;
 
-                               if (isDirty) {
-                                       lock (IFace.UpdateMutex)
-                                               RegisterForRedraw ();
-                               }
+                       lock (imlVE.RenderMutex)
+                               isDirty = imlVE.IsDirty;
 
-                               Thread.Sleep (10);
+                       if (isDirty) {
+                               lock (IFace.UpdateMutex)
+                                       RegisterForRedraw ();
                        }
                }
 
@@ -194,59 +211,7 @@ namespace Crow.Coding
                                break;
                        }
                }
-               bool tryAddDraggedObjTo(GraphicObject g){
-                       lock (imlVE.UpdateMutex) {
-                               if (g.GetType ().IsSubclassOf (typeof(Container))) {
-                                       Container c = g as Container;
-                                       c.SetChild (draggedObj);
-                                       GraphicTree [0].design_HasChanged = true;
-                               } else if (g.GetType ().IsSubclassOf (typeof(Group))) {
-                                       Group c = g as Group;
-                                       c.AddChild (draggedObj);
-                               } else
-                                       return false;
-                               GraphicTree [0].design_HasChanged = true;
-                               draggedObjContainer = g;
-                       }
-                       return true;
-               }
-               bool isPossibleContainer (GraphicObject g){
-                       if (g.GetType().IsSubclassOf(typeof(Container))){
-                               Container c = g as Container;
-                               return c.Child == null;
-                       }
-                       return g.GetType ().IsSubclassOf (typeof(Group));
-               }
-               void removeDraggedObjFrom(){
-                       if (draggedObjContainer == null)
-                               return;
-                       lock (imlVE.UpdateMutex) {
-                               if (draggedObjContainer.GetType().IsSubclassOf(typeof(Container))){
-                                       Container c = draggedObjContainer as Container;
-                                       c.SetChild (null);
-                                       GraphicTree [0].design_HasChanged = true;
-                                       //Console.WriteLine ("remove {0} from {1}", draggedObj, c);
-                               }else if (draggedObjContainer.GetType().IsSubclassOf(typeof(Group))){
-                                       Group c = draggedObjContainer as Group;
-                                       c.RemoveChild (draggedObj);
-                                       GraphicTree [0].design_HasChanged = true;
-                                       //Console.WriteLine ("remove {0} from {1}", draggedObj, c);
-                               }//else
-                               //      Console.WriteLine ("Error removing dragged obj");
-                       }
-                       draggedObjContainer = null;
-               }
-               public void ClearDraggedObj (bool removeFromTree = true) {
-                       //Console.WriteLine ("Clear dragged obj {0}, remove from tree = {1}", draggedObj, removeFromTree);
-                       if (removeFromTree)
-                               removeDraggedObjFrom ();
-                       draggedObjContainer = null;
-                       if (draggedObj == null)
-                               return;
-                       if (removeFromTree)
-                               draggedObj.Dispose ();
-                       draggedObj = null;
-               }
+
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
                        base.onMouseMove (sender, e);
@@ -279,6 +244,7 @@ namespace Crow.Coding
                        }
 
                }
+
                protected override void onDraw (Cairo.Context gr)
                {
                        base.onDraw (gr);
@@ -338,31 +304,87 @@ namespace Crow.Coding
                        gr.Rectangle (hr, 1.0);
                }
 
-               public GraphicObject draggedObj = null;
-               public GraphicObject draggedObjContainer = null;
-
                protected override void onDragEnter (object sender, DragDropEventArgs e)
                {
                        base.onDragEnter (sender, e);
                        GraphicObjectDesignContainer godc = e.DragSource.DataSource as GraphicObjectDesignContainer;
                        if (godc == null)
                                return;
-                       Console.WriteLine ("IMLEditor Drag Enter");
-
-                       lock (imlVE.UpdateMutex) {
-                               draggedObj = imlVE.CreateITorFromIMLFragment ("<" + godc.CrowType.Name + "/>").CreateInstance ();
-                       }
+                       createDraggedObj (godc.CrowType);
                }
                protected override void onDragLeave (object sender, DragDropEventArgs e)
                {
                        base.onDragLeave (sender, e);
 
-                       Console.WriteLine ("IMLEditor Drag Enter");
-
                        ClearDraggedObj ();
                }
                #endregion
 
+               #region draggedObj handling
+               public GraphicObject draggedObj = null;
+               public GraphicObject draggedObjContainer = null;
+
+               bool tryAddDraggedObjTo(GraphicObject g){
+                       lock (imlVE.UpdateMutex) {
+                               if (g.GetType ().IsSubclassOf (typeof(Container))) {
+                                       Container c = g as Container;
+                                       c.SetChild (draggedObj);
+                                       EditorIsDirty = true;
+                               } else if (g.GetType ().IsSubclassOf (typeof(Group))) {
+                                       Group c = g as Group;
+                                       c.AddChild (draggedObj);
+                               } else
+                                       return false;
+                               EditorIsDirty = true;
+                               draggedObjContainer = g;
+                       }
+                       return true;
+               }
+               bool isPossibleContainer (GraphicObject g){
+                       if (g.GetType().IsSubclassOf(typeof(Container))){
+                               Container c = g as Container;
+                               return c.Child == null;
+                       }
+                       return g.GetType ().IsSubclassOf (typeof(Group));
+               }
+               void removeDraggedObjFrom(){
+                       if (draggedObjContainer == null)
+                               return;
+                       lock (imlVE.UpdateMutex) {
+                               if (draggedObjContainer.GetType().IsSubclassOf(typeof(Container))){
+                                       Container c = draggedObjContainer as Container;
+                                       c.SetChild (null);
+                                       EditorIsDirty = true;
+                                       //Console.WriteLine ("remove {0} from {1}", draggedObj, c);
+                               }else if (draggedObjContainer.GetType().IsSubclassOf(typeof(Group))){
+                                       Group c = draggedObjContainer as Group;
+                                       c.RemoveChild (draggedObj);
+                                       EditorIsDirty = true;
+                                       //Console.WriteLine ("remove {0} from {1}", draggedObj, c);
+                               }//else
+                               //      Console.WriteLine ("Error removing dragged obj");
+                       }
+                       draggedObjContainer = null;
+               }
+               void createDraggedObj (Type crowType) {
+                       lock (imlVE.UpdateMutex) {
+                               draggedObj = imlVE.CreateITorFromIMLFragment ("<" + crowType.Name + "/>").CreateInstance ();
+                       }
+               }
+               public void ClearDraggedObj (bool removeFromTree = true) {
+                       //Console.WriteLine ("Clear dragged obj {0}, remove from tree = {1}", draggedObj, removeFromTree);
+                       if (removeFromTree)
+                               removeDraggedObjFrom ();
+                       draggedObjContainer = null;
+                       if (draggedObj == null)
+                               return;
+                       if (removeFromTree)
+                               draggedObj.Dispose ();
+                       draggedObj = null;
+               }
+               #endregion
+
+
                void WidgetCheckOver (GraphicObject go, MouseMoveEventArgs e){
                        Type tGo = go.GetType();
                        if (typeof(TemplatedGroup).IsAssignableFrom (tGo)) {
index 5e6c98d9e76a66d69de6c34a76fee135ae11ed25..38e38493bae8aebaa627804c485c684036c4321b 100644 (file)
@@ -216,20 +216,37 @@ namespace Crow.Coding
 
                #endregion
 
+               Crow.Command cmdSave, cmdOpen, cmdCompile, cmdSetAsStartProj, cmdNewFile;
 
                public Project (Solution sol, SolutionProject sp) {
                        solutionProject = sp;
 
                        solution = sol;
-                       
-                       Commands = new List<Crow.Command> (new Crow.Command[] {
-                               new Crow.Command(new Action(() => Compile())) { Caption = "Compile"},
-                               new Crow.Command(new Action(() => setAsStartupProject())) { Caption = "Set as Startup Project"},
-                       });
+
+                       cmdSave = new Crow.Command (new Action (() => Save ()))
+                       { Caption = "Save", Icon = new SvgPicture ("#Crow.Coding.ui.icons.inbox.svg"), CanExecute = true };
+                       cmdOpen = new Crow.Command (new Action (() => Load ())) 
+                       { Caption = "Open", Icon = new SvgPicture ("#Crow.Coding.ui.icons.outbox.svg"), CanExecute = false };
+                       cmdCompile = new Crow.Command (new Action (() => Compile ())) {
+                               Caption = "Compile",
+                               Icon = "#Crow.Coding.icons.compile.svg"
+                       };
+                       cmdSetAsStartProj = new Crow.Command (new Action (() => setAsStartupProject ())) {
+                               Caption = "Set as Startup Project"
+                       };
+                       cmdNewFile = new Crow.Command (new Action (() => AddNewFile ())) {
+                               Caption = "Add New File"
+                       };
+
+                       Commands = new List<Crow.Command> (new Crow.Command[] {cmdOpen,cmdSave,cmdSetAsStartProj,cmdCompile,cmdNewFile});
 
                        Load ();
                }
 
+               public void AddNewFile () {
+                       
+               }
+
                public void Load () {
                        
                        xmlDoc = new XmlDocument();
@@ -254,6 +271,10 @@ namespace Crow.Coding
                        IsLoaded = true;
                }
 
+               public void Save () {
+                       
+               }
+
                void setAsStartupProject () {
                        solution.StartupProject = this;
                }
index bf213c277cdca8c52ecd8713c9e21bd3c96ed82d..1524b3d22553a1faf804358eeac62aebf687b1d0 100644 (file)
@@ -263,6 +263,8 @@ namespace Crow.Coding
                                NotifyValueChanged ("Source", source);
                                NotifyValueChanged ("IsDirty", IsDirty);
 
+                               cmdSave.CanExecute = IsDirty;
+
                                srcEditMtx.ExitWriteLock ();
                        }
                }
@@ -317,6 +319,8 @@ namespace Crow.Coding
                        NotifyValueChanged ("IsDirty", false);
                }
                public void Save () {
+                       if (!IsDirty)
+                               return;
                        using (StreamWriter sw = new StreamWriter (AbsolutePath)) {
                                sw.Write (source);
                        }
index 041e903cd8c4dd3597a4103f0a789910932fb3bc..23f43fba39ce091e6ccc0e7050459383a99d0cb7 100644 (file)
@@ -59,7 +59,7 @@ namespace Crow.Coding
                }
 
                public void SetLineInError (ParserException ex) {
-                       Tokens = null; 
+                       Tokens = null;
                        exception = ex;
                }
 
index 691b6d9d79ce5bb2d0917e3eb74c1ce28c4d7f7b..22666f53372b13dd3eaa7f683d7b8d169ce761ed 100644 (file)
@@ -42,10 +42,8 @@ namespace Crow.Coding
        /// <summary>
        /// Scrolling text box optimized for monospace fonts, for coding
        /// </summary>
-       public class SourceEditor : ScrollingObject
-       {
-               public ReaderWriterLockSlim seMutex = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
-
+       public class SourceEditor : Editor
+       {               
                #region CTOR
                public SourceEditor (): base()
                {
@@ -66,6 +64,7 @@ namespace Crow.Coding
                        //formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent));
 
                        parsing.Add (".crow", "Crow.Coding.XMLParser");
+                       parsing.Add (".svg", "Crow.Coding.XMLParser");
                        parsing.Add (".template", "Crow.Coding.XMLParser");
                        parsing.Add (".cs", "Crow.Coding.CSharpParser");
                        parsing.Add (".style", "Crow.Coding.StyleParser");
@@ -79,40 +78,14 @@ namespace Crow.Coding
                        buffer.PositionChanged += Buffer_PositionChanged;
                        buffer.FoldingEvent += Buffer_FoldingEvent;
                        buffer.Add (new CodeLine(""));
-
-                       Thread updateSource = new Thread (updateSourceThreadFunc);
-                       updateSource.IsBackground = true;
-                       updateSource.Start ();
                }
                #endregion
+
                string oldSource = "";
-               void updateSourceThreadFunc (){
-                       while (true) {
-                               if (projFile != null && buffer != null) {
-                                       if (!projFile.RegisteredEditors [this]) {
-                                               loadSource ();
-                                               isDirty = false;
-                                               oldSource = projFile.Source;
-                                               CurrentLine = requestedLine;
-                                               CurrentColumn = requestedCol;
-                                               projFile.RegisteredEditors [this] = true;
-                                       }
-                                       buffer.editMutex.EnterWriteLock ();
-                                       string newsrc = "";
-                                       bool wasDirty = false;
-                                       if (isDirty) {
-                                               isDirty = false;
-                                               wasDirty = true;
-                                               newsrc = buffer.FullText;
-                                       }
-                                       buffer.editMutex.ExitWriteLock ();
-                                       if (wasDirty) 
-                                               projFile.UpdateSource (this, newsrc);                                           
-                                       
-                               }
-                               Thread.Sleep (100);
-                       }
-               }
+               //save requested position on error, and try it on next move
+               int requestedLine = 0, requestedCol = 0;
+               volatile bool isDirty = false;
+
                const int leftMarginGap = 3;//gap between items in margin and text
                const int foldSize = 9;//folding rectangles size
                const int foldHSpace = 4;//folding level tabulation x
@@ -120,7 +93,6 @@ namespace Crow.Coding
 
                #region private and protected fields
                bool foldingEnabled = true;
-               ProjectFile projFile = null;
                int leftMargin = 0;     //margin used to display line numbers, folding errors,etc...
                int visibleLines = 1;
                int visibleColumns = 1;
@@ -199,7 +171,7 @@ namespace Crow.Coding
                }                       
                void updatePrintedLines () {
                        buffer.editMutex.EnterReadLock ();
-                       seMutex.EnterWriteLock ();
+                       editorMutex.EnterWriteLock ();
 
                        PrintedLines = new List<CodeLine> ();
                        int curL = 0;
@@ -225,7 +197,10 @@ namespace Crow.Coding
                        }
 
                        buffer.editMutex.ExitReadLock ();
-                       seMutex.ExitWriteLock ();
+                       editorMutex.ExitWriteLock ();
+               }
+               void updateOnScreenCurLineFromBuffCurLine(){
+                       printedCurrentLine = PrintedLines.IndexOf (buffer.CurrentCodeLine);
                }
                void toogleFolding (int line) {
                        if (parser == null || !foldingEnabled)
@@ -233,12 +208,34 @@ namespace Crow.Coding
                        buffer.ToogleFolding (line);
                }
 
-               volatile bool isDirty = false;
+               protected override void updateEditorFromProjFile ()
+               {
+                       loadSource ();
+                       isDirty = false;
+                       oldSource = projFile.Source;
+                       CurrentLine = requestedLine;
+                       CurrentColumn = requestedCol;
+                       projFile.RegisteredEditors [this] = true;
+               }
+               protected override void updateProjFileFromEditor ()
+               {
+                       buffer.editMutex.EnterWriteLock ();
+                       string newsrc = buffer.FullText;
+                       buffer.editMutex.ExitWriteLock ();
+                       projFile.UpdateSource (this, newsrc);
+               }
+               protected override bool EditorIsDirty {
+                       get { return isDirty; }
+                       set { isDirty = value; }
+               }
+               protected override bool IsReady {
+                       get { return buffer != null; }
+               }
 
                #region Buffer events handlers
                void Buffer_BufferCleared (object sender, EventArgs e)
                {
-                       seMutex.EnterWriteLock ();
+                       editorMutex.EnterWriteLock ();
 
                        buffer.longestLineCharCount = 0;
                        buffer.longestLineIdx = 0;
@@ -249,7 +246,7 @@ namespace Crow.Coding
                        notifyPositionChanged ();
                        isDirty = true;
 
-                       seMutex.ExitWriteLock ();
+                       editorMutex.ExitWriteLock ();
                }
                void Buffer_LineAdditionEvent (object sender, CodeBufferEventArgs e)
                {
@@ -343,20 +340,18 @@ namespace Crow.Coding
                }
                #endregion
 
-               public int CurrentColumn{
-                       get { return buffer == null ? 0 : buffer.CurrentColumn+1; }
-                       set {
-                               try {                                   
-                                       if (value - 1 == buffer.CurrentColumn)
-                                               return;
-                                       buffer.CurrentColumn = value - 1;
-                               } catch (Exception ex) {
-                                       requestedCol = value - 1;
-                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
-                               }
+               void notifyPositionChanged (){
+                       try {                           
+                               NotifyValueChanged ("CurrentLine", buffer.CurrentLine+1);
+                               NotifyValueChanged ("CurrentColumn", buffer.CurrentColumn+1);
+                               NotifyValueChanged ("CurrentLineHasError", CurrentLineHasError);
+                               NotifyValueChanged ("CurrentLineError", CurrentLineError);
+                       } catch (Exception ex) {
+                               Console.WriteLine (ex.ToString ());
                        }
                }
-               int requestedLine = 0, requestedCol = 0;
+                       
+               #region Public Crow Properties
                public int CurrentLine{
                        get { return buffer == null ? 0 : buffer.CurrentLine+1; }
                        set {
@@ -373,30 +368,19 @@ namespace Crow.Coding
                                }
                        }
                }
-
-               void notifyPositionChanged (){
-                       try {
-                               
-                               NotifyValueChanged ("CurrentLine", buffer.CurrentLine+1);
-                               NotifyValueChanged ("CurrentColumn", buffer.CurrentColumn+1);
-                       } catch (Exception ex) {
-                               Console.WriteLine (ex.ToString ());
+               public int CurrentColumn{
+                       get { return buffer == null ? 0 : buffer.CurrentColumn+1; }
+                       set {
+                               try {                                   
+                                       if (value - 1 == buffer.CurrentColumn)
+                                               return;
+                                       buffer.CurrentColumn = value - 1;
+                               } catch (Exception ex) {
+                                       requestedCol = value - 1;
+                                       Console.WriteLine ("Error cur column: " + ex.ToString ());
+                               }
                        }
                }
-
-               BufferParser getParserFromExt (string extension) {
-                       if (string.IsNullOrEmpty(extension))
-                               return null;
-                       if (!parsing.ContainsKey(extension))
-                               return null;
-                       Type parserType = Type.GetType (parsing [extension]);
-                       if (parserType == null)
-                               return null;
-                       return (BufferParser)Activator.CreateInstance (parserType, buffer );
-               }
-
-               #region Public Crow Properties
-               [XmlAttributeAttribute]
                public bool PrintLineNumbers
                {
                        get { return Configuration.Global.Get<bool> ("PrintLineNumbers"); }
@@ -409,55 +393,7 @@ namespace Crow.Coding
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute]
-               public ProjectFile ProjectNode
-               {
-                       get {
-                               return projFile;
-                       }
-                       set
-                       {
-                               if (projFile == value)
-                                       return;
-
-                               if (projFile != null)
-                                       projFile.UnregisterEditor (this);
-
-                               projFile = value;
-                               NotifyValueChanged ("ProjectNode", projFile);
-
-                               if (projFile == null)
-                                       return;
-
-                               parser = getParserFromExt (System.IO.Path.GetExtension (projFile.Extension));
-
-                               projFile.RegisterEditor (this);
-
-                       }
-               }
-               void loadSource () {
-                       
-                       try {
-                               
-                               if (parser == null)
-                                       buffer.Load (projFile.Source);
-                               else//parser may have special linebrk rules
-                                       buffer.Load (projFile.Source, parser.LineBrkRegex);
-                               
-                       } catch (Exception ex) {
-                               Debug.WriteLine (ex.ToString ());
-                       }
-
-                       projFile.RegisteredEditors [this] = true;
-
-                       updateMaxScrollY ();
-                       MaxScrollX = Math.Max (0, buffer.longestLineCharCount - visibleColumns);
-                       updatePrintedLines ();
-
-                       RegisterForGraphicUpdate ();
-               }
-
-               [XmlAttributeAttribute][DefaultValue("BlueGray")]
+               [DefaultValue("BlueGray")]
                public virtual Color SelectionBackground {
                        get { return selBackground; }
                        set {
@@ -468,7 +404,7 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("White")]
+               [DefaultValue("White")]
                public virtual Color SelectionForeground {
                        get { return selForeground; }
                        set {
@@ -479,23 +415,6 @@ namespace Crow.Coding
                                RegisterForRedraw ();
                        }
                }
-
-//             [XmlIgnore]public string SelectedText
-//             {
-//                     get {
-//                             if (!selectionIsEmpty)
-//                                     buffer.SetSelection (selectionStart, selectionEnd);
-//                             return buffer.SelectedText;
-//                     }
-//             }
-
-               #endregion
-
-
-               void updateOnScreenCurLineFromBuffCurLine(){
-                       printedCurrentLine = PrintedLines.IndexOf (buffer.CurrentCodeLine);
-               }
-
                public override int ScrollY {
                        get {
                                return base.ScrollY;
@@ -509,6 +428,56 @@ namespace Crow.Coding
                                RegisterForGraphicUpdate ();
                        }
                }
+               public ParserException CurrentLineError {
+                       get { return buffer?.CurrentCodeLine?.exception; }
+               }
+               public bool CurrentLineHasError {
+                       get { return buffer == null ? false : buffer.CurrentCodeLine == null ? false :
+                               buffer.CurrentCodeLine.exception != null; }
+               }
+               public override ProjectFile ProjectNode {
+                       get {
+                               return base.ProjectNode;
+                       }
+                       set {
+                               base.ProjectNode = value;
+                               if (projFile != null)
+                                       parser = getParserFromExt (System.IO.Path.GetExtension (projFile.Extension));
+                       }
+               }
+               #endregion
+
+               BufferParser getParserFromExt (string extension) {
+                       if (string.IsNullOrEmpty(extension))
+                               return null;
+                       if (!parsing.ContainsKey(extension))
+                               return null;
+                       Type parserType = Type.GetType (parsing [extension]);
+                       if (parserType == null)
+                               return null;
+                       return (BufferParser)Activator.CreateInstance (parserType, buffer );
+               }
+               void loadSource () {
+
+                       try {
+
+                               if (parser == null)
+                                       buffer.Load (projFile.Source);
+                               else//parser may have special linebrk rules
+                                       buffer.Load (projFile.Source, parser.LineBrkRegex);
+
+                       } catch (Exception ex) {
+                               Debug.WriteLine (ex.ToString ());
+                       }
+
+                       projFile.RegisteredEditors [this] = true;
+
+                       updateMaxScrollY ();
+                       MaxScrollX = Math.Max (0, buffer.longestLineCharCount - visibleColumns);
+                       updatePrintedLines ();
+
+                       RegisterForGraphicUpdate ();
+               }
 
                /// <summary>
                /// Current editor line, when set, update buffer.CurrentLine
@@ -874,7 +843,7 @@ namespace Crow.Coding
                        }
                        #endregion
 
-                       seMutex.EnterReadLock ();
+                       editorMutex.EnterReadLock ();
 
                        if (PrintedLines != null) {                             
                                int unfoldedLines = buffer.UnfoldedLines;
@@ -899,7 +868,7 @@ namespace Crow.Coding
                                }
                        }
 
-                       seMutex.ExitReadLock ();
+                       editorMutex.ExitReadLock ();
 
                        buffer.editMutex.ExitReadLock ();
 
@@ -1027,6 +996,14 @@ namespace Crow.Coding
 
                        Key key = e.Key;
 
+                       if (e.Control) {
+                               switch (key) {
+                               case Key.S:
+                                       projFile.Save ();
+                                       break;
+                               }
+                       }
+
                        switch (key)
                        {
                        case Key.Back:
diff --git a/CrowIDE/src/SvgEditor.cs b/CrowIDE/src/SvgEditor.cs
new file mode 100644 (file)
index 0000000..dba622e
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// SvgEditor.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.ComponentModel;
+using Cairo;
+
+namespace Crow.Coding
+{
+       public class SvgEditor : Editor
+       {
+               SvgPicture _pic = new SvgPicture();
+
+               protected override void updateEditorFromProjFile ()
+               {
+                       Error = null;
+                       try {
+                               editorMutex.EnterWriteLock();
+                               _pic.LoadSvgFragment (projFile.Source);
+                               _pic.Scaled = false;
+                               _pic.KeepProportions = true;
+                       } catch (Exception ex) {
+                               Error = ex;
+                       }
+                       editorMutex.ExitWriteLock ();
+                       RegisterForGraphicUpdate ();
+               }
+               protected override void updateProjFileFromEditor ()
+               {
+                       throw new NotImplementedException ();
+               }
+               protected override bool EditorIsDirty {
+                       get { return false;     }
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               #region GraphicObject overrides
+               protected override int measureRawSize (LayoutingType lt)
+               {
+                       if (_pic == null)
+                               return 2 * Margin;
+                       //_pic = "#Crow.Images.Icons.IconAlerte.svg";
+                       //TODO:take scalling in account
+                       if (lt == LayoutingType.Width)
+                               return _pic.Dimensions.Width + 2 * Margin;
+                       else
+                               return _pic.Dimensions.Height + 2 * Margin;
+               }
+               protected override void onDraw (Context gr)
+               {
+                       base.onDraw (gr);
+
+                       editorMutex.EnterReadLock ();
+                       if (_pic != null)
+                               _pic.Paint (gr, ClientRectangle);
+                       editorMutex.ExitReadLock ();
+               }
+               #endregion
+       }
+}
+
index e5e9b280d81734bcac33177169711cf3d2cda00b..1279af9ee594d4da4da08dfcae1f796cd5cb9eba 100644 (file)
@@ -6,7 +6,27 @@
 </ItemTemplate>
 <ItemTemplate DataType=".svg">
        <TabItem Caption="{DisplayName}" QueryClose="OnQueryClose">
-               <Image Path="{AbsolutePath}"/>
+               <VerticalStack>
+                       <HorizontalStack Height="50%" >
+                               <SvgEditor ProjectNode="{}" Focusable="true" Name="editor"/>
+                               <ScrollBar Name="scrollbarY" Value="{²../editor.ScrollY}"
+                                                  LargeIncrement="{../editor.VisibleLines}"
+                                                  CursorSize="{../editor.ChildHeightRatio}"
+                                       Maximum="{../editor.MaxScrollY}" Orientation="Vertical"
+                                       Width="14" />
+                       </HorizontalStack>
+                       <ScrollBar Name="scrollbarX" Value="{²../editor.ScrollX}"
+                                       Maximum="{../editor.MaxScrollX}" Orientation="Horizontal"
+                                       LargeIncrement="{../editor.VisibleColumns}"
+                                       CursorSize="{../editor.ChildWidthRatio}"
+                                       Height="14" />  
+                       <Splitter/>
+                       <IMLContainer Path="#Crow.Coding.ui.SourceEditor.crow"/>
+                       <Label DataSource="{../editor.Error}" Text="{Message}"
+                               Visible="{../editor.HasError}"
+                               Height="Fit" Width="Stretched" Background="DarkRed" Foreground="White"
+                               TextAlignment="TopLeft" Multiline="true"/>
+               </VerticalStack>
        </TabItem>
 </ItemTemplate>
 <ItemTemplate Path="#Crow.Coding.ui.SrcEdit.itemp" DataType=".cs"/>
index b0431a94691734f36e7f870a1c1a45411e251c9d..5f75bdca68a62fc46fa63b79e61ccd2fe6aa6306 100644 (file)
@@ -6,35 +6,11 @@
                        AllowDrop="true"
                        ProjectNode="{}" SelectedItem="{²SelectedItem}"
                        Name="crowContainer" Background="Onyx"/>
-               <Splitter/>
-               <HorizontalStack Height="Stretched" >
-                       <SourceEditor Focusable="true" Name="editor" Font="monospace, 12" VerticalAlignment="Top" Margin="4"
-                                       Foreground="Jet" Background="White" Width="Stretched" Height="Stretched"
-                                       CurrentLine="{²CurrentLine}" CurrentColumn="{²CurrentColumn}"
-                                       PrintLineNumbers="true"
-                                       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 Name="scrollbarX" Value="{²../editor.ScrollX}"
-                               Maximum="{../editor.MaxScrollX}" Orientation="Horizontal"
-                               Height="14" />
-               <Label DataSource="{../../crowContainer.IMLError}" Text="{Message}"
-                       Visible="{../../crowContainer.HasError}"
+               <Label DataSource="{../crowContainer.Error}" Text="{Message}"
+                       Visible="{../crowContainer.HasError}"
                        Height="Fit" Width="Stretched" Background="DarkRed" Foreground="White"
-                       TextAlignment="TopLeft" Multiline="true"/>                      
-               <HorizontalStack Height="Fit">                          
-                       <GraphicObject Height="5" Width="Stretched"/>
-                       <GraphicObject Background="Red" Width="5" Height="5" Visible="{IsDirty}"/>
-                       <Label Text="column:"/>
-                       <Label Text="{CurrentColumn}" Font="droid bold, 10"/>
-                       <Label Text="line:"/>
-                       <Label Text="{CurrentLine}" Font="droid bold, 10"/>
-                       <Label Text="ScrollX:"/>
-                       <Label Text="{../../editor.ScrollX}"/>
-               </HorizontalStack>
+                       TextAlignment="TopLeft" Multiline="true"/>
+               <Splitter/>
+               <IMLContainer Path="#Crow.Coding.ui.SourceEditor.crow"/>
        </VerticalStack>
 </TabItem>
diff --git a/CrowIDE/ui/SourceEditor.crow b/CrowIDE/ui/SourceEditor.crow
new file mode 100644 (file)
index 0000000..3d364ef
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<VerticalStack>
+       <HorizontalStack Height="Stretched" >
+               <SourceEditor Focusable="true" Name="editor" Font="monospace, 12" VerticalAlignment="Top" Margin="10"
+                               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 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>
index d9e5139097030729d6de3183653ba8be09e22a60..ec67b550977869b101549e36ac39e797ef238715 100644 (file)
@@ -1,33 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <TabItem Caption="{DisplayName}" QueryClose="OnQueryClose">
-       <VerticalStack>
-               <HorizontalStack Height="Stretched" >
-                       <SourceEditor Focusable="true" Name="editor" Font="monospace, 12" VerticalAlignment="Top" Margin="10"
-                                       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 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>
+       <IMLContainer Path="#Crow.Coding.ui.SourceEditor.crow"/>
 </TabItem>
\ No newline at end of file
index ed92e89b0d7c30a1233f9825e463a02d7282976d..5cb1aad68a0c766fdbe70379740736e5130d7cdd 100644 (file)
@@ -128,6 +128,7 @@ DockStack {
        //EndDrag="{Background=Jet}";
 }
 DockWindow {
+       Background = "Onyx";
        Focusable = "true";
        AllowDrag = "true";
        Margin="0";
index a3bd9fd49c7b4c63beb1952985dacdf6f4b3017b..eb4caefaaf5beafc7702515fd9fc53c8b27dd6e2 100644 (file)
@@ -1133,6 +1133,19 @@ namespace Crow
                        ctxMenuContainer = Load  ("#Crow.ContextMenu.template") as MenuItem;
                }
 
+               void CtxMenuContainer_LayoutChanged (object sender, LayoutingEventArgs e)
+               {
+                       Rectangle r = ctxMenuContainer.ScreenCoordinates (ctxMenuContainer.Slot);
+                       if (e.LayoutType == LayoutingType.Width) {
+                               if (r.Right > this.clientRectangle.Right)
+                                       ctxMenuContainer.Left = this.clientRectangle.Right - ctxMenuContainer.Slot.Width;
+                       }else if (e.LayoutType == LayoutingType.Width) {
+                               if (r.Bottom > this.clientRectangle.Bottom)
+                                       ctxMenuContainer.Top = this.clientRectangle.Bottom - ctxMenuContainer.Slot.Height;
+                       }
+                       
+               }
+
                public void ShowContextMenu (GraphicObject go) {
 
                        lock (UpdateMutex) {
index eb85504dc592fa85e75f3fba1eb0deb6bcd4a6ff..1b59698156b063766e02503197b3162c333a3c66 100644 (file)
@@ -6,15 +6,25 @@ namespace Crow.Coding
        {
                public int Line;
                public int Column;
+               public string Source;
                public ParserException(int line, int column, string txt, string source = null)
-                       : base(string.Format("{3}:({0},{1}): {2}", line, column, txt, source))
+                       : base(txt)
                {
                        Line = line;
                        Column = column;
+                       Source = source;
                }
                public ParserException(int line, int column, string txt, Exception innerException, string source = null)
-                       : base(string.Format("{3}:({0},{1}): {2}", line, column, txt, source), innerException)
-               {}
+                       : base(txt, innerException)
+               {
+                       Line = line;
+                       Column = column;
+                       Source = source;
+               }
+               public override string ToString ()
+               {
+                       return string.Format("{3}:({0},{1}): {2}", Line, Column, Message, Source);
+               }
        }
 }
 
index 01aaeb5fa75ca4aa94682a28af43664d0426f222..ce7fdedfc5a16237c7c44d0aabfcc41a7900d693 100644 (file)
@@ -71,6 +71,11 @@ namespace Crow
                        sharedResources [path] = new sharedPicture (hSVG, Dimensions);
                }
 
+               public void LoadSvgFragment (string fragment) {                 
+                       hSVG = new Rsvg.Handle (System.Text.Encoding.Unicode.GetBytes(fragment));
+                       Dimensions = new Size (hSVG.Dimensions.Width, hSVG.Dimensions.Height);
+               }
+
                #region implemented abstract members of Fill
 
                public override void SetAsSource (Context ctx, Rectangle bounds = default(Rectangle))
@@ -112,6 +117,8 @@ namespace Crow
                /// <param name="subPart">limit rendering to svg part named 'subPart'</param>
                public override void Paint (Context gr, Rectangle rect, string subPart = "")
                {
+                       if (hSVG == null)
+                               return;
                        float widthRatio = 1f;
                        float heightRatio = 1f;