]> O.S.I.I.S - jp/crow.git/commitdiff
rename all 'GraphicObject' to 'Widget', move to netcoreapp3.0 for crow library to... FileDialogImprove
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 26 Oct 2021 06:23:19 +0000 (08:23 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 26 Oct 2021 06:23:19 +0000 (08:23 +0200)
74 files changed:
Crow/Crow.csproj
Crow/Templates/DockWindow.template
Crow/Templates/FileDialog.template
Crow/Templates/FileItems.template
Crow/src/2d/Rectangle.cs
Crow/src/Configuration.cs
Crow/src/CrowThread.cs
Crow/src/IML/BindingMember.cs
Crow/src/IML/CompilerServices.cs
Crow/src/IML/IMLContext.cs
Crow/src/IML/Instantiator.cs
Crow/src/Interface.cs
Crow/src/Text/SpanCharReader.cs
Crow/src/Text/TextChange.cs
Crow/src/Text/TextSpan.cs
Crow/src/Widgets/Border.cs
Crow/src/Widgets/Button.cs
Crow/src/Widgets/DirectoryView.cs
Crow/src/Widgets/DirectoryView2.cs
Crow/src/Widgets/DockStack.cs
Crow/src/Widgets/GenericStack.cs
Crow/src/Widgets/Grid.cs
Crow/src/Widgets/Group.cs
Crow/src/Widgets/GroupBase.cs
Crow/src/Widgets/Image.cs
Crow/src/Widgets/Label.cs
Crow/src/Widgets/Popper.cs
Crow/src/Widgets/PrivateContainer.cs
Crow/src/Widgets/RadioButton.cs
Crow/src/Widgets/Scroller.cs
Crow/src/Widgets/Splitter.cs
Crow/src/Widgets/TemplatedContainer.cs
Crow/src/Widgets/TemplatedControl.cs
Crow/src/Widgets/TemplatedGroup.cs
Crow/src/Widgets/Widget.cs
Crow/src/Widgets/Window.cs
Crow/src/Widgets/Wrapper.cs
Crow/src/styling/StyleReader.cs
Directory.Build.props
Samples/BasicTests/BasicTests.cs
Samples/HelloWorld/HelloWorld.csproj
Samples/HelloWorld/main.cs
Samples/HelloWorld/ui/helloworld.crow [deleted file]
Samples/ShowCase/ShowCase.cs
Samples/common/src/SampleBase.cs
Samples/common/ui/Interfaces/Container/3.crow
Samples/common/ui/Interfaces/Divers/testFileDialogTemplate.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Experimental/directoryView2.crow
Samples/common/ui/Interfaces/Experimental/directoryView3.crow
Samples/common/ui/Interfaces/Experimental/directoryView5.crow
Samples/common/ui/Interfaces/Experimental/fileDialog.crow
Samples/common/ui/Interfaces/Experimental/randomProgress.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/GraphicObject/0.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/1.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/2.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/4.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/5.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/6.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/7.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/blueLine.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/label.crow [deleted file]
Samples/common/ui/Interfaces/GraphicObject/textBox.crow [deleted file]
Samples/common/ui/Interfaces/Widget/0.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/1.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/2.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/4.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/5.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/6.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/7.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/blueLine.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/label.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/Widget/textBox.crow [new file with mode: 0644]
Samples/common/ui/templates/testWindow.goml.sav

index d5912c8a7c3e0d8ff0e7f321d58a844d57dadac8..2771f658cdb5d0464fe2b6c0f56ef17bcfd352b9 100644 (file)
@@ -2,7 +2,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
        <PropertyGroup>
 <!--           <TargetFrameworks>netstandard2.0</TargetFrameworks>-->
-               <TargetFramework>netstandard2.1</TargetFramework>
+               <TargetFramework>netcoreapp3.0</TargetFramework>
 
                <AssemblyVersion>$(CrowVersion)</AssemblyVersion>
                <PackageVersion>$(CrowPackageVersion)</PackageVersion>
index 9e8e623a00974b091ea141b039f7e59c3d1defba..f54974fbf2c2dea1457c2119257e0700486ca2af 100644 (file)
@@ -20,7 +20,7 @@
                </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">
index 71ed5c2b6619ca66b05524ab57e5c411e879c846..04c4b39ceb067ba68f298c8b85b9eb9f0c89677d 100644 (file)
                                                        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>
index 2fad338403e296149dc8733f4fc770e4fcf25553..d9f529d3585bca1cbd4c5cdf6d7d232188933656 100644 (file)
@@ -3,6 +3,7 @@
 </ItemTemplate>
 <ItemTemplate DataType="System.IO.FileInfo">
        <ListItem Height="Fit"
+                               BubbleEvents="All"
                                Selected = "{Background=${ControlHighlight}}"
                                Unselected = "{Background=Transparent}">
                <HorizontalStack>
@@ -13,6 +14,7 @@
 </ItemTemplate>
 <ItemTemplate DataType="System.IO.DirectoryInfo">
        <ListItem Height="Fit"
+                               BubbleEvents="All"
                                Selected = "{Background=${ControlHighlight}}"
                                Unselected = "{Background=Transparent}">
                <HorizontalStack>
index a0e5ccf8a3a3f1dc3cdeb0cffcef558423c37e92..278decb5f1f67c504a8a181392d2a0d1ad325b55 100644 (file)
@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 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;
@@ -15,34 +15,34 @@ namespace Crow {
                #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 {
@@ -53,13 +53,13 @@ namespace Crow {
                [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);
 
@@ -67,12 +67,12 @@ namespace Crow {
 
                #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);
@@ -83,54 +83,74 @@ namespace Crow {
                        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;
@@ -140,16 +160,16 @@ namespace Crow {
                        (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
@@ -165,5 +185,5 @@ namespace Crow {
                }
                public override bool Equals (object obj) => (obj == null || obj.GetType () != typeof (Rectangle)) ?
                                false : this == (Rectangle)obj;
-    }
+       }
 }
index 5b99761d3f41baa0b0f0bff87048a8ba0c1cb8a2..f3dadd18e7ee332c6730d68726cab043eb17cef7 100644 (file)
@@ -135,7 +135,7 @@ namespace Crow
                void savingThread(){
                        while(true){
                                if (isDirty)
-                                       Save ();                                
+                                       Save ();
                                Thread.Sleep (100);
                        }
                }
index 01558753a892ee1e34fee2d2b1408342b7ebb896..7d894168618b2d19a1aa541ebe761b0393f95809 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
                public void Cancel(){
                        if (thread.IsAlive & !cancelRequested){
                                cancelRequested = true;
-                               while (thread.IsAlive) 
+                               while (thread.IsAlive)
                                        Thread.Sleep (1);
                                thread.Join ();
                        }
index 2f96f131dc18f6c08d57dec8b590e7d039f3c6ef..f0b00ef35922fda184f6dabdebeed763231d15e3 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow.IML
        /// - '../' => 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
        {
index 3888ceafc60a1e5c5c3b67de0175be71f5597732..ba6e29359641fb41371db1e65704f6a0223acf3f 100644 (file)
@@ -280,7 +280,7 @@ namespace Crow.IML
 #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;
@@ -507,7 +507,7 @@ namespace Crow.IML
                                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>
@@ -879,12 +879,16 @@ namespace Crow.IML
                                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);
index a69f7b2d5f8d24398f5dec27264afd5fc1e59f3f..16ace24e2765f46353436c789b2f59ec08836a18 100644 (file)
@@ -47,7 +47,7 @@ namespace Crow.IML
 
                        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);
index 2acace294a15a6c56e18b23a808dffd642ec3797..e338e7145394498831353248c996910b9ed6fa6f 100644 (file)
@@ -41,9 +41,7 @@ namespace Crow.IML {
        {
                #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> ();
@@ -141,7 +139,7 @@ namespace Crow.IML {
                #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(){
@@ -205,7 +203,7 @@ namespace Crow.IML {
                        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)
@@ -1500,7 +1498,12 @@ namespace Crow.IML {
                                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 ();
                }
index 0901b9bc6bef938fa138d3149321ff3fa76ea362..d04319858222f67eed55fd8379eecc0f83c1389f 100644 (file)
@@ -89,9 +89,26 @@ namespace Crow
                        }
                }
 
+               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),
@@ -426,7 +443,7 @@ namespace Crow
                #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)
@@ -634,8 +651,8 @@ namespace Crow
                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
@@ -972,7 +989,7 @@ namespace Crow
                        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>
@@ -1001,7 +1018,7 @@ namespace Crow
                        }
                }
                /// <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>
@@ -1273,7 +1290,21 @@ namespace Crow
                                        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>
@@ -1282,6 +1313,8 @@ namespace Crow
 
                        PerformanceMeasure.Begin (PerformanceMeasure.Kind.Drawing);
                        if (!clipping.IsEmpty) {
+                               ctx.Scale (zoomFactor,zoomFactor);
+
 #if VKVG
                                clear (ctx);
 #else
@@ -1692,7 +1725,7 @@ namespace Crow
                /// 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
@@ -2169,8 +2202,8 @@ namespace Crow
                        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;
index 5b206575d7c86ad5cef529feb2d5d1b6d42d5bdc..ae55d64fd56404bcad89079ccef2f23b6af1c358 100644 (file)
@@ -144,5 +144,12 @@ namespace Crow.Text
                                (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();
+               }
     }
 }
index 75948da8e11ac87a7ca1381029c5f8adab1d4b7b..6aae62b12d97d9851e341e08f22b819f5e4b8b60 100644 (file)
@@ -14,8 +14,9 @@ namespace Crow.Text
         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;
index 929d505451d3be4984c5736344c56cd8aec27b6c..83fbc68df0b265c4561c663f9afc473cfc0fa62c 100644 (file)
@@ -33,5 +33,7 @@ namespace Crow.Text
                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;
        }
 }
index 473581002a37c484b0874850cece052159dcaec0..1957498fd763a01c66b581c66a52d71f26e3a6e3 100644 (file)
@@ -86,7 +86,7 @@ namespace Crow
                }
                #endregion
 
-               #region GraphicObject override
+               #region Widget override
                /*[XmlIgnore]public override Rectangle ClientRectangle {
                        get {
                                Rectangle cb = base.ClientRectangle;
index a6b57687eb4ca9560b589a856a7283e6aa981437..cdd9c5908e673ee37f07a0fba313f01e0787293c 100644 (file)
@@ -24,7 +24,7 @@ namespace Crow
                public event EventHandler Pressed;
                public event EventHandler Released;
 
-               #region GraphicObject Overrides
+               #region Widget Overrides
                public override void onMouseDown (object sender, MouseButtonEventArgs e)
                {
                        IsPressed = true;
index 89f388d17d4fc8a9192aba4cdca504234b6c049a..1d6f005fd4c9a353dd0e61bb50542c038e397e55 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
                        get {
                                return _selectedItem;
                        }
-                       set { 
+                       set {
                                if (value == _selectedItem)
                                        return;
                                _selectedItem = value;
index 174708d4e3b71a9bb7b5e577c1d321b31367cc56..3a966447652b5f27da9a3b8ccb53d9fbbfc081f3 100644 (file)
@@ -97,7 +97,7 @@ namespace Crow
                                currentDirectory = value;
                                NotifyValueChangedAuto (currentDirectory);
                                NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
-                               updateFileSystemEntries();
+                               Data = FileSystemEntries;
                        }
                }
                [XmlIgnore]public FileSystemInfo[] FileSystemEntries {
@@ -120,38 +120,148 @@ namespace Crow
                }
                //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>
+"
+;
        }
 }
 
index 3d70a84e488089b94402c46c0894c7018e2ff430..d75df5676b88a67295ea51940aa36a7fa81094f9 100644 (file)
@@ -9,7 +9,7 @@ namespace Crow
 {
        [DesignIgnore]
        public class DockStack : GenericStack
-       {               
+       {
                #region CTor
                public DockStack ()     {}
                public DockStack (Interface iface, string style = null) : base (iface, style) { }
@@ -37,7 +37,7 @@ namespace Crow
                }
 
                /*public override bool PointIsIn (ref Point m)
-               {                       
+               {
                        if (!base.PointIsIn(ref m))
                                return false;
 
@@ -65,7 +65,7 @@ namespace Crow
 //                     base.OnLayoutChanges (layoutType);
 //
 //                     if ((layoutType & LayoutingType.Sizing) > 0)
-//                             computeRects();                 
+//                             computeRects();
 //             }
 
                Rectangle rIn = default(Rectangle);
@@ -95,7 +95,7 @@ namespace Crow
                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);
@@ -121,14 +121,14 @@ namespace Crow
                                                        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;
                                                        }
                                                }
                                        }
@@ -137,18 +137,18 @@ namespace Crow
                                                        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)
@@ -160,7 +160,7 @@ namespace Crow
                protected override void onDragEnter (object sender, DragDropEventArgs e)
                {
                        base.onDragEnter (sender, e);
-                       
+
                }
                public override void onDragLeave (object sender, DragDropEventArgs e)
                {
@@ -168,16 +168,16 @@ namespace Crow
                        //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 ();
@@ -201,7 +201,7 @@ namespace Crow
 
                        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);
@@ -233,7 +233,7 @@ namespace Crow
                        }
                        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);
@@ -242,8 +242,8 @@ namespace Crow
 
                        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];
@@ -262,7 +262,7 @@ namespace Crow
                                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);
@@ -316,10 +316,10 @@ namespace Crow
                        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;
@@ -329,14 +329,14 @@ namespace Crow
                        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;
@@ -346,7 +346,7 @@ namespace Crow
                                        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);
@@ -354,8 +354,8 @@ namespace Crow
                                        }
                                        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;
@@ -386,19 +386,19 @@ namespace Crow
                        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 (")");
index a605f02d87ec821e195fe9cf485a9e66f836d473..4c0a85d9f8522e84f6e94cfdb60542ede3f1e87d 100644 (file)
@@ -46,7 +46,7 @@ namespace Crow {
                }
                #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
index 1412284380312605fb4453bdce0f10e6f7109ffe..4d7edced77b38488aad1c8be3b7002696daacbee 100644 (file)
@@ -99,12 +99,12 @@ namespace Crow
 
                #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);
 //                     }
index 90ff4e648eecb485800345c201b3490cde6a7e4d..e6e6caf67a4c1447cecf3363cae8eda316676a5c 100644 (file)
@@ -98,7 +98,7 @@ namespace Crow
                        ChildrenCleared.Raise (this, new EventArgs ());
                }
 
-               #region GraphicObject overrides
+               #region Widget overrides
                public override int measureRawSize (LayoutingType lt)
                {
                        DbgLogger.StartEvent(DbgEvtType.GOMeasure, this, lt);
index 8c98d0b612a0fe606450f29d6bc0a1f93b72d648..bed807e057a3d2d660102070e49b05190facd092 100644 (file)
@@ -164,7 +164,7 @@ namespace Crow
                        }
                }
 
-               #region GraphicObject overrides
+               #region Widget overrides
                public override Widget FindByName (string nameToFind)
                {
                        if (Name == nameToFind)
index 0473893b2a5984f944eb3d0e56df31bc2765d735..eb6ee0d0451f74089f54fb92276d6067509d2b88 100644 (file)
@@ -112,7 +112,7 @@ namespace Crow
                /// <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; }
@@ -157,7 +157,7 @@ namespace Crow
                }
                #endregion
 
-               #region GraphicObject overrides
+               #region Widget overrides
                public override int measureRawSize (LayoutingType lt)
                {
                        if (_pic == null)
index 9a16bf872f5fa40b604d482e71d4bd71348b0619..9379e5d24cf273424ab8af93e25107d2a69a5286 100644 (file)
@@ -606,7 +606,7 @@ namespace Crow
                                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))
index b1529e4a544ae097d3356a21f4a658708696db41..e8ba3fe9adb9a32f3da0ca9153a5cd9bc7d2a858 100644 (file)
@@ -178,7 +178,7 @@ namespace Crow
                                positionContent (LayoutingType.Y);
                }
 
-               #region GraphicObject overrides
+               #region Widget overrides
                public override void onMouseLeave (object sender, MouseMoveEventArgs e)
                {
                        IsPopped = false;
index b5e9fbc2f7a63c92fb6cc88f623695986093a5f8..d0bd9859692f5cda6d36cdc4e8d264b37ef8ceea 100644 (file)
@@ -34,9 +34,7 @@ namespace Crow
                #endif
                protected Widget child;
                #if DEBUG_LOG
-               internal Widget getTemplateRoot {
-                       get { return child; }
-               }
+               internal Widget getTemplateRoot => child;
                #endif
 
                protected virtual void SetChild(Widget _child)
@@ -71,7 +69,7 @@ namespace Crow
                                g.Dispose ();
                }
 
-               #region GraphicObject Overrides
+               #region Widget Overrides
 
                public override Widget FindByName (string nameToFind)
                {
index 116863b48e69434ad60b0ccc71fc1935e9925a4e..8d53c6b1cc9557d66e142ca234d2be4ed26389dd 100644 (file)
@@ -23,7 +23,7 @@ namespace Crow
                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;
index 4e754a3d8fa8014a216d06ed49721e864b976e63..8eb9aaf34fdfe4f9deaac2b6df491b2ba150f582 100644 (file)
@@ -26,7 +26,16 @@ namespace Crow
                /// <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>
@@ -150,7 +159,7 @@ namespace Crow
                }
 
 
-               #region GraphicObject Overrides
+               #region Widget Overrides
                public override Rectangle ScreenCoordinates (Rectangle r)
                {
                        return base.ScreenCoordinates (r) - new Point((int)ScrollX,(int)ScrollY);
@@ -222,7 +231,7 @@ namespace Crow
                {
                        base.onKeyDown (sender, e);
 
-                       if (KeyEventsOverrides)
+                       if (keyEventsOverrides)
                                return;
 
                        switch (e.Key) {
index 663177d06618b3011220656a2b261bad10061ccf..d1f2d97d3bfe20f42cead6277f51de39afc24513 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
                        }
                }
 
-               #region GraphicObject override
+               #region Widget override
                public override ILayoutable Parent {
                        get => base.Parent;
                        set {
index 5977203ca1ccec55fdfcab049cb9cd5f62809b0b..c956603229c6c5134a0154d330f56aa1c59f6b1e 100644 (file)
@@ -56,7 +56,7 @@ namespace Crow
                        _contentContainer = this.child.FindByName ("Content") as Container;
                }
 
-#region GraphicObject overrides
+#region Widget overrides
                public override Widget FindByName (string nameToFind)
                {
                        if (Name == nameToFind)
index c1e20eaea7bb5ace034cf98e7bb5ac5f2c8d7c61..dc22896a7f13d9540701c4b30c653e6ea338bdbe 100644 (file)
@@ -39,13 +39,12 @@ namespace Crow
                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;
@@ -56,6 +55,8 @@ namespace Crow
 
                                if (string.IsNullOrEmpty(_template))
                                        loadTemplate ();
+                               else if (_template.Trim().StartsWith('<'))//imlfragment
+                                       loadTemplate (IFace.CreateITorFromIMLFragment (_template).CreateInstance());
                                else
                                        loadTemplate (IFace.CreateInstance (_template));
                        }
@@ -74,9 +75,9 @@ namespace Crow
                        }
                }
 
-               #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>
index bc00a0f394b6965c5f1c829ab14b23d3e8665135..ed955d724421e0eee2de8bf928af0634bad5f2fe 100644 (file)
@@ -85,7 +85,7 @@ namespace Crow {
                /// <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.
@@ -353,7 +353,7 @@ namespace Crow {
                }
 
 
-               #region GraphicObject overrides
+               #region Widget overrides
                public override Widget FindByName (string nameToFind)
                {
                        if (Name == nameToFind)
@@ -725,10 +725,34 @@ namespace Crow {
                                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);
+                       }
+               }
        }
 }
index a7f50e78fc1c245d66fa4d0aa2a96e7c448efadb..5422460a5ad6f2f415788f32b94f986924bf74d5 100644 (file)
@@ -246,7 +246,7 @@ namespace Crow
                /// <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
@@ -350,7 +350,7 @@ namespace Crow
                        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
@@ -531,7 +531,7 @@ namespace Crow
                        }
                }
                /// <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 {
@@ -875,7 +875,7 @@ namespace Crow
                        }
                }
                /// <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 {
@@ -1198,7 +1198,7 @@ namespace Crow
                        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);
 
index c1bf5b8b01306137b9bd81468d12097c2c85530a..73d89f1dec85535d1efc39b9286ec2e41100f3b9 100644 (file)
@@ -375,7 +375,7 @@ namespace Crow
                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);
index 71ef6a0dde63e7fbe11b716b642348a3c339d9b2..ef7d627a20b52a83358e77f1dfc553c3905e51ad 100644 (file)
@@ -93,7 +93,7 @@ namespace Crow
                }
                #endregion
 
-               #region GraphicObject Overrides
+               #region Widget Overrides
                public override int measureRawSize (LayoutingType lt)
                {
                        int tmp = 0;
index a056283ac7cfe63c1316f80f857e98d63f544ff5..e0bc07b9495f1f881fd820955f6218cd28a85831 100644 (file)
@@ -14,9 +14,18 @@ using System.Text;
 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 }
 
index c0160dcbbc064d780ad5d1721fb6a333dc154d11..a5cc8f97efba9dd6c3ce277741a969cb1c797daa 100644 (file)
@@ -26,6 +26,6 @@
                <!-- Experimental vkvg backend, testing only-->
                <CrowVkvgBackend>false</CrowVkvgBackend>
 
-               <GlfwSharpVersion>0.2.12-beta</GlfwSharpVersion>
+               <GlfwSharpVersion>0.2.14</GlfwSharpVersion>
        </PropertyGroup>
 </Project>
index 3b4e6bb2ceccbd1991536f92200be48f7194f709..59b0e1ca67ffc0d65961a3804aa1d6a8f80d913f 100644 (file)
@@ -38,7 +38,7 @@ namespace Samples
                        //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 ();
index 7ceb582dacc7be05bcce39225ad132ba61ad83c8..178d453704016a4ad1ea925b0c41464b45584ffb 100644 (file)
@@ -1,9 +1,11 @@
 <?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
index dc5e2a1355ba3196fb9abafd148dae1eaff3f519..e60b97820a0e6809a6dce508fa106e3136539fab 100644 (file)
@@ -4,21 +4,10 @@ using Samples;
 
 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 ();
                        }
                }
diff --git a/Samples/HelloWorld/ui/helloworld.crow b/Samples/HelloWorld/ui/helloworld.crow
deleted file mode 100644 (file)
index a9dad40..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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>
index 71556f019f859964b3b68cfb0e8e579f17091f60..9d2571603cb0fe0c55411d33d62bfe83322abf83 100644 (file)
@@ -37,6 +37,8 @@ namespace ShowCase
                                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 ();
                        }
index 3e0ef714c9872d0aa001c08556c8d8b6c5576b74..ce043b37b24d5a33d585467e5c75cb968f458064 100644 (file)
@@ -11,31 +11,13 @@ using System.Runtime.InteropServices;
 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) :
@@ -436,5 +418,63 @@ namespace Samples
                        }
                        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
index 4d6d1ec3734c6cb513449f202a50b078f5c87518..79df9e91e3d822b3ac2a20c1e6f9c95ced4b0290 100644 (file)
@@ -1,4 +1,10 @@
 <?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&#10;a multiline textbox&#13;
+and another line&#13;
+and another line&#13;
+and another line a little bit longuer&#13;
+and another line&#13;
+and another line
+" Margin="10" Fit="true" Background="SeaGreen" TextAlignment="Center"/>
 </Container>
\ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Divers/testFileDialogTemplate.crow b/Samples/common/ui/Interfaces/Divers/testFileDialogTemplate.crow
new file mode 100644 (file)
index 0000000..7aed370
--- /dev/null
@@ -0,0 +1,91 @@
+<?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>
+
diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow b/Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow
new file mode 100644 (file)
index 0000000..811b3db
--- /dev/null
@@ -0,0 +1,5 @@
+<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
index 8035f7499f4710237f958c5f745af643876ef8c7..9bfebe7264b97b6e2ec8788763ac58e0fe2cd062 100644 (file)
@@ -1,7 +1,8 @@
-<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"
@@ -13,8 +14,7 @@
                                        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}"
@@ -37,4 +37,5 @@
                        </VerticalStack>
                </ListItem>
        </ItemTemplate>
-</DirectoryView2>
\ No newline at end of file
+</DirectoryView2>
+</VerticalStack>
\ No newline at end of file
index 1dd1d88d2e4752c3db54d7e20e9438cb110968e3..45d811a25efe2c5f8ecbe195af4544b00635600d 100644 (file)
@@ -1,35 +1,38 @@
-<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
index 62b743ab3b2e89719a5f439965fd9303caad298f..5b59a0f632199703918fafc1a4edd18a985489eb 100644 (file)
@@ -1,36 +1,40 @@
-<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
index 977cbf311f9c98d91e83afc496129cdf256c83c0..c26e3a7a54b29194f23679b9825f9791e61e3f9c 100644 (file)
@@ -12,7 +12,7 @@
                <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">
@@ -65,7 +65,7 @@
                                                                                                                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>
@@ -76,7 +76,7 @@
                                                                                                                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>
diff --git a/Samples/common/ui/Interfaces/Experimental/randomProgress.crow b/Samples/common/ui/Interfaces/Experimental/randomProgress.crow
new file mode 100644 (file)
index 0000000..9b63b81
--- /dev/null
@@ -0,0 +1,18 @@
+<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
diff --git a/Samples/common/ui/Interfaces/GraphicObject/0.crow b/Samples/common/ui/Interfaces/GraphicObject/0.crow
deleted file mode 100644 (file)
index a58dcb8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<Widget Width="200" Height="200" Background="RoyalBlue"/>
diff --git a/Samples/common/ui/Interfaces/GraphicObject/1.crow b/Samples/common/ui/Interfaces/GraphicObject/1.crow
deleted file mode 100644 (file)
index d74f494..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<Widget Margin="10" Width="150" Height="150" Background="SeaGreen"
-               MinimumSize="50,50"/>
\ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/GraphicObject/2.crow b/Samples/common/ui/Interfaces/GraphicObject/2.crow
deleted file mode 100644 (file)
index af2998a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?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
diff --git a/Samples/common/ui/Interfaces/GraphicObject/4.crow b/Samples/common/ui/Interfaces/GraphicObject/4.crow
deleted file mode 100644 (file)
index 81d386c..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-<?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
diff --git a/Samples/common/ui/Interfaces/GraphicObject/5.crow b/Samples/common/ui/Interfaces/GraphicObject/5.crow
deleted file mode 100644 (file)
index 535623a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?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>
diff --git a/Samples/common/ui/Interfaces/GraphicObject/6.crow b/Samples/common/ui/Interfaces/GraphicObject/6.crow
deleted file mode 100644 (file)
index f537a71..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?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>
diff --git a/Samples/common/ui/Interfaces/GraphicObject/7.crow b/Samples/common/ui/Interfaces/GraphicObject/7.crow
deleted file mode 100644 (file)
index 0ac9b19..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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>
diff --git a/Samples/common/ui/Interfaces/GraphicObject/blueLine.crow b/Samples/common/ui/Interfaces/GraphicObject/blueLine.crow
deleted file mode 100644 (file)
index 32d5c16..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?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
diff --git a/Samples/common/ui/Interfaces/GraphicObject/label.crow b/Samples/common/ui/Interfaces/GraphicObject/label.crow
deleted file mode 100644 (file)
index ad47ccf..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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
diff --git a/Samples/common/ui/Interfaces/GraphicObject/textBox.crow b/Samples/common/ui/Interfaces/GraphicObject/textBox.crow
deleted file mode 100644 (file)
index 2094de4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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
diff --git a/Samples/common/ui/Interfaces/Widget/0.crow b/Samples/common/ui/Interfaces/Widget/0.crow
new file mode 100644 (file)
index 0000000..a58dcb8
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<Widget Width="200" Height="200" Background="RoyalBlue"/>
diff --git a/Samples/common/ui/Interfaces/Widget/1.crow b/Samples/common/ui/Interfaces/Widget/1.crow
new file mode 100644 (file)
index 0000000..d74f494
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<Widget Margin="10" Width="150" Height="150" Background="SeaGreen"
+               MinimumSize="50,50"/>
\ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Widget/2.crow b/Samples/common/ui/Interfaces/Widget/2.crow
new file mode 100644 (file)
index 0000000..af2998a
--- /dev/null
@@ -0,0 +1,4 @@
+<?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
diff --git a/Samples/common/ui/Interfaces/Widget/4.crow b/Samples/common/ui/Interfaces/Widget/4.crow
new file mode 100644 (file)
index 0000000..81d386c
--- /dev/null
@@ -0,0 +1,377 @@
+<?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
diff --git a/Samples/common/ui/Interfaces/Widget/5.crow b/Samples/common/ui/Interfaces/Widget/5.crow
new file mode 100644 (file)
index 0000000..535623a
--- /dev/null
@@ -0,0 +1,10 @@
+<?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>
diff --git a/Samples/common/ui/Interfaces/Widget/6.crow b/Samples/common/ui/Interfaces/Widget/6.crow
new file mode 100644 (file)
index 0000000..f537a71
--- /dev/null
@@ -0,0 +1,6 @@
+<?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>
diff --git a/Samples/common/ui/Interfaces/Widget/7.crow b/Samples/common/ui/Interfaces/Widget/7.crow
new file mode 100644 (file)
index 0000000..0ac9b19
--- /dev/null
@@ -0,0 +1,46 @@
+<?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>
diff --git a/Samples/common/ui/Interfaces/Widget/blueLine.crow b/Samples/common/ui/Interfaces/Widget/blueLine.crow
new file mode 100644 (file)
index 0000000..32d5c16
--- /dev/null
@@ -0,0 +1,3 @@
+<?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
diff --git a/Samples/common/ui/Interfaces/Widget/label.crow b/Samples/common/ui/Interfaces/Widget/label.crow
new file mode 100644 (file)
index 0000000..ad47ccf
--- /dev/null
@@ -0,0 +1,26 @@
+<?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
diff --git a/Samples/common/ui/Interfaces/Widget/textBox.crow b/Samples/common/ui/Interfaces/Widget/textBox.crow
new file mode 100644 (file)
index 0000000..2094de4
--- /dev/null
@@ -0,0 +1,39 @@
+<?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
index 42b4b744f1e93065b9e8cd4fc2a01dabf9ec7d5f..268f7af4ec0d6a7e10687b5ed72ab8ddfb4690d4 100644 (file)
@@ -7,7 +7,7 @@
 
                <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">