Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{7285454A-930F-4536-AB84-C076B44C0C80}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Build.props = Directory.Build.props
+ README.md = README.md
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "Crow\Crow.csproj", "{C2980F9B-4798-4C05-99E2-E174810F7C7B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicTests", "Samples\BasicTests\BasicTests.csproj", "{7AEB6DD5-916E-4415-84E1-78EC6E5881CE}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testMSBuild", "Samples\testMSBuild\testMSBuild.csproj", "{B912DD88-F41B-428A-9784-E2CF265CE3DD}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{91F1CE07-EECE-4F1D-A3EE-7239B563654A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AEB6DD5-916E-4415-84E1-78EC6E5881CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AEB6DD5-916E-4415-84E1-78EC6E5881CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7AEB6DD5-916E-4415-84E1-78EC6E5881CE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
{56329D48-D382-4850-93DE-59C453894E8A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
{91F1CE07-EECE-4F1D-A3EE-7239B563654A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
{7AEB6DD5-916E-4415-84E1-78EC6E5881CE} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
+ {B912DD88-F41B-428A-9784-E2CF265CE3DD} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
EndGlobalSection
EndGlobal
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
- <ReleaseVersion>0.8.0</ReleaseVersion>
- <AssemblyVersion>$(ReleaseVersion)</AssemblyVersion>
+ <ReleaseVersion>$(CrowVersion)</ReleaseVersion>
+ <AssemblyVersion>$(CrowVersion)</AssemblyVersion>
<Title>C# Rapid Open Widget Toolkit</Title>
<Description>C.R.O.W. is a widget toolkit and rendering engine developed in C# with templates, styles, compositing, and bindings.</Description>
<License>MIT</License>
<Authors>Jean-Philippe Bruyère</Authors>
-
<RepositoryUrl>https://github.com/jpbruyere/Crow</RepositoryUrl>
+ <PackageVersion>$(CrowPackageVersion)</PackageVersion>
<PackageTags>GUI Widget toolkit Interface C# .Net Mono</PackageTags>
- <PackageVersion>$(AssemblyVersion)-beta</PackageVersion>
+
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/jpbruyere/Crow/wiki</PackageProjectUrl>
<PackageLicense>https://opensource.org/licenses/MIT</PackageLicense>
still untested. Next beta will have a glfw backend.
</PackageReleaseNotes>
- <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
+ <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
- <GenerateDocumentationFile>true</GenerateDocumentationFile>
+ <GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1587;1570;1572;1573;1574</NoWarn>
-
- <DefineConstants>DESIGN_MODE</DefineConstants>
+ <DefineConstants>DESIGN_MODE</DefineConstants>
<EnableDefaultItems>false</EnableDefaultItems>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
-
</PropertyGroup>
-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
- <DefineConstants>DEBUG;TRACE;_DEBUG_DISPOSE;_DEBUG_BINDING;DESIGN_MODE;_DEBUG_CLIP_RECTANGLE;_DEBUG_FOCUS;_DEBUG_DRAGNDROP;_DEBUG_LOG</DefineConstants>
+ <DefineConstants>DEBUG;TRACE;MEASURE_TIME;_DEBUG_DISPOSE;_DEBUG_BINDING;DESIGN_MODE;_DEBUG_CLIP_RECTANGLE;_DEBUG_FOCUS;_DEBUG_DRAGNDROP;_DEBUG_LOG</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.6.0" />
<!--<PackageReference Include="glfw-sharp" Version="0.2.0" />-->
</ItemGroup>
- <ItemGroup>
- <Content Include="$(SolutionDir)Images/crow.png" Pack="true" PackagePath="" />
+ <ItemGroup>
+ <Content Include="$(SolutionDir)Images/crow.png" Pack="true" PackagePath="" />
<Compile Include="src\**\*.cs" Exclude="src\Mono.Cairo\NativeMethods-internal.cs;src\backends\win32\User32\Structs\RawInputDevice.cs" />
<EmbeddedResource Include="Templates\*.*">
<LogicalName>Crow.%(Filename).template</LogicalName>
<EmbeddedResource Include="Default.style" />
<EmbeddedResource Include="Icons\*.*" />
</ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
- <rect opacity="1.0" rx="5" id="svg_1" height="59" width="59" y="2.5" x="2.5" stroke-width="6" stroke="#111111" fill="#bbbbcc"/>
- <rect opacity="1.0" rx="5" id="svg_1" height="22" width="59" y="2.5" x="2.5" stroke-width="6" stroke="#111111" fill="#4455aa"/>
+ <rect opacity="1.0" rx="0" id="svg_1" height="59" width="59" y="2.5" x="2.5" stroke-width="2" stroke="#111111" fill="#bbbbcc"/>
+ <rect opacity="1.0" rx="0" id="svg_1" height="22" width="59" y="2.5" x="2.5" stroke-width="2" stroke="#111111" fill="#4455aa"/>
<!-- <line stroke-linecap="undefined" stroke-linejoin="undefined" id="svg_2" y2="24.5" x2="61.5" y1="24.5" x1="2.5" stroke-width="6" stroke="#bbbbbb" fill="none"/>-->
</g>
-</svg>
\ No newline at end of file
+</svg>
while (running) {
Update ();
- Thread.Sleep (5);
+ Thread.Sleep (UPDATE_INTERVAL);
+#if MEASURE_TIME
+ foreach (PerformanceMeasure m in PerfMeasures)
+ m.NotifyChanges ();
+#endif
}
}
protected virtual void Startup ()
}*/
#region Static and constants
+ /// <summary>Time interval in milisecond between Updates of the interface</summary>
+ public static int UPDATE_INTERVAL = 5;
/// <summary>Crow configuration root path</summary>
public static string CROW_CONFIG_ROOT;
/// <summary>If true, mouse focus is given when mouse is over control</summary>
public event EventHandler<ListChangedEventArg> ListAdd;
public event EventHandler<ListChangedEventArg> ListRemove;
public event EventHandler<ListChangedEventArg> ListEdit;
+ public event EventHandler<ListChangedEventArg> ListClear;
#endregion
public ObservableList() : base () {}
base.RemoveAt (idx);
ListRemove.Raise (this, new ListChangedEventArg (idx, elem));
}
+ public new void Clear ()
+ {
+ base.Clear ();
+ ListClear.Raise (this, null);
+ }
public void Remove () {
if (selectedIndex < 0)
return;
-//
-// StyleReader.cs
+// Copyright (c) 2013-2020 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
-// 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.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
using System;
using System.Collections.Generic;
-//
-// DockingView.cs
+// Copyright (c) 2013-2020 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
-// 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.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
using System;
using System.Xml.Serialization;
if (lt == LayoutingType.Width) {
if (largestChild == null)
searchLargestChild ();
- if (largestChild == null) {
+ /*if (largestChild == null) {
//if still null, not possible to determine a width
//because all children are stretched, force first one to fit
Children [0].Width = Measure.Fit;
return -1;//cancel actual sizing to let child computation take place
- }
+ }*/
} else {
if (tallestChild == null)
searchTallestChild ();
- if (tallestChild == null) {
+ /*if (tallestChild == null) {
Children [0].Height = Measure.Fit;
return -1;
- }
+ }*/
}
}
return base.measureRawSize (lt);
if (maxScrollX == value)
return;
- maxScrollX = value;
+ maxScrollX = Math.Max(0, value);
if (scrollX > maxScrollX)
ScrollX = maxScrollX;
-
+
NotifyValueChanged ("MaxScrollX", maxScrollX);
RegisterForGraphicUpdate ();
}
if (maxScrollY == value)
return;
- maxScrollY = value;
+ maxScrollY = Math.Max (0, value);
if (scrollY > maxScrollY)
ScrollY = maxScrollY;
<License>MIT</License>
<Authors>Jean-Philippe Bruyère</Authors>
<LangVersion>7.2</LangVersion>
+
+ <CrowVersion>0.8.6</CrowVersion>
+ <CrowPackageVersion>$(CrowVersion)-beta</CrowPackageVersion>
</PropertyGroup>
</Project>
// += KeyboardKeyDown1;
//testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" };
- testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
- //testFiles = new string [] { @"Interfaces/Divers/testSlider.crow" };
+ //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+ testFiles = new string [] { @"Interfaces/Group/5.crow" };
+ //testFiles = new string [] { @"Interfaces/Divers/perfMeasures.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Interfaces\%(RecursiveDir)%(Filename)%(Extension)</Link>
</None>
+ <EmbeddedResource Include="..\common\ui\templates\**\*.*">
+ <LogicalName>ui.%(Filename)%(Extension)</LogicalName>
+ <Link>Templates\%(Filename)%(Extension)</Link>
+ </EmbeddedResource>
</ItemGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Background="DimGrey" Margin="10" Fit="true" MinimumSize="200,20">
+ <Label Font="droid bold,20" Text="Label1" Margin="5" Width="Stretched" Height="Fit" Background="Jet"/>
+ <Label Font="droid bold,20" Text="Label1" Margin="5" Width="Stretched" Height="Fit" Background="Jet"/>
+ <Label Font="droid bold,20" Text="Label1" Margin="5" Width="Stretched" Height="Fit" Background="Jet"/>
+ <Label Font="droid bold,20" Text="Label1" Margin="5" Width="Stretched" Height="Fit" Background="Jet"/>
+</VerticalStack>
\ No newline at end of file
--- /dev/null
+<Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ Margin="3"
+ Background="{./Background}"
+ Foreground="DimGrey"
+ TextAlignment="Center"
+ MouseEnter="{Foreground=White}"
+ MouseLeave="{Foreground=DimGrey}"/>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<GenericStack Orientation="Vertical" Spacing="0"
+ Background="{./Background}"
+ MouseEnter="{/caption.Foreground=White}"
+ MouseLeave="{/caption.Foreground=Grey}">
+ <HorizontalStack Left="{./TabOffset}"
+ Name="TabTitle"
+ HorizontalAlignment="Left"
+ Height="{./TabHeight}"
+ Width="{./TabWidth}">
+ <Label Name="caption" Text="{./Caption}" Foreground="Grey" Width="Stretched"/>
+ <Label Text="{./ViewIndex}" Foreground="Green"/>
+ <Label Text="{./TabOffset}" Foreground="Red"/>
+ <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.Icons.exit2.svg"
+ MouseClick="./butCloseTabClick"/>
+ </Border>
+ </HorizontalStack>
+ <Container Margin="20">
+ <Container Background="DimGrey" Name="Content"/>
+ </Container>
+</GenericStack>
+
--- /dev/null
+<?xml version="1.0"?>
+<!--<VerticalStack Height="{../HeightPolicy}" Width="{../WidthPolicy}" MouseClick="../onMouseClick">
+ <Label Text="{../../Caption}" Width="{../../WidthPolicy}"/>
+ <Container Name="Content" Visible="false" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/>
+</VerticalStack>-->
+<Group BorderWidth="1" Foreground="LightGray"
+ MouseClick="../onMouseClick">
+ <VerticalStack>
+ <Label Text="{../../../Caption}"/>
+ <Container Name="Content" Visible="false"/>
+ </VerticalStack>
+</Group>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border Foreground="Transparent" Focusable="true" HorizontalAlignment="Left" Height="Fit" Width="200">
+ <HorizontalStack Margin="0"
+ MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}"
+ MouseLeave="{Background=Transparent}">
+ <Widget Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/>
+ <Label Text="{}" Margin="0" Width="Stretched"/>
+ </HorizontalStack>
+</Border>
+
--- /dev/null
+<?xml version="1.0"?>
+<Border Foreground="Transparent" Focusable="true" HorizontalAlignment="Left" Height="Fit">
+ <HorizontalStack Margin="0"
+ MouseEnter="{Background=CornflowerBlue}"
+ MouseLeave="{Background=Transparent}">
+ <Widget Height="8" Width="14" Background="{}" Margin="0" CornerRadius="2"/>
+ <Label Text="{}" Margin="0" Width="Stretched" Font="mono, 8"/>
+ </HorizontalStack>
+</Border>
+
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="3">
+ <Label Text="{Name}" Focusable="true" Width="Stretched" Height="Fit" Margin="0"
+ MouseEnter="{Background=Red}"
+ MouseLeave="{Background=Transparent}"
+ />
+</Border>
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<Container Name="topContainer" HorizontalAlignment="Center" VerticalAlignment="Top"
+ Margin="2"
+ Width="600" Height="-1">
+ <Border Margin="2" BorderWidth="1" Background="0,6;0,6;0,6;0,6" Height="-1">
+ <Group Width="0" Name="logs">
+ <VerticalStack Name="VerticalStack" Width="0" Focusable="False">
+ <Label Name="line1" Width="0" Text="Line1" Margin="0"/>
+ <Label Name="line2" Width="0" Text="Line2" Margin="0"/>
+ <Label Name="line3" Width="0" Text="Line3" Margin="0"/>
+ <Label Name="line4" Width="0" Text="Line4" Margin="0"/>
+ </VerticalStack>
+ <Button Name="btOk" Background="Gray" Fit="True"
+ HorizontalAlignment="Right" VerticalAlignment="Bottom"
+ MouseClick="BtOk_MouseClick">
+ <Label Text="Ok" Margin="3" Foreground="White" />
+ </Button>
+ </Group>
+ </Border>
+</Container>
+
--- /dev/null
+<?xml version="1.0"?>
+
+ <VerticalStack Spacing="1" Height="Fit" Width="Stretched">
+ <HorizontalStack Background="DarkSlateGrey">
+ <Label Text="{Name}" Width="Stretched" Font="doid bold, 10" Margin="2"/>
+ <Button Caption="Reset" MouseClick="onResetClick" Height="Fit"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit" Width="Fit" HorizontalAlignment="Left">
+ <HorizontalStack Style="HStackMeasure">
+ <Label Text="Cur:" Style="FpsLabel"/>
+ <Label Text="{current}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Style="HStackMeasure">
+ <Label Text="Min:" Style="FpsLabel"/>
+ <Label Text="{minimum}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Style="HStackMeasure">
+ <Label Text="Mean:" Style="FpsLabel"/>
+ <Label Text="{mean}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack Style="HStackMeasure">
+ <Label Text="Max:" Style="FpsLabel"/>
+ <Label Text="{maximum}" Style="FpsDisp"/>
+ </HorizontalStack>
+ </HorizontalStack>
+ <Border Foreground="White" Width="Stretched" Height="60">
+ <Trend Background="Black" NewValue="{current}" Minimum="{minimum}" Maximum="{maximum}"/>
+ </Border>
+<!-- <HorizontalStack>
+ <Label Text="Total:" Style="FpsLabel"/>
+ <Label Text="{total}" Style="FpsDisp"/>
+ </HorizontalStack>
+ <HorizontalStack>
+ <Label Text="Cpt:" Style="FpsLabel"/>
+ <Label Text="{cptMeasures}" Style="FpsDisp"/>
+ </HorizontalStack>-->
+ </VerticalStack>
+
--- /dev/null
+FpsLabel {
+ Width = "30";
+ Font = "droid, 10";
+ Margin = "0";
+ TextAlignment = "Center";
+}
+FpsDisp {
+ Font = "droid bold, 10";
+ Width = "60";
+ Margin = "0";
+ CornerRadius = "3";
+ TextAlignment = "Center";
+ Background = "MediumSeaGreen";
+}
+HStackMeasure {
+ Margin = "2";
+ Width = "Fit";
+ Height = "Fit";
+ Background = "DimGrey";
+}
+CheckBox2 {
+ Template= "Interfaces/CheckBox2.imlt";
+ Background = "Jet";
+ Checked="{Background=MediumSeaGreen}";
+ Unchecked = "{Background=Jet}";
+}
+RadioButton2 {
+ Template="Interfaces/CheckBox2.imlt";
+ Background = "Jet";
+ Checked = "{Background=MediumSeaGreen}";
+ Unchecked = "{Background=Jet}";
+}
+labPerf {
+ Font = "droid, 8";
+ Width = "50%";
+}
+labPerfVal{
+ Font = "droid, 8";
+ Width = "50%";
+}
+DbgLogViewer{
+ Background = "Onyx";
+ Font = "mono, 8";
+ Foreground = "LightGrey";
+ Focusable = "true";
+}
+DockWindow{
+ Background = "0.1,0.1,0.1,0.5";
+}
--- /dev/null
+<?xml version="1.0"?>
+<AnalogMeter Width="Fit" Height="Fit" Background="White" Foreground="Black" Value="{fps}" Minimum="Stretched" Maximum="100"/>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<!--<Group>-->
+<Window Name="window1" Left="10" Top="10" Title="Test window"
+ Width="250" Height="300" >
+ <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">
+ <Slider Name="slider" Height="10" Width="0"/>
+
+ <HorizontalStack Width="0" Height="-1" Margin="10" Background="BlueCrayola">
+ <Checkbox Height="-1" Width="80"/>
+ <GraphicObject Width="0"/>
+ <Checkbox Height="-1" Width="80"/>
+ </HorizontalStack>
+ <Groupbox Text="test" Height="-1" Width="-1" Margin="5">
+ <VerticalStack Height="-1" Width="0" >
+ <RadioButton Caption="Radio 1" Background="Red" />
+ <RadioButton Caption="Radio 2" IsChecked="true" />
+ <RadioButton Caption="Radio 3" />
+ </VerticalStack>
+ </Groupbox>
+<!-- <Checkbox Height="-1" Width="-1" Background="Red" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Right"/>-->
+ </VerticalStack>
+</Window>
+<!--</Group>-->
+<!-- <Label Text="{fps}" Background="DarkRed"/>
+ <Label Text="{fpsMin}" />
+ <Label Text="{fpsMax}" />-->
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+ <HorizontalStack Width="Fit" Height="Fit" Focusable="true"
+ HorizontalAlignment="Left"
+ MouseEnter="{Background=RoyalBlue}"
+ MouseLeave="{Background=Transparent}">
+ <Image Width="16" Height="16" Path="#Tests.image.folder1.svg" SvgSub="{Attributes}"/>
+ <Label Text="{Name}" Width="Fit" Height="Fit" Margin="0"/>
+ <Label Text="{Attributes}" Width="Fit" Height="Fit" Margin="0"/>
+ <Label Text="{Extension}" Width="Fit" Height="Fit" Margin="0"/>
+ </HorizontalStack>
+
--- /dev/null
+<?xml version="1.0"?>
+ <HorizontalStack Width="Stretched" Height="Fit" Focusable="true"
+ MouseEnter="{Background=SkyBlue}"
+ MouseLeave="{Background=Transparent}">
+ <Image Width="8" Height="8" Path="#Crow.Images.Icons.member.svg" SvgSub="{GetIcon}"/>
+ <Label Text="{Name}" Width="Stretched" Height="Fit" Margin="1"/>
+ <Label Text="{MemberType}" Width="Fit" Height="Fit" Margin="0"/>
+ </HorizontalStack>
+
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Height="Fit" Name="List"/>
\ No newline at end of file
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using Microsoft.Build.Construction;
+using Microsoft.Build.Evaluation;
+using Microsoft.Build.Execution;
+using Microsoft.Build.Framework;
+
+namespace testMSBuild
+{
+ class Program
+ {
+
+ //const string msbuildRoot = "/usr/lib/mono/msbuild/Current/bin/";
+ const string msbuildRoot = "/usr/share/dotnet/sdk/3.1.101/";
+ //const string msbuildRoot = "/mnt/data/src/microsoft/msbuild/artifacts/bin/bootstrap/netcoreapp2.1/MSBuild/";
+ const string toolsVersion = "Current";
+
+ static void Main (string [] args)
+ {
+ /*var nativeSharedMethod = typeof (SolutionFile).Assembly.GetType ("Microsoft.Build.Shared.NativeMethodsShared");
+ var isMonoField = nativeSharedMethod.GetField ("_isMono", BindingFlags.Static | BindingFlags.NonPublic);
+ isMonoField.SetValue (null, true);*/
+
+ //Environment.SetEnvironmentVariable (MSBUILD_EXE_PATH, "/usr/share/dotnet/sdk/3.1.101/MSBuild.dll");
+ Environment.SetEnvironmentVariable ("MSBUILD_EXE_PATH", Path.Combine(msbuildRoot, "MSBuild.dll"));
+ Environment.SetEnvironmentVariable ("MSBUILD_NUGET_PATH", "/home/jp/.nuget/packages");
+
+
+ //Environment.SetEnvironmentVariable ("COREHOST_TRACE", "1");
+
+ AppDomain currentDomain = AppDomain.CurrentDomain;
+ currentDomain.AssemblyResolve += msbuildAssembliesResolve;
+
+ compile ();
+ }
+
+ static Assembly msbuildAssembliesResolve (object sender, ResolveEventArgs args)
+ {
+ string assemblyPath = Path.Combine (msbuildRoot, new AssemblyName (args.Name).Name + ".dll");
+ /*Console.BackgroundColor = ConsoleColor.DarkBlue;
+ Console.ForegroundColor = ConsoleColor.White;
+ Console.WriteLine ($"Probing: {assemblyPath}");
+ Console.ResetColor ();*/
+ if (!File.Exists (assemblyPath)) return null;
+ Assembly assembly = Assembly.LoadFrom (assemblyPath);
+ return assembly;
+ }
+
+
+ static void compile ()
+ {
+ //Console.WriteLine ($"{Microsoft.Build. BuildEnvironmentHelper.Instance.CurrentMSBuildExePath}");
+ string slnPath = "/mnt/devel/glfw-sharp/glfw-sharp.sln";//<--- change here can be another VS type ex: .vcxproj
+ //string slnPath = "/mnt/devel/vke.net/vke.net.sln";//<--- change here can be another VS type ex: .vcxproj
+ //string csprojPath = "/mnt/devel/glfw-sharp/glfw-sharp.csproj";
+ //ILogger Logger = new BasicLogger ();
+ ILogger Logger = new Microsoft.Build.Logging.ConsoleLogger ();
+ Logger.Verbosity = LoggerVerbosity.Minimal;
+ //Logger.Parameters = "V=DIAG;consoleloggerparameters:ShowEventId";
+ ProjectCollection projectCollection = new ProjectCollection ();
+ projectCollection.DefaultToolsVersion = toolsVersion;
+ //projectCollection.IsBuildEnabled = false;
+ //projectCollection.LoadProject (projectFileName);
+ SolutionFile sln = SolutionFile.Parse (slnPath);
+
+ /*foreach (ProjectInSolution pis in sln.ProjectsInOrder) {
+ Console.WriteLine ($"{pis.ProjectName} {pis.RelativePath} {pis.ProjectType}");
+ }*/
+
+
+ //Project project = new Project (projectCollection);
+ BuildParameters buildParams = new BuildParameters (projectCollection);
+ buildParams.Loggers = new List<ILogger> () { Logger };
+ //buildParams.DefaultToolsVersion = "Current";
+ //buildParams.DetailedSummary = true;
+ //buildParams.LogInitialPropertiesAndItems = true;
+ //buildParams.LogTaskInputs = true;
+
+ buildParams.ResetCaches = false;
+
+ Dictionary<String, String> globalProperties = new Dictionary<String, String> ();
+
+ globalProperties ["Configuration"] = sln.GetDefaultConfigurationName ();
+ globalProperties ["Platform"] = sln.GetDefaultPlatformName ();
+
+
+ //globalProperties ["RollForward"] = "none";
+ //globalProperties ["_IsRollForwardSupported"] = "false";
+
+ //globalProperties ["GenerateRuntimeConfigurationFiles"] = "true";
+
+ //globalProperties ["NuGetPackageRoot"] = "/home/jp/.nuget/packages";
+ //globalProperties ["RoslynTargetsPath"] = Path.Combine (msbuildRoot, "Roslyn/");
+ //globalProperties ["MSBuildSDKsPath"] = Path.Combine (msbuildRoot, "Sdks/");
+
+ //globalProperties ["AdditionalLibPaths"] = msbuildRoot;
+ //globalProperties ["AssemblySearchPaths"] = msbuildRoot;
+
+
+ //globalProperty.Add ("CSharpCoreTargetsPath", "/usr/share/dotnet/sdk/3.1.101/Roslyn/Microsoft.CSharp.Core.targets");
+
+ /*ProjectInstance pinst = new ProjectInstance (csprojPath, globalProperties, "Current");
+ if (pinst.Build (new String [] { "Build" }, buildParams.Loggers, out System.Collections.Generic.IDictionary<string, Microsoft.Build.Execution.TargetResult> targetOutputs))
+ Console.WriteLine ("Success");
+ ProjectRootElement pre = pinst.ToProjectRootElement ();*/
+
+ //List <Project> projects = new List<Project> ();
+
+ //projectCollection.ProjectAdded += (sender, e) => {
+ // // pc = sender as ProjectCollection;
+ // // Console.ForegroundColor = ConsoleColor.Yellow;
+ // // Console.WriteLine ($"Proj added: {e.ProjectRootElement} {e.ProjectRootElement.FullPath}");
+ // // Console.ResetColor ();
+
+ // Project p = new Project (e.ProjectRootElement);//, globalProperties, toolsVersion, projectCollection);
+ // // //projects.Add (p);
+ // Console.WriteLine ($"\nEvaluated properties:");
+ // foreach (var pi in p.Properties)
+ // Console.WriteLine ($"\t{pi.Name} = {pi.EvaluatedValue}");
+ // Console.WriteLine ("");
+
+ // // //foreach (ProjectItem pi in p.AllEvaluatedItems)
+ // // //Console.WriteLine ($"{pi.ItemType} {pi.EvaluatedInclude}");
+ // // /*foreach (GlobResult gr in p.GetAllGlobs()) {
+ // // foreach (string g in gr.IncludeGlobs) {
+ // // Console.WriteLine ($"\t\t{g}");
+ // // }
+ //};
+
+ //};
+
+ BuildManager.DefaultBuildManager.ResetCaches ();
+
+ //string[] targetsToBuild = { "ResolveAssemblyReferences" };
+ string [] targetsToBuild = { "restore", "build"};
+ //string [] targetsToBuild = { "Rebuild" };
+
+ //globalProperties ["Configuration"] = "ReleaseSpirVTasks";
+
+ BuildRequestData buildRequest = new BuildRequestData (slnPath, globalProperties, "Current", targetsToBuild, null);
+
+ BuildResult buildResult = BuildManager.DefaultBuildManager.Build (buildParams, buildRequest);
+
+
+ if (buildResult.OverallResult == BuildResultCode.Success) {
+ Console.WriteLine ("Build succes.");
+ } else {
+ foreach (var item in buildResult.ResultsByTarget) {
+ Console.WriteLine ($"{item.Key} -> {item.Value.ResultCode} {item.Value.ToString()}");
+ }
+
+ Console.WriteLine ("Error: " + buildResult.Exception);
+ }
+ //Console.WriteLine ($"proj count: {}");
+ //MessageBox.Show (Logger.GetLogString ());
+ /*foreach (Project p in buildParams. ..LoadedProjects) {
+ foreach (ProjectItem pi in p.AllEvaluatedItems) {
+ Console.WriteLine ($"{pi.ItemType} {pi}");
+ }
+ }*/
+
+ }
+ }
+
+ public class FileLogger : ILogger
+ {
+ public LoggerVerbosity Verbosity { get => throw new NotImplementedException (); set => throw new NotImplementedException (); }
+ public string Parameters { get => throw new NotImplementedException (); set => throw new NotImplementedException (); }
+
+ Stream log;
+ StreamWriter sw;
+
+ public void Initialize (IEventSource eventSource)
+ {
+ log = new FileStream ("buildlog.txt", FileMode.Create);
+ sw = new StreamWriter (log);
+
+ eventSource.MessageRaised += (sender, e) => sw.WriteLine ($"{e.Message}");
+ eventSource.BuildStarted += (sender, e) => sw.WriteLine("Build started");
+ eventSource.BuildFinished += (sender, e) => sw.WriteLine ("Build finished");
+ }
+
+ public void Shutdown ()
+ {
+ log.Flush ();
+ sw.Dispose ();
+ log.Dispose ();
+ }
+ }
+
+ public class BasicLogger : ILogger
+ {
+ public LoggerVerbosity Verbosity { get; set; }
+ public string Parameters { get; set; }
+
+ public void Initialize (IEventSource eventSource)
+ {
+ //eventSource.ProjectStarted += (sender, e) => Console.WriteLine ($"Building project: {e.Message}");
+ //eventSource.ProjectFinished += (sender, e) => Console.WriteLine ($"Done project: {e.Message}");
+ eventSource.ErrorRaised += (sender, e) => {
+ Console.ForegroundColor = ConsoleColor.White;
+ Console.BackgroundColor = ConsoleColor.Red;
+ Console.WriteLine ($"{e.Message}");
+ Console.ResetColor ();
+ };
+ eventSource.TargetStarted += (sender, e) => {
+ Console.ForegroundColor = ConsoleColor.DarkYellow;
+ Console.WriteLine ($"Target start: {e.TargetName}<-{e.ParentTarget} {e.Message}");
+ Console.ResetColor ();
+ };
+ eventSource.TargetFinished += (sender, e) => {
+ Console.ForegroundColor = ConsoleColor.DarkYellow;
+ Console.WriteLine ($"\tDone {e.TargetName} ({e.Succeeded}) : {e.Message}");
+ Console.ResetColor ();
+ };
+
+ eventSource.MessageRaised += (sender, e) => {
+ Console.ForegroundColor = ConsoleColor.Gray;
+ Console.WriteLine ($"{e.HelpKeyword} {e.Message}");
+ Console.ResetColor ();
+ };
+ //eventSource.AnyEventRaised += (sender, e) => Console.WriteLine ($"{e.Timestamp}:{e.SenderName}=>{e.Message}");
+ //eventSource.BuildStarted += (sender, e) => Console.WriteLine("Build started");
+ eventSource.BuildFinished += (sender, e) => Console.WriteLine ("Build finished");
+ }
+
+ public void Shutdown ()
+ {
+ }
+ }
+
+ //public class BasicLogger : ILogger
+ // {
+ // MemoryStream streamMem = new MemoryStream ();
+ // /// <summary>
+ // /// Initialize is guaranteed to be called by MSBuild at the start of the build
+ // /// before any events are raised.
+ // /// </summary>
+ // public override void Initialize (IEventSource eventSource)
+ // {
+
+ // try {
+ // // Open the file
+ // this.streamWriter = new StreamWriter (streamMem);
+ // //this.streamWriter = new StreamWriter(logFile);
+ // } catch (Exception ex) {
+ // if
+ // (
+ // ex is UnauthorizedAccessException
+ // || ex is ArgumentNullException
+ // || ex is PathTooLongException
+ // || ex is DirectoryNotFoundException
+ // || ex is NotSupportedException
+ // || ex is ArgumentException
+ // || ex is SecurityException
+ // || ex is IOException
+ // ) {
+ // throw new LoggerException ("Failed to create log file: " + ex.Message);
+ // } else {
+ // // Unexpected failure
+ // throw;
+ // }
+ // }
+
+ // // For brevity, we'll only register for certain event types. Loggers can also
+ // // register to handle TargetStarted/Finished and other events.
+ // eventSource.ProjectStarted += new ProjectStartedEventHandler (eventSource_ProjectStarted);
+ // eventSource.TaskStarted += new TaskStartedEventHandler (eventSource_TaskStarted);
+ // eventSource.MessageRaised += new BuildMessageEventHandler (eventSource_MessageRaised);
+ // eventSource.WarningRaised += new BuildWarningEventHandler (eventSource_WarningRaised);
+ // eventSource.ErrorRaised += new BuildErrorEventHandler (eventSource_ErrorRaised);
+ // eventSource.ProjectFinished += new ProjectFinishedEventHandler (eventSource_ProjectFinished);
+ // }
+
+ // void eventSource_ErrorRaised (object sender, BuildErrorEventArgs e)
+ // {
+ // // BuildErrorEventArgs adds LineNumber, ColumnNumber, File, amongst other parameters
+ // string line = String.Format (": ERROR {0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber);
+ // WriteLineWithSenderAndMessage (line, e);
+ // }
+
+ // void eventSource_WarningRaised (object sender, BuildWarningEventArgs e)
+ // {
+ // // BuildWarningEventArgs adds LineNumber, ColumnNumber, File, amongst other parameters
+ // string line = String.Format (": Warning {0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber);
+ // WriteLineWithSenderAndMessage (line, e);
+ // }
+
+ // void eventSource_MessageRaised (object sender, BuildMessageEventArgs e)
+ // {
+ // // BuildMessageEventArgs adds Importance to BuildEventArgs
+ // // Let's take account of the verbosity setting we've been passed in deciding whether to log the message
+ // if ((e.Importance == MessageImportance.High && IsVerbosityAtLeast (LoggerVerbosity.Minimal))
+ // || (e.Importance == MessageImportance.Normal && IsVerbosityAtLeast (LoggerVerbosity.Normal))
+ // || (e.Importance == MessageImportance.Low && IsVerbosityAtLeast (LoggerVerbosity.Detailed))
+ // ) {
+ // WriteLineWithSenderAndMessage (String.Empty, e);
+ // }
+ // }
+
+ // void eventSource_TaskStarted (object sender, TaskStartedEventArgs e)
+ // {
+ // // TaskStartedEventArgs adds ProjectFile, TaskFile, TaskName
+ // // To keep this log clean, this logger will ignore these events.
+ // }
+
+ // void eventSource_ProjectStarted (object sender, ProjectStartedEventArgs e)
+ // {
+ // // ProjectStartedEventArgs adds ProjectFile, TargetNames
+ // // Just the regular message string is good enough here, so just display that.
+ // WriteLine (String.Empty, e);
+ // indent++;
+ // }
+
+ // void eventSource_ProjectFinished (object sender, ProjectFinishedEventArgs e)
+ // {
+ // // The regular message string is good enough here too.
+ // indent--;
+ // WriteLine (String.Empty, e);
+ // }
+
+ // /// <summary>
+ // /// Write a line to the log, adding the SenderName and Message
+ // /// (these parameters are on all MSBuild event argument objects)
+ // /// </summary>
+ // private void WriteLineWithSenderAndMessage (string line, BuildEventArgs e)
+ // {
+ // if (0 == String.Compare (e.SenderName, "MSBuild", true /*ignore case*/)) {
+ // // Well, if the sender name is MSBuild, let's leave it out for prettiness
+ // WriteLine (line, e);
+ // } else {
+ // WriteLine (e.SenderName + ": " + line, e);
+ // }
+ // }
+
+ // /// <summary>
+ // /// Just write a line to the log
+ // /// </summary>
+ // private void WriteLine (string line, BuildEventArgs e)
+ // {
+ // for (int i = indent; i > 0; i--) {
+ // streamWriter.Write ("\t");
+ // }
+ // streamWriter.WriteLine (line + e.Message);
+ // }
+
+
+ // public string GetLogString ()
+ // {
+ // var sr = new StreamReader (streamMem);
+ // var myStr = sr.ReadToEnd ();
+ // return myStr;
+ // }
+ // /// <summary>
+ // /// Shutdown() is guaranteed to be called by MSBuild at the end of the build, after all
+ // /// events have been raised.
+ // /// </summary>
+ // ///
+ // ///
+ // public override void Shutdown ()
+ // {
+ // streamWriter.Flush ();
+ // streamMem.Position = 0;
+ // }
+ // private StreamWriter streamWriter;
+ // private int indent;
+ //}
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <!-- <TargetFramework>net472</TargetFramework>-->
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <ReleaseVersion>0.8.0</ReleaseVersion>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.Build" Version="16.*">
+ <IncludeAssets>compile</IncludeAssets>
+ </PackageReference>
+ <PackageReference Include="Microsoft.Build.Framework" Version="16.*">
+ <IncludeAssets>compile</IncludeAssets>
+ </PackageReference>
+ <PackageReference Include="Microsoft.Build.Tasks.Core" Version="16.*">
+ <IncludeAssets>compile</IncludeAssets>
+ </PackageReference>
+ <PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.*">
+ <IncludeAssets>compile</IncludeAssets>
+ </PackageReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file