diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-11-01 15:49:37 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-11-01 15:49:37 +0100 |
| commit | fe8c1b41ea3c994a8d31d95eefe3ddf7a92b66d2 (patch) | |
| tree | 7832e9a3f2b5b74722abe3c2c64a4ad7f8a2cb2b | |
| parent | 0bb8bc91f960611e229a7603779fd60e0473b0c5 (diff) | |
wip
| -rw-r--r-- | Crow/src/GraphicBackends/Mono.Cairo/Context.cs | 2 | ||||
| -rw-r--r-- | Crow/src/GraphicBackends/Mono.Cairo/GLSurface.cs | 1 | ||||
| -rw-r--r-- | Crow/src/Widgets/TemplatedContainer.cs | 2 | ||||
| -rw-r--r-- | Crow/src/Widgets/TemplatedControl.cs | 14 | ||||
| -rw-r--r-- | README.md | 12 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Experimental/multiColorPick2.crow | 2 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Experimental/multiColorPick3.crow | 19 |
7 files changed, 36 insertions, 16 deletions
diff --git a/Crow/src/GraphicBackends/Mono.Cairo/Context.cs b/Crow/src/GraphicBackends/Mono.Cairo/Context.cs index 84c5fd40..f8c1c0e7 100644 --- a/Crow/src/GraphicBackends/Mono.Cairo/Context.cs +++ b/Crow/src/GraphicBackends/Mono.Cairo/Context.cs @@ -38,7 +38,7 @@ using System; using System.Runtime.InteropServices; using System.Text; -namespace Crow.Drawing { +namespace Crow.Drawing { [Obsolete ("Renamed Cairo.Context per suggestion from cairo binding guidelines.")] public class Graphics : Context { diff --git a/Crow/src/GraphicBackends/Mono.Cairo/GLSurface.cs b/Crow/src/GraphicBackends/Mono.Cairo/GLSurface.cs index 33042658..45112024 100644 --- a/Crow/src/GraphicBackends/Mono.Cairo/GLSurface.cs +++ b/Crow/src/GraphicBackends/Mono.Cairo/GLSurface.cs @@ -34,7 +34,6 @@ namespace Crow.Drawing { public class GLSurface : Surface { - public GLSurface (IntPtr ptr, bool own) : base (ptr, own) {} diff --git a/Crow/src/Widgets/TemplatedContainer.cs b/Crow/src/Widgets/TemplatedContainer.cs index c9566032..7ed025e7 100644 --- a/Crow/src/Widgets/TemplatedContainer.cs +++ b/Crow/src/Widgets/TemplatedContainer.cs @@ -7,7 +7,7 @@ namespace Crow { /// <summary> /// base class for new containers that will use templates. - /// + /// /// TemplatedControl's **must** provide a widget of the [`Container`](Container) class named **_'Content'_** inside their template tree /// </summary> public class TemplatedContainer : TemplatedControl diff --git a/Crow/src/Widgets/TemplatedControl.cs b/Crow/src/Widgets/TemplatedControl.cs index dc22896a..99ff7d23 100644 --- a/Crow/src/Widgets/TemplatedControl.cs +++ b/Crow/src/Widgets/TemplatedControl.cs @@ -11,7 +11,7 @@ using Crow.Drawing; namespace Crow { /// <summary> - /// Base class for all templated widget + /// Base class for all templated widget. /// </summary> public abstract class TemplatedControl : PrivateContainer { @@ -42,13 +42,14 @@ namespace Crow /// Template path or IML fragment. /// </summary> /// <remark> - /// The 'null' default value with the 'NOT_SET' field init value force a loading - /// of the default template by passing the first equality check. + /// If both Template property and inline template are present, the second has priority. /// </remark> [DefaultValue(null)] public string Template { get => _template; set { + //The 'null' default value with the 'NOT_SET' field init value force a loading + // of the default template by passing the first equality check. if (_template == value) return; _template = value; @@ -112,17 +113,16 @@ namespace Crow #endregion /// <summary> - /// Loads the template. Each TemplatedControl MUST provide a default template - /// or have an inlined template in iml. + /// Loads the template. Each TemplatedControl should provide a default template + /// otherwise it must have an inlined template in iml. /// It must be an embedded ressource with ID = fullTypeName.template - /// Entry assembly is search first, then the one where the type is defined /// </summary> /// <Remark> - /// Setting the default template path in style will provide an interned string for itor search. /// </Remark> /// <param name="template">Optional template instance</param> protected virtual void loadTemplate(Widget template = null) { + // Setting the default template path in style will provide an interned string for itor search. if (this.child != null)//template change, bindings has to be reset this.ClearTemplateBinding(); @@ -24,20 +24,20 @@ </p> </h1> -**Open source widget toolkit** and rendering engine for building portable graphical interfaces in `C#`, featuring a `declarative language` for ui called [IML](https://github.com/jpbruyere/Crow/wiki/using-iml) with [Styling](https://github.com/jpbruyere/Crow/wiki/Styling), [Templates](https://github.com/jpbruyere/Crow/wiki/Templates) and a [binding system](https://github.com/jpbruyere/Crow/wiki/first-binding) to connect your `c#` code to your `ui` components easily. +**C.R.O.W.** is an open source widget toolkit and rendering engine for building portable graphical interfaces in `C#`. <p align="center"> - <a href="https://github.com/jpbruyere/Crow/blob/master/Images/crowEdit.png"> + <a href="https://github.com/jpbruyere/CrowEdit"> <kbd><img src="https://github.com/jpbruyere/Crow/blob/master/Images/crowEdit.png" height="200"></kbd> </a> - <a href="https://github.com/jpbruyere/Crow/blob/master/Images/chess.png"> + <a href="https://github.com/jpbruyere/vkChess.net"> <kbd><img src="https://github.com/jpbruyere/Crow/blob/master/Images/chess.png" height="200"></kbd> </a> </p> Check the [Tutorials](https://github.com/jpbruyere/Crow/wiki/Tutorials) for a quick introduction. -The `ShowCase` sample will allow you to quickly test IML with live result. +The `ShowCase` sample will allow you to quickly test **IML** with live result. <p align="center"> <a href="https://github.com/jpbruyere/Crow/blob/master/Images/showCase2.png"> @@ -45,7 +45,9 @@ The `ShowCase` sample will allow you to quickly test IML with live result. </a> </p> -Visit the [wiki](https://github.com/jpbruyere/Crow/wiki) and the samples for documentation. Due to the early state of this project and the frequent changes, some part of the docs may be outdated. C.R.O.W. is in **beta** development state, api could change, but most of it is quiet stabilized. +Visit the [wiki](https://github.com/jpbruyere/Crow/wiki) and the [samples](https://github.com/jpbruyere/Crow/wiki/Tutorials) for documentation. + +_Due to the early state of this project and the frequent changes, some part of the docs may be outdated. It is in **beta** development state, api could change, but most of it is quiet stabilized._ Please report bugs and issues on [GitHub](https://github.com/jpbruyere/Crow/issues) diff --git a/Samples/common/ui/Interfaces/Experimental/multiColorPick2.crow b/Samples/common/ui/Interfaces/Experimental/multiColorPick2.crow index 21490b71..66578324 100644 --- a/Samples/common/ui/Interfaces/Experimental/multiColorPick2.crow +++ b/Samples/common/ui/Interfaces/Experimental/multiColorPick2.crow @@ -11,7 +11,7 @@ </HorizontalStack> </Template>/> <TabView MinimumSize="{../MinimumPopupSize}" Width="200" Height="200" > - <ColorPicker Name="HSV" CurrentColor="{²../../../CurrentColor}" Background="Onyx" /> + <ColorPicker Name="HSV" CurrentColor="{²../../../CurrentColor}" Background="Onyx" BubbleEvents="None" /> <ColorPicker IsVisible="false" Name="Names" CurrentColor="{²../../../CurrentColor}" Height="Stretched" Background="Onyx"> <Template> <ListBox Width="Stretched" Data="{./AvailableColors}" SelectedItemChanged="./onSelectedItemChanged"> diff --git a/Samples/common/ui/Interfaces/Experimental/multiColorPick3.crow b/Samples/common/ui/Interfaces/Experimental/multiColorPick3.crow new file mode 100644 index 00000000..288e641b --- /dev/null +++ b/Samples/common/ui/Interfaces/Experimental/multiColorPick3.crow @@ -0,0 +1,19 @@ +<VerticalStack> + <Label Text="{../cp.CurrentColor}"/> + <ColorPicker IsVisible="false" Name="Names" CurrentColor="{²../../../CurrentColor}" Height="Stretched" Background="Onyx"> + <Template> + <ListBox Width="Stretched" Data="{./AvailableColors}" SelectedItemChanged="./onSelectedItemChanged"> + <Template> + <Scroller Name="scroller1" Margin="5" ClipToClientRect="true" Background="Onyx"> + <Wrapper Name="ItemsContainer" Height="Fit" VerticalAlignment="Top"/> + </Scroller> + </Template> + <ItemTemplate> + <Border Width="16" Height="16" Background="{}" Foreground="Transparent" Tooltip="{}" + MouseEnter="{Foreground=Black}" + MouseLeave="{Foreground=Transparent}"/> + </ItemTemplate> + </ListBox> + </Template> + </ColorPicker> +</VerticalStack>
\ No newline at end of file |