<Compile Include="src\Instantiator.cs" />
<Compile Include="src\IMLReader.cs" />
<Compile Include="src\ItemTemplate.cs" />
+ <Compile Include="Style.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<ItemGroup>
<EmbeddedResource Include="Images\Icons\updown.svg" />
<EmbeddedResource Include="Images\Icons\IconAlerte.svg" />
- <EmbeddedResource Include="Images\Icons\button.svg" />
<EmbeddedResource Include="Images\Icons\buttonB.svg" />
- <EmbeddedResource Include="Images\Icons\buttest.svg" />
- <EmbeddedResource Include="Images\Icons\buttest2.svg" />
- <EmbeddedResource Include="Images\Icons\buttest4.svg" />
<EmbeddedResource Include="Images\Icons\checkbox.svg" />
<EmbeddedResource Include="Images\Icons\radiobutton.svg" />
<EmbeddedResource Include="Templates\RadioButton.goml" />
Focusable = true;
Background = DimGray;
}
+TabView {
+ CacheEnabled = false;
+}
TabItem {
Focusable = true;
CacheEnabled = false;
Background = White;
Foreground = Black;
Selectable = True;
+ Text = TextBox;
}
Window {
Focusable = true;
Height = 150;
}
Border {
- Foreground = White;
+ Foreground = Gray;
}
ProgressBar {
Foreground = vgradient|0:BlueCrayola|0.5:SkyBlue|1:BlueCrayola;
+}
+Icon {
+ Margin=1;
+ Width=12;
+ Height=12;
+}
+Control {
+ Margin=0;
+ Spacing=3;
}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="64"
- height="64"
- viewBox="0 0 64.000003 64.000002"
- id="svg4460"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="buttest.svg">
- <defs
- id="defs4462">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient5028">
- <stop
- style="stop-color:#000b61;stop-opacity:1"
- offset="0"
- id="stop5030" />
- <stop
- id="stop5040"
- offset="0.13136131"
- style="stop-color:#001dff;stop-opacity:1" />
- <stop
- style="stop-color:#1e39ff;stop-opacity:1"
- offset="0.85384595"
- id="stop5042" />
- <stop
- style="stop-color:#c4cbff;stop-opacity:1"
- offset="1"
- id="stop5032" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5028"
- id="linearGradient5034"
- x1="30.357145"
- y1="64.321434"
- x2="30.607143"
- y2="0.21428518"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5028"
- id="linearGradient5034-7"
- x1="30.357145"
- y1="64.321434"
- x2="30.607143"
- y2="0.21428518"
- gradientUnits="userSpaceOnUse" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2.8"
- inkscape:cx="42.157776"
- inkscape:cy="30.146419"
- inkscape:document-units="px"
- inkscape:current-layer="svg4460"
- showgrid="false"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="1280"
- inkscape:window-height="984"
- inkscape:window-x="0"
- inkscape:window-y="16"
- inkscape:window-maximized="1"
- units="px" />
- <metadata
- id="metadata4465">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- id="normal"
- style="opacity:0.5">
- <rect
- ry="10.1399"
- y="0"
- x="0"
- height="64"
- width="64"
- id="rect5026"
- style="opacity:1;fill:url(#linearGradient5034);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <path
- id="rect5008-9"
- d="M 53.6875,64 C 59.400625,64 64,59.400625 64,53.6875 l 0,-43.375 C 64,4.5993748 59.400625,-2.3151643e-7 53.6875,-2.3151643e-7 l -0.898438,0 C 58.406543,-2.3151643e-7 62.927734,4.5231438 62.927734,10.140625 l 0,42.648437 c 0,5.617482 -4.521191,10.138673 -10.138672,10.138673 l -42.648437,0 C 4.5231438,62.927735 -2.3151643e-7,58.406544 -2.3151643e-7,52.789062 l 0,0.898438 C -2.3151643e-7,59.400625 4.5993748,64 10.3125,64 l 43.375,0 z"
- style="opacity:1;fill:#353535;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- <path
- id="rect5008"
- d="M 10.3125,0 C 4.599375,0 0,4.599375 0,10.3125 l 0,43.375 C 0,59.400625 4.599375,64 10.3125,64 l 0.898438,0 C 5.5934566,64 1.0722656,59.476856 1.0722656,53.859375 l 0,-42.648437 c 0,-5.6174814 4.521191,-10.1386724 10.1386724,-10.1386724 l 42.648437,0 C 59.476856,1.0722656 64,5.5934566 64,11.210938 L 64,10.3125 C 64,4.599375 59.400625,0 53.6875,0 l -43.375,0 z"
- style="opacity:1;fill:#8e8e8e;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- </g>
- <g
- id="pressed"
- style="opacity:0.5">
- <rect
- ry="10.1399"
- y="0"
- x="0"
- height="64"
- width="64"
- id="rect5026-6"
- style="opacity:1;fill:url(#linearGradient5034-7);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <path
- id="rect5008-3"
- d="M 53.6875,64 C 59.400625,64 64,59.400625 64,53.6875 l 0,-43.375 C 64,4.599375 59.400625,0 53.6875,0 l -0.898438,0 c 5.617481,0 10.138672,4.523144 10.138672,10.140625 l 0,42.648437 c 0,5.617481 -4.521191,10.138672 -10.138672,10.138672 l -42.648437,0 C 4.523144,62.927734 0,58.406543 0,52.789062 L 0,53.6875 C 0,59.400625 4.599375,64 10.3125,64 l 43.375,0 z"
- style="opacity:1;fill:#747474;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- <path
- id="rect5008-9-3"
- d="M 10.3125,-2.3151644e-7 C 4.5993748,-2.3151644e-7 -2.3151644e-7,4.5993748 -2.3151644e-7,10.3125 l 0,43.375 C -2.3151644e-7,59.400625 4.5993748,64 10.3125,64 l 0.898438,0 C 5.5934568,64 1.0722658,59.476856 1.0722658,53.859375 l 0,-42.648437 c 0,-5.6174822 4.521191,-10.1386732 10.1386722,-10.1386732 l 42.648437,0 C 59.476856,1.0722648 64,5.5934558 64,11.210938 L 64,10.3125 C 64,4.5993748 59.400625,-2.3151644e-7 53.6875,-2.3151644e-7 l -43.375,0 z"
- style="opacity:1;fill:#353535;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="64"
- height="64"
- viewBox="0 0 64.000003 64.000002"
- id="svg4460"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="buttest2.svg">
- <defs
- id="defs4462">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient5028">
- <stop
- style="stop-color:#939393;stop-opacity:1"
- offset="0"
- id="stop5030" />
- <stop
- id="stop5040"
- offset="0.13136131"
- style="stop-color:#c5c5c5;stop-opacity:1" />
- <stop
- style="stop-color:#c0c0c0;stop-opacity:1"
- offset="0.85384595"
- id="stop5042" />
- <stop
- style="stop-color:#ffffff;stop-opacity:1"
- offset="1"
- id="stop5032" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5028"
- id="linearGradient5034"
- x1="30.357145"
- y1="64.321434"
- x2="30.607143"
- y2="0.21428518"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5028"
- id="linearGradient5805"
- gradientUnits="userSpaceOnUse"
- x1="30.357145"
- y1="64.321434"
- x2="30.607143"
- y2="0.21428518" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2.8"
- inkscape:cx="42.157776"
- inkscape:cy="30.146419"
- inkscape:document-units="px"
- inkscape:current-layer="svg4460"
- showgrid="false"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="1280"
- inkscape:window-height="984"
- inkscape:window-x="0"
- inkscape:window-y="16"
- inkscape:window-maximized="1"
- units="px" />
- <metadata
- id="metadata4465">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- id="normal"
- style="opacity:1">
- <rect
- ry="10.1399"
- y="0"
- x="0"
- height="64"
- width="64"
- id="rect5026"
- style="opacity:1;fill:url(#linearGradient5034);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <path
- id="rect5008-9"
- d="M 53.6875,64 C 59.400625,64 64,59.400625 64,53.6875 l 0,-43.375 C 64,4.5993748 59.400625,-2.3151643e-7 53.6875,-2.3151643e-7 l -0.898438,0 C 58.406543,-2.3151643e-7 62.927734,4.5231438 62.927734,10.140625 l 0,42.648437 c 0,5.617482 -4.521191,10.138673 -10.138672,10.138673 l -42.648437,0 C 4.5231438,62.927735 -2.3151643e-7,58.406544 -2.3151643e-7,52.789062 l 0,0.898438 C -2.3151643e-7,59.400625 4.5993748,64 10.3125,64 l 43.375,0 z"
- style="opacity:1;fill:#353535;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- <path
- id="rect5008"
- d="M 10.3125,0 C 4.599375,0 0,4.599375 0,10.3125 l 0,43.375 C 0,59.400625 4.599375,64 10.3125,64 l 0.898438,0 C 5.5934566,64 1.0722656,59.476856 1.0722656,53.859375 l 0,-42.648437 c 0,-5.6174814 4.521191,-10.1386724 10.1386724,-10.1386724 l 42.648437,0 C 59.476856,1.0722656 64,5.5934566 64,11.210938 L 64,10.3125 C 64,4.599375 59.400625,0 53.6875,0 l -43.375,0 z"
- style="opacity:1;fill:#efefef;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- </g>
- <g
- id="pressed"
- style="opacity:1">
- <rect
- ry="10.1399"
- y="0"
- x="0"
- height="64"
- width="64"
- id="rect5026-9"
- style="opacity:1;fill:url(#linearGradient5805);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <path
- id="rect5008-7"
- d="M 53.6875,64 C 59.400625,64 64,59.400625 64,53.6875 l 0,-43.375 C 64,4.599375 59.400625,0 53.6875,0 l -0.898438,0 c 5.617481,0 10.138672,4.523144 10.138672,10.140625 l 0,42.648437 c 0,5.617481 -4.521191,10.138672 -10.138672,10.138672 l -42.648437,0 C 4.523144,62.927734 0,58.406543 0,52.789062 L 0,53.6875 C 0,59.400625 4.599375,64 10.3125,64 l 43.375,0 z"
- style="opacity:1;fill:#efefef;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- <path
- id="rect5008-9-0"
- d="M 10.3125,-2.3151642e-7 C 4.5993748,-2.3151642e-7 -2.3151642e-7,4.5993748 -2.3151642e-7,10.3125 l 0,43.375 C -2.3151642e-7,59.400625 4.5993748,64 10.3125,64 l 0.898438,0 C 5.5934568,64 1.0722658,59.476856 1.0722658,53.859375 l 0,-42.648437 c 0,-5.6174822 4.521191,-10.1386732 10.1386722,-10.1386732 l 42.648437,0 C 59.476856,1.0722648 64,5.5934558 64,11.210938 L 64,10.3125 C 64,4.5993748 59.400625,-2.3151642e-7 53.6875,-2.3151642e-7 l -43.375,0 z"
- style="opacity:1;fill:#353535;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="241.42857"
- height="87.85714"
- viewBox="0 0 241.42858 87.857136"
- id="svg6194"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="buttest4.svg">
- <defs
- id="defs6196">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient5895">
- <stop
- style="stop-color:#ffffff;stop-opacity:1"
- offset="0"
- id="stop4179" />
- <stop
- style="stop-color:#a9a9a9;stop-opacity:1"
- offset="1"
- id="stop4181" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5938"
- id="radialGradient5944"
- cx="-98.622185"
- cy="192.01556"
- fx="-98.622185"
- fy="192.01556"
- r="120.71429"
- gradientTransform="matrix(1.640154,0.00509028,-0.00183136,0.59008493,63.485033,79.212097)"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- id="linearGradient5938">
- <stop
- style="stop-color:#ffffff;stop-opacity:1"
- offset="0"
- id="stop5940" />
- <stop
- style="stop-color:#000000;stop-opacity:1"
- offset="1"
- id="stop5942" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5895"
- id="linearGradient5901"
- x1="-94.577568"
- y1="155.6501"
- x2="-94.577568"
- y2="239.49275"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(216.17265,-155.05841)" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5895"
- id="linearGradient4185"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(216.17265,-155.05841)"
- x1="-94.577568"
- y1="155.6501"
- x2="-94.577568"
- y2="239.49275" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.979899"
- inkscape:cx="34.707974"
- inkscape:cy="28.122813"
- inkscape:document-units="px"
- inkscape:current-layer="svg6194"
- showgrid="false"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="1280"
- inkscape:window-height="984"
- inkscape:window-x="0"
- inkscape:window-y="16"
- inkscape:window-maximized="1"
- units="px" />
- <metadata
- id="metadata6199">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- id="normal">
- <rect
- ry="20.854177"
- y="5"
- x="0"
- height="82.85714"
- width="241.42857"
- id="rect5893-7"
- style="opacity:1;fill:url(#radialGradient5944);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <rect
- ry="20.854177"
- y="0"
- x="0"
- height="82.85714"
- width="241.42857"
- id="rect5893"
- style="opacity:1;fill:url(#linearGradient5901);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
- <g
- id="pressed">
- <rect
- style="opacity:1;fill:#616161;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4159"
- width="241.42857"
- height="82.85714"
- x="0"
- y="0"
- ry="20.854177" />
- <rect
- style="opacity:1;fill:url(#linearGradient4185);fill-opacity:1.0;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4161"
- width="241.42857"
- height="82.85714"
- x="0"
- y="2"
- ry="20.854177" />
- </g>
-</svg>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- viewBox="0 0 65.480012 51.479989"
- height="51.479988"
- width="65.480011"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="button.svg">
- <metadata
- id="metadata13">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1280"
- inkscape:window-height="984"
- id="namedview11"
- showgrid="false"
- inkscape:zoom="3.2415936"
- inkscape:cx="-10.014146"
- inkscape:cy="-4.9619855"
- inkscape:window-x="0"
- inkscape:window-y="16"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg2" />
- <defs
- id="defs4">
- <filter
- height="1.4299999"
- y="-0.215"
- width="1.3096"
- x="-0.1548"
- id="filter4391"
- style="color-interpolation-filters:sRGB">
- <feGaussianBlur
- id="feGaussianBlur4393"
- stdDeviation="3.225" />
- </filter>
- <filter
- height="1.4299999"
- y="-0.215"
- width="1.3096"
- x="-0.1548"
- id="filter4391-5"
- style="color-interpolation-filters:sRGB">
- <feGaussianBlur
- id="feGaussianBlur4393-0"
- stdDeviation="3.225" />
- </filter>
- <filter
- inkscape:label="Button"
- inkscape:menu="Bevels"
- inkscape:menu-tooltip="Soft bevel, slightly depressed middle"
- style="color-interpolation-filters:sRGB;"
- id="filter4179">
- <feGaussianBlur
- stdDeviation="2.3"
- in="SourceAlpha"
- result="result0"
- id="feGaussianBlur4181" />
- <feMorphology
- in="SourceAlpha"
- radius="6.6"
- result="result1"
- id="feMorphology4183" />
- <feGaussianBlur
- stdDeviation="8.9"
- in="result1"
- id="feGaussianBlur4185" />
- <feColorMatrix
- values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.3 0"
- result="result91"
- id="feColorMatrix4187" />
- <feComposite
- in="result0"
- operator="out"
- result="result2"
- in2="result91"
- id="feComposite4189" />
- <feGaussianBlur
- stdDeviation="1.7"
- result="result4"
- id="feGaussianBlur4191" />
- <feDiffuseLighting
- surfaceScale="10"
- id="feDiffuseLighting4193">
- <feDistantLight
- azimuth="225"
- elevation="45"
- id="feDistantLight4195" />
- </feDiffuseLighting>
- <feBlend
- in2="SourceGraphic"
- mode="multiply"
- id="feBlend4197" />
- <feComposite
- in2="SourceAlpha"
- operator="in"
- result="result3"
- id="feComposite4199" />
- <feSpecularLighting
- in="result4"
- surfaceScale="5"
- specularExponent="17.9"
- id="feSpecularLighting4201">
- <feDistantLight
- azimuth="225"
- elevation="45"
- id="feDistantLight4203" />
- </feSpecularLighting>
- <feComposite
- in2="result3"
- operator="atop"
- id="feComposite4205" />
- </filter>
- </defs>
- <rect
- style="opacity:0.88700005;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4179)"
- id="rect4177"
- width="64.165955"
- height="51.209366"
- x="1.2339609"
- y="0.27060935"
- ry="11.72263"
- rx="0" />
- <g
- id="down" />
-</svg>
--- /dev/null
+//
+// Style.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2016 jp
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+using System;
+using System.Collections.Generic;
+
+namespace Crow
+{
+ public class Style : Dictionary<string, object>
+ {
+ public Dictionary<string, Style> SubStyles;
+ public Style () : base()
+ {
+ }
+ }
+}
+
<?xml version="1.0"?>
<Border Background="{./Background}" MinimumSize="50,20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
- Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
+ Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
>
<!-- <Image Height="0" Width="0" Margin="0" Path="{./Image}" SvgSub="{./SvgSub}"/>-->
- <Label Font="{./Font}" Name="caption" Margin="5" Foreground="LightGray" Text="{./Caption}"/>
+ <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGray" Text="{./Caption}"/>
</Border>
\ No newline at end of file
<?xml version="1.0"?>
-<HorizontalStack Background="{./Background}" Margin="1" Spacing="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Image Margin="2" Width="14" Height="14" Path="#Crow.Images.Icons.checkbox.svg"
+<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Image Style="Icon" Path="#Crow.Images.Icons.checkbox.svg"
SvgSub="{./IsChecked}"/>
<Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
</HorizontalStack>
\ No newline at end of file
Height="{./HeightPolicy}" Width="{./WidthPolicy}">
<VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
<HorizontalStack Spacing="1" Height="-1" Width="{./WidthPolicy}">
- <Image Margin="2" Width="12" Height="12"
+ <Image Style="Icon" Margin="2"
Visible="{./HasContent}"
Path="{./Image}"
SvgSub="{./IsExpanded}"/>
<?xml version="1.0"?>
-<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" BorderWidth="1" Foreground="White" CornerRadius="10"
+<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" CornerRadius="0"
MouseEnter="./onBorderMouseEnter"
MouseLeave="./onBorderMouseLeave">
- <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="0.4,0.4,0.4,0.4">
- <Border BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="-1"
- Background="0.1,0.5,1,0,0.5">
- <HorizontalStack Name="hs" Margin="1" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
+ <Border BorderWidth="0" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+ Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
+ <HorizontalStack Name="hs" Margin="2" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
<GraphicObject Width="5" Height="5"/>
<Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
<Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
<Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#Crow.Images.Icons.exit2.svg"
+ <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
MouseClick="./butQuitPress"/>
</Border>
<GraphicObject Width="5" Height="5"/>
</HorizontalStack>
</Border>
- <HorizontalStack Spacing="3" Margin="3" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Image Name="Image" Width="24" Height="24"
- Path="#Crow.Images.Icons.iconInfo.svg" />
- <Label Font="serif, 12" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Text="{./Message}"
+ <HorizontalStack Margin="5" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Image Name="Image" Width="20%" Height="20" Path="#Crow.Images.Icons.iconInfo.svg" />
+ <Label Margin="5" Font="serif, 10" Height="{./HeightPolicy}" Width="80%" Text="{./Message}"
TextAlignment="Left"
Multiline="true" />
</HorizontalStack>
- <HorizontalStack Height="-1" Width="{./WidthPolicy}" Margin="3">
- <GraphicObject Height="5"/>
- <Button Caption="Ok" MouseClick="./onOkButtonClick" Background="Gray"/>
- <Button Caption="Cancel" MouseClick="./onCancelButtonClick" Background="Gray"/>
+ <HorizontalStack Margin="1" Height="Fit" Width="60%" HorizontalAlignment="Right">
+ <Button Width="48%" Caption="Ok" MouseClick="./onOkButtonClick" />
+ <GraphicObject Width="4%" Height="5"/>
+ <Button Width="48%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
</HorizontalStack>
</VerticalStack>
</Border>
<?xml version="1.0"?>
<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit" Width="{./WidthPolicy}">
- <HorizontalStack Spacing="1" Height="-1" Width="{./WidthPolicy}">
- <Image Margin="2" Width="12" Height="12"
+ <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}">
+ <Image Style="Icon" Margin="2"
Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
<Label Text="{./Caption}" Width="{./WidthPolicy}"/>
</HorizontalStack>
<?xml version="1.0"?>
-<HorizontalStack Background="{./Background}" Spacing="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
- <Image Margin="2" Width="14" Height="14" Path="#Crow.Images.Icons.radiobutton.svg"
+<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
SvgSub="{./IsChecked}"/>
<Label Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
</HorizontalStack>
\ No newline at end of file
<?xml version="1.0"?>
-<Border BorderWidth="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+<Border BorderWidth="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
<HorizontalStack Margin="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
<Scroller Name="scroller1" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
<?xml version="1.0" encoding="UTF-8" ?>
<GenericStack Orientation="Vertical" Spacing="0"
- Width="{../../WidthPolicy}" Height="{../../HeightPolicy}"
- Background="vgradient|0:DimGray|1:Black"
- MouseEnter="{Background=vgradient|0:Gray|1:Black}"
- MouseLeave="{Background=vgradient|0:DimGray|1:Black}">
- <HorizontalStack Margin="2" Left="{../../TabOffset}"
+ Width="{./WidthPolicy}" Height="{./HeightPolicy}"
+ Background="Onyx"
+ MouseEnter="{caption.Foreground=White}"
+ MouseLeave="{caption.Foreground=Gray}">
+ <HorizontalStack Margin="2" Left="{./TabOffset}"
Name="TabTitle"
HorizontalAlignment="Left"
Height="{../../../TabThickness}"
Width="Fit">
- <Label Text="{../../../Caption}"/>
+ <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
<Border CornerRadius="5" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
<Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
</Border>
</HorizontalStack>
<Container
- Name="Content" Width="{../../../WidthPolicy}" Height="{../../../HeightPolicy}"/>
+ Name="Content" Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
</GenericStack>
-<Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
- Background="{./Background}"
- Height="{./HeightPolicy}" Width="{./WidthPolicy}"
- ValueChanged="./_scroller_ValueChanged">
- <VerticalStack LayoutChanged="./_list_LayoutChanged"
- Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
-</Scroller>
+<HorizontalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
+ Background="{./Background}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ ScrollY="{../scrollbar1.Value}"
+ ValueChanged="./_scroller_ValueChanged">
+ <VerticalStack LayoutChanged="./_list_LayoutChanged"
+ Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+ <ScrollBar
+ Name="scrollbar1"
+ Value="{../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}"
+ Width="14" Orientation="Vertical"/>
+</HorizontalStack>
--- /dev/null
+<Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ Margin="3"
+ Background="{./Background}"
+ Foreground="DimGray"
+ TextAlignment="Center"
+ MouseEnter="{Foreground=White}"
+ MouseLeave="{Foreground=DimGray}"/>
\ No newline at end of file
-<?xml version="1.0"?>
-<CheckBox/>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8" ?>
+<MessageBox/>
<?xml version="1.0"?>
-<Container Background="Green" Margin="0">
- <GraphicObject Margin="0" Width="50" Height="50" Background="Red"/>
-</Container>
\ No newline at end of file
+<Window Title="Showcase" Height="90%" Width="90%">
+ <HorizontalStack >
+ <VerticalStack Width="33%" Margin="5">
+ <GroupBox Caption="Performance" Height="Fit">
+ <VerticalStack Width="90%" Height="Fit" Spacing="2" >
+ <HorizontalStack Height="Fit">
+ <Label Text="Fps:" Style="FpsLabel"/>
+ <Label Text="{fps}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Min:" Style="FpsLabel"/>
+ <Label Text="{fpsMin}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Max:" Style="FpsLabel"/>
+ <Label Text="{fpsMax}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Update:" Style="FpsLabel"/>
+ <Label Text="{update}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Layouting:" Style="FpsLabel"/>
+ <Label Text="{layouting}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Clipping:" Style="FpsLabel"/>
+ <Label Text="{clipping}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Drawing:" Style="FpsLabel"/>
+ <Label Text="{drawing}" Style="FpsDisp"/>
+ </HorizontalStack>
+ </VerticalStack>
+ </GroupBox>
+ <Label Width="Stretched" Margin="3" Background="Onyx"/>
+ <TextBox Text="TextBox" Multiline="true" Margin="3"/>
+ <HorizontalStack Height="Fit" Margin="5" Background="Onyx" CornerRadius="10">
+ <VerticalStack Spacing="5" Width="50%">
+ <CheckBox Fit="true"/>
+ <CheckBox Fit="true"/>
+ <CheckBox Fit="true"/>
+ <CheckBox Fit="true"/>
+ </VerticalStack>
+ <VerticalStack Spacing="5" Width="50%">
+ <RadioButton Fit="true"/>
+ <RadioButton Fit="true"/>
+ <RadioButton Fit="true"/>
+ <RadioButton Fit="true"/>
+ </VerticalStack>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit" Margin="5">
+ <Label Text="MouseEvents" Width="50%" Margin="3"
+ Background="Onyx"
+ Foreground="DimGray"
+ TextAlignment="Center"
+ MouseEnter="{Foreground=White}"
+ MouseLeave="{Foreground=DimGray}"
+ MouseDown="{Background=DarkRed}"
+ MouseUp="{Background=Onyx}"/>
+ <Label Text="MouseEvents" Width="50%" Margin="3"
+ Background="Onyx"
+ Foreground="DimGray"
+ TextAlignment="Center"
+ MouseEnter="{Foreground=White}"
+ MouseLeave="{Foreground=DimGray}"
+ MouseDown="{Background=Mantis}"
+ MouseUp="{Background=Onyx}"/>
+ </HorizontalStack>
+ <GroupBox Caption="Templated controls" Height="Fit" Margin="5">
+ <HorizontalStack Height="Fit">
+ <VerticalStack Width="50%">
+ <CheckBox Template="#Tests.Interfaces.CheckBox2.imlt" Style="CheckBox2"/>
+ <CheckBox Template="#Tests.Interfaces.CheckBox2.imlt" Style="CheckBox2"/>
+ <CheckBox Template="#Tests.Interfaces.CheckBox2.imlt" Style="CheckBox2"/>
+ <CheckBox Template="#Tests.Interfaces.CheckBox2.imlt" Style="CheckBox2"/>
+ </VerticalStack>
+ <Splitter/>
+ <VerticalStack Width="50%">
+ <RadioButton Template="#Tests.Interfaces.CheckBox2.imlt" Style="RadioButton2"/>
+ <RadioButton Template="#Tests.Interfaces.CheckBox2.imlt" Style="RadioButton2"/>
+ <RadioButton Template="#Tests.Interfaces.CheckBox2.imlt" Style="RadioButton2"/>
+ <RadioButton Template="#Tests.Interfaces.CheckBox2.imlt" Style="RadioButton2"/>
+ </VerticalStack>
+ </HorizontalStack>
+ </GroupBox>
+ <Spinner Fit="true"/>
+ </VerticalStack>
+ <VerticalStack Width="33%" Margin="5" Spacing="5">
+ <Expandable Background="DimGray">
+ <Image Path="#Crow.Images.Icons.crow.svg"/>
+ </Expandable>
+ <Popper Background="DimGray" PopDirection="Bottom">
+ <Border Fit="True" Background="DimGray" CornerRadius="0" BorderWidth="1">
+ <Image Path="#Crow.Images.Icons.crow.svg" Width="100" Height="100" Margin="10"
+ MouseEnter="{Background=LightGray}"
+ MouseLeave="{Background=Transparent}"/>
+ </Border>
+ </Popper>
+ <Slider Height="10" Width="90%"/>
+ <Container Height="Fit" Background="Onyx" Margin="2" CornerRadius="5">
+ <ProgressBar Background="DimGray" Height="10" Value="50"/>
+ </Container>
+ <Image Path="#Crow.Images.Icons.crow.svg" Width="60" Height="60" Background="LightGray" />
+ <TabView Name="tabview1"
+ Height="120" Orientation="Horizontal" Spacing="15">
+ <TabItem Name="TabItem1" Caption="Tab 1" Margin="0">
+ <VerticalStack Fit="true">
+ <CheckBox/>
+ <CheckBox/>
+ <CheckBox/>
+ <CheckBox/>
+ </VerticalStack>
+ </TabItem>
+ <TabItem Name="TabItem2" Caption="Tab 2" Background="Gray">
+ <VerticalStack Fit="true">
+ <RadioButton/>
+ <RadioButton/>
+ <RadioButton/>
+ <RadioButton/>
+ </VerticalStack>
+ </TabItem>
+ <TabItem Name="TabItem2" Caption="Tab 3" Background="Gray">
+ <Container Margin="5" CornerRadius="2">
+ <TextBox Height="Stretched" Margin="5" Multiline="true" TextAlignment="TopLeft"/>
+ </Container>
+ </TabItem>
+ </TabView>
+ <MessageBox Movable="false"/>
+ </VerticalStack>
+ <VerticalStack Width="33%" Margin="5">
+ <Border Margin="5" Background="Onyx" Height="Fit">
+ <Label Width="Stretched" Margin="1" Text="{../../dv.SelectedItem}"/>
+ </Border>
+ <Border Margin="5" Background="Onyx" Height="50%">
+ <DirectoryView Name="dv" Root="./" Margin="1"/>
+ </Border>
+ <ListBox Data="{TestList}" Background="Onyx" Margin="5"
+ ItemTemplate="#Tests.Interfaces.colorItem.crow"
+ Template="#Crow.Templates.ScrollingListBox.goml"/>
+ </VerticalStack>
+ </HorizontalStack>
+</Window>
\ No newline at end of file
<EmbeddedResource Include="ui\MenuItem.style" />
<EmbeddedResource Include="test.style" />
<EmbeddedResource Include="Interfaces\treeList.crow" />
+ <EmbeddedResource Include="Interfaces\CheckBox2.imlt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Crow.csproj">
Font = droid, 10;
Margin = 1;
TextAlignment = Center;
- Background = Jet;
+ Background = Onyx;
}
FpsDisp {
Font = droid , 12;
TextAlignment = Center;
Background = Teal;
}
+CheckBox2 {
+ Background = Onyx;
+ Checked={Background=Mantis;Font=droid bold, 10};
+ Unchecked = {Background=Onyx;Font=droid,10};
+}
+RadioButton2 {
+ Background = Onyx;
+ Checked = {Background=Mantis;Font=droid bold, 10};
+ Unchecked = {Background=Onyx;Font=droid,10};
+}
string _root = "/";
bool _showFiles;
+ object _selectedItem;
+ [XmlIgnore]public object SelectedItem {
+ get {
+ return _selectedItem;
+ }
+ set {
+ if (value == _selectedItem)
+ return;
+ _selectedItem = value;
+ NotifyValueChanged ("SelectedItem", _selectedItem);
+ }
+ }
[XmlAttributeAttribute()][DefaultValue(true)]
public virtual bool ShowFiles {
get { return _showFiles; }
get { return new DirectoryInfo (Root).GetFileSystemInfos (); }
}
public void onSelectedItemChanged (object sender, SelectionChangeEventArgs e){
+ SelectedItem = e.NewValue;
SelectedItemChanged.Raise (this, e);
}
}
}
}
- List<Dictionary<string, object>> styling = new List<Dictionary<string, object>>();
+ List<Style> styling = new List<Style>();
//Search for a style mathing :
//1: Full class name, with full namespace
il.Emit (OpCodes.Ldarg_0);
il.Emit (OpCodes.Stloc_0);
- foreach (PropertyInfo pi in thisType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) {
+ foreach (EventInfo ei in thisType.GetEvents(BindingFlags.Public | BindingFlags.Instance)) {
+ string expression;
+ if (!getDefaultEvent(ei, styling, out expression))
+ continue;
+ CompilerServices.emitBindingCreation (il, ei.Name, expression);
+ }
+
+ foreach (PropertyInfo pi in thisType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) {
if (pi.GetSetMethod () == null)
continue;
object defaultValue;
throw new Exception ("Error applying style <" + styleKey + ">:", ex);
}
}
- bool getDefaultValue(PropertyInfo pi, List<Dictionary<string, object>> styling,
+ bool getDefaultEvent(EventInfo ei, List<Style> styling,
+ out string expression){
+ expression = "";
+ if (styling.Count > 0){
+ for (int i = 0; i < styling.Count; i++) {
+ if (styling[i].ContainsKey (ei.Name)){
+ expression = (string)styling[i] [ei.Name];
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ bool getDefaultValue(PropertyInfo pi, List<Style> styling,
out object defaultValue){
defaultValue = null;
string name = "";
set { _multiSelect = value; }
}
public virtual void AddChild(GraphicObject g){
- Children.Add(g);
+ lock (children)
+ Children.Add(g);
g.Parent = this;
g.ResolveBindings ();
g.RegisteredLayoutings = LayoutingType.None;
child.LayoutChanged -= OnChildLayoutChanges;
child.ClearBinding ();
//child.Parent = null;
- Children.Remove(child);
+ lock (children)
+ Children.Remove(child);
if (child == largestChild && Width == Measure.Fit)
searchLargestChild ();
//clip to client zone
CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
gr.Clip ();
-
- foreach (GraphicObject g in Children) {
- g.Paint (ref gr);
+ lock (children) {
+ foreach (GraphicObject g in Children) {
+ g.Paint (ref gr);
+ }
}
gr.Restore ();
}
return;
_content.LogicalParent = this;
+ _content.HorizontalAlignment = HorizontalAlignment.Left;
+ _content.VerticalAlignment = VerticalAlignment.Top;
_content.LayoutChanged += _content_LayoutChanged;
_content.MouseLeave += onMouseLeave;
}
public override void onMouseLeave (object sender, MouseMoveEventArgs e)
{
base.onMouseLeave (sender, e);
- if (MouseIsIn (e.Position))
- return;
- if (_content == null)
- return;
- try {
- if (_content.MouseIsIn (e.Position))
- return;
- } catch {}
IsPopped = false;
}
#endregion
[DefaultTemplate("#Crow.Templates.Spinner.goml")]
public class Spinner : NumericControl
{
+ #region CTOR
+ public Spinner () : base()
+ {
+ }
public Spinner (double minimum, double maximum, double step) :
base (minimum, maximum, step)
{
}
- public Spinner () : base()
- {
- }
+ #endregion
void onUp (object sender, MouseButtonEventArgs e)
{
{
}
+ #region public properties
[XmlAttributeAttribute()][DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation
{
NotifyValueChanged ("TabOrientation", Orientation.Horizontal);
}
}
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [XmlAttributeAttribute()][DefaultValue(20)]
public int Spacing
{
get { return _spacing; }
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(22)]
+ [XmlAttributeAttribute()][DefaultValue("15")]
public virtual Measure TabThickness {
get { return tabThickness; }
set {
RegisterForGraphicUpdate ();
}
}
-
- //prevent caching, because drawing order is different depending on selected tab
- [XmlAttributeAttribute()][DefaultValue(false)]
- public override bool CacheEnabled {
- get {return false;}
- set { }
- }
+ #endregion
public override void AddChild (GraphicObject child)
{
string _title;
string _icon;
bool _resizable;
+ bool _movable;
bool hoverBorder = false;
Container _contentContainer;
NotifyValueChanged ("Resizable", _resizable);
}
}
-
+ [XmlAttributeAttribute()][DefaultValue(true)]
+ public bool Movable {
+ get {
+ return _movable;
+ }
+ set {
+ _movable = value;
+ NotifyValueChanged ("Movable", _movable);
+ }
+ }
#region GraphicObject Overrides
public override void ResolveBindings ()
{
return;
}
- if (this.HasFocus) {
+ if (this.HasFocus && _movable) {
if (e.Mouse.IsButtonDown (MouseButton.Left)) {
int currentLeft = this.Left;
int currentTop = this.Top;
/// The compilation is done on the first object instancing, and is also done for custom widgets
public delegate void LoaderInvoker(object instance);
public static Dictionary<String, LoaderInvoker> DefaultValuesLoader = new Dictionary<string, LoaderInvoker>();
- public static Dictionary<string, Dictionary<string, object>> Styling;
+ public static Dictionary<string, Style> Styling;
/// <summary> parse all styling data's and build global Styling Dictionary </summary>
static void LoadStyling() {
System.Globalization.CultureInfo savedCulture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
- Styling = new Dictionary<string, Dictionary<string, object>> ();
+ Styling = new Dictionary<string, Style> ();
//fetch styling info in this order, if member styling is alreadey referenced in previous
//assembly, it's ignored.
{
enum readerState { classNames, propertyName, expression }
readerState state = readerState.classNames;
-
+ string resourceId;
+ int column = 1;
+ int line = 1;
public StyleReader (Assembly assembly, string resId)
: base(assembly.GetManifestResourceStream (resId))
{
+ resourceId = resId;
string styleKey = resId.Substring (0, resId.Length - 6);
string token = "";
List<string> targetsClasses = new List<string> ();
//this file contains only properties,
//resource Id (minus .style extention) will determine the single target class
if (targetsClasses.Count > 1)
- throw new Exception ("Unexpected token '='");
+ throwParserException ("Unexpected token '='");
else if (targetsClasses.Count == 1) {
if (!string.IsNullOrEmpty (token))
- throw new Exception ("Unexpected token '='");
+ throwParserException ("Unexpected token '='");
currentProperty = targetsClasses [0];
targetsClasses [0] = styleKey;
}else{
if (string.IsNullOrEmpty (token))
- throw new Exception ("Unexpected token '='");
+ throwParserException ("Unexpected token '='");
targetsClasses.Add (styleKey);
currentProperty = token;
token = "";
token = "";
}else if (c == '}'){
if (!string.IsNullOrEmpty (token))
- throw new Exception ("Unexpected token '" + c + "'");
+ throwParserException ("Unexpected token '" + c + "'");
targetsClasses = new List<string> ();
currentProperty = "";
state = readerState.classNames;
token += c;
break;
case readerState.expression:
+ bool expressionIsFinished = false;
if (curlyBracketCount == 0) {
if (c == '{'){
- if (string.IsNullOrEmpty(token))
- throw new Exception ("Unexpected token '{'");
+ if (!string.IsNullOrEmpty(token.Trim()))
+ throwParserException ("Unexpected token '{'");
curlyBracketCount++;
token = "{";
}else if (c == '}')
- throw new Exception ("Unexpected token '{'");
+ throwParserException ("Unexpected token '{'");
else if (c == ';') {
- if (!string.IsNullOrEmpty (token)) {
- string expression = token.Trim ();
-
- foreach (string tc in targetsClasses) {
- if (!Interface.Styling.ContainsKey (tc))
- Interface.Styling [tc] = new Dictionary<string, object> ();
- else if (Interface.Styling [tc].ContainsKey (currentProperty))
- continue;
- Interface.Styling [tc] [currentProperty] = expression;
- }
- token = "";
- }
- state = readerState.propertyName;
+ expressionIsFinished = true;
} else
token += c;
} else {
if (c == '{')
curlyBracketCount++;
- else if (c == '}')
+ else if (c == '}') {
curlyBracketCount--;
+ if (curlyBracketCount == 0)
+ expressionIsFinished = true;
+ }
token += c;
}
+ if (expressionIsFinished) {
+ if (!string.IsNullOrEmpty (token)) {
+ string expression = token.Trim ();
+
+ foreach (string tc in targetsClasses) {
+ if (!Interface.Styling.ContainsKey (tc))
+ Interface.Styling [tc] = new Style ();
+ else if (Interface.Styling [tc].ContainsKey (currentProperty))
+ continue;
+ Interface.Styling [tc] [currentProperty] = expression;
+ }
+ token = "";
+ }
+ //allow omiting ';' if curly bracket close expression
+ while (!EndOfStream) {
+ if (Char.IsWhiteSpace((char)Peek()))
+ Read();
+ else
+ break;
+ }
+ if (this.Peek () == ';')
+ this.Read ();
+ state = readerState.propertyName;
+ }
break;
}
}
if (curlyBracketCount > 0)
- throw new Exception ("Unexpected end of file");
+ throwParserException ("Unexpected end of file");
+ }
+
+ public override int Read ()
+ {
+ int tmp = base.Read ();
+ char c = (char)tmp;
+ if (c == '\n') {
+ line++;
+ column = 1;
+ } else if (c == '\t')
+ column += Interface.TabSize;
+ else if (c != '\r')
+ column++;
+ return tmp;
+ }
+
+ void throwParserException(string message){
+ throw new Exception (string.Format ("Style Reader Exception ({0},{1}): {2} in {3}.",
+ line, column, message, resourceId));
}
}
}