]> O.S.I.I.S - jp/crow.git/commitdiff
* Spinner.goml, Window.cs:
authorjpbruyere <jp.bruyere@hotmail.com>
Sun, 13 Sep 2015 22:38:19 +0000 (00:38 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sun, 13 Sep 2015 22:38:19 +0000 (00:38 +0200)
  debug

* GraphicObject.cs:
  allow min and max size overriding

* ListBox.cs:
  refresh list when children are cleared

Images/Icons/iconInfo.svg [new file with mode: 0644]
Templates/MessageBox.goml [new file with mode: 0644]
Templates/Spinner.goml
Tests/Interfaces/test6.goml [new file with mode: 0755]
Tests/Interfaces/testMsgBox.goml [new file with mode: 0755]
src/GraphicObjects/GraphicObject.cs
src/GraphicObjects/ListBox.cs
src/GraphicObjects/MessageBox.cs [new file with mode: 0644]
src/GraphicObjects/Window.cs

diff --git a/Images/Icons/iconInfo.svg b/Images/Icons/iconInfo.svg
new file mode 100644 (file)
index 0000000..f09168a
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 62 62" width="620" height="620" version="1.0">
+       <defs>
+               <linearGradient id="fieldGradient" gradientUnits="userSpaceOnUse" x1="42.9863" y1="7.01270" x2="22.0144" y2="51.9871">
+                       <stop offset="0.0" stop-color="#BCD6FE"/>
+                       <stop offset="1.0" stop-color="#6787D3"/>
+               </linearGradient>
+               <linearGradient id="edgeGradient" gradientUnits="userSpaceOnUse" x1="55.4541" y1="42.7529" x2="9.54710" y2="16.2485">
+                       <stop offset="0.0" stop-color="#3057A7"/>
+                       <stop offset="1.0" stop-color="#5A7AC6"/>
+               </linearGradient>
+               <radialGradient id="shadowGradient">
+                       <stop offset="0.0" stop-color="#C0C0C0"/>
+                       <stop offset="0.88" stop-color="#C0C0C0"/>
+                       <stop offset="1.0" stop-color="#C0C0C0" stop-opacity="0.0"/>
+               </radialGradient>
+       </defs>
+       <circle id="shadow" r="26.5" cy="29.5" cx="32.5" fill="url(#shadowGradient)" transform="matrix(1.0648,0.0,0.0,1.064822,-2.1,1.0864)"/>
+       <circle id="field" r="25.8" cx="31" cy="31" fill="url(#fieldGradient)" stroke="url(#edgeGradient)" stroke-width="2"/>
+       <g id="info" fill="white">
+               <polygon points="23,25 35,25 35,44 39,44 39,48 23,48 23,44 27,44 27,28 23,28 23,25"/>
+               <circle r="4" cx="31" cy="17"/>
+       </g>
+</svg>
\ No newline at end of file
diff --git a/Templates/MessageBox.goml b/Templates/MessageBox.goml
new file mode 100644 (file)
index 0000000..e02abfc
--- /dev/null
@@ -0,0 +1 @@
+
index 70b459b22b8415afbb52b501e4954c4abb78846c..59897fe3b8d412ef03f1f087ae6c33d3122ecc2e 100755 (executable)
@@ -3,7 +3,7 @@
        <HorizontalStack Name="hstack" Margin="0" Spacing="2" Width="{Width}" Height="{Height}">
                <Label Foreground="DimGray" Width="0" Height="{Height}" Name="labCpt" 
                        Text="{Value}" Margin="1" TextAlignment="RightCenter"/>
-               <VerticalStack RowCount="2" Width="-1" Height="-1" Spacing="1" >
+               <VerticalStack Width="-1" Height="-1" Spacing="1" >
                        <Button Width="12" Height="8" MouseClick="onUp">
                                <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
                        </Button>
diff --git a/Tests/Interfaces/test6.goml b/Tests/Interfaces/test6.goml
new file mode 100755 (executable)
index 0000000..b3b629b
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!--<GraphicObject
+                       Width="100" Height="100"
+                       Top="200" Left="200" 
+                       Margin="10" Background="Green"/>-->
+<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
+       <HorizontalStack Name="hstack" Margin="0" Spacing="5">
+               <Label Name="labCpt" Text="55"/>
+               <VerticalStack Spacing="1" Name="vstack">
+                       <Button Width="10" Height="8" MouseClick="onUp">
+                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
+                       </Button>
+                       <Button Width="10" Height="8"  MouseClick="onDown">
+                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
+                       </Button>
+               </VerticalStack>
+       </HorizontalStack>
+</Border>
\ No newline at end of file
diff --git a/Tests/Interfaces/testMsgBox.goml b/Tests/Interfaces/testMsgBox.goml
new file mode 100755 (executable)
index 0000000..b3b629b
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!--<GraphicObject
+                       Width="100" Height="100"
+                       Top="200" Left="200" 
+                       Margin="10" Background="Green"/>-->
+<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
+       <HorizontalStack Name="hstack" Margin="0" Spacing="5">
+               <Label Name="labCpt" Text="55"/>
+               <VerticalStack Spacing="1" Name="vstack">
+                       <Button Width="10" Height="8" MouseClick="onUp">
+                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
+                       </Button>
+                       <Button Width="10" Height="8"  MouseClick="onDown">
+                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
+                       </Button>
+               </VerticalStack>
+       </HorizontalStack>
+</Border>
\ No newline at end of file
index 98b52b0d45813f46a824a4b5ce3131074ad3050c..f8ffb51155c90faa06cbab0b8dee2453b6a69073 100644 (file)
@@ -295,12 +295,12 @@ namespace go
                        }\r
                }\r
                [XmlAttributeAttribute()][DefaultValue("0;0")]\r
-               public Size MaximumSize {\r
+               public virtual Size MaximumSize {\r
                        get { return _maximumSize; }\r
                        set { _maximumSize = value; }\r
                }\r
                [XmlAttributeAttribute()][DefaultValue("0;0")]\r
-               public Size MinimumSize {\r
+               public virtual Size MinimumSize {\r
                        get { return _minimumSize; }\r
                        set { _minimumSize = value; }\r
                }\r
index ea7f9ec5d0ea2f5edb5fd68c9e83bcacf8366f1a..6267ca923f1c481989fb66467fbcd123f6fff367 100644 (file)
@@ -72,6 +72,7 @@ namespace go
                                data = value;
 
                                _list.Children.Clear ();
+                               _list.registerForGraphicUpdate ();
                                if (data == null)
                                        return;
 
diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs
new file mode 100644 (file)
index 0000000..a5ce691
--- /dev/null
@@ -0,0 +1,32 @@
+//
+//  MessageBox.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+//  Copyright (c) 2015 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+using System;
+
+namespace go
+{
+       public class MessageBox
+       {
+               public MessageBox ()
+               {
+               }
+       }
+}
+
index 09488499e53cfb5aa8c2ddaf65e9a0ad97daf698..8355ff15dc47c9b28a6b64ca24f7b47e2b0dfb5f 100644 (file)
@@ -174,7 +174,7 @@ namespace go
                        _icon = this.child.FindByName ("Icon") as Image;
                }
 
-               void butQuitPress (object sender, MouseButtonEventArgs e)
+               protected void butQuitPress (object sender, MouseButtonEventArgs e)
                {
                        ILayoutable parent = (sender as GraphicObject).Parent;
                        while(!(parent is Window))