]> O.S.I.I.S - jp/crow.git/commitdiff
test appveyor
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 30 Jan 2018 15:25:41 +0000 (16:25 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 30 Jan 2018 15:25:41 +0000 (16:25 +0100)
appveyor.yml
src/GraphicObjects/WrappedWidgetGroup.cs [deleted file]

index 358d2b6158a23408e20d6cb3f42289bbb4912e05..42519fabee8f69f37e40cd9569409bba8c5ac986 100644 (file)
@@ -7,7 +7,7 @@ branches:
 clone_depth: 1
 
 before_build:
-- cmd: nuget restore
+- cmd: nuget restore Crow.sln
 
 build_script:
     - set path=%path%;C:\Program Files (x86)\Mono\bin
diff --git a/src/GraphicObjects/WrappedWidgetGroup.cs b/src/GraphicObjects/WrappedWidgetGroup.cs
deleted file mode 100755 (executable)
index fa033b5..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Drawing;
-using OpenTK.Graphics.OpenGL;
-using System.Diagnostics;
-
-namespace go
-{
-    public class WrappedWidgetGroup : Group
-    {
-
-        public int widgetSpacing = 2;
-
-        public Orientation Orientation = Orientation.Horizontal;
-
-
-        public WrappedWidgetGroup()
-            : base()
-        {
-            BorderWidth = 0;
-        }
-
-        int currentXForWidget = 0;
-        int currentYForWidget = 0;
-
-        int highestWidget = 0;
-        int largestWidget = 0;
-
-
-        public override void UpdateLayout()
-        {
-            //while (!layoutIsValid)
-            //{
-            //if (!(sizeIsValid && positionIsValid))
-            base.UpdateLayout();
-
-            //if (!base.layoutIsValid)
-            //    return;
-
-            currentXForWidget = ClientRectangle.X;
-            currentYForWidget = ClientRectangle.Y;
-
-            highestWidget = 0;
-            largestWidget = 0;
-
-            Rectangle contentBounds = Rectangle.Zero;
-
-            GraphicObject[] widgets = new GraphicObject[Children.Count];
-            Children.CopyTo(widgets);
-            foreach (GraphicObject w in widgets)
-            {
-                if (w.renderBounds.Width > largestWidget)
-                    largestWidget = w.renderBounds.Width;
-                if (w.renderBounds.Height > highestWidget)
-                    highestWidget = w.renderBounds.Height;
-
-                if (!enoughtSpaceForWidget(w))
-                    advance(w);
-
-                if (enoughtSpaceForWidget(w))
-                {
-                    w.renderBounds.X = currentXForWidget;
-                    w.renderBounds.Y = currentYForWidget;
-
-                    w.positionIsValid = true;
-
-                    contentBounds += w.renderBounds;
-
-                    advance(w);
-                }
-                else
-                    break;
-            }
-
-            contentBounds.Width += BorderWidth + Margin;
-            contentBounds.Height += BorderWidth + Margin;
-
-            if (SizeToContent)
-                renderBounds.Size = contentBounds.Size;
-            else if (VerticalScrolling)
-                renderBounds.Size = new Size(renderBounds.Size.Width, contentBounds.Size.Height);
-            else if (HorizontalScrolling)
-                renderBounds.Size = new Size(contentBounds.Size.Width, renderBounds.Size.Height);
-
-            if (layoutIsValid)
-                registerForRedraw();
-        }
-
-
-        bool enoughtSpaceForWidget(GraphicObject w)
-        {
-            int nextXForWidget = 0;
-            int nextYForWidget = 0;
-
-            if (Orientation == Orientation.Horizontal)
-                nextXForWidget = currentXForWidget + w.renderBounds.Width;
-            else
-                nextYForWidget = nextYForWidget + w.renderBounds.Height;
-
-            if (!SizeToContent)
-            {
-                if (nextXForWidget > ClientRectangle.Right && !HorizontalScrolling)
-                    return false;
-                if (currentYForWidget > ClientRectangle.Bottom && !VerticalScrolling)
-                    return false;
-            }
-            return true;
-        }
-        void advance(GraphicObject w)
-        {
-            if (Orientation == Orientation.Horizontal)
-            {
-                //if (w is LabelWidget)
-                //    Debugger.Break();
-                currentXForWidget = currentXForWidget + widgetSpacing + w.renderBounds.Width;
-            }
-            else
-                currentYForWidget = currentYForWidget + widgetSpacing + w.renderBounds.Height;
-
-            if (!SizeToContent)
-            {
-                if (currentXForWidget > ClientRectangle.Right && !HorizontalScrolling)
-                {
-                    if (Orientation == Orientation.Vertical)
-                    {
-                        //not scrolling
-                    }
-                    else
-                    {
-                        currentXForWidget = ClientRectangle.X;
-                        currentYForWidget += widgetSpacing + highestWidget;
-                        highestWidget = 0;
-                    }
-                }
-                if (currentYForWidget > ClientRectangle.Bottom && !VerticalScrolling)
-                {
-                    if (Orientation == Orientation.Horizontal)
-                    {
-                        //not scrolling
-                    }
-                    else
-                    {
-                        currentXForWidget += widgetSpacing + largestWidget;
-                        currentYForWidget = ClientRectangle.Y;
-                        largestWidget = 0;
-                    }
-
-                }
-            }
-        }
-    }
-}