<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- <TargetFrameworks>netstandard2.0</TargetFrameworks>-->
- <TargetFramework>netstandard2.1</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyVersion>$(CrowVersion)</AssemblyVersion>
<PackageVersion>$(CrowPackageVersion)</PackageVersion>
</HorizontalStack>
<HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
Name="hs" Margin="0" Spacing="0" Height="Fit" Visible="{./IsFloating}">
- <Widget Width="5"/>
+ <Widget Width="5"/>
<Image Margin="1" Width="10" Height="10" Path="{./Icon}"/>
<Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Left" Text="{./CurDir}" />
<ListBox Data="{./DockCommands}" Fit="true">
SelectedItemChanged="./onSelectedItemChanged">
<Template>
<HorizontalStack>
- <Scroller Name="scroller1">
+ <Scroller Name="ItemsScroller" KeyEventsOverrides="true" >
<VerticalStack Height="Fit" VerticalAlignment="Top"
Name="ItemsContainer" Margin="0" Spacing="1"/>
</Scroller>
<ScrollBar Name="scrollbar1" Orientation="Vertical"
- Value="{²../scroller1.ScrollY}" Maximum="{../scroller1.MaxScrollY}"
- CursorRatio="{../scroller1.ChildHeightRatio}"
- LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
+ Value="{²../ItemsScroller.ScrollY}" Maximum="{../ItemsScroller.MaxScrollY}"
+ CursorRatio="{../ItemsScroller.ChildHeightRatio}"
+ LargeIncrement="{../ItemsScroller.PageHeight}" SmallIncrement="30"
Width="14" />
</HorizontalStack>
</Template>
</ItemTemplate>
<ItemTemplate DataType="System.IO.FileInfo">
<ListItem Height="Fit"
+ BubbleEvents="All"
Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
<HorizontalStack>
</ItemTemplate>
<ItemTemplate DataType="System.IO.DirectoryInfo">
<ListItem Height="Fit"
+ BubbleEvents="All"
Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
<HorizontalStack>
namespace Crow {
[StructLayout(LayoutKind.Sequential)]
public struct Rectangle
- {
+ {
public static readonly Rectangle Zero = new Rectangle (0, 0, 0, 0);
public int X, Y, Width, Height;
#region ctor
public Rectangle(Point p, Size s): this (p.X, p.Y, s.Width, s.Height) { }
public Rectangle(Size s) : this (0, 0, s.Width, s.Height) { }
- public Rectangle(int x, int y, int width, int height) {
+ public Rectangle(int x, int y, int width, int height) {
X = x;
Y = y;
Width = width;
Height = height;
- }
+ }
#endregion
#region PROPERTIES
[XmlIgnore]public int Left{
get => X;
- set { X = value; }
- }
+ set { X = value; }
+ }
[XmlIgnore]public int Top{
- get => Y;
- set { Y = value; }
- }
+ get => Y;
+ set { Y = value; }
+ }
[XmlIgnore] public int Right => X + Width;
[XmlIgnore]public int Bottom => Y + Height;
[XmlIgnore]public Size Size{
get => new Size (Width, Height);
- set {
- Width = value.Width;
- Height = value.Height;
- }
- }
+ set {
+ Width = value.Width;
+ Height = value.Height;
+ }
+ }
[XmlIgnore]
- public SizeD SizeD => new SizeD (Width, Height);
+ public SizeD SizeD => new SizeD (Width, Height);
[XmlIgnore]public Point Position{
get => new Point (X, Y);
set {
[XmlIgnore]public Point TopLeft{
get => new Point (X, Y);
set {
- X = value.X;
- Y = value.Y;
- }
- }
+ X = value.X;
+ Y = value.Y;
+ }
+ }
[XmlIgnore] public Point TopRight => new Point (Right, Y);
[XmlIgnore] public Point BottomLeft => new Point (X, Bottom);
- [XmlIgnore] public Point BottomRight => new Point (Right, Bottom);
+ [XmlIgnore] public Point BottomRight => new Point (Right, Bottom);
[XmlIgnore] public Point Center => new Point (Left + Width / 2, Top + Height / 2);
[XmlIgnore] public Point CenterD => new PointD (Left + Width / 2.0, Top + Height / 2.0);
#region FUNCTIONS
public void Inflate(int xDelta, int yDelta)
- {
- this.X -= xDelta;
- this.Width += 2 * xDelta;
- this.Y -= yDelta;
- this.Height += 2 * yDelta;
- }
+ {
+ this.X -= xDelta;
+ this.Width += 2 * xDelta;
+ this.Y -= yDelta;
+ this.Height += 2 * yDelta;
+ }
public void Inflate(int delta)
{
Inflate (delta, delta);
r.Inflate (deltaX, deltaY);
return r;
}
+ public void Scale (double factor) {
+ X = (int)Math.Round(factor * X);
+ Y = (int)Math.Round(factor * Y);
+ Width = (int)Math.Round(factor * Width);
+ Height = (int)Math.Round(factor * Height);
+ }
+ public Rectangle Scaled (double factor) {
+ return new Rectangle (
+ (int)Math.Round(factor * X),
+ (int)Math.Round(factor * Y),
+ (int)Math.Round(factor * Width),
+ (int)Math.Round(factor * Height));
+ }
+ public RectangleD ScaledD (double factor) {
+ return new RectangleD (
+ factor * X,
+ factor * Y,
+ factor * Width,
+ factor * Height);
+ }
public bool ContainsOrIsEqual (Point p) => (p.X >= X && p.X <= X + Width && p.Y >= Y && p.Y <= Y + Height);
public bool ContainsOrIsEqual (Rectangle r) => r.TopLeft >= this.TopLeft && r.BottomRight <= this.BottomRight;
- public bool Intersect(Rectangle r)
- {
- int maxLeft = Math.Max(this.Left, r.Left);
- int minRight = Math.Min(this.Right, r.Right);
- int maxTop = Math.Max(this.Top, r.Top);
- int minBottom = Math.Min(this.Bottom, r.Bottom);
+ public bool Intersect(Rectangle r)
+ {
+ int maxLeft = Math.Max(this.Left, r.Left);
+ int minRight = Math.Min(this.Right, r.Right);
+ int maxTop = Math.Max(this.Top, r.Top);
+ int minBottom = Math.Min(this.Bottom, r.Bottom);
return (maxLeft < minRight) && (maxTop < minBottom);
- }
- public Rectangle Intersection(Rectangle r)
- {
- Rectangle result = new Rectangle();
-
- if (r.Left >= Left)
- result.Left = r.Left;
- else
- result.TopLeft = TopLeft;
+ }
+ public Rectangle Intersection(Rectangle r)
+ {
+ Rectangle result = new Rectangle();
- if (r.Right >= Right)
- result.Width = Right - result.Left;
- else
- result.Width = r.Right - result.Left;
+ if (r.Left >= Left)
+ result.Left = r.Left;
+ else
+ result.TopLeft = TopLeft;
- if (r.Top >= Top)
- result.Top = r.Top;
- else
- result.Top = Top;
+ if (r.Right >= Right)
+ result.Width = Right - result.Left;
+ else
+ result.Width = r.Right - result.Left;
- if (r.Bottom >= Bottom)
- result.Height = Bottom - result.Top;
- else
- result.Height = r.Bottom - result.Top;
+ if (r.Top >= Top)
+ result.Top = r.Top;
+ else
+ result.Top = Top;
- return result;
- }
+ if (r.Bottom >= Bottom)
+ result.Height = Bottom - result.Top;
+ else
+ result.Height = r.Bottom - result.Top;
+
+ return result;
+ }
#endregion
- #region operators
- public static Rectangle operator +(Rectangle r1, Rectangle r2)
- {
- int x = Math.Min(r1.X, r2.X);
- int y = Math.Min(r1.Y, r2.Y);
- int x2 = Math.Max(r1.Right, r2.Right);
- int y2 = Math.Max(r1.Bottom, r2.Bottom);
- return new Rectangle(x, y, x2 - x, y2 - y);
- }
+ #region operators
+ public static Rectangle operator +(Rectangle r1, Rectangle r2)
+ {
+ int x = Math.Min(r1.X, r2.X);
+ int y = Math.Min(r1.Y, r2.Y);
+ int x2 = Math.Max(r1.Right, r2.Right);
+ int y2 = Math.Max(r1.Bottom, r2.Bottom);
+ return new Rectangle(x, y, x2 - x, y2 - y);
+ }
public static Rectangle operator + (Rectangle r, Point p) => new Rectangle (r.X + p.X, r.Y + p.Y, r.Width, r.Height);
public static Rectangle operator - (Rectangle r, Point p) => new Rectangle (r.X - p.X, r.Y - p.Y, r.Width, r.Height);
public static bool operator == (Rectangle r1, Rectangle r2) => r1.TopLeft == r2.TopLeft && r1.Size == r2.Size;
(int)Math.Round (r.Width), (int)Math.Round (r.Height));
#endregion
- public override string ToString () => $"{X},{Y},{Width},{Height}";
- public static Rectangle Parse(string s)
- {
- string[] d = s.Split(new char[] { ',' });
- return new Rectangle(
- int.Parse(d[0]),
- int.Parse(d[1]),
- int.Parse(d[2]),
- int.Parse(d[3]));
- }
+ public override string ToString () => $"{X},{Y},{Width},{Height}";
+ public static Rectangle Parse(string s)
+ {
+ string[] d = s.Split(new char[] { ',' });
+ return new Rectangle(
+ int.Parse(d[0]),
+ int.Parse(d[1]),
+ int.Parse(d[2]),
+ int.Parse(d[3]));
+ }
public override int GetHashCode ()
{
unchecked // Overflow is fine, just wrap
}
public override bool Equals (object obj) => (obj == null || obj.GetType () != typeof (Rectangle)) ?
false : this == (Rectangle)obj;
- }
+ }
}
void savingThread(){
while(true){
if (isDirty)
- Save ();
+ Save ();
Thread.Sleep (100);
}
}
public void Cancel(){
if (thread.IsAlive & !cancelRequested){
cancelRequested = true;
- while (thread.IsAlive)
+ while (thread.IsAlive)
Thread.Sleep (1);
thread.Join ();
}
/// - '../' => 1 level up in graphic tree
/// - './' or '/' => template root level
/// - '.Name1.Name2' current level properties
- /// - 'name.prop' named descendant in graphic tree, search with 'FindByName' method of GraphicObject
+ /// - 'name.prop' named descendant in graphic tree, search with 'FindByName' method of Widget
/// </summary>
public class BindingMember
{
#if DEBUG_BINDING_FUNC_CALLS
Console.WriteLine ($"getMemberInfoWithReflexion ({instance},{member}); type:{t}");
#endif
- MemberInfo mi = t.GetMember (member)?.FirstOrDefault();
+ MemberInfo mi = t.GetMember (member, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)?.FirstOrDefault();
if (mi == null)
mi = CompilerServices.SearchExtMethod (t, member);
return mi;
emitGetChild (il, dest [i].CrowType, dest [i + 1].Index);
}
/// <summary>
- /// Emits msil to fetch chil instance of current GraphicObject on the stack
+ /// Emits msil to fetch chil instance of current Widget on the stack
/// </summary>
/// <param name="il">Il generator</param>
/// <param name="parentType">Parent type</param>
return dataType;
}
foreach (Assembly a in Interface.crowAssemblies) {
- foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name != strDataType && expT.FullName != strDataType)
- continue;
- if (!knownTypes.ContainsKey(strDataType))
- knownTypes.Add (strDataType, expT);
- return expT;
+ try {
+ foreach (Type expT in a.GetExportedTypes ()) {
+ if (expT.Name != strDataType && expT.FullName != strDataType)
+ continue;
+ if (!knownTypes.ContainsKey(strDataType))
+ knownTypes.Add (strDataType, expT);
+ return expT;
+ }
+ }catch (Exception e) {
+ Debug.WriteLine ($"Crow.getTypeFromeName error: {e.Message}");
}
}
knownTypes.Add (strDataType, null);
il.DeclareLocal (typeof (Widget));
il.Emit (OpCodes.Nop);
- //set local GraphicObject to root object
+ //set local Widget to root object
ConstructorInfo ci = rootType.GetConstructor (
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public,
null, Type.EmptyTypes, null);
{
#region Dynamic Method ID generation
static long curId = 0;
- internal static long NewId {
- get { return curId++; }
- }
+ internal static long NewId => curId++;
#endregion
internal static Dictionary<string, Type> knownGOTypes = new Dictionary<string, Type> ();
#endregion
/// <summary>
- /// Creates a new instance of the GraphicObject compiled in the instantiator
+ /// Creates a new instance of the Widget compiled in the instantiator
/// </summary>
/// <returns>The new graphic object instance</returns>
public Widget CreateInstance(){
loader = (InstanciatorInvoker)ctx.dm.CreateDelegate (typeof (InstanciatorInvoker), this);
}
/// <summary>
- /// read first node to set GraphicObject class for loading
+ /// read first node to set Widget class for loading
/// and let reader position on that node
/// </summary>
Type findRootType (XmlReader reader)
il.Emit (OpCodes.Stfld, mi as FieldInfo);
else if (mi.MemberType == MemberTypes.Property) {
MethodInfo mt = (mi as PropertyInfo).GetSetMethod ();
- il.Emit (mt.IsVirtual?OpCodes.Callvirt:OpCodes.Call, mt);
+ if (mt == null) {
+ Console.WriteLine ($"[emitSetValue]No set method found for: {mi}");
+ il.Emit (OpCodes.Pop);//pop value
+ il.Emit (OpCodes.Pop);//pop set target instance
+ } else
+ il.Emit (mt.IsVirtual?OpCodes.Callvirt:OpCodes.Call, mt);
} else
throw new NotImplementedException ();
}
}
}
+ static IntPtr resolveUnmanaged(Assembly assembly, String libraryName)
+ {
+
+ switch (libraryName)
+ {
+ /*case "glfw3":
+ return NativeLibrary.Load("glfw", assembly, null);*/
+ case "rsvg-2.40":
+ return NativeLibrary.Load("rsvg-2", assembly, null);
+ }
+ Console.WriteLine($"[UNRESOLVE] {assembly} {libraryName}");
+ return IntPtr.Zero;
+ }
+
+
#region CTOR
static Interface ()
{
+ System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()).ResolvingUnmanagedDll += resolveUnmanaged;
+
CROW_CONFIG_ROOT =
System.IO.Path.Combine (
Environment.GetFolderPath (Environment.SpecialFolder.UserProfile),
#region events delegates
static CursorPosDelegate HandleCursorPosDelegate = (window, xPosition, yPosition) => {
- windows [window].OnMouseMove ((int)xPosition, (int)yPosition);
+ windows [window].OnMouseMove ((int)(xPosition / windows [window].ZoomFactor), (int)(yPosition / windows [window].ZoomFactor));
};
static MouseButtonDelegate HandleMouseButtonDelegate = (IntPtr window, MouseButton button, InputAction action, Modifier mods) => {
if (action == InputAction.Release)
public static Antialias Antialias = Antialias.Subpixel;
/// <summary>
- /// Each control need a ref to the root interface containing it, if not set in GraphicObject.currentInterface,
- /// the ref of this one will be stored in GraphicObject.currentInterface
+ /// Each control need a ref to the root interface containing it, if not set in Widget.currentInterface,
+ /// the ref of this one will be stored in Widget.currentInterface
/// </summary>
//protected static Interface CurrentInterface;
#endregion
return Instantiator.CreateFromImlFragment (this, imlFragment);
}
/// <summary>
- /// Create an instance of a GraphicObject and add it to the GraphicTree of this Interface
+ /// Create an instance of a Widget and add it to the GraphicTree of this Interface
/// </summary>
/// <returns>new instance of graphic object created</returns>
/// <param name="path">path of the iml file to load</param>
}
}
/// <summary>
- /// Create an instance of a GraphicObject linked to this interface but not added to the GraphicTree
+ /// Create an instance of a Widget linked to this interface but not added to the GraphicTree
/// </summary>
/// <returns>new instance of graphic object created</returns>
/// <param name="path">path of the iml file to load</param>
Debug.WriteLine ("SolidBackground property only available on unix.");
}
}
-
+ double zoomFactor = 1.0;
+ public double ZoomFactor {
+ get => zoomFactor;
+ set {
+ if (zoomFactor == value)
+ return;
+ zoomFactor = value;
+ NotifyValueChanged (zoomFactor);
+ lock (UpdateMutex) {
+ foreach (Widget g in GraphicTree)
+ g.RegisterForLayouting (LayoutingType.All);
+ registerRefreshClientRectangle ();
+ }
+ }
+ }
/// <summary>Clipping Rectangles drive the drawing process. For compositing, each object under a clip rectangle should be
/// repainted. If it contains also clip rectangles, its cache will be update, or if not cached a full redraw will take place</summary>
PerformanceMeasure.Begin (PerformanceMeasure.Kind.Drawing);
if (!clipping.IsEmpty) {
+ ctx.Scale (zoomFactor,zoomFactor);
+
#if VKVG
clear (ctx);
#else
/// Ask OS to force the mouse position to the actual coordinate of Interface.MousePosition
/// </summary>
public virtual void ForceMousePosition () {
- Glfw3.SetCursorPosition (hWin, MousePosition.X, MousePosition.Y);
+ Glfw3.SetCursorPosition (hWin, MousePosition.X * ZoomFactor, MousePosition.Y * ZoomFactor);
}
/// <summary>Processes mouse move events from the root container, this function
set { throw new NotImplementedException (); }
}
- public Rectangle ClientRectangle => clientRectangle;
- public Rectangle GetClientRectangleForChild (ILayoutable child) => clientRectangle;
+ public Rectangle ClientRectangle => clientRectangle.Scaled (1.0/zoomFactor);
+ public Rectangle GetClientRectangleForChild (ILayoutable child) => ClientRectangle;
public Interface HostContainer => this;
public Rectangle getSlot () => ClientRectangle;
(Peak == '\xD' && (buffer [curPos + 1] == '\xA' || buffer [curPos + 1] == '\x85'));
}
+ /// <summary>
+ /// next char sequence has already been tested as eol, advance 1 or two char depending on eol format.
+ /// </summary>
+ public void ReadEol () {
+ if (Read () == '\xD')
+ Advance();
+ }
}
}
public readonly string ChangedText;
public int End => Start + Length;
+ public int End2 => Start + (string.IsNullOrEmpty (ChangedText) ? 0 : CharDiff);
- public int CharDiff => ChangedText.Length - Length;
+ public int CharDiff => string.IsNullOrEmpty (ChangedText) ? - Length : ChangedText.Length - Length;
public TextChange (int position, int length, string changedText) {
Start = position;
Length = length;
public override string ToString() => $"{Start},{End}";
public bool Contains (int absolutePosition)
=> absolutePosition >= Start && absolutePosition < End;
+ public bool Contains (TextSpan span)
+ => Start <= span.Start && End >= span.End;
}
}
}
#endregion
- #region GraphicObject override
+ #region Widget override
/*[XmlIgnore]public override Rectangle ClientRectangle {
get {
Rectangle cb = base.ClientRectangle;
public event EventHandler Pressed;
public event EventHandler Released;
- #region GraphicObject Overrides
+ #region Widget Overrides
public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
IsPressed = true;
get {
return _selectedItem;
}
- set {
+ set {
if (value == _selectedItem)
return;
_selectedItem = value;
currentDirectory = value;
NotifyValueChangedAuto (currentDirectory);
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
- updateFileSystemEntries();
+ Data = FileSystemEntries;
}
}
[XmlIgnore]public FileSystemInfo[] FileSystemEntries {
}
//set template and itemTemplates depending on view configuration
void updateItemTemplates () {
- return;
- ItemTemplate = fileItemTemplates;
+ lock (IFace.UpdateMutex) {
+ Template = dvTemplate;
+ switch (ViewStyle) {
+ case DirectoryViewStyle.Icons:
+ ItemTemplate = iconViewItmp;
+ break;
+ case DirectoryViewStyle.Detailed:
+ ItemTemplate = detailedViewITmp;
+ break;
+ case DirectoryViewStyle.Compact:
+ ItemTemplate = compactViewITmp;
+ break;
+ }
+ }
+ RegisterForGraphicUpdate();
}
- void updateFileSystemEntries () {
-
+ /// <summary>
+ /// Default template in DirectoryView is set depending on 'ViewStyle'
+ /// </summary>
+ /// <param name="template"></param>
+ protected override void loadTemplate (Widget template = null)
+ {
+ if (template == null)
+ base.loadTemplate (IFace.CreateITorFromIMLFragment (dvTemplate).CreateInstance());
+ else
+ base.loadTemplate (template);
}
- string fileItemTemplates => @"
-
+ string compactViewITmp => $@"
<ItemTemplate DataType='System.IO.FileInfo'>
<ListItem Fit='true'
BubbleEvents='All'
- Selected = '{Background=${ControlHighlight}}'
- Unselected = '{Background=Transparent}'>
- <HorizontalStack>
- <Image Margin='2' Width='ICON_SIZE' Height='ICON_SIZE' Path='${FileIcon}'/>
- <Label Text='{Name}' />
+ Selected = '{{Background=${{ControlHighlight}}}}'
+ Unselected = '{{Background=Transparent}}'>
+ <HorizontalStack Margin='1' >
+ <Image Width='20' Height='20' Path='${{FileIcon}}'/>
+ <Label Text='{{Name}}' />
</HorizontalStack>
</ListItem>
</ItemTemplate>
<ItemTemplate DataType='System.IO.DirectoryInfo'>
<ListItem Fit='true'
BubbleEvents='All'
- Selected = '{Background=${ControlHighlight}}'
- Unselected = '{Background=Transparent}'>
- <HorizontalStack>
- <Image Margin='2' Width='ICON_SIZE' Height='ICON_SIZE' Path='${FolderIcon}'/>
- <Label Text='{Name}' />
- <!--<Label Text='{LastAccessTime}' />-->
+ Selected = '{{Background=${{ControlHighlight}}}}'
+ Unselected = '{{Background=Transparent}}'>
+ <HorizontalStack Margin='1' >
+ <Image Width='20' Height='20' Path='${{FolderIcon}}'/>
+ <Label Text='{{Name}}' />
+ <!--<Label Text='{{LastAccessTime}}' />-->
</HorizontalStack>
</ListItem>
</ItemTemplate>
-".Replace ("ICON_SIZE", iconSize.ToString());
+";
+ string iconViewItmp => $@"
+<ItemTemplate DataType='System.IO.FileInfo'>
+ <ListItem Width='70' Height='60'
+ BubbleEvents='All'
+ Selected = '{{Background=${{ControlHighlight}}}}'
+ Unselected = '{{Background=Transparent}}'>
+ <VerticalStack>
+ <Image Margin='8' Width='Fit' Height='Stretched' Path='${{FileIcon}}' Scaled='true'/>
+ <Label Text='{{Name}}' Background='Jet' Width='Stretched' TextAlignment='Center' Multiline='true' Font='sans,9' />
+ </VerticalStack>
+ </ListItem>
+</ItemTemplate>
+<ItemTemplate DataType='System.IO.DirectoryInfo'>
+ <ListItem Width='90' Height='60'
+ BubbleEvents='All'
+ Selected = '{{Background=${{ControlHighlight}}}}'
+ Unselected = '{{Background=Transparent}}'>
+ <VerticalStack>
+ <Image Margin='0' Width='Fit' Height='Stretched' Path='${{FolderIcon}}' Scaled='true'/>
+ <Label Text='{{Name}}' Background='Jet' Width='Stretched' TextAlignment='Center' Multiline='true' Font='sans,9' />
+ </VerticalStack>
+ </ListItem>
+</ItemTemplate>
+";
+ string detailedViewITmp => $@"
+<ItemTemplate DataType='System.IO.DirectoryInfo'>
+ <TableRow Width='Stretched' Height='Fit' Focusable='true'
+ BubbleEvents='All' Tooltip='{{Name}}'
+ Selected='{{Background=${{ControlHighlight}}}}'
+ Unselected='{{Background=Transparent}}'>
+ <Image Width='Stretched' Height='Stretched' Path='${{FolderIcon}}' Margin='0' />
+ <Label Text='{{Name}}' Width='Fit' Font='sans,11' Margin='3'/>
+ <Label Text='' Font='sans,9'/>
+ <Label Text='{{LastAccessTime}}' Font='sans,9'/>
+ </TableRow>
+</ItemTemplate>
+<ItemTemplate DataType='System.IO.FileInfo'>
+ <TableRow Width='Stretched' Height='Fit' Focusable='true'
+ BubbleEvents='All' Tooltip='{{Name}}'
+ Selected='{{Background=${{ControlHighlight}}}}'
+ Unselected='{{Background=Transparent}}'>
+ <Image Width='Stretched' Height='Stretched' Path='${{FileIcon}}' Margin='2' />
+ <Label Text='{{Name}}' Width='Fit' Font='sans,11' Margin='3'/>
+ <Label Text='{{Length}}' Font='sans,9' TextAlignment='Right'/>
+ <Label Text='{{LastAccessTime}}' Font='sans,9'/>
+ </TableRow>
+</ItemTemplate>
+";
+
+string dvTemplate => ViewStyle == DirectoryViewStyle.Compact ?
+$@"
+<VerticalStack Margin='5'>
+ <Scroller Name='scroller1'>
+ <Wrapper Orientation='Horizontal' Height='Stretched' Width='Fit' HorizontalAlignment='Left'
+ Name='ItemsContainer' Margin='0' Spacing='2'/>
+ </Scroller>
+ <ScrollBar Style='HScrollBar'
+ Value='{{²../scroller1.ScrollX}}' Maximum='{{../scroller1.MaxScrollX}}'
+ CursorRatio='{{../scroller1.ChildWidthRatio}}'
+ LargeIncrement='{{../scroller1.PageWidth}}' SmallIncrement='30' />
+</VerticalStack>
+"
+: ViewStyle == DirectoryViewStyle.Detailed ?
+$@"
+<HorizontalStack Margin='5'>
+ <Scroller Name='scroller1'>
+ <Table Columns=',20;Name,Stretched;Size,100;Accessed,Fit' Height='Fit' Width='Stretched' VerticalAlignment='Top'
+ Name='ItemsContainer' Margin='0' Spacing='0' RowsMargin='0' ColumnSpacing='10'
+ HorizontalLineWidth='0' VerticalLineWidth='1' />
+ </Scroller>
+ <ScrollBar
+ Value='{{²../scroller1.ScrollY}}' Maximum='{{../scroller1.MaxScrollY}}'
+ CursorRatio='{{../scroller1.ChildHeightRatio}}'
+ LargeIncrement='{{../scroller1.PageHeight}}' SmallIncrement='30'/>
+</HorizontalStack>
+"
+:
+$@"
+<HorizontalStack Margin='5'>
+ <Scroller Name='scroller1'>
+ <Wrapper Orientation='Vertical' Height='Fit' VerticalAlignment='Top'
+ Name='ItemsContainer' Margin='0' Spacing='2'/>
+ </Scroller>
+ <ScrollBar
+ Value='{{²../scroller1.ScrollY}}' Maximum='{{../scroller1.MaxScrollY}}'
+ CursorRatio='{{../scroller1.ChildHeightRatio}}'
+ LargeIncrement='{{../scroller1.PageHeight}}' SmallIncrement='30'/>
+</HorizontalStack>
+"
+;
}
}
{
[DesignIgnore]
public class DockStack : GenericStack
- {
+ {
#region CTor
public DockStack () {}
public DockStack (Interface iface, string style = null) : base (iface, style) { }
}
/*public override bool PointIsIn (ref Point m)
- {
+ {
if (!base.PointIsIn(ref m))
return false;
// base.OnLayoutChanges (layoutType);
//
// if ((layoutType & LayoutingType.Sizing) > 0)
-// computeRects();
+// computeRects();
// }
Rectangle rIn = default(Rectangle);
public void onDragMouseMove (object sender, MouseMoveEventArgs e)
{
- //if (IsDropTarget) {
+ //if (IsDropTarget) {
DockWindow dw = IFace.DragAndDropOperation.DragSource as DockWindow;
if (dw == null || dw.IsDocked) {
base.onMouseMove (sender, e);
if (lm.X < cb.Left + cb.Width / dockWidthDivisor)
dw.DockingPosition = Alignment.Left;
else if (lm.X > cb.Right - cb.Width / dockWidthDivisor)
- dw.DockingPosition = Alignment.Right;
+ dw.DockingPosition = Alignment.Right;
} else {
getFocusedChild (lm);
if (focusedChild != null) {
if (lm.Y < rIn.Top + rIn.Height / dockWidthDivisor)
dw.DockingPosition = Alignment.Top;
else if (lm.Y > rIn.Bottom - rIn.Height / dockWidthDivisor)
- dw.DockingPosition = Alignment.Bottom;
+ dw.DockingPosition = Alignment.Bottom;
}
}
}
if (lm.Y < cb.Top + cb.Height / dockWidthDivisor)
dw.DockingPosition = Alignment.Top;
else if (lm.Y > cb.Bottom - cb.Height / dockWidthDivisor)
- dw.DockingPosition = Alignment.Bottom;
+ dw.DockingPosition = Alignment.Bottom;
} else {
getFocusedChild (lm);
if (focusedChild != null) {
if (lm.X < rIn.Left + rIn.Width / dockWidthDivisor)
dw.DockingPosition = Alignment.Left;
else if (lm.X > rIn.Right - rIn.Width / dockWidthDivisor)
- dw.DockingPosition = Alignment.Right;
+ dw.DockingPosition = Alignment.Right;
}
}
}
-
+
}
if (curDockPos != dw.DockingPosition)
protected override void onDragEnter (object sender, DragDropEventArgs e)
{
base.onDragEnter (sender, e);
-
+
}
public override void onDragLeave (object sender, DragDropEventArgs e)
{
//if (dw != null)
// dw.DockingPosition = Alignment.Undefined;
base.onDragLeave (sender, e);
-
+
}
-
+
public void Dock(DockWindow dw){
DockStack activeStack = this;
if (Children.Count == 1) {
Orientation = dw.DockingPosition.GetOrientation ();
if (Children [0] is DockWindow dwc)
- dwc.DockingPosition = dw.DockingPosition.GetOpposite ();
+ dwc.DockingPosition = dw.DockingPosition.GetOpposite ();
} else if (Children.Count > 0 && dw.DockingPosition.GetOrientation () != Orientation) {
activeStack = new DockStack (IFace);
activeStack.Orientation = dw.DockingPosition.GetOrientation ();
System.Diagnostics.Debug.WriteLine ("Docking {0} as {2} in {1}", dw.Name, activeStack.Name, dw.DockingPosition);
switch (dw.DockingPosition) {
- case Alignment.Top:
+ case Alignment.Top:
dw.Height = vTreshold;
dw.Width = Measure.Stretched;
activeStack.InsertChild (0, dw);
}
dw.IsDocked = true;
}
- public void Undock (DockWindow dw){
+ public void Undock (DockWindow dw){
int idx = Children.IndexOf(dw);
System.Diagnostics.Debug.WriteLine ("undocking child index: {0} ; name={1}; pos:{2} ; childcount:{3}",idx, dw.Name, dw.DockingPosition, Children.Count);
if (Children.Count == 0)//TODO:empty Stack should be removed if not root stack I guess
return;
-
- if (dw.DockingPosition == Alignment.Left || dw.DockingPosition == Alignment.Top) {
+
+ if (dw.DockingPosition == Alignment.Left || dw.DockingPosition == Alignment.Top) {
RemoveChild (idx);
if (stretchedChild == dw) {
stretchedChild = Children [idx];
if (dsp == null) {
Children [0].Width = Children [0].Height = Measure.Stretched;
return;
- }
+ }
//remove level and move remaining obj to level above
Widget g = Children [0];
RemoveChild (g);
DockWindow dw = null;
string wName = getConfAttrib (conf, ref i).ToString();
try {
- dw = IFace.CreateInstance (wName) as DockWindow;
+ dw = IFace.CreateInstance (wName) as DockWindow;
} catch (Exception ex){
Console.WriteLine ($"[importDockWinConfig]{ex}");
- dw = new DockWindow (IFace);
+ dw = new DockWindow (IFace);
}
dw.Name = wName;
dw.savedSlot = Rectangle.Parse (getConfAttrib (conf, ref i).ToString());
dw.wasResizable = Boolean.Parse (getConfAttrib (conf, ref i).ToString());
dw.Resizable = false;
-
+
dw.DataSource = dataSource;
return dw;
}
- void importConfig (ReadOnlySpan<char> conf, ref int i, object dataSource) {
+ void importConfig (ReadOnlySpan<char> conf, ref int i, object dataSource) {
if (conf [i++] != '(')
return;
- DockWindow dw = null;
+ DockWindow dw = null;
while (i < conf.Length - 4) {
string sc = conf.Slice (i, 4).ToString();
i += 4;
tv.Width = Measure.Parse (getConfAttrib (conf, ref i).ToString());
tv.Height = Measure.Parse (getConfAttrib (conf, ref i).ToString());
this.AddChild (tv);
- i++;
+ i++;
while (conf [i] != ')') {
dw = importDockWinConfig (conf, ref i, dataSource);
tv.AddItem (dw);
}
i++;
break;
- case "WIN;":
- dw = importDockWinConfig (conf, ref i, dataSource);
+ case "WIN;":
+ dw = importDockWinConfig (conf, ref i, dataSource);
this.AddChild (dw);
dw.IsDocked = true;
break;
StringBuilder tmp = new StringBuilder("(");
for (int i = 0; i < Children.Count; i++) {
- if (Children [i] is DockWindow dw)
+ if (Children [i] is DockWindow dw)
tmp.Append (dw.GetDockConfigString());
else if (Children [i] is TabView tv) {
tmp.Append ($"TVI;{tv.Width};{tv.Height};(");
foreach (DockWindow d in tv.Items)
- tmp.Append (d.GetDockConfigString().Substring(4));
+ tmp.Append (d.GetDockConfigString().Substring(4));
tmp.Append (")");
}else if (Children [i] is DockStack ds)
tmp.Append ($"STK;{ds.Width};{ds.Height};{ds.Orientation};{ds.exportConfig()}");
- else if (Children [i] is Splitter sp)
+ else if (Children [i] is Splitter sp)
tmp.Append (string.Format("SPL;{0};{1};{2};", sp.Width, sp.Height, sp.Thickness));
if (i < Children.Count - 1)
- tmp.Append ("|");
+ tmp.Append ("|");
}
tmp.Append (")");
}
#endregion
- #region GraphicObject Overrides
+ #region Widget Overrides
public override bool ArrangeChildren => true;
public override void ChildrenLayoutingConstraints (ILayoutable layoutable, ref LayoutingType layoutType) {
//Prevent child repositionning in the direction of stacking
#endregion
- #region GraphicObject Overrides
+ #region Widget Overrides
// protected override Size measureRawSize ()
// {
// Size tmp = new Size ();
//
-// foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {
+// foreach (Widget c in Children.Where(ch=>ch.Visible)) {
// tmp.Width = Math.Max (tmp.Width, c.Slot.Width);
// tmp.Height = Math.Max (tmp.Height, c.Slot.Height);
// }
ChildrenCleared.Raise (this, new EventArgs ());
}
- #region GraphicObject overrides
+ #region Widget overrides
public override int measureRawSize (LayoutingType lt)
{
DbgLogger.StartEvent(DbgEvtType.GOMeasure, this, lt);
}
}
- #region GraphicObject overrides
+ #region Widget overrides
public override Widget FindByName (string nameToFind)
{
if (Name == nameToFind)
/// <summary>
/// Opacity parameter for the image
/// </summary>
- // TODO:could be moved in GraphicObject
+ // TODO:could be moved in Widget
[DefaultValue(1.0)]
public virtual double Opacity {
get { return opacity; }
}
#endregion
- #region GraphicObject overrides
+ #region Widget overrides
public override int measureRawSize (LayoutingType lt)
{
if (_pic == null)
selectionStart = null;
}
- #region GraphicObject overrides
+ #region Widget overrides
public override bool UpdateLayout (LayoutingType layoutType) {
if ((LayoutingType.Sizing | layoutType) != LayoutingType.None) {
if (!System.Threading.Monitor.TryEnter (linesMutex))
positionContent (LayoutingType.Y);
}
- #region GraphicObject overrides
+ #region Widget overrides
public override void onMouseLeave (object sender, MouseMoveEventArgs e)
{
IsPopped = false;
#endif
protected Widget child;
#if DEBUG_LOG
- internal Widget getTemplateRoot {
- get { return child; }
- }
+ internal Widget getTemplateRoot => child;
#endif
protected virtual void SetChild(Widget _child)
g.Dispose ();
}
- #region GraphicObject Overrides
+ #region Widget Overrides
public override Widget FindByName (string nameToFind)
{
public event EventHandler Checked;
public event EventHandler Unchecked;
- #region GraphicObject overrides
+ #region Widget overrides
public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
Group pg = Parent as Group;
/// <summary>
/// if true, key stroke are handled in derrived class
/// </summary>
- protected bool KeyEventsOverrides = false;
+ bool keyEventsOverrides;
+ public bool KeyEventsOverrides {
+ get => keyEventsOverrides;
+ set {
+ if (keyEventsOverrides == value)
+ return;
+ keyEventsOverrides = value;
+ NotifyValueChangedAuto (keyEventsOverrides);
+ }
+ }
#region public properties
/// <summary> Horizontal Scrolling Position </summary>
}
- #region GraphicObject Overrides
+ #region Widget Overrides
public override Rectangle ScreenCoordinates (Rectangle r)
{
return base.ScreenCoordinates (r) - new Point((int)ScrollX,(int)ScrollY);
{
base.onKeyDown (sender, e);
- if (KeyEventsOverrides)
+ if (keyEventsOverrides)
return;
switch (e.Key) {
}
}
- #region GraphicObject override
+ #region Widget override
public override ILayoutable Parent {
get => base.Parent;
set {
_contentContainer = this.child.FindByName ("Content") as Container;
}
-#region GraphicObject overrides
+#region Widget overrides
public override Widget FindByName (string nameToFind)
{
if (Name == nameToFind)
string caption;
/// <summary>
- /// Template path
+ /// 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.
/// </remark>
- //TODO: this property should be renamed 'TemplatePath'
[DefaultValue(null)]
public string Template {
get => _template;
if (string.IsNullOrEmpty(_template))
loadTemplate ();
+ else if (_template.Trim().StartsWith('<'))//imlfragment
+ loadTemplate (IFace.CreateITorFromIMLFragment (_template).CreateInstance());
else
loadTemplate (IFace.CreateInstance (_template));
}
}
}
- #region GraphicObject overrides
+ #region Widget overrides
/// <summary>
- /// override search method from GraphicObject to prevent
+ /// override search method from Widget to prevent
/// searching inside template
/// </summary>
/// <returns>widget identified by name, or null if not found</returns>
/// <summary>
/// Keep track of expanded subnodes and closed time to unload
/// </summary>
- //Dictionary<GraphicObject, Stopwatch> nodes = new Dictionary<GraphicObject, Stopwatch>();
+ //Dictionary<Widget, Stopwatch> nodes = new Dictionary<Widget, Stopwatch>();
internal List<Widget> nodes = new List<Widget>();//TODO:close time tracking
/// <summary>
/// Item templates file path, on disk or embedded.
}
- #region GraphicObject overrides
+ #region Widget overrides
public override Widget FindByName (string nameToFind)
{
if (Name == nameToFind)
if (SelectedIndex < Items.Count - 1)
SelectedIndex++;
break;
+ case Glfw.Key.PageUp:
+ pagedSelection (true);
+ break;
+ case Glfw.Key.PageDown:
+ pagedSelection (false);
+ break;
+ case Glfw.Key.Home:
+ SelectedIndex = 0;
+ break;
+ case Glfw.Key.End:
+ SelectedIndex = Items.Count - 1;
+ break;
default:
base.onKeyDown(sender, e);
break;
}
}
+
+ void pagedSelection (bool up) {
+ if (scroller != null && selectedItemContainer != null && itemsContainer is GenericStack gs) {
+ Rectangle scrollerCb = scroller.ClientRectangle;
+ Rectangle itemCb = selectedItemContainer.Slot;
+ int itemsPerPage = gs.Orientation == Orientation.Vertical ? scrollerCb.Height / itemCb.Height : scrollerCb.Width / itemCb.Width;
+ if (up)
+ SelectedIndex = Math.Max (0, SelectedIndex - itemsPerPage);
+ else
+ SelectedIndex = Math.Min (Items.Count - 1, SelectedIndex + itemsPerPage);
+ }
+ }
}
}
/// <summary>
/// This constructor **must** be used when creating widget from code.
///
- /// When creating new widgets derived from GraphicObject, both parameterless and this constructors are
+ /// When creating new widgets derived from Widget, both parameterless and this constructors are
/// facultatives, the compiler will create the parameterless one automaticaly if no other one exists.
/// But if you intend to be able to create instances of the new widget in code and override the constructor
/// with the Interface parameter, you **must** also provide the override of the parameterless constructor because
get => requiredLayoutings;
set => requiredLayoutings = value;
}
- //TODO: it would save the recurent cost of a cast in event bubbling if parent type was GraphicObject
+ //TODO: it would save the recurent cost of a cast in event bubbling if parent type was Widget
// or we could add to the interface the mouse events
/// <summary>
/// Parent in the graphic tree, used for rendering and layouting
}
}
/// <summary>
- /// If true, rendering of GraphicObject is clipped inside client rectangle
+ /// If true, rendering of Widget is clipped inside client rectangle
/// </summary>
[DesignCategory ("Appearance")][DefaultValue(true)]
public virtual bool ClipToClientRect {
}
}
/// <summary>
- /// Font being used in many controls, it is defined in the base GraphicObject class.
+ /// Font being used in many controls, it is defined in the base Widget class.
/// </summary>
[DesignCategory ("Appearance")][DefaultValue("sans, 12")]
public virtual Font Font {
il = dm.GetILGenerator(256);
il.DeclareLocal(typeof (object));//store root
il.Emit(OpCodes.Nop);
- //set local GraphicObject to root object passed as 1st argument
+ //set local Widget to root object passed as 1st argument
il.Emit (OpCodes.Ldarg_0);
il.Emit (OpCodes.Stloc_0);
bool maySize => sizingHandle != null && resizable && sizingHandle.IsHover;
bool mayMove => moveHandle != null && movable;
- #region GraphicObject Overrides
+ #region Widget Overrides
public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
base.onMouseMove (sender, e);
}
#endregion
- #region GraphicObject Overrides
+ #region Widget Overrides
public override int measureRawSize (LayoutingType lt)
{
int tmp = 0;
namespace Crow
{
/// <summary>
- /// Parser for style files.
+ /// Parser for style files. Only the first occurence of a key/value pair is kept.
+ /// Theme styles will override any style, then the startup application styles have priority.
/// </summary>
+ /// <remark>
+ /// The order of style loading during application startup is as follow:
+ /// - Optional theme styles
+ /// - Style from entry assembly, the executable
+ /// - crowAssemblies list are loaded in order.
+ /// - default style from the crow assembly.
+ /// </remark>
//TODO: style key shared by different class may use only first encouneter class setter, which can cause bug.
+ //TODO: ensure alphabetic order of loading inside single assembly.
public class StyleReader : StreamReader {
enum States { classNames, members, value, endOfStatement }
<!-- Experimental vkvg backend, testing only-->
<CrowVkvgBackend>false</CrowVkvgBackend>
- <GlfwSharpVersion>0.2.12-beta</GlfwSharpVersion>
+ <GlfwSharpVersion>0.2.14</GlfwSharpVersion>
</PropertyGroup>
</Project>
//testFiles = new string [] { @"Interfaces/Stack/StretchedInFit4.crow" };
//testFiles = new string [] { @"Interfaces/TemplatedGroup/1.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker2.crow" };
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
+ testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Widget", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Stack", "*.crow")).ToArray ();
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <OutputType>Exe</OutputType>
+ </PropertyGroup>
<ItemGroup>
- <EmbeddedResource Include="ui\**\*.*">
- <LogicalName>HelloWorld.%(Filename)%(Extension)</LogicalName>
- </EmbeddedResource>
+ <PackageReference Include="Crow" />
</ItemGroup>
</Project>
\ No newline at end of file
namespace HelloWorld
{
- class Program : SampleBase {
- public CommandGroup CMDTest = new CommandGroup (
- new ActionCommand("Action", ()=> Console.WriteLine ("Action executed"))
- );
+ class Program {
static void Main (string[] args) {
- DbgLogger.IncludedEvents.AddRange ( new DbgEvtType[] {
- DbgEvtType.MouseEnter,
- DbgEvtType.MouseLeave,
- DbgEvtType.WidgetMouseDown,
- DbgEvtType.WidgetMouseUp,
- DbgEvtType.WidgetMouseClick,
- DbgEvtType.HoverWidget
- });
- using (Interface app = new Program ()) {
- app.Initialized += (sender, e) => (sender as Interface).Load ("#HelloWorld.helloworld.crow").DataSource = sender;
+ using (Interface app = new Interface ()) {
+ app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Label Text='Hello World'/>");
app.Run ();
}
}
+++ /dev/null
-<?xml version="1.0"?>
-<VerticalStack Margin="50" Spacing="20">
- <HorizontalStack Height="Fit">
- <Label Text="Hover:" Width="50" Foreground="Grey"/>
- <Label Text="{HoverWidget}" Font="mono, 8"/>
- </HorizontalStack>
- <HorizontalStack Height="Fit">
- <Label Text="Focus:" Width="50" Foreground="Grey"/>
- <Label Text="{FocusedWidget}" Font="mono, 8"/>
- </HorizontalStack>
- <HorizontalStack Height="Fit">
- <Label Text="Active:" Width="50" Foreground="Grey"/>
- <Label Text="{ActiveWidget}" Font="mono, 8"/>
- </HorizontalStack>
- <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true"
- MouseEnter="{Background=Red}"
- MouseLeave="{Background=Blue}">
- <Label Margin="5" Text="Hello World" />
- </Border>
- <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true"
- MouseEnter="{Background=Red}"
- MouseLeave="{Background=Blue}">
- <Label Margin="5" Text="Hello World" />
- </Border>
- <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true"
- MouseEnter="{Background=Red}"
- MouseLeave="{Background=Blue}">
- <Label Margin="5" Text="Hello World" />
- </Border>
- <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true"
- MouseEnter="{Background=Red}"
- MouseLeave="{Background=Blue}">
- <Label Margin="5" Text="Hello World" />
- </Border>
- <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true"
- MouseEnter="{Background=Red}"
- MouseLeave="{Background=Blue}">
- <Label Margin="5" Text="Hello World" />
- </Border>
-</VerticalStack>
app.SetWindowIcon ("#Crow.Icons.crow.png");
//app.Theme = @"C:\Users\Jean-Philippe\source\Crow\Themes\TestTheme";
CurrentProgramInstance = app;
+ Interface.UPDATE_INTERVAL = 50;
+ Interface.POLLING_INTERVAL = 5;
app.Run ();
}
using System.Threading;
using Crow.Drawing;
+using System.Diagnostics;
namespace Samples
{
public class SampleBase : Interface
{
-#if NETCOREAPP
- static IntPtr resolveUnmanaged(Assembly assembly, String libraryName)
- {
-
- switch (libraryName)
- {
- case "glfw3":
- return NativeLibrary.Load("glfw", assembly, null);
- case "rsvg-2.40":
- return NativeLibrary.Load("rsvg-2", assembly, null);
- }
- Console.WriteLine($"[UNRESOLVE] {assembly} {libraryName}");
- return IntPtr.Zero;
- }
- static SampleBase()
- {
- System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()).ResolvingUnmanagedDll += resolveUnmanaged;
- }
-#endif
public SampleBase(IntPtr hWin) : base(800, 600, hWin) { }
public SampleBase() : base(800, 600, true, true) { }
public SampleBase(int width, int height, bool startUIThread, bool createSurface) :
}
return base.OnKeyDown(e);
}
+ public IEnumerable<RandomProgress> RandomProgressList {
+ get {
+ for (int i=0; i< RandomProgressItemCount; i++)
+ yield return new RandomProgress ();
+ }
+ }
+ int randomProgressItemCount = 10;
+ public int RandomProgressItemCount {
+ get => randomProgressItemCount;
+ set {
+ if (randomProgressItemCount == value)
+ return;
+ randomProgressItemCount = value;
+ NotifyValueChanged (randomProgressItemCount);
+ NotifyValueChanged ("RandomProgressList", RandomProgressList);
+ }
+ }
+
+ public class RandomProgress : IValueChange {
+ static Random rnd = new Random();
+ public event EventHandler<ValueChangeEventArgs> ValueChanged;
+ public void NotifyValueChanged(object _value, [CallerMemberName] string caller = null)
+ => ValueChanged.Raise(this, new ValueChangeEventArgs(caller, _value));
+ public void NotifyValueChanged(string membername, object _value)
+ => ValueChanged.Raise(this, new ValueChangeEventArgs(membername, _value));
+ public RandomProgress () {
+ step = rnd.Next (10);
+ max = rnd.Next (100, 1000);
+ sleep = rnd.Next (2,200);
+ Thread t = new Thread(increment);
+ t.IsBackground = true;
+ t.Start ();
+
+ NotifyValueChanged ("Maximum", max);
+ }
+ int val, step, max, sleep;
+ public int Value {
+ get => val;
+ set {
+ if (val == value)
+ return;
+ val = value;
+ NotifyValueChanged (val);
+ }
+ }
+ public int Maximum => max;
+
+ void increment() {
+ Stopwatch sw = Stopwatch.StartNew();
+ while (sw.ElapsedMilliseconds < 10000) {
+ Value += step;
+ if (Value > max)
+ Value = 0;
+ Thread.Sleep (sleep);
+ }
+ Value = max;
+ }
+ }
}
}
\ No newline at end of file
<?xml version="1.0"?>
<Container Background="Blue" Margin="10" Fit="true">
- <Label Text="test" Margin="10" Fit="true" Background="SeaGreen"/>
+ <Label Multiline="true" Text="this is a test of a multiline textbox
+and another line
+and another line
+and another line a little bit longuer
+and another line
+and another line
+" Margin="10" Fit="true" Background="SeaGreen" TextAlignment="Center"/>
</Container>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<FileDialog Caption="Open File" CurrentDirectory="/" SearchPattern="*.*">
+ <Template>
+ <Border Name="SizeHandle" Style="winBorder" CornerRadius="{./CornerRadius}" Background="{./Background}">
+ <VerticalStack Spacing="0">
+ <HorizontalStack Background="${WindowTitleBarBackground}" Margin="0" Spacing="0" Height="Fit">
+ <Widget Width="5"/>
+ <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+ <Label Name="MoveHandle" Width="Stretched" Foreground="${WindowTitleBarForeground" Margin="2" TextAlignment="Center" Text="{./Caption}" />
+ <Border CornerRadius="0" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Icons.exit2.svg"
+ MouseClick="./onQuitPress"/>
+ </Border>
+ <Widget Width="5"/>
+ </HorizontalStack>
+ <Container Name="Content" MinimumSize="50,50" Background="Jet">
+ <VerticalStack Margin="1">
+ <HorizontalStack Height="Fit">
+ <Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
+ <Image Margin="2" Width="14" Height="14"
+ Path="#Crow.Icons.level-up.svg"/>
+ </Button>
+ <TextBox Style="TxtInFileDialog" Text="{²./CurrentDirectory}"/>
+ </HorizontalStack>
+ <DirectoryView ShowHidden="{²../cbShowHidden.IsChecked}" FileMask="{²../txtFileMask.Text}" ShowFiles="{²../cbShowFiles.IsChecked}"
+ Name="fv" CurrentDirectory="{./CurrentDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
+ Width="100%" Margin="0" MouseDoubleClick="./onFileSelectDblClick">
+ <Template>
+ <ListBox Name="fileView" Data="{./FileSystemEntries}"
+ SelectedItemChanged="./onSelectedItemChanged">
+ <Template>
+ <HorizontalStack>
+ <Scroller Name="scroller1">
+ <VerticalStack Height="Fit" VerticalAlignment="Top"
+ Name="ItemsContainer" Margin="0" Spacing="1"/>
+ </Scroller>
+ <ScrollBar Name="scrollbar1" Orientation="Vertical"
+ Value="{²../scroller1.ScrollY}" Maximum="{../scroller1.MaxScrollY}"
+ CursorRatio="{../scroller1.ChildHeightRatio}"
+ LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
+ Width="14" />
+ </HorizontalStack>
+ </Template>
+ <ItemTemplate>
+ <Widget Height="16" Background="Red"/>
+ </ItemTemplate>
+ <ItemTemplate DataType="System.IO.FileInfo">
+ <ListItem Height="Fit"
+ Selected = "{Background=${ControlHighlight}}"
+ Unselected = "{Background=Transparent}">
+ <HorizontalStack>
+ <Image Margin="2" Width="16" Height="16" Path="#Crow.Icons.file.svg"/>
+ <Label Text="{Name}" Width="Stretched"/>
+ </HorizontalStack>
+ </ListItem>
+ </ItemTemplate>
+ <ItemTemplate DataType="System.IO.DirectoryInfo">
+ <ListItem Height="Fit"
+ Selected = "{Background=${ControlHighlight}}"
+ Unselected = "{Background=Transparent}">
+ <HorizontalStack>
+ <Image Margin="2" Width="16" Height="16" Path="#Crow.Icons.folder.svg"/>
+ <Label Text="{Name}" Width="Stretched"/>
+ <Label Text="{LastAccessTime}" />
+ </HorizontalStack>
+ </ListItem>
+ </ItemTemplate>
+ </ListBox>
+ </Template>
+ </DirectoryView>
+ <HorizontalStack Height="Fit">
+ <TextBox Style="TxtInFileDialog" Text="{²./SelectedFile}"/>
+ <TextBox Style="TxtInFileDialog" Width="50" Name="txtFileMask" Text="{²./SearchPattern}"/>
+ </HorizontalStack>
+ <HorizontalStack Margin="5" Fit="true" HorizontalAlignment="Right">
+ <CheckBox Style="CheckBoxAlt" Name="cbShowFiles" Caption="Show Files" IsChecked="{²./ShowFiles}"/>
+ <CheckBox Style="CheckBoxAlt" Name="cbShowHidden" Caption="Show Hidden" IsChecked="{²./ShowHidden}"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true" HorizontalAlignment="Right" Margin="3" Spacing="3">
+ <Button Caption="Ok" Command="{./CMDOk}"/>
+ <Button Caption="Cancel" Command="{./CMDCancel}"/>
+ </HorizontalStack>
+ </VerticalStack>
+ </Container>
+ </VerticalStack>
+ </Border>
+
+ </Template>
+</FileDialog>
+
--- /dev/null
+<VerticalStack>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 Name="dv" CurrentDirectory="/mnt/devel" MouseDoubleClick="./onFileSelectDblClick"/>
+</VerticalStack>
\ No newline at end of file
-<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
- <Template>
- <VerticalStack>
- <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+<VerticalStack>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 UseLoadingThread="false" Name="dv" CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
+ <Template>
<HorizontalStack Background="Grey" Margin="5">
<Scroller Name="scroller1">
<Wrapper Orientation="Vertical" Height="Fit" VerticalAlignment="Top"
LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
Width="14" />
</HorizontalStack>
- </VerticalStack>
- </Template>
+ </Template>
<ItemTemplate DataType="System.IO.FileInfo">
<ListItem Width="70" Height="60"
BubbleEvents="All" Tooltip="{Name}"
</VerticalStack>
</ListItem>
</ItemTemplate>
-</DirectoryView2>
\ No newline at end of file
+</DirectoryView2>
+</VerticalStack>
\ No newline at end of file
-<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
- <Template>
- <VerticalStack>
- <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/>
- <VerticalStack Background="Grey" Margin="5">
- <Scroller Name="scroller1">
- <Wrapper Orientation="Horizontal" Height="Stretched" Width="Fit" HorizontalAlignment="Left"
- Name="ItemsContainer" Margin="0" Spacing="2"/>
- </Scroller>
+<VerticalStack>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 Name="dv" CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
+ <Template>
+ <VerticalStack>
+ <VerticalStack Background="Grey" Margin="5">
+ <Scroller Name="scroller1">
+ <Wrapper Orientation="Horizontal" Height="Stretched" Width="Fit" HorizontalAlignment="Left"
+ Name="ItemsContainer" Margin="0" Spacing="2"/>
+ </Scroller>
+ </VerticalStack>
</VerticalStack>
- </VerticalStack>
- </Template>
- <ItemTemplate DataType="System.IO.FileInfo">
- <ListItem Width="Fit" Height="Fit"
- BubbleEvents="All" Tooltip="{Name}"
- Selected = "{Background=${ControlHighlight}}"
- Unselected = "{Background=Transparent}">
- <HorizontalStack Spacing="5">
- <Image Margin="0" Width="16" Height="16" Path="${FileIcon}" Scaled="true"/>
- <Label Text="{Name}" Width="Fit" Font="sans,9" />
- </HorizontalStack>
- </ListItem>
- </ItemTemplate>
- <ItemTemplate DataType="System.IO.DirectoryInfo">
- <ListItem Width="Fit" Height="Fit"
- BubbleEvents="All" Tooltip="{Name}"
- Selected = "{Background=${ControlHighlight}}"
- Unselected = "{Background=Transparent}">
- <HorizontalStack Spacing="5">
- <Image Margin="0" Width="16" Height="16" Path="${FolderIcon}" Scaled="true"/>
- <Label Text="{Name}" Width="Fit" Font="sans,9"/>
- </HorizontalStack>
- </ListItem>
- </ItemTemplate>
-</DirectoryView2>
\ No newline at end of file
+ </Template>
+ <ItemTemplate DataType="System.IO.FileInfo">
+ <ListItem Width="Fit" Height="Fit"
+ BubbleEvents="All" Tooltip="{Name}"
+ Selected = "{Background=${ControlHighlight}}"
+ Unselected = "{Background=Transparent}">
+ <HorizontalStack Spacing="5">
+ <Image Margin="0" Width="16" Height="16" Path="${FileIcon}" Scaled="true"/>
+ <Label Text="{Name}" Width="Fit" Font="sans,9" />
+ </HorizontalStack>
+ </ListItem>
+ </ItemTemplate>
+ <ItemTemplate DataType="System.IO.DirectoryInfo">
+ <ListItem Width="Fit" Height="Fit"
+ BubbleEvents="All" Tooltip="{Name}"
+ Selected = "{Background=${ControlHighlight}}"
+ Unselected = "{Background=Transparent}">
+ <HorizontalStack Spacing="5">
+ <Image Margin="0" Width="16" Height="16" Path="${FolderIcon}" Scaled="true"/>
+ <Label Text="{Name}" Width="Fit" Font="sans,9"/>
+ </HorizontalStack>
+ </ListItem>
+ </ItemTemplate>
+ </DirectoryView2>
+</VerticalStack>
\ No newline at end of file
-<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
- <Template>
- <VerticalStack>
- <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/>
- <VerticalStack Background="DarkGrey" Margin="0">
- <Scroller Name="scroller1">
- <Table Columns=",20;Name,Stretched;Size,100;Accessed,Fit" Height="Fit" Width="Stretched" VerticalAlignment="Top"
- Name="ItemsContainer" Margin="0" Spacing="0" RowsMargin="0" ColumnSpacing="10"
- HorizontalLineWidth="0" VerticalLineWidth="1" />
- </Scroller>
+<VerticalStack>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 Name="dv" CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
+ <Template>
+ <VerticalStack>
+ <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <VerticalStack Background="DarkGrey" Margin="0">
+ <Scroller Name="scroller1">
+ <Table Columns=",20;Name,Stretched;Size,100;Accessed,Fit" Height="Fit" Width="Stretched" VerticalAlignment="Top"
+ Name="ItemsContainer" Margin="0" Spacing="0" RowsMargin="0" ColumnSpacing="10"
+ HorizontalLineWidth="0" VerticalLineWidth="1" />
+ </Scroller>
+ </VerticalStack>
</VerticalStack>
- </VerticalStack>
- </Template>
- <ItemTemplate DataType="System.IO.DirectoryInfo">
- <TableRow Width="Stretched" Height="Fit" Focusable="true"
- BubbleEvents="All" Tooltip="{Name}"
- Selected="{Background=${ControlHighlight}}"
- Unselected="{Background=Transparent}">
- <Image Width="Stretched" Height="Stretched" Path="${FolderIcon}" Margin="0" />
- <Label Text="{Name}" Width="Fit" Font="sans,11" Margin="3"/>
- <Label Text="" Font="sans,9"/>
- <Label Text="{LastAccessTime}" Font="sans,9"/>
- </TableRow>
- </ItemTemplate>
- <ItemTemplate DataType="System.IO.FileInfo">
- <TableRow Width="Stretched" Height="Fit" Focusable="true"
- BubbleEvents="All" Tooltip="{Name}"
- Selected="{Background=${ControlHighlight}}"
- Unselected="{Background=Transparent}">
- <Image Width="Stretched" Height="Stretched" Path="${FileIcon}" Margin="2" />
- <Label Text="{Name}" Width="Fit" Font="sans,11" Margin="3"/>
- <Label Text="{Length}" Font="sans,9" TextAlignment="Right"/>
- <Label Text="{LastAccessTime}" Font="sans,9"/>
- </TableRow>
- </ItemTemplate>
-</DirectoryView2>
\ No newline at end of file
+ </Template>
+ <ItemTemplate DataType="System.IO.DirectoryInfo">
+ <TableRow Width="Stretched" Height="Fit" Focusable="true"
+ BubbleEvents="All" Tooltip="{Name}"
+ Selected="{Background=${ControlHighlight}}"
+ Unselected="{Background=Transparent}">
+ <Image Width="Stretched" Height="Stretched" Path="${FolderIcon}" Margin="0" />
+ <Label Text="{Name}" Width="Fit" Font="sans,11" Margin="3"/>
+ <Label Text="" Font="sans,9"/>
+ <Label Text="{LastAccessTime}" Font="sans,9"/>
+ </TableRow>
+ </ItemTemplate>
+ <ItemTemplate DataType="System.IO.FileInfo">
+ <TableRow Width="Stretched" Height="Fit" Focusable="true"
+ BubbleEvents="All" Tooltip="{Name}"
+ Selected="{Background=${ControlHighlight}}"
+ Unselected="{Background=Transparent}">
+ <Image Width="Stretched" Height="Stretched" Path="${FileIcon}" Margin="2" />
+ <Label Text="{Name}" Width="Fit" Font="sans,11" Margin="3"/>
+ <Label Text="{Length}" Font="sans,9" TextAlignment="Right"/>
+ <Label Text="{LastAccessTime}" Font="sans,9"/>
+ </TableRow>
+ </ItemTemplate>
+ </DirectoryView2>
+</VerticalStack>
\ No newline at end of file
<Label Text="{ActiveWidget}" Font="mono, 8"/>
</HorizontalStack>
<Container>
- <FileDialog Focusable="true" Resizable="true">
+ <FileDialog Focusable="true" Resizable="true" Width="80%" Height="80%">
<Template>
<Border Name="SizeHandle" Style="winBorder" CornerRadius="{./CornerRadius}" Background="{./Background}">
<VerticalStack Spacing="0">
Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
<HorizontalStack Spacing="5">
- <Image Width="20" Height="20" Path="#Crow.Icons.file.svg"/>
+ <Image Width="16" Height="16" Path="#Crow.Icons.file.svg"/>
<Label Margin="2" Text="{Name}" Width="Stretched"/>
</HorizontalStack>
</ListItem>
Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
<HorizontalStack Spacing="5">
- <Image Width="20" Height="20" Path="#Crow.Icons.folder.svg"/>
+ <Image Width="16" Height="16" Path="#Crow.Icons.folder.svg"/>
<Label Margin="2" Text="{Name}" Width="Stretched"/>
<Label Margin="2" Text="{LastAccessTime}" />
</HorizontalStack>
--- /dev/null
+<VerticalStack>
+ <VerticalStack Width="Fit" Background="DarkSlateGrey" Margin="10" Height="Fit">
+ <HorizontalStack Height="Fit" Spacing="10">
+ <Label Text="Value:"/>
+ <Label Text="{../../slider.Value}" Background="Onyx" Margin="1" Width="40" TextAlignment="Right"/>
+ </HorizontalStack>
+ <Slider Name="slider" Height="10" Width="200" Background="DarkGrey" LargeIncrement="20" SmallIncrement="5"
+ Minimum="10" Maximum="1000" Value="{²RandomProgressItemCount}"/>
+ </VerticalStack>
+ <ListBox UseLoadingThread="false" Data="{RandomProgressList}">
+ <Template>
+ <Wrapper Name="ItemsContainer"/>
+ </Template>
+ <ItemTemplate>
+ <ProgressBar Maximum="{Maximum}" Value="{Value}" Height="10" Width="50"/>
+ </ItemTemplate>
+ </ListBox>
+</VerticalStack>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Widget Width="200" Height="200" Background="RoyalBlue"/>
+++ /dev/null
-<?xml version="1.0"?>
-<Widget Margin="10" Width="150" Height="150" Background="SeaGreen"
- MinimumSize="50,50"/>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Widget Margin="10" Width="50%" Height="50%"
- Background="hgradient|0:Red|0.25:Blue|0.5:Green|0.75:Yellow|1:Red"
- MinimumSize="50,50"/>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack Fit="true">
- <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
- <ProgressBar CornerRadius="5" Background="DimGrey" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
- <HorizontalStack Fit="true">
- <Label Text="Memory:" Width="50" TextAlignment="Right"/>
- <Label Text="{memory}" Font="droid,12" TextAlignment="Center"
- Background="vgradient|0:Blue|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- </VerticalStack>
- <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- </VerticalStack>
- <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- </VerticalStack>
- <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Update:" Width="50" TextAlignment="Right"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
- <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Min:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Max:" Width="50" TextAlignment="Right"/>
- <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
- Background="vgradient|0:Green|1:Black"/>
- </HorizontalStack>
- </VerticalStack>
-</HorizontalStack>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack Width="Stretched" Height="Fit" Margin="5" Background="RoyalBlue">
- <Widget Background="Blue" Width="10%" Height="20"/>
- <Widget Background="RoyalBlue" Width="Stretched" Height="20"/>
- <Widget Background="RoyalBlue" Width="10%" Height="20"/>
- <Widget Background="RoyalBlue" Width="10%" Height="20"/>
- <Widget Background="RoyalBlue" Width="10%" Height="20"/>
- <Widget Background="RoyalBlue" Width="10%" Height="20"/>
- <Widget Background="RoyalBlue" Width="10%" Height="20"/>
-</HorizontalStack>
+++ /dev/null
-<?xml version="1.0"?>
-<VerticalStack Fit="true" Background="DimGrey" Margin="5">
-<!-- <RadioButton/>-->
- <Label Text="a" Width="Stretched" Background="Red"/>
- <Label Text="{fps}" HorizontalAlignment="Right" Background="LimeGreen"/>
-</VerticalStack>
+++ /dev/null
-<?xml version="1.0"?>
-<VerticalStack Height="Fit" Width="Fit">
- <Label Width="0"/>
- <Expandable Width="Fit" Background="Grey">
- <Expandable Background="LightBlue">
- <Expandable Background="Green">
- <Expandable Background="LimeGreen">
- <Expandable Background="DimGrey">
- <Expandable Width="0" Background="Yellow">
- <Expandable Background="Blue">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="Green">
- <Label Background="Red"/>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- <Expandable Width="0" Background="Grey">
- <Expandable Width="0" Background="LightBlue">
- <Expandable Width="0" Background="Green">
- <Expandable Width="0" Background="LimeGreen">
- <Expandable Width="0" Background="DimGrey">
- <Expandable Width="0" Background="Yellow">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="Green">
- <Label Background="Red"/>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
-</VerticalStack>
+++ /dev/null
-<?xml version="1.0"?>
-<Widget Margin="10" Width="0" Height="20"
- Background = "vgradient|0:0.1,0.1,0.1,0.1|0.5:Blue|1:0.1,0.1,0.1,0.1"/>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack >
- <VerticalStack Background="Jet" Height="Stretched" Width="50%" Margin="10" >
- <Label Margin="0" Text="Hello World this is a test string" Focusable="true" Font="serif,14"/>
- <Label Margin="15" Background="DarkGrey" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
- <Label Background="DarkGrey" Width="300" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
- <Label TextAlignment="Right" Background="DarkGrey" Width="300" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
- <Label Name="lab" TextAlignment="Center" Background="DarkGrey" Width="Fit" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
- </VerticalStack>
- <VerticalStack Background="Jet" Height="Stretched" Margin="10">
- <Label Multiline="true" TextAlignment="{TextAlignment}" Background="DarkGrey" Width="Fit" Height="Fit"
- Text="{MultilineText}" Focusable="true" Font="consolas,14"
- Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
- <EnumSelector RadioButtonStyle="CheckBox2" Caption="Text Alignment" EnumValue="{²TextAlignment}" >
- <Template>
- <GroupBox Caption="{./Caption}" CornerRadius="{./CornerRadius}" Foreground="{./Foreground}" Background="{./Background}">
- <VerticalStack Name="Content"/>
- </GroupBox>
- </Template>
- </EnumSelector>
- </VerticalStack>
-</HorizontalStack>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<HorizontalStack >
- <VerticalStack Background="Jet" Height="Stretched" Width="50%" Margin="10" >
- <TextBox Margin="0" Text="Hello World this is a test string" Focusable="true" Font="serif,14"/>
- <TextBox Margin="15" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
- <TextBox Name="lab" TextAlignment="Center" Width="Fit" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
- <TextBox TextAlignment="{TextAlignment}" Multiline="false" Width="300" Height="Fit" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
- Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
- </VerticalStack>
- <VerticalStack Background="Jet" Height="Stretched" Margin="10">
- <TextBox Multiline="true" TextAlignment="{TextAlignment}" Width="320" Height="Fit"
- Text="{MultilineText}" Focusable="true" Font="consolas,12"
- Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
- <VerticalStack Width="300" Height="100">
- <HorizontalStack>
- <TextBox Name="tb" Multiline="true" TextAlignment="{TextAlignment}" Width="Stretched" Height="Stretched"
- ClipToClientRect="true"
- Text="{MultilineText}" Focusable="true" Font="consolas,12" Margin="10"
- Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"
- />
- <ScrollBar Value="{²../tb.ScrollY}"
- LargeIncrement="{../tb.PageHeight}" SmallIncrement="1"
- CursorRatio="{../tb.ChildHeightRatio}" Maximum="{../tb.MaxScrollY}" />
- </HorizontalStack>
- <ScrollBar Style="HScrollBar" Value="{²../tb.ScrollX}"
- LargeIncrement="{../tb.PageWidth}" SmallIncrement="1"
- CursorRatio="{../tb.ChildWidthRatio}" Maximum="{../tb.MaxScrollX}" />
- </VerticalStack>
- <EnumSelector RadioButtonStyle="CheckBox2" Caption="Text Alignment" EnumValue="{²TextAlignment}" >
- <Template>
- <GroupBox Caption="{./Caption}" CornerRadius="{./CornerRadius}" Foreground="{./Foreground}" Background="{./Background}">
- <VerticalStack Name="Content" Width="100"/>
- </GroupBox>
- </Template>
- </EnumSelector>
- </VerticalStack>
-</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Widget Width="200" Height="200" Background="RoyalBlue"/>
--- /dev/null
+<?xml version="1.0"?>
+<Widget Margin="10" Width="150" Height="150" Background="SeaGreen"
+ MinimumSize="50,50"/>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Widget Margin="10" Width="50%" Height="50%"
+ Background="hgradient|0:Red|0.25:Blue|0.5:Green|0.75:Yellow|1:Red"
+ MinimumSize="50,50"/>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Fit="true">
+ <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
+ <ProgressBar CornerRadius="5" Background="DimGrey" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
+ <HorizontalStack Fit="true">
+ <Label Text="Memory:" Width="50" TextAlignment="Right"/>
+ <Label Text="{memory}" Font="droid,12" TextAlignment="Center"
+ Background="vgradient|0:Blue|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:Green|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Width="Stretched" Height="Fit" Margin="5" Background="RoyalBlue">
+ <Widget Background="Blue" Width="10%" Height="20"/>
+ <Widget Background="RoyalBlue" Width="Stretched" Height="20"/>
+ <Widget Background="RoyalBlue" Width="10%" Height="20"/>
+ <Widget Background="RoyalBlue" Width="10%" Height="20"/>
+ <Widget Background="RoyalBlue" Width="10%" Height="20"/>
+ <Widget Background="RoyalBlue" Width="10%" Height="20"/>
+ <Widget Background="RoyalBlue" Width="10%" Height="20"/>
+</HorizontalStack>
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Fit="true" Background="DimGrey" Margin="5">
+<!-- <RadioButton/>-->
+ <Label Text="a" Width="Stretched" Background="Red"/>
+ <Label Text="{fps}" HorizontalAlignment="Right" Background="LimeGreen"/>
+</VerticalStack>
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Height="Fit" Width="Fit">
+ <Label Width="0"/>
+ <Expandable Width="Fit" Background="Grey">
+ <Expandable Background="LightBlue">
+ <Expandable Background="Green">
+ <Expandable Background="LimeGreen">
+ <Expandable Background="DimGrey">
+ <Expandable Width="0" Background="Yellow">
+ <Expandable Background="Blue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="Green">
+ <Label Background="Red"/>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ <Expandable Width="0" Background="Grey">
+ <Expandable Width="0" Background="LightBlue">
+ <Expandable Width="0" Background="Green">
+ <Expandable Width="0" Background="LimeGreen">
+ <Expandable Width="0" Background="DimGrey">
+ <Expandable Width="0" Background="Yellow">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="Green">
+ <Label Background="Red"/>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+</VerticalStack>
--- /dev/null
+<?xml version="1.0"?>
+<Widget Margin="10" Width="0" Height="20"
+ Background = "vgradient|0:0.1,0.1,0.1,0.1|0.5:Blue|1:0.1,0.1,0.1,0.1"/>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack >
+ <VerticalStack Background="Jet" Height="Stretched" Width="50%" Margin="10" >
+ <Label Margin="0" Text="Hello World this is a test string" Focusable="true" Font="serif,14"/>
+ <Label Margin="15" Background="DarkGrey" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
+ <Label Background="DarkGrey" Width="300" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
+ <Label TextAlignment="Right" Background="DarkGrey" Width="300" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
+ <Label Name="lab" TextAlignment="Center" Background="DarkGrey" Width="Fit" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
+ </VerticalStack>
+ <VerticalStack Background="Jet" Height="Stretched" Margin="10">
+ <Label Multiline="true" TextAlignment="{TextAlignment}" Background="DarkGrey" Width="Fit" Height="Fit"
+ Text="{MultilineText}" Focusable="true" Font="consolas,14"
+ Focused="{Background=Onyx}" Unfocused="{Background=DarkGrey}"/>
+ <EnumSelector RadioButtonStyle="CheckBox2" Caption="Text Alignment" EnumValue="{²TextAlignment}" >
+ <Template>
+ <GroupBox Caption="{./Caption}" CornerRadius="{./CornerRadius}" Foreground="{./Foreground}" Background="{./Background}">
+ <VerticalStack Name="Content"/>
+ </GroupBox>
+ </Template>
+ </EnumSelector>
+ </VerticalStack>
+</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack >
+ <VerticalStack Background="Jet" Height="Stretched" Width="50%" Margin="10" >
+ <TextBox Margin="0" Text="Hello World this is a test string" Focusable="true" Font="serif,14"/>
+ <TextBox Margin="15" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
+ <TextBox Name="lab" TextAlignment="Center" Width="Fit" Height="50" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
+ <TextBox TextAlignment="{TextAlignment}" Multiline="false" Width="300" Height="Fit" Text="Hello World this is a test string" Focusable="true" Font="serif,14"
+ Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
+ </VerticalStack>
+ <VerticalStack Background="Jet" Height="Stretched" Margin="10">
+ <TextBox Multiline="true" TextAlignment="{TextAlignment}" Width="320" Height="Fit"
+ Text="{MultilineText}" Focusable="true" Font="consolas,12"
+ Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"/>
+ <VerticalStack Width="300" Height="100">
+ <HorizontalStack>
+ <TextBox Name="tb" Multiline="true" TextAlignment="{TextAlignment}" Width="Stretched" Height="Stretched"
+ ClipToClientRect="true"
+ Text="{MultilineText}" Focusable="true" Font="consolas,12" Margin="10"
+ Background="Grey" Focused="{Background=White}" Unfocused="{Background=Grey}"
+ />
+ <ScrollBar Value="{²../tb.ScrollY}"
+ LargeIncrement="{../tb.PageHeight}" SmallIncrement="1"
+ CursorRatio="{../tb.ChildHeightRatio}" Maximum="{../tb.MaxScrollY}" />
+ </HorizontalStack>
+ <ScrollBar Style="HScrollBar" Value="{²../tb.ScrollX}"
+ LargeIncrement="{../tb.PageWidth}" SmallIncrement="1"
+ CursorRatio="{../tb.ChildWidthRatio}" Maximum="{../tb.MaxScrollX}" />
+ </VerticalStack>
+ <EnumSelector RadioButtonStyle="CheckBox2" Caption="Text Alignment" EnumValue="{²TextAlignment}" >
+ <Template>
+ <GroupBox Caption="{./Caption}" CornerRadius="{./CornerRadius}" Foreground="{./Foreground}" Background="{./Background}">
+ <VerticalStack Name="Content" Width="100"/>
+ </GroupBox>
+ </Template>
+ </EnumSelector>
+ </VerticalStack>
+</HorizontalStack>
\ No newline at end of file
<HorizontalStack Width="0" Height="-1" Margin="10" Background="BlueCrayola">
<Checkbox Height="-1" Width="80"/>
- <GraphicObject Width="0"/>
+ <Widget Width="0"/>
<Checkbox Height="-1" Width="80"/>
</HorizontalStack>
<Groupbox Text="test" Height="-1" Width="-1" Margin="5">