--- /dev/null
+//
+// AnalogMeter.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.Xml.Serialization;
+using System.ComponentModel;
+using Cairo;
+
+namespace Crow
+{
+ public class AnalogMeter : NumericControl
+ {
+ #region CTOR
+ protected AnalogMeter () : base(){}
+ public AnalogMeter (Interface iface) : base(iface){}
+ #endregion
+
+ #region GraphicObject Overrides
+ protected override void onDraw (Context gr)
+ {
+ base.onDraw (gr);
+
+ Rectangle r = ClientRectangle;
+ Point m = r.Center;
+
+ gr.Save ();
+
+
+ double aUnit = Math.PI*2.0 / (Maximum - Minimum);
+ gr.Translate (m.X, r.Height *1.1);
+ gr.Rotate (Value/4.0 * aUnit - Math.PI/4.0);
+ gr.Translate (-m.X, -m.Y);
+
+ gr.LineWidth = 2;
+ Foreground.SetAsSource (gr);
+ gr.MoveTo (m.X,0.0);
+ gr.LineTo (m.X, -m.Y*0.5);
+ gr.Stroke ();
+
+ gr.Restore ();
+ }
+ #endregion
+ }
+}
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{6E48BD3D-7B33-4368-AA8A-D878427DAC83}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Crow.ControlsLib</RootNamespace>
+ <AssemblyName>Crow.ControlsLib</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <EmbeddedResource Include="Default.style" />
+ <EmbeddedResource Include="Templates\AnalogMeter0.goml" />
+ <EmbeddedResource Include="Templates\Checkbox2.goml" />
+ <EmbeddedResource Include="Templates\DockingView.template">
+ <LogicalName>Crow.DockingView.template</LogicalName>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Templates\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AnalogMeter.cs" />
+ <Compile Include="DockingView.cs" />
+ <Compile Include="DocksView.cs" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+Button, CheckBox, RadioButton, ComboBox, Expandable,
+MessageBox, Popper, Slider, Spinner, TextBox {
+ Focusable = true;
+ Height = Fit;
+}
+Border {
+ Foreground = Gray;
+}
+CheckBox { Caption = CheckBox; }
+RadioButton { Caption = RadioButton; }
+Expandable { Caption = Expandable; }
+Popper { Caption = Popper; }
+GroupBox { Caption = Group Box; }
+Wrapper {
+ Orientation = Vertical;
+}
+Button {
+ Caption = Button;
+ Width = Fit;
+}
+Label {
+ Height = Fit;
+ Width = Fit;
+ Margin = 0;
+}
+Menu {
+ Margin = 1;
+ Background = vgradient|0:DimGray|1:Onyx;
+ Height = Fit;
+ Width = Stretched;
+ VerticalAlignment = Top;
+}
+MenuItem {
+ Caption = MenuItem;
+ Width = Stretched;
+ Height = Fit;
+ Background = Transparent;
+ Foreground = LightGray;
+ MouseEnter = {Background = vgradient|0:UnitedNationsBlue|1:Onyx;Foreground=White;}
+ MouseLeave = {Foreground=LightGray;Background=Transparent;}
+}
+MessageBox {
+ Background = 0.3,0.3,0.3,0.3;
+ Width = Fit;
+ Title=MessageBox;
+ Font = serif, 12;
+ MinimumSize = 200,120;
+}
+Slider {
+ Background = vgradient|0:Black|0.1:Gray|0.9:Gray|1:LightGray;
+ Foreground = Gray;
+ Width = Fit;
+}
+Splitter {
+ Focusable = true;
+ Background = DimGray;
+}
+Spinner {
+ Foreground = DimGray;
+}
+TabView {
+ CacheEnabled = false;
+}
+TabItem {
+ Caption = TabItem;
+ Focusable = true;
+ CacheEnabled = false;
+}
+TextBox {
+ Background = White;
+ Foreground = Black;
+ Selectable = True;
+ Text = TextBox;
+ Margin = 1;
+}
+Window {
+ Caption = Window;
+ Focusable = true;
+ MinimumSize=5,5;
+ Width = 150;
+ Height = 150;
+}
+ToolWindow {
+ Caption = Window;
+ Template = #Crow.ToolWindow.template;
+ Focusable = true;
+ MinimumSize=50,50;
+ Width = 150;
+ Height = 150;
+}
+DocksView {
+ AllowDrop = true;
+}
+DockingView {
+ Focusable = true;
+ AllowDrag = true;
+}
+FileDialog {
+ Template = #Crow.FileDialog.template;
+ Focusable = true;
+ MinimumSize=50,50;
+ Width = 500;
+ Height = 300;
+}
+ProgressBar {
+ Foreground = vgradient|0:BlueCrayola|0.5:SkyBlue|1:BlueCrayola;
+}
+ScrollBar {
+ Maximum = 0;
+ Value = 0;
+}
+Scroller {
+ CacheEnabled = false;
+}
+Icon {
+ Margin=1;
+ Width=12;
+ Height=12;
+}
+Control {
+ Margin=0;
+ Spacing=3;
+}
+SaturationValueSelector {
+ Foreground=Red;
+}
+HueSelector {
+ ClipToClientRect=False;
+}
+ColorSpinner {
+ Minimum = 0;
+ Maximum = 255;
+ SmallIncrement = 1;
+}
+HSVSpinner {
+ Minimum = 0;
+ Maximum = 1;
+ SmallIncrement = 0.01;
+}
\ No newline at end of file
--- /dev/null
+//
+// DockingView.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;
+
+namespace Crow
+{
+ public class DockingView : Window
+ {
+ #region CTOR
+ protected DockingView() : base ()
+ {
+ }
+ #endregion
+
+ bool isDocked = false;
+ Alignment docking = Alignment.Center;
+
+ Point lastMousePos; //last known mouse pos in this control
+ Point undockingMousePosOrig; //mouse pos when docking was donne, use for undocking on mouse move
+ Rectangle savedSlot; //last undocked slot recalled when view is undocked
+ bool wasResizable;
+
+ public DocksView docker;
+
+ public override void OnLayoutChanges (LayoutingType layoutType)
+ {
+ base.OnLayoutChanges (layoutType);
+
+ if (isDocked)
+ return;
+
+ if (docker == null)
+ return;
+
+ Rectangle dvCliRect = docker.ClientRectangle;
+
+ if (layoutType == LayoutingType.X) {
+ if (Slot.X < docker.DockingThreshold)
+ dock (Alignment.Left);
+ else if (Slot.Right > dvCliRect.Width - docker.DockingThreshold)
+ dock (Alignment.Right);
+ }else if (layoutType == LayoutingType.Y) {
+ if (Slot.Y < docker.DockingThreshold)
+ dock (Alignment.Top);
+ else if (Slot.Bottom > dvCliRect.Height - docker.DockingThreshold)
+ dock (Alignment.Bottom);
+ }
+ }
+
+ public override void onMouseMove (object sender, MouseMoveEventArgs e)
+ {
+ lastMousePos = e.Position;
+
+ if (this.HasFocus && e.Mouse.IsButtonDown (MouseButton.Left) && isDocked) {
+ if (docking == Alignment.Left) {
+ if (lastMousePos.X - undockingMousePosOrig.X > docker.DockingThreshold)
+ undock ();
+ } else if (docking == Alignment.Right) {
+ if (undockingMousePosOrig.X - lastMousePos.X > docker.DockingThreshold)
+ undock ();
+ } else if (docking == Alignment.Top) {
+ if (lastMousePos.Y - undockingMousePosOrig.Y > docker.DockingThreshold)
+ undock ();
+ } else if (docking == Alignment.Bottom) {
+ if (undockingMousePosOrig.Y - lastMousePos.Y > docker.DockingThreshold)
+ undock ();
+ }
+ return;
+ }
+
+ base.onMouseMove (sender, e);
+ }
+ public override void onMouseDown (object sender, MouseButtonEventArgs e)
+ {
+ base.onMouseDown (sender, e);
+
+ if (this.HasFocus && isDocked && e.Button == MouseButton.Left)
+ undockingMousePosOrig = lastMousePos;
+ }
+
+// protected override void onBorderMouseEnter (object sender, MouseMoveEventArgs e)
+// {
+// base.onBorderMouseEnter (sender, e);
+//
+// if (isDocked) {
+// switch (docking) {
+// case Alignment.Top:
+// if (this.currentDirection != Window.Direction.S)
+// onBorderMouseLeave (this, null);
+// break;
+// case Alignment.Left:
+// if (this.currentDirection != Window.Direction.E)
+// onBorderMouseLeave (this, null);
+// break;
+// case Alignment.TopLeft:
+// break;
+// case Alignment.Right:
+// if (this.currentDirection != Window.Direction.W)
+// onBorderMouseLeave (this, null);
+// break;
+// case Alignment.TopRight:
+// break;
+// case Alignment.Bottom:
+// if (this.currentDirection != Window.Direction.N)
+// onBorderMouseLeave (this, null);
+// break;
+// case Alignment.BottomLeft:
+// break;
+// case Alignment.BottomRight:
+// break;
+// case Alignment.Center:
+// break;
+// default:
+// break;
+// }
+// }
+// }
+
+ void undock () {
+ docker.Undock(this);
+
+ this.Left = savedSlot.Left;
+ this.Top = savedSlot.Top;
+ this.Width = savedSlot.Width;
+ this.Height = savedSlot.Height;
+
+ isDocked = false;
+ Resizable = wasResizable;
+ }
+ void dock (Alignment align){
+ this.Left = this.Top = 0;
+ isDocked = true;
+ docking = align;
+ undockingMousePosOrig = lastMousePos;
+ savedSlot = this.LastPaintedSlot;
+ wasResizable = Resizable;
+ Resizable = false;
+
+ docker.Dock (this, align);
+ }
+ }
+}
+
--- /dev/null
+//
+// DocksView.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.Xml.Serialization;
+using System.ComponentModel;
+using System.Collections.Generic;
+
+namespace Crow
+{
+ public class DocksView : Group
+ {
+ List<DockingView> childViews = new List<DockingView>();
+ GenericStack rootStack = null;
+
+ public override void AddChild (GraphicObject g)
+ {
+ DockingView dv = g as DockingView;
+ if (g == null)
+ throw new Exception ("DocksView accept only DockingView as child");
+ base.AddChild (g);
+ childViews.Add (dv);
+ dv.docker = this;
+ }
+ public override void RemoveChild (GraphicObject child)
+ {
+ DockingView dv = child as DockingView;
+ if (child == null)
+ throw new Exception ("DocksView accept only DockingView as child");
+ base.RemoveChild (child);
+ childViews.Remove (dv);
+ dv.docker = this;
+ }
+ public void Dock (DockingView dv, Alignment pos){
+ switch (pos) {
+ case Alignment.Top:
+ if (rootStack?.Orientation != Orientation.Vertical)
+ this.Width = Measure.Stretched;
+ break;
+ case Alignment.Bottom:
+ this.Width = Measure.Stretched;
+ break;
+ case Alignment.Left:
+ this.Height = Measure.Stretched;
+ break;
+ case Alignment.Right:
+ this.Height = Measure.Stretched;
+ break;
+ }
+ }
+ public void Undock (DockingView dv){
+ }
+
+ int dockingThreshold;
+
+ [XmlAttributeAttribute][DefaultValue(10)]
+ public virtual int DockingThreshold {
+ get { return dockingThreshold; }
+ set {
+ if (dockingThreshold == value)
+ return;
+ dockingThreshold = value;
+ NotifyValueChanged ("DockingThreshold", dockingThreshold);
+
+ }
+ }
+ }
+}
+
--- /dev/null
+<?xml version="1.0"?>
+<Group Margin="0" Width="-1" Height="-1" Focusable="false">
+ <Image Name="Image" Path="#go.Images.meter.svg" SvgSub="background"/>
+<!-- <Image Name="Image" Path="#go.Images.meter.svg" SvgSub="gauge"/>-->
+</Group>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Margin="0" Spacing="1" Focusable="false">
+ <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>
+ <Label Name="Caption" Background="Red"/>
+</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+ Background="{./Background}"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Spacing="0">
+<!-- <Border Name="TitleBar" BorderWidth="1" 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 Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
+ Name="hs" Margin="2" Spacing="0" Height="Fit">
+ <GraphicObject Width="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
+ <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="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+<!-- </Border>-->
+ <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
+ </VerticalStack>
+</Border>
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Margin="1" MinimumSize="10,10">
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true">
+ <VerticalStack
+ Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+</Border>
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Name="ItemsContainer" Margin="0" Background="{./Background}"/>
--- /dev/null
+<?xml version="1.0"?>
+<Popper Font="{./Font}" Caption="{./Caption}" Background="{./Background}" PopDirection="{./PopDirection}"
+ Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseClick="./onMI_Click"
+ IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}">
+ <Template>
+ <Border Name="border1"
+ MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+ MouseLeave="{Foreground=Transparent}"
+ 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}"
+ MinimumSize = "60,0"
+ Foreground="Transparent"
+ Background="{./Background}">
+ <Label Text="{./Caption}"
+ Foreground="{./Foreground}"
+ Margin="1" HorizontalAlignment="Left"
+ Font="{./Font}" />
+ </Border>
+ </Template>
+ <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
+ <VerticalStack Name="ItemsContainer"/>
+ </Border>
+</Popper>
--- /dev/null
+<?xml version="1.0"?>
+<Border CornerRadius="0"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Background="{./Background}">
+ <Border BorderWidth="0" Foreground="White" Height="Fit" Width="Stretched" MinimumSize="200,0"
+ 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" Height="Fit" >
+ <GraphicObject Width="5" Height="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
+ <Border CornerRadius="3" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5" Height="5"/>
+ </HorizontalStack>
+ </Border>
+ <HorizontalStack Margin="5">
+ <Image Name="Image" Width="20%" Height="30" Path="{./MsgIcon}" />
+ <Label Margin="5" Font="{./Font}" Width="Fit" Text="{./Message}"
+ TextAlignment="Left"
+ Multiline="true" />
+ </HorizontalStack>
+ <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
+ <Button Width="50%" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" />
+ <Button Width="50%" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" />
+ </HorizontalStack>
+ </VerticalStack>
+</Border>
--- /dev/null
+<?xml version="1.0"?>
+<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit">
+ <HorizontalStack Spacing="1" Height="Fit">
+ <Image Style="Icon" Margin="1" Width="9" Height="9"
+ Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
+ <Label Text="{./Caption}" />
+ </HorizontalStack>
+</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Style="Control" Background="{./Background}">
+ <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
+ SvgSub="{./IsChecked}"/>
+ <Label Text="{./Caption}"/>
+</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="LightGray">
+ <GenericStack Orientation="{./Orientation}" Spacing="0">
+ <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
+ </Button>
+ <Slider Name="Slider"
+ Orientation="{./Orientation}"
+ Value="{²./Value}"
+ Maximum="{./Maximum}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ LargeIncrement="{./LargeIncrement}"
+ SmallIncrement="{./SmallIncrement}"
+ Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
+ <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+ </Button>
+ </GenericStack>
+</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Background="{./Background}">
+ <HorizontalStack Margin="1">
+ <Scroller Name="scroller1"
+ Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
+ <VerticalStack Height="Fit" MinimumSize="10,10"
+ Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+ <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+ Width="14" />
+ </HorizontalStack>
+</Border>
--- /dev/null
+<?xml version="1.0"?>
--- /dev/null
+<?xml version="1.0"?>
+<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
+ <HorizontalStack Name="hstack" Margin="0" Spacing="5">
+ <Label Name="labCpt" Text="55"/>
+ <VerticalStack Spacing="1" Name="vstack">
+ <Button Width="10" Height="8" MouseClick="onUp">
+ <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
+ </Button>
+ <Button Width="10" Height="8" MouseClick="onDown">
+ <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
+ </Button>
+ </VerticalStack>
+ </HorizontalStack>
+</Border>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0">
+ <Border BorderWidth="1" Width="80%" Background="White"
+ Foreground="{./Foreground}" Margin="0">
+ <TextBox Foreground="{./Foreground}" Font="{./Font}" Width="Stretched"
+ Text="{²./Value}" TextAlignment="Right" Margin="0"/>
+ </Border>
+ <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
+ <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
+ </Button>
+ <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown"
+ Template="#Crow.Templates.ArrowButTemplate.crow">
+ <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
+ </Button>
+ </VerticalStack>
+</HorizontalStack>
--- /dev/null
+<?xml version="1.0"?>
+<GenericStack Orientation="Vertical" Spacing="0"
+ Background="Onyx"
+ MouseEnter="{caption.Foreground=White}"
+ MouseLeave="{caption.Foreground=Gray}">
+ <HorizontalStack Margin="2" Left="{./TabOffset}"
+ Name="TabTitle"
+ HorizontalAlignment="Left"
+ Height="{./TabThickness}"
+ Width="Fit">
+ <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"
+ MouseClick="./butCloseTabClick"/>
+ </Border>
+ </HorizontalStack>
+ <Container Name="Content"/>
+</GenericStack>
+
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+ Background="{./Background}"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Spacing="0">
+<!-- <Border Name="TitleBar" BorderWidth="1" 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 Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
+ Name="hs" Margin="2" Spacing="0" Height="Fit">
+ <GraphicObject Width="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
+ <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="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+<!-- </Border>-->
+ <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
+ </VerticalStack>
+</Border>
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack>
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
+ Background="{./Background}"
+ ScrollY="{../scrollbar1.Value}">
+ <VerticalStack
+ Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+ <ScrollBar
+ Name="scrollbar1"
+ Value="{../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}"
+ Width="14" Orientation="Vertical"/>
+</HorizontalStack>
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+ Background="{./Background}"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Spacing="0">
+<!-- <Border Name="TitleBar" BorderWidth="1" 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 Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
+ Name="hs" Margin="2" Spacing="0" Height="Fit">
+ <GraphicObject Width="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Width="Stretched" Foreground="White" Margin="2" TextAlignment="Center" Text="{./Caption}" />
+ <Border Visible="{./ShowMinimize}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Path="#Crow.Images.Icons.minimize.svg"
+ MouseClick="./onMinimized"/>
+ </Border>
+ <Border Visible="{./ShowNormal}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Path="#Crow.Images.Icons.normalize.svg"
+ MouseClick="./onUnmaximized"/>
+ </Border>
+ <Border Visible="{./ShowMaximize}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Path="#Crow.Images.Icons.maximize.svg"
+ MouseClick="./onMaximized"/>
+ </Border>
+ <Border BorderWidth="1" Foreground="Transparent" Height="14" Width="14"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Path="#Crow.Images.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+<!-- </Border>-->
+ <Container Name="Content" MinimumSize="0,0" Background="0.5,0.5,0.5,0.5"/>
+ </VerticalStack>
+</Border>
--- /dev/null
+<?xml version="1.0"?>
+ <VerticalStack Width="0" Height="-1" Focusable="true"
+ MouseEnter="{Background=BlueCrayola}"
+ MouseLeave="{Background=Transparent}">
+ <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
+ <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
+ </VerticalStack>
+
--- /dev/null
+<?xml version="1.0"?>
+ <HorizontalStack Width="-1" Height="-1" Focusable="true"
+ HorizontalAlignment="Left"
+ MouseEnter="{Background=BlueCrayola}"
+ MouseLeave="{Background=Transparent}">
+ <Image Width="16" Height="16" Path="#Tests.image.folder1.svg" SvgSub="{Attributes}"/>
+ <Label Text="{Name}" Width="-1" Height="-1" Margin="0"/>
+<!-- <Label Text="{Attributes}" Width="-1" Height="-1" Margin="0"/>
+ <Label Text="{Extension}" Width="-1" Height="-1" Margin="0"/>-->
+ </HorizontalStack>
+
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack
+ Height="Fit" Name="ItemsContainer"/>
<package >
<metadata>
<id>Crow.OpenTK</id>
- <version>0.5.6</version>
+ <version>0.6.0-pre1</version>
<title>C# Rapid Open Widget Toolkit</title>
<authors>JP Bruyere</authors>
<owners>Grand Tetras Software</owners>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
- <projectUrl>https://jpbruyere.github.io/Crow/</projectUrl>
+ <projectUrl>https://github.com/jpbruyere/Crow/wiki</projectUrl>
<iconUrl>https://jpbruyere.github.io/Crow/images/crow.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
-CROW is a pure C# widget toolkit with templates, styles, compositing, and bindings.
+C.R.O.W. is a widget toolkit and rendering engine entirely developed in C# with templates, styles, compositing, and bindings.
Crow.OpenTK is the OpenTK ready version.
</description>
<summary>
-CROW is a pure C# widget toolkit with templates, styles, compositing, and bindings.
-Crow.OpenTK is the OpenTK ready version.
-
-Native libraries dependencies:
- - cairo
- - librsvg (and its dependencies (glib2, libxml, fontconfig, etc)
-
-Precompiled binaries of those libs are available at http://ftp.gnome.org/pub/GNOME/binaries/
-For more information, please visit https://jpbruyere.github.io/Crow/.
</summary>
<releaseNotes>
- - Bug fix (#35) of 0.5.4
- - embed Cairo bindings in Crow.
- - use of CairoRegion to handle clipping
- - IDisposable for GraphicObject
- - Border style Raised/Sunken
+ - Bug fix #36
+ - group item templates in single file
+ - instantiation from code clarification
+ - Only run on mono >= 5.0
+ - Cairo mesh patterns support.
+ - Image resources sharing among controls.
</releaseNotes>
<copyright>Copyright 2013-2017</copyright>
<dependencies>
- <dependency id="OpenTK" version="2.0" />
+ <dependency id="OpenTK" version="3.0.0-git00041" />
</dependencies>
<tags>Crow OpenTK OpenGL Widget Interface GUI C# .Net Mono</tags>
<references>
<Compile Include="src\Enums.cs" />
<Compile Include="src\GraphicObjects\GenericStack.cs" />
<Compile Include="src\CompilerServices\CompilerServices.cs" />
- <Compile Include="src\GraphicObjects\AnalogMeter.cs" />
<Compile Include="src\GraphicObjects\Border.cs" />
<Compile Include="src\Font.cs" />
<Compile Include="src\GraphicObjects\Window.cs" />
<Compile Include="src\Mono.Cairo\Win32Surface.cs" />
<Compile Include="src\Mono.Cairo\XcbSurface.cs" />
<Compile Include="src\Mono.Cairo\XlibSurface.cs" />
- <Compile Include="src\GraphicObjects\DocksView.cs" />
- <Compile Include="src\GraphicObjects\DockingView.cs" />
<Compile Include="src\IML\IMLContext.cs" />
<Compile Include="src\Mono.Cairo\MeshPattern.cs" />
</ItemGroup>
<EmbeddedResource Include="Images\Icons\buttonB.svg" />
<EmbeddedResource Include="Images\Icons\checkbox.svg" />
<EmbeddedResource Include="Images\Icons\radiobutton.svg" />
- <EmbeddedResource Include="Templates\Spinner %28copier%29.goml" />
<EmbeddedResource Include="Images\Icons\expandable.svg" />
- <EmbeddedResource Include="Templates\Checkbox2.goml" />
<EmbeddedResource Include="Images\Icons\tetra.png" />
<EmbeddedResource Include="Images\Icons\exit.svg" />
- <EmbeddedResource Include="Templates\AnalogMeter0.goml" />
<EmbeddedResource Include="Images\meter.svg" />
<EmbeddedResource Include="Images\Icons\member.svg" />
<EmbeddedResource Include="Images\Icons\exit2.svg" />
<EmbeddedResource Include="Images\Icons\iconInfo.svg">
<LogicalName>Crow.Images.Icons.Informations.svg</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="Templates\tmpDirItem.goml" />
- <EmbeddedResource Include="Templates\ScrollingListBox.goml" />
- <EmbeddedResource Include="Templates\imgItemTemplate.goml" />
<EmbeddedResource Include="Images\Icons\Cursors\cross" />
<EmbeddedResource Include="Images\Icons\Cursors\bottom_left_corner" />
<EmbeddedResource Include="Images\Icons\Cursors\bottom_right_corner" />
<EmbeddedResource Include="Images\Icons\Cursors\hand" />
<EmbeddedResource Include="Images\Icons\Cursors\help" />
<EmbeddedResource Include="Images\Icons\Cursors\move" />
- <EmbeddedResource Include="Templates\ArrowButTemplate.crow" />
<EmbeddedResource Include="Images\crow0.svg" />
- <EmbeddedResource Include="Templates\Dummy.goml" />
<EmbeddedResource Include="Images\Icons\crow.png" />
<EmbeddedResource Include="Images\Icons\crow.svg" />
<EmbeddedResource Include="Default.style" />
<LogicalName>Crow.Window.template</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Images\Icons\Cursors\ibeam" />
- <EmbeddedResource Include="Templates\treeList.crow" />
<EmbeddedResource Include="Templates\MenuItem.template">
<LogicalName>Crow.MenuItem.template</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Icons\exit-symbol.svg" />
<EmbeddedResource Include="Icons\paste-on-document.svg" />
<EmbeddedResource Include="Icons\question.svg" />
- <EmbeddedResource Include="Templates\FileDialog2.template">
- <LogicalName>Crow.FileDialog2.template</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="Icons\folder.svg" />
<EmbeddedResource Include="Icons\file.svg" />
<EmbeddedResource Include="Icons\level-up.svg" />
- <EmbeddedResource Include="Templates\DockingView.template">
- <LogicalName>Crow.DockingView.template</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="Templates\FileItems.template" />
<EmbeddedResource Include="Templates\DefaultItem.template">
<LogicalName>Crow.DefaultItem.template</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="Templates\ScrollingListBox.template" />
+ <EmbeddedResource Include="Templates\imgItem.template" />
+ <EmbeddedResource Include="Templates\ArrowBut.template" />
+ <EmbeddedResource Include="Templates\treeList.template" />
</ItemGroup>
<ItemGroup>
<None Include="Crow.dll.config">
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow.Test.csproj", "{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.ControlsLib", "Crow.ControlsLib\Crow.ControlsLib.csproj", "{6E48BD3D-7B33-4368-AA8A-D878427DAC83}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Release|Any CPU.Build.0 = Release|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU
- {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.StandardHeader = $1
$1.Text = @\n${FileName}\n \nAuthor:\n ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) 2013-2017 Jean-Philippe Bruyère\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.
+ $1.IncludeInNewFiles = True
$0.DotNetNamingPolicy = $2
+ $2.DirectoryNamespaceAssociation = None
+ $2.ResourceNamePolicy = FileFormatDefault
$0.TextStylePolicy = $3
+ $3.FileWidth = 120
+ $3.TabsToSpaces = False
$3.EolMarker = Unix
+ $3.inheritsSet = VisualStudio
+ $3.inheritsScope = text/plain
$3.scope = text/x-csharp
$0.CSharpFormattingPolicy = $4
$4.AfterDelegateDeclarationParameterComma = True
+ $4.inheritsSet = Mono
+ $4.inheritsScope = text/x-csharp
$4.scope = text/x-csharp
- $4.IndentSwitchSection = False
- $4.NewLinesForBracesInProperties = False
- $4.NewLinesForBracesInAccessors = False
- $4.NewLinesForBracesInAnonymousMethods = False
- $4.NewLinesForBracesInControlBlocks = False
- $4.NewLinesForBracesInAnonymousTypes = False
- $4.NewLinesForBracesInObjectCollectionArrayInitializers = False
- $4.NewLinesForBracesInLambdaExpressionBody = False
- $4.NewLineForElse = False
- $4.NewLineForCatch = False
- $4.NewLineForFinally = False
- $4.NewLineForMembersInObjectInit = False
- $4.NewLineForMembersInAnonymousTypes = False
- $4.NewLineForClausesInQuery = False
- $4.SpacingAfterMethodDeclarationName = True
- $4.SpaceAfterMethodCallName = True
- $4.SpaceBeforeOpenSquareBracket = True
$0.VersionControlPolicy = $5
$5.CommitMessageStyle = $6
$6.Indent = @\t
$6.FileSeparator = ", "
$6.LastFilePostfix = "@:\n "
+ $6.LineAlign = 0
$6.Wrap = False
+ $5.inheritsSet = Mono
description = @C.R.O.W. c# Rapid Open Widgets\n\nCrow is a pure c# widget toolkit with XML definition of interface, bindings, styling...\n
version = 0.5
EndGlobalSection
C# Rapid Open Widgets
<br>
<p align="center">
+ <a href="https://gitter.im/CSharpRapidOpenWidgets?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
+ <img src="https://badges.gitter.im/CSharpRapidOpenWidgets.svg">
+ </a>
<a href="https://www.paypal.me/GrandTetraSoftware">
<img src="https://img.shields.io/badge/Donate-PayPal-green.svg">
</a>
</h1>
## Presentation
-**C.R.O.W.** is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit) and
-rendering engine entirely developed in **C#**, offering a nice trade-off between
-complexity of language and performances. Crow provides a declarative interface language
-with styling and templates
-called [IML](interface-markup-language) for **Interface Markup Language** similar to
-[XAML](https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) and a binding system
-for easy c# code linking.
+**C.R.O.W.** is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit) and rendering engine entirely developed in **C#**, offering a nice trade-off between complexity of language and performances. Crow provides a declarative interface language with styling and templates called [IML](interface-markup-language) for **Interface Markup Language** similar to [XAML](https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) and a binding system for easy c# code linking.
<p align="center">
<a href="https://github.com/jpbruyere/Crow/blob/master/Images/screenshot.png">
<img src="https://github.com/jpbruyere/Crow/blob/master/Images/screenshot.png" width="400">
- SVG rendering (with [rsvg library](https://developer.gnome.org/rsvg/))
#### Documentation
-* [Introduction](https://github.com/jpbruyere/Crow/wiki/Global-architecture)
+* [Introduction](https://github.com/jpbruyere/Crow/wiki)
* [Classes documentation autogenerated from doxygen](https://github.com/jpbruyere/Crow/wiki/index)
* [Tutorials](https://github.com/jpbruyere/Crow/wiki/Tutorials)
+++ /dev/null
-<?xml version="1.0"?>
-<Group Margin="0" Width="-1" Height="-1" Focusable="false">
- <Image Name="Image" Path="#go.Images.meter.svg" SvgSub="background"/>
-<!-- <Image Name="Image" Path="#go.Images.meter.svg" SvgSub="gauge"/>-->
-</Group>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border Name="Content"
+ Background="vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black" Foreground="DarkGray"
+ MouseEnter="{Foreground=White}"
+ MouseLeave="{Foreground=DarkGray}"
+ MouseDown="{Background=vgradient|0:Black|0.1:LightGray|0.9:LightGray|1:White}"
+ MouseUp="{Background=vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black}"
+ >
+</Border>
+++ /dev/null
-<?xml version="1.0"?>
-<Border Name="Content"
- Background="vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black" Foreground="DarkGray"
- MouseEnter="{Foreground=White}"
- MouseLeave="{Foreground=DarkGray}"
- MouseDown="{Background=vgradient|0:Black|0.1:LightGray|0.9:LightGray|1:White}"
- MouseUp="{Background=vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black}"
- >
-</Border>
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack Margin="0" Spacing="1" Focusable="false">
- <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>
- <Label Name="Caption" Background="Red"/>
-</HorizontalStack>
\ No newline at end of file
<TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
Text="{../../../../SelectedItem}"/>
<Button Width="14" Height="14" Focusable="false"
- Template="#Crow.Templates.ArrowButTemplate.crow">
+ Template="#Crow.Templates.ArrowBut.template">
<Image Margin="0" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
</Button>
</HorizontalStack>
<HorizontalStack Height="Fit">
<GraphicObject Width="12" Height="10"/>
<TreeView Name="List" Height="Fit"
- Template="#Crow.Templates.treeList.crow" />
+ Template="#Crow.Templates.treeList.template" />
</HorizontalStack>
</Expandable>
</ItemTemplate>
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
- Background="{./Background}"
- MouseEnter="./onBorderMouseEnter"
- MouseLeave="./onBorderMouseLeave">
- <VerticalStack Spacing="0">
-<!-- <Border Name="TitleBar" BorderWidth="1" 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 Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
- Name="hs" Margin="2" Spacing="0" Height="Fit">
- <GraphicObject Width="5"/>
- <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
- <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
- <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="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
- MouseClick="./butQuitPress"/>
- </Border>
- <GraphicObject Width="5"/>
- </HorizontalStack>
-<!-- </Border>-->
- <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
- </VerticalStack>
-</Border>
+++ /dev/null
-<?xml version="1.0"?>
-<!--<Group Margin="5" Background="Red" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
-<Label Margin="0" Text="DUMMY2" Background="Green" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/>
-</Group>-->
-<HorizontalStack Margin="5" Background="Red" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
- <Label Margin="0" Text="DUMMY" Background="Blue" Height="{../../HeightPolicy}" Width="20"/>
- <Label Margin="0" Text="DUMMY2" Background="Green" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/>
-</HorizontalStack>
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
- Background="{./Background}"
- MouseEnter="./onBorderMouseEnter"
- MouseLeave="./onBorderMouseLeave">
- <VerticalStack Spacing="0">
- <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
- Name="hs" Margin="2" Spacing="0" Height="Fit">
- <GraphicObject Width="5"/>
- <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
- <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
- <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="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
- MouseClick="./butQuitPress"/>
- </Border>
- <GraphicObject Width="5"/>
- </HorizontalStack>
- <Container Name="Content" MinimumSize="50,50" Background="Onyx">
- <VerticalStack Margin="1">
- <HorizontalStack Height="Fit">
- <Button Caption="Up" MouseClick="./goUpDirClick"/>
- <TextBox Text="{²./CurrentDirectory}"/>
- </HorizontalStack>
- <HorizontalStack Spacing="1">
- <DirectoryView ShowFiles="false" Name="dv" CurrentDirectory="{²./CurrentDirectory}" Width="50%" Margin="0"
- SelectedItemChanged="./onFVSelectedItemChanged">
- <Template>
- <TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}"
- SelectedItemChanged="./onSelectedItemChanged">
- <ItemTemplate DataType="System.IO.FileInfo">
- <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Icons.file.svg"/>
- <Label Text="{Name}" Width="Stretched"
- MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
- MouseLeave="{Background=Transparent}"/>
- </HorizontalStack>
- </ItemTemplate>
- <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetDirectories">
- <Expandable Caption="{Name}" >
- <Template>
- <VerticalStack>
- <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand"
- MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
- MouseLeave="{Background=Transparent}">
- <Container Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
- MouseEnter="{Background=LightGray}"
- MouseLeave="{Background=Transparent}">
- <Image
- Path="{./Image}"
- Visible="{./IsExpandable}"
- SvgSub="{./IsExpanded}"/>
- </Container>
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Icons.folder.svg"/>
- <Label Text="{./Caption}"/>
- </HorizontalStack>
- <Container Name="Content" Visible="false"/>
- </VerticalStack>
- </Template>
- <HorizontalStack Height="Fit">
- <GraphicObject Width="12" Height="10"/>
- <TreeView Name="List" Height="Fit"
- Template="#Crow.Templates.treeList.crow" />
- </HorizontalStack>
- </Expandable>
- </ItemTemplate>
- </TreeView>
- </Template>
- </DirectoryView>
- <Splitter/>
- <DirectoryView ShowFiles="true" Name="fv" CurrentDirectory="{./SelectedDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
- Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
- <Template>
- <ListBox Name="fileView" Data="{./FileSystemEntries}" SelectedItemChanged="./onSelectedItemChanged">
- <Template>
- <VerticalStack>
- <Scroller ScrollX="{../scrollbar1.Value}" Name="scroller1"
- VerticalScrolling="False" HorizontalScrolling="true">
- <Wrapper Orientation="Horizontal" Width="Fit" HorizontalAlignment="Left"
- Name="ItemsContainer" Margin="0" Spacing="1"/>
- </Scroller>
- <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollX}"
- Maximum="{../scroller1.MaximumScroll}" Orientation="Horizontal"
- Height="14" />
- </VerticalStack>
- </Template>
- <ItemTemplate DataType="System.IO.FileInfo">
- <HorizontalStack Focusable="true" Height="Fit" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Icons.file.svg"/>
- <Label Text="{Name}"
- MouseEnter="{Background=BlueCrayola}"
- MouseLeave="{Background=Transparent}"/>
- </HorizontalStack>
- </ItemTemplate>
- <ItemTemplate DataType="System.IO.DirectoryInfo">
- <HorizontalStack Focusable="true" Height="Fit" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Icons.folder.svg"/>
- <Label Text="{Name}"
- MouseEnter="{Background=BlueCrayola}"
- MouseLeave="{Background=Transparent}"/>
- </HorizontalStack>
- </ItemTemplate>
- </ListBox>
- </Template>
- </DirectoryView>
- </HorizontalStack>
- <TextBox Text="{./SelectedDirectory}"/>
- <TextBox Text="{²./SelectedFile}"/>
- <HorizontalStack Fit="true" HorizontalAlignment="Right">
- <Button Caption="Ok" MouseClick="./onFileSelect"/>
- <Button Caption="Cancel" MouseClick="./onCancel"/>
- </HorizontalStack>
- </VerticalStack>
- </Container>
- </VerticalStack>
-</Border>
</HorizontalStack>
</Border>
<HorizontalStack Margin="5">
- <Image Name="Image" Width="20%" Height="30" Path="{./MsgIcon}" />
+ <Image Name="Image" Width="50" Height="30" Path="{./MsgIcon}" />
<Label Margin="5" Font="{./Font}" Width="Fit" Text="{./Message}"
TextAlignment="Left"
Multiline="true" />
</HorizontalStack>
- <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
- <Button Width="50%" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" />
- <Button Width="50%" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" />
+ <HorizontalStack Margin="1" Spacing="0" Width="Fit" Height="Fit" HorizontalAlignment="Right">
+ <Button Width="Fit" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" />
+ <Button Width="Fit" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" />
</HorizontalStack>
</VerticalStack>
</Border>
<Border BorderWidth="1" Foreground="LightGray">
<GenericStack Orientation="{./Orientation}" Spacing="0">
<Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
- Template="#Crow.Templates.ArrowButTemplate.crow">
+ Template="#Crow.Templates.ArrowBut.template">
<Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
</Button>
<Slider Name="Slider"
SmallIncrement="{./SmallIncrement}"
Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
<Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
- Template="#Crow.Templates.ArrowButTemplate.crow">
+ Template="#Crow.Templates.ArrowBut.template">
<Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
</Button>
</GenericStack>
+++ /dev/null
-<?xml version="1.0"?>
-<Border BorderWidth="1" Background="{./Background}">
- <HorizontalStack Margin="1">
- <Scroller Name="scroller1"
- Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
- <VerticalStack Height="Fit" MinimumSize="10,10"
- Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
- </Scroller>
- <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
- Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
- Width="14" />
- </HorizontalStack>
-</Border>
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Background="{./Background}">
+ <HorizontalStack Margin="1">
+ <Scroller Name="scroller1"
+ Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
+ <VerticalStack Height="Fit" MinimumSize="10,10"
+ Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+ <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+ Width="14" />
+ </HorizontalStack>
+</Border>
+++ /dev/null
-<?xml version="1.0"?>
-<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
- <HorizontalStack Name="hstack" Margin="0" Spacing="5">
- <Label Name="labCpt" Text="55"/>
- <VerticalStack Spacing="1" Name="vstack">
- <Button Width="10" Height="8" MouseClick="onUp">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
- </Button>
- <Button Width="10" Height="8" MouseClick="onDown">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
- </Button>
- </VerticalStack>
- </HorizontalStack>
-</Border>
\ No newline at end of file
</Border>
<VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
<Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
- Template="#Crow.Templates.ArrowButTemplate.crow">
+ Template="#Crow.Templates.ArrowBut.template">
<Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
</Button>
<Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown"
- Template="#Crow.Templates.ArrowButTemplate.crow">
+ Template="#Crow.Templates.ArrowBut.template">
<Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
</Button>
</VerticalStack>
--- /dev/null
+<?xml version="1.0"?>
+ <VerticalStack Width="0" Height="-1" Focusable="true"
+ MouseEnter="{Background=BlueCrayola}"
+ MouseLeave="{Background=Transparent}">
+ <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
+ <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
+ </VerticalStack>
+
+++ /dev/null
-<?xml version="1.0"?>
- <VerticalStack Width="0" Height="-1" Focusable="true"
- MouseEnter="{Background=BlueCrayola}"
- MouseLeave="{Background=Transparent}">
- <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
- <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
- </VerticalStack>
-
+++ /dev/null
-<?xml version="1.0"?>
- <HorizontalStack Width="-1" Height="-1" Focusable="true"
- HorizontalAlignment="Left"
- MouseEnter="{Background=BlueCrayola}"
- MouseLeave="{Background=Transparent}">
- <Image Width="16" Height="16" Path="#Tests.image.folder1.svg" SvgSub="{Attributes}"/>
- <Label Text="{Name}" Width="-1" Height="-1" Margin="0"/>
-<!-- <Label Text="{Attributes}" Width="-1" Height="-1" Margin="0"/>
- <Label Text="{Extension}" Width="-1" Height="-1" Margin="0"/>-->
- </HorizontalStack>
-
+++ /dev/null
-<?xml version="1.0"?>
-<VerticalStack
- Height="Fit" Name="ItemsContainer"/>
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack
+ Height="Fit" Name="ItemsContainer"/>
--- /dev/null
+//
+// SimpleGauge.cs
+//
+// Author:
+// jp <>
+//
+// 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 Crow;
+using Cairo;
+
+namespace Tutorials2
+{
+ /// <summary>
+ /// Hexa container.
+ /// </summary>
+ /// <remarks>
+ /// </remarks>
+ public class HexaContainer : Container
+ {
+ const double pi3 = Math.PI / 3.0;
+
+ public HexaContainer () : base() {}
+ public HexaContainer (Interface iface): base (iface){}
+
+ protected override void onDraw (Context gr)
+ {
+ gr.Save ();
+
+ if (ClipToClientRect) {
+ //clip to client zone
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+ }
+
+ Rectangle r = ClientRectangle;
+ double radius = 0,
+ cx = r.Width / 2.0 + r.X,
+ cy = r.Height / 2.0 + r.Y;
+
+ if (r.Width > r.Height)
+ radius = r.Height / 2.0;
+ else
+ radius = r.Width / 2.0;
+
+ double dx = Math.Sin (pi3) * radius;
+ double dy = Math.Cos (pi3) * radius;
+
+ gr.MoveTo (cx - radius, cy);
+ gr.LineTo (cx - dy, cy - dx);
+ gr.LineTo (cx + dy, cy - dx);
+ gr.LineTo (cx + radius, cy);
+ gr.LineTo (cx + dy, cy + dx);
+ gr.LineTo (cx - dy, cy + dx);
+ gr.ClosePath ();
+
+ gr.LineWidth = 1;
+ Background.SetAsSource (gr);
+ gr.FillPreserve ();
+ Foreground.SetAsSource (gr);
+ gr.Stroke ();
+
+ if (child != null) {
+ if (child.Visible)
+ child.Paint (ref gr);
+ }
+ gr.Restore ();
+ }
+ }
+}
+
<Splitter/>-->
<ListBox Name="colorList" Data="{TestList}" Margin="5"
ItemTemplate="#Tests.Interfaces.colorItem.crow"
- Template="#Crow.Templates.ScrollingListBox.goml"
+ Template="#Crow.Templates.ScrollingListBox.templat"
/>
</VerticalStack>
</HorizontalStack>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<DefineConstants>DEBUG;TRACE;MEASURE_TIME</DefineConstants>
+ <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
+ <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<WarningLevel>0</WarningLevel>
<ConsolePause>false</ConsolePause>
+ <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
+ <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<StartAction>Program</StartAction>
<StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(RunConfiguration)' == 'Custom Command' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>%24{TargetName}</StartProgram>
+ <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Drawing" />
<Reference Include="OpenTK">
- <HintPath>$(SolutionDir)libs\OpenTK.dll</HintPath>
+ <HintPath>..\packages\OpenTK.3.0.0-git00041\lib\net20\OpenTK.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Compile Include="Tutorials\T3_OpenGLCube.cs" />
<Compile Include="Tutorials\T4_Gauge.cs" />
<Compile Include="Tutorials\T2_IML.cs" />
+ <Compile Include="GraphicObjects\HexaContainer.cs" />
</ItemGroup>
<ItemGroup>
<None Include="image\u.svg">
<None Include="Interfaces\Wrapper\2.2.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="OpenTK.dll.config" />
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="OpenTK" version="3.0.0-git00041" targetFramework="net45" />
+</packages>
\ No newline at end of file
+++ /dev/null
-//
-// AnalogMeter.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.Xml.Serialization;
-using System.ComponentModel;
-using Cairo;
-
-namespace Crow
-{
- public class AnalogMeter : NumericControl
- {
- #region CTOR
- public AnalogMeter () : base(){}
- public AnalogMeter (Interface iface) : base(iface){}
- #endregion
-
- #region GraphicObject Overrides
- protected override void onDraw (Context gr)
- {
- base.onDraw (gr);
-
- Rectangle r = ClientRectangle;
- Point m = r.Center;
-
- gr.Save ();
-
-
- double aUnit = Math.PI*2.0 / (Maximum - Minimum);
- gr.Translate (m.X, r.Height *1.1);
- gr.Rotate (Value/4.0 * aUnit - Math.PI/4.0);
- gr.Translate (-m.X, -m.Y);
-
- gr.LineWidth = 2;
- Foreground.SetAsSource (gr);
- gr.MoveTo (m.X,0.0);
- gr.LineTo (m.X, -m.Y*0.5);
- gr.Stroke ();
-
- gr.Restore ();
- }
- #endregion
- }
-}
-
public class Border : Container
{
#region CTOR
- public Border () : base(){}
+ protected Border () : base(){}
public Border (Interface iface) : base(iface){}
#endregion
public class Button : TemplatedContainer
{
#region CTOR
- public Button() : base() {}
+ protected Button() : base() {}
public Button (Interface iface) : base(iface){}
#endregion
public class CheckBox : TemplatedControl
{
#region CTOR
- public CheckBox () : base(){}
+ protected CheckBox() : base(){}
public CheckBox (Interface iface) : base(iface){}
#endregion
public class ColorPicker : TemplatedControl
{
#region CTOR
- public ColorPicker () : base(){}
+ protected ColorPicker() : base(){}
public ColorPicker (Interface iface) : base(iface){}
#endregion
public class ColorSelector : GraphicObject
{
#region CTOR
- public ColorSelector () : base(){}
+ protected ColorSelector() : base(){}
public ColorSelector (Interface iface) : base(iface){}
#endregion
public class ComboBox : ListBox
{
#region CTOR
- public ComboBox () : base(){}
+ protected ComboBox() : base(){}
public ComboBox (Interface iface) : base(iface){}
#endregion
public class Container : PrivateContainer
{
#region CTOR
- public Container () : base(){}
+ protected Container() : base(){}
public Container (Interface iface) : base(iface){}
#endregion
public class DirectoryView : TemplatedControl
{
#region CTOR
- public DirectoryView () : base(){}
+ protected DirectoryView() : base(){}
public DirectoryView (Interface iface) : base(iface){}
#endregion
+++ /dev/null
-//
-// DockingView.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;
-
-namespace Crow
-{
- public class DockingView : Window
- {
- #region CTOR
- public DockingView () : base ()
- {
- }
- #endregion
-
- bool isDocked = false;
- Alignment docking = Alignment.Center;
-
- Point lastMousePos; //last known mouse pos in this control
- Point undockingMousePosOrig; //mouse pos when docking was donne, use for undocking on mouse move
- Rectangle savedSlot; //last undocked slot recalled when view is undocked
- bool wasResizable;
-
- public DocksView docker;
-
- public override void OnLayoutChanges (LayoutingType layoutType)
- {
- base.OnLayoutChanges (layoutType);
-
- if (isDocked)
- return;
-
- if (docker == null)
- return;
-
- Rectangle dvCliRect = docker.ClientRectangle;
-
- if (layoutType == LayoutingType.X) {
- if (Slot.X < docker.DockingThreshold)
- dock (Alignment.Left);
- else if (Slot.Right > dvCliRect.Width - docker.DockingThreshold)
- dock (Alignment.Right);
- }else if (layoutType == LayoutingType.Y) {
- if (Slot.Y < docker.DockingThreshold)
- dock (Alignment.Top);
- else if (Slot.Bottom > dvCliRect.Height - docker.DockingThreshold)
- dock (Alignment.Bottom);
- }
- }
-
- public override void onMouseMove (object sender, MouseMoveEventArgs e)
- {
- lastMousePos = e.Position;
-
- if (this.HasFocus && e.Mouse.IsButtonDown (MouseButton.Left) && isDocked) {
- if (docking == Alignment.Left) {
- if (lastMousePos.X - undockingMousePosOrig.X > docker.DockingThreshold)
- undock ();
- } else if (docking == Alignment.Right) {
- if (undockingMousePosOrig.X - lastMousePos.X > docker.DockingThreshold)
- undock ();
- } else if (docking == Alignment.Top) {
- if (lastMousePos.Y - undockingMousePosOrig.Y > docker.DockingThreshold)
- undock ();
- } else if (docking == Alignment.Bottom) {
- if (undockingMousePosOrig.Y - lastMousePos.Y > docker.DockingThreshold)
- undock ();
- }
- return;
- }
-
- base.onMouseMove (sender, e);
- }
- public override void onMouseDown (object sender, MouseButtonEventArgs e)
- {
- base.onMouseDown (sender, e);
-
- if (this.HasFocus && isDocked && e.Button == MouseButton.Left)
- undockingMousePosOrig = lastMousePos;
- }
-
-// protected override void onBorderMouseEnter (object sender, MouseMoveEventArgs e)
-// {
-// base.onBorderMouseEnter (sender, e);
-//
-// if (isDocked) {
-// switch (docking) {
-// case Alignment.Top:
-// if (this.currentDirection != Window.Direction.S)
-// onBorderMouseLeave (this, null);
-// break;
-// case Alignment.Left:
-// if (this.currentDirection != Window.Direction.E)
-// onBorderMouseLeave (this, null);
-// break;
-// case Alignment.TopLeft:
-// break;
-// case Alignment.Right:
-// if (this.currentDirection != Window.Direction.W)
-// onBorderMouseLeave (this, null);
-// break;
-// case Alignment.TopRight:
-// break;
-// case Alignment.Bottom:
-// if (this.currentDirection != Window.Direction.N)
-// onBorderMouseLeave (this, null);
-// break;
-// case Alignment.BottomLeft:
-// break;
-// case Alignment.BottomRight:
-// break;
-// case Alignment.Center:
-// break;
-// default:
-// break;
-// }
-// }
-// }
-
- void undock () {
- docker.Undock(this);
-
- this.Left = savedSlot.Left;
- this.Top = savedSlot.Top;
- this.Width = savedSlot.Width;
- this.Height = savedSlot.Height;
-
- isDocked = false;
- Resizable = wasResizable;
- }
- void dock (Alignment align){
- this.Left = this.Top = 0;
- isDocked = true;
- docking = align;
- undockingMousePosOrig = lastMousePos;
- savedSlot = this.LastPaintedSlot;
- wasResizable = Resizable;
- Resizable = false;
-
- docker.Dock (this, align);
- }
- }
-}
-
+++ /dev/null
-//
-// DocksView.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.Xml.Serialization;
-using System.ComponentModel;
-using System.Collections.Generic;
-
-namespace Crow
-{
- public class DocksView : Group
- {
- List<DockingView> childViews = new List<DockingView>();
- GenericStack rootStack = null;
-
- public override void AddChild (GraphicObject g)
- {
- DockingView dv = g as DockingView;
- if (g == null)
- throw new Exception ("DocksView accept only DockingView as child");
- base.AddChild (g);
- childViews.Add (dv);
- dv.docker = this;
- }
- public override void RemoveChild (GraphicObject child)
- {
- DockingView dv = child as DockingView;
- if (child == null)
- throw new Exception ("DocksView accept only DockingView as child");
- base.RemoveChild (child);
- childViews.Remove (dv);
- dv.docker = this;
- }
- public void Dock (DockingView dv, Alignment pos){
- switch (pos) {
- case Alignment.Top:
- if (rootStack?.Orientation != Orientation.Vertical)
- this.Width = Measure.Stretched;
- break;
- case Alignment.Bottom:
- this.Width = Measure.Stretched;
- break;
- case Alignment.Left:
- this.Height = Measure.Stretched;
- break;
- case Alignment.Right:
- this.Height = Measure.Stretched;
- break;
- }
- }
- public void Undock (DockingView dv){
- }
-
- int dockingThreshold;
-
- [XmlAttributeAttribute][DefaultValue(10)]
- public virtual int DockingThreshold {
- get { return dockingThreshold; }
- set {
- if (dockingThreshold == value)
- return;
- dockingThreshold = value;
- NotifyValueChanged ("DockingThreshold", dockingThreshold);
-
- }
- }
- }
-}
-
public class Expandable : TemplatedContainer
{
#region CTOR
- public Expandable () : base(){}
+ protected Expandable() : base(){}
public Expandable (Interface iface) : base(iface){}
#endregion
public class FileDialog: Window
{
#region CTOR
- public FileDialog () : base(){}
+ protected FileDialog() : base(){}
public FileDialog (Interface iface) : base(iface){}
#endregion
public class GenericStack : Group
{
#region CTOR
- public GenericStack () : base(){}
+ protected GenericStack() : base(){}
public GenericStack(Interface iface) : base(iface){}
#endregion
public class GraduatedSlider : Slider
{
#region CTOR
- public GraduatedSlider () : base(){}
+ protected GraduatedSlider() : base(){}
public GraduatedSlider(Interface iface) : base(iface)
{}
// public GraduatedSlider(double minimum, double maximum, double step)
public class Grid : Group
{
#region CTOR
- public Grid () : base(){}
+ protected Grid () : base(){}
public Grid(Interface iface) : base(iface)
{
}
int _rowCount;
#endregion
- public override void AddChild (GraphicObject child)
- {
- base.AddChild (child);
- this.RegisterForLayouting (LayoutingType.ArrangeChildren);
- }
- public override void RemoveChild (GraphicObject child)
- {
- base.RemoveChild (child);
- this.RegisterForLayouting (LayoutingType.ArrangeChildren);
- }
-
#region Public Properties
[XmlAttributeAttribute()][DefaultValue(2)]
public int Spacing
get { return _spacing; }
set { _spacing = value; }
}
- [XmlAttributeAttribute()][DefaultValue(1)]
+ [XmlAttributeAttribute()][DefaultValue(2)]
public virtual int ColumnCount
{
get { return _columnCount; }
this.RegisterForLayouting (LayoutingType.ArrangeChildren);
}
}
- [XmlAttributeAttribute()][DefaultValue(1)]
+ [XmlAttributeAttribute()][DefaultValue(2)]
public virtual int RowCount
{
get { return _rowCount; }
//
// return tmp;
// }
+ public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType)
+ {
+ //Prevent child repositionning
+ layoutType &= (~LayoutingType.Positioning);
+ }
+ public override bool ArrangeChildren { get { return true; } }
public virtual void ComputeChildrenPositions()
{
int slotWidth = CaseWidth;
GraphicObject c = Children [idx];
if (!c.Visible)
continue;
- //ensure Item are not realigned
- c.HorizontalAlignment = HorizontalAlignment.Left;
- c.VerticalAlignment = VerticalAlignment.Top;
- c.Left = curX * (slotWidth + Spacing);
- c.Top = curY * (slotHeight + Spacing);
- c.Width = slotWidth;
- c.Height = slotHeight;
+ c.Slot.X = curX * (slotWidth + Spacing);
+ c.Slot.Y = curY * (slotHeight + Spacing);
+ //c.Slot.Width = slotWidth;
+ //c.Slot.Height = slotHeight;
}
}
+ IsDirty = true;
+ }
+ public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg)
+ {
+ //base.OnChildLayoutChanges (sender, arg);
}
-
public override bool UpdateLayout (LayoutingType layoutType)
{
public class Group : GraphicObject
{
#region CTOR
- public Group () : base(){}
+ protected Group () : base(){}
public Group(Interface iface) : base(iface){}
#endregion
Children.Add (g);
}
g.RegisteredLayoutings = LayoutingType.None;
- g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
g.LayoutChanged += OnChildLayoutChanges;
+ g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
}
public virtual void RemoveChild(GraphicObject child)
{
public class GroupBox : TemplatedContainer
{
#region CTOR
- public GroupBox () : base(){}
+ protected GroupBox () : base(){}
public GroupBox(Interface iface) : base(iface){}
#endregion
}
public class HorizontalStack : GenericStack
{
#region CTOR
- public HorizontalStack () : base(){}
+ protected HorizontalStack () : base(){}
public HorizontalStack(Interface iface) : base(iface)
{
}
public class HueSelector : ColorSelector
{
#region CTOR
- public HueSelector () : base(){}
+ protected HueSelector () : base(){}
public HueSelector (Interface iface) : base(iface)
{
}
namespace Crow
{
+ /// <summary>
+ /// Base widget to display an image. Accepts bitmaps and SVGs.
+ /// </summary>
+ /// <remarks>
+ /// </remarks>
public class Image : GraphicObject
{
Picture _pic;
double opacity;
#region Public properties
+ /// <summary>
+ /// If false, original size will be kept in any case.
+ /// </summary>
[XmlAttributeAttribute][DefaultValue(true)]
public virtual bool Scaled {
get { return scaled; }
RegisterForGraphicUpdate ();
}
}
+ /// <summary>
+ /// If image is scaled, proportions will be preserved.
+ /// </summary>
[XmlAttributeAttribute][DefaultValue(true)]
public virtual bool KeepProportions {
get { return keepProps; }
RegisterForGraphicUpdate ();
}
}
+ /// <summary>
+ /// Image file path, may be on disk or embedded. Accepts bitmaps or SVG drawings.
+ /// </summary>
[XmlAttributeAttribute]
public string Path {
get { return _pic == null ? "" : _pic.Path; }
NotifyValueChanged ("Path", Path);
}
}
+ /// <summary>
+ /// Used only for svg images, repaint only node named referenced in SvgSub.
+ /// If null, all the svg is rendered
+ /// </summary>
[XmlAttributeAttribute]
public string SvgSub {
get { return _svgSub; }
RegisterForGraphicUpdate ();
}
}
+ /// <summary>
+ /// Object holding the image data once loaded, may be used directely to pupulate this control without
+ /// specifying a path.
+ /// </summary>
[XmlAttributeAttribute]
public Picture Picture {
get { return _pic; }
RegisterForGraphicUpdate ();
}
}
+ /// <summary>
+ /// Opacity parameter for the image
+ /// </summary>
+ // TODO:could be moved in GraphicObject
[XmlAttributeAttribute()][DefaultValue(1.0)]
public virtual double Opacity {
get { return opacity; }
#endregion
#region CTOR
- public Image () : base(){}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Crow.Image"/> class.
+ /// </summary>
+ protected Image () : base(){}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Crow.Image"/> class from code
+ /// </summary>
+ /// <param name="iface">interface to bound to</param>
public Image (Interface iface) : base(iface)
{
}
public class Label : GraphicObject
{
#region CTOR
- public Label () : base(){}
+ protected Label () : base(){}
public Label(Interface iface) : base(iface)
{
public class ListBox : TemplatedGroup
{
#region CTOR
- public ListBox () : base(){}
+ protected ListBox () : base(){}
public ListBox (Interface iface) : base(iface) {}
#endregion
public class Menu : TemplatedGroup
{
#region CTOR
- public Menu () : base(){}
+ protected Menu () : base(){}
public Menu (Interface iface) : base(iface) {}
#endregion
public class MenuItem : Menu
{
#region CTOR
- public MenuItem () : base(){}
+ protected MenuItem () : base(){}
public MenuItem (Interface iface) : base(iface) {}
#endregion
public class MessageBox : Window
{
#region CTOR
- public MessageBox () : base(){}
+ protected MessageBox () : base(){}
public MessageBox (Interface iface) : base(iface){}
#endregion
public abstract class NumericControl : TemplatedControl
{
#region CTOR
- public NumericControl () : base(){}
+ protected NumericControl () : base(){}
public NumericControl (Interface iface) : base(iface)
{
}
public class Popper : TemplatedContainer
{
#region CTOR
- public Popper () : base(){}
+ protected Popper () : base(){}
public Popper (Interface iface) : base(iface){}
#endregion
public class PrivateContainer : GraphicObject
{
#region CTOR
- public PrivateContainer () : base(){}
+ protected PrivateContainer () : base(){}
public PrivateContainer (Interface iface) : base(iface){}
#endregion
public class ProgressBar : NumericControl
{
#region CTOR
- public ProgressBar () : base(){}
+ protected ProgressBar () : base(){}
public ProgressBar(Interface iface) : base(iface){}
#endregion
bool isChecked;
#region CTOR
- public RadioButton () : base(){}
+ protected RadioButton () : base(){}
public RadioButton(Interface iface) : base(iface){}
#endregion
Orientation _orientation;
#region CTOR
- public ScrollBar () : base(){}
+ protected ScrollBar () : base(){}
public ScrollBar(Interface iface) : base(iface) {}
#endregion
public class Scroller : Container
{
#region CTOR
- public Scroller () : base(){}
+ protected Scroller () : base(){}
public Scroller (Interface iface) : base(iface){}
#endregion
public class ScrollingObject : GraphicObject
{
#region CTOR
- public ScrollingObject ():base(){}
+ protected ScrollingObject ():base(){}
public ScrollingObject (Interface iface):base(iface){}
#endregion
public class ScrollingTextBox : ScrollingObject
{
#region CTOR
- public ScrollingTextBox (Interface iface):base(iface){
+ protected ScrollingTextBox ():base()
+ {
KeyEventsOverrides = true;
}
- public ScrollingTextBox ():base()
- {
+ public ScrollingTextBox (Interface iface):base(iface){
KeyEventsOverrides = true;
}
#endregion
public class Slider : NumericControl
{
#region CTOR
- public Slider() : base(){}
+ protected Slider() : base(){}
public Slider(Interface iface) : base(iface)
{}
// public Slider(double minimum, double maximum, double step)
public class Spinner : NumericControl
{
#region CTOR
- public Spinner() : base(){}
+ protected Spinner() : base(){}
public Spinner (Interface iface) : base(iface)
{
}
public class Splitter : GraphicObject
{
#region CTOR
- public Splitter() : base(){}
+ protected Splitter() : base(){}
public Splitter (Interface iface) : base(iface){}
#endregion
public class TabItem : TemplatedContainer
{
#region CTOR
- public TabItem() : base(){}
+ protected TabItem() : base(){}
public TabItem (Interface iface) : base(iface){}
#endregion
public class TabView : Group
{
#region CTOR
- public TabView() : base(){}
+ protected TabView() : base(){}
public TabView (Interface iface) : base(iface){}
#endregion
public class TemplatedContainer : TemplatedControl
{
#region CTOR
- public TemplatedContainer() : base(){}
+ protected TemplatedContainer() : base(){}
public TemplatedContainer (Interface iface) : base(iface){}
#endregion
public abstract class TemplatedControl : PrivateContainer
{
#region CTOR
- public TemplatedControl() : base(){}
+ protected TemplatedControl() : base(){}
public TemplatedControl (Interface iface) : base(iface){}
#endregion
public abstract class TemplatedGroup : TemplatedControl
{
#region CTOR
- public TemplatedGroup() : base(){}
+ protected TemplatedGroup() : base(){}
public TemplatedGroup (Interface iface) : base(iface){}
#endregion
public class TextBox : Label
{
#region CTOR
- public TextBox() : base(){}
+ protected TextBox() : base(){}
public TextBox(Interface iface) : base(iface)
{ }
// public TextBox(string _initialValue)
public class TextRun : GraphicObject
{
#region CTOR
- public TextRun () : base(){}
+ protected TextRun () : base(){}
public TextRun (Interface iface) : base (iface){}
#endregion
bool isRoot;
#region CTOR
- public TreeView() : base(){}
+ protected TreeView() : base(){}
public TreeView (Interface iface) : base(iface)
{
}
values.RemoveAt (0);
RegisterForRedraw ();
}
-
- public Trend ()
+ #region CTOR
+ protected Trend () : base()
{
}
+ #endregion
[XmlIgnore]public virtual int NewValue {
set {
AddValue (value);
/// </summary>
public class VerticalStack : GenericStack
{
- public VerticalStack() : base(){}
+ #region CTOR
+ protected VerticalStack() : base(){}
public VerticalStack(Interface iface) : base(iface)
{
}
+ #endregion
[System.Xml.Serialization.XmlIgnore]
public override Orientation Orientation
#endregion
#region CTOR
- public Window() : base(){}
+ protected Window() : base(){}
public Window (Interface iface) : base(iface){}
#endregion
public class Wrapper : GenericStack
{
#region CTOR
- public Wrapper() : base(){}
+ protected Wrapper() : base(){}
public Wrapper (Interface iface) : base(iface){}
#endregion
/// The Interface Class is the root of crow graphic trees. It is thread safe allowing
/// application to run multiple interfaces in different threads.
/// It provides the Dirty bitmap and zone of the interface to be drawn on screen.
- ///
+ /// </summary>
+ /// <remarks>
/// The Interface contains :
/// - rendering and layouting queues and logic.
/// - helpers to load XML interfaces files directely bound to this interface
///
/// The resulting surface (a byte array in the OpenTK renderer) is made available and protected with the
/// RenderMutex of the interface.
- /// </summary>
+ /// </remarks>
public class Interface : ILayoutable
{
#region CTOR