<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">
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
<!-- 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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
--- /dev/null
+<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+//
+// 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);
+ }
+ }
+ }
+}
+
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 {
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 {
RegisterForRedraw ();
}
}
- /// <summary>Pointer is over the widget</summary>
+ /// <summary>PoinprojFilever the widget</summary>
public virtual GraphicObject HoverWidget
{
get { return imlVE.HoverWidget; }
[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 ();
}
}
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);
}
}
+
protected override void onDraw (Cairo.Context gr)
{
base.onDraw (gr);
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)) {
#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();
IsLoaded = true;
}
+ public void Save () {
+
+ }
+
void setAsStartupProject () {
solution.StartupProject = this;
}
NotifyValueChanged ("Source", source);
NotifyValueChanged ("IsDirty", IsDirty);
+ cmdSave.CanExecute = IsDirty;
+
srcEditMtx.ExitWriteLock ();
}
}
NotifyValueChanged ("IsDirty", false);
}
public void Save () {
+ if (!IsDirty)
+ return;
using (StreamWriter sw = new StreamWriter (AbsolutePath)) {
sw.Write (source);
}
}
public void SetLineInError (ParserException ex) {
- Tokens = null;
+ Tokens = null;
exception = ex;
}
/// <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()
{
//formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent));
parsing.Add (".crow", "Crow.Coding.XMLParser");
+ parsing.Add (".svg", "Crow.Coding.XMLParser");
parsing.Add (".template", "Crow.Coding.XMLParser");
parsing.Add (".cs", "Crow.Coding.CSharpParser");
parsing.Add (".style", "Crow.Coding.StyleParser");
buffer.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
#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;
}
void updatePrintedLines () {
buffer.editMutex.EnterReadLock ();
- seMutex.EnterWriteLock ();
+ editorMutex.EnterWriteLock ();
PrintedLines = new List<CodeLine> ();
int curL = 0;
}
buffer.editMutex.ExitReadLock ();
- seMutex.ExitWriteLock ();
+ editorMutex.ExitWriteLock ();
+ }
+ void updateOnScreenCurLineFromBuffCurLine(){
+ printedCurrentLine = PrintedLines.IndexOf (buffer.CurrentCodeLine);
}
void toogleFolding (int line) {
if (parser == null || !foldingEnabled)
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;
notifyPositionChanged ();
isDirty = true;
- seMutex.ExitWriteLock ();
+ editorMutex.ExitWriteLock ();
}
void Buffer_LineAdditionEvent (object sender, CodeBufferEventArgs e)
{
}
#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 {
}
}
}
-
- 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"); }
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 {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue("White")]
+ [DefaultValue("White")]
public virtual Color SelectionForeground {
get { return selForeground; }
set {
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;
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
}
#endregion
- seMutex.EnterReadLock ();
+ editorMutex.EnterReadLock ();
if (PrintedLines != null) {
int unfoldedLines = buffer.UnfoldedLines;
}
}
- seMutex.ExitReadLock ();
+ editorMutex.ExitReadLock ();
buffer.editMutex.ExitReadLock ();
Key key = e.Key;
+ if (e.Control) {
+ switch (key) {
+ case Key.S:
+ projFile.Save ();
+ break;
+ }
+ }
+
switch (key)
{
case Key.Back:
--- /dev/null
+//
+// 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
+ }
+}
+
</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"/>
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>
--- /dev/null
+<?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>
<?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
//EndDrag="{Background=Jet}";
}
DockWindow {
+ Background = "Onyx";
Focusable = "true";
AllowDrag = "true";
Margin="0";
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) {
{
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);
+ }
}
}
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))
/// <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;