<ItemGroup>
<PackageReference Include="glfw-sharp" Version="$(GlfwSharpVersion)" />
- <PackageReference Include="OpenGL.Net" Version="0.8.4" />
+ <!--<PackageReference Include="OpenGL.Net" Version="0.8.4" />-->
<ProjectReference Include="..\..\Drawing2D\Drawing2D.csproj" />
</ItemGroup>
using Drawing2D;
using Glfw;
+#if CAIRO_HAS_GL
namespace Crow.CairoBackend
{
public class EglBackend : CairoBackendBase {
}
}
+#endif
\ No newline at end of file
//
using System;
+
+#if CAIRO_HAS_GL
+
using OpenGL;
using static OpenGL.Gl;
}
}
}
+#endif
\ No newline at end of file
{
IContext ctx = base.PrepareUIFrame (existingContext, clipping);
+ //clear(ctx);
+
for (int i = 0; i < clipping.NumRectangles; i++)
ctx.Rectangle (clipping.GetRectangle (i));
ctx.Clip ();
case SurfaceType.Svg:
return new SvgSurface (surface, owned);
case SurfaceType.GL:
+#if CAIRO_HAS_GL
return new GLSurface (surface, owned);
+#endif
default:
return new Surface (surface, owned);
}
<PackageProjectUrl>https://github.com/jpbruyere/Crow/wiki</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>crow.png</PackageIcon>
- <PackageCopyright>Copyright 2021</PackageCopyright>
+ <PackageCopyright>Copyright 2023</PackageCopyright>
</PropertyGroup>
<ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyVersion>1.1.0</AssemblyVersion>
<PackageVersion>$(AssemblyVersion)-beta</PackageVersion>
Selected="{Background=${ControlHighlight}}"
Unselected="{Background=Transparent}">
<HorizontalStack>
- <Image Margin="1" Width="14" Height="14" Path="#Crow.Icons.file.svg"/>
+ <Image Margin="1" Width="${IconSize}" Height="${IconSize}" Path="#Crow.Icons.file.svg"/>
<Label Text="{Name}" Width="Stretched"/>
</HorizontalStack>
</ListItem>
MouseEnter="{Foreground=DimGrey}"
MouseLeave="{Foreground=Transparent}">
<HorizontalStack Background="{./Background}" Spacing="1">
- <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+ <Image Margin="1" Width="${IconSize}" Height="${IconSize}" Focusable="true" MouseDown="./onClickForExpand"
Path="{./Image}"
Visible="{./IsExpandable}"
SvgSub="{./IsExpanded}"
MouseEnter="{Background=LightGrey}"
MouseLeave="{Background=Transparent}"/>
- <Image Margin="1" Width="16" Height="16"
+ <Image Margin="1" Width="${IconSize}" Height="${IconSize}"
Path="#Crow.Icons.folder.svg" SvgSub="{./IsExpanded}"/>
<Label Text="{./Caption}"/>
</HorizontalStack>
/// does not expose child to allow reuse of container
/// behaviour for widgets that have other xml hierarchy: example
/// TemplatedControl may have 3 children (template,templateItem,content) but
- /// behave exactely as a container for layouting and drawing
+ /// behave exactly as a container for layouting and drawing
/// </summary>
[DesignIgnore]
public class PrivateContainer : Widget
child.Dispose ();
}
- child = _child as Widget;
+ child = _child;
if (child != null) {
child.Parent = this;
}
}
//dispose child if not null
- protected virtual void deleteChild () {
+ /*protected virtual void deleteChild () {
Widget g = child;
SetChild (null);
if (g != null)
g.Dispose ();
- }
+ }*/
#region Widget Overrides
isVisible = value;
- /*if (!isVisible)
- unshownPostActions ();
- RegisterForLayouting (LayoutingType.Sizing);*/
-
if (isVisible){
IsDirty = true;
} else {
<Authors>Jean-Philippe Bruyère</Authors>
<LangVersion>7.3</LangVersion>
- <CrowVersion>1.2.0</CrowVersion>
+ <CrowVersion>1.3.0</CrowVersion>
<CrowPackageVersion>$(CrowVersion)-beta</CrowPackageVersion>
<!-- If you dont have a native libstb on your system, enable the managed version of stb here
<!-- Used only by CrowIDE and CrowEdit-->
<CrowDesignModeEnabled>false</CrowDesignModeEnabled>
- <GlfwSharpVersion>0.2.14</GlfwSharpVersion>
+ <GlfwSharpVersion>0.2.15</GlfwSharpVersion>
</PropertyGroup>
</Project>
<Project>
<PropertyGroup>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net6</TargetFrameworks>
<!--<TargetFrameworks>net5</TargetFrameworks>-->
<OutputType>Exe</OutputType>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
- <OutputType>Exe</OutputType>
- </PropertyGroup>
<ItemGroup>
<PackageReference Include="Crow" />
</ItemGroup>
//Interface.PreferedBackendType = Drawing2D.BackendType.Egl;
using (Program app = new Program ()) {
//app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Label Text='Hello World' Background='Red' Top='50' Margin='0'/>");
- //app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Window Caption='hello world'/>");
+ app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Container Width='Stretched' ><Window Caption='hello world' Background='Jet'/></Container>");
app.Run ();
}
}
- protected override void OnInitialized()
- {
- Load ("/mnt/devel/crow/Samples/HelloWorld/ui/helloworld.crow");
- }
}
}
<?xml version="1.0" encoding="UTF-8"?>
<Window Caption="Showcase" Height="90%" Width="91%" Background="DarkGrey">
<HorizontalStack>
- <VerticalStack Width="30%" Margin="5">
+ <VerticalStack Width="30%" Margin="5" Spacing="10">
<ListBox Data="{PerfMeasures}" Height="Fit">
<Template>
- <GroupBox Caption="Performance">
- <VerticalStack Name="ItemsContainer" Width="90%" Spacing="2"/>
+ <GroupBox Caption="Performance" Margin="10">
+ <VerticalStack Name="ItemsContainer" Spacing="2" Margin="0"/>
</GroupBox>
</Template>
<ItemTemplate>
</ListBox>
<Label Width="Stretched" Margin="3" Background="DimGrey" />
<TextBox Text="TextBox" Multiline="true" Margin="3" />
- <HorizontalStack Height="Fit" Margin="5" Background="DimGrey" CornerRadius="10">
+ <HorizontalStack Height="Fit" Margin="15" Background="Jet" CornerRadius="10">
<VerticalStack Spacing="5" Width="50%">
<CheckBox Fit="true" Caption="test" />
<CheckBox Fit="true" />
<Label Text="MouseEvents" Width="50%" Margin="3" Background="Jet" Foreground="DimGrey" TextAlignment="Center" MouseClick="{Foreground=Green}" MouseDoubleClick="{Foreground=Yellow}" MouseEnter="{Foreground=White}" MouseLeave="{Foreground=DimGrey}" MouseDown="{Background=SeaGreen}" MouseUp="{Background=DimGrey}" />
</HorizontalStack>
<GroupBox Caption="Templated controls" Height="Fit" Margin="5">
- <HorizontalStack Height="Fit">
+ <HorizontalStack Height="Fit" Margin="10">
<VerticalStack Width="50%">
<CheckBox Style="CheckBox2" IsChecked="true" />
<CheckBox Style="CheckBox2" />
<ListItem Margin="1" Width="Stretched"
Selected="{Background=RoyalBlue}"
Unselected="{Background=Transparent}">
- <HorizontalStack Height="Fit" >
- <Widget Width="20" Height="14" Background="{}" CornerRadius="3"/>
- <Label Text="{}" Width="Stretched" />
+ <HorizontalStack Height="Fit" Spacing="10" >
+ <Widget Width="60" Height="40" Background="{}" CornerRadius="3"/>
+ <Label Text="{}" Width="Stretched" Font="Mono, 20" />
</HorizontalStack>
</ListItem>
</ItemTemplate>