<?xml version="1.0"?>\r
<HorizontalStack Width="{Width}" Height="{Height}" Margin="0" Spacing="1">\r
<Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>\r
- <Label Name="Caption" Height="{Height}" Width="0"/>\r
+ <Label Name="Caption" Height="{Height}" Width="-1"/>\r
</HorizontalStack>
\ No newline at end of file
<?xml version="1.0"?>\r
-<HorizontalStack Margin="0" Spacing="1" Focusable="false">\r
+<HorizontalStack Width="{Width}" Height="{Height}" Margin="0" Spacing="1">\r
<Image Name="Image" Width="12" Height="12" Path="#go.Images.Icons.radiobutton.svg"/>\r
- <Label Name="Caption"/>\r
+ <Label Name="Caption" Height="{Height}" Width="-1"/>\r
</HorizontalStack>
\ No newline at end of file
\r
\r
#region FPS\r
- static int _fps = 0;\r
+ int _fps = 0;\r
\r
public int fps {\r
get { return _fps; }\r
}\r
\r
ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", _fps));\r
+ ValueChanged.Raise (this, new ValueChangeEventArgs ("update",\r
+ this.updateTime.ElapsedMilliseconds.ToString () + " ms"));\r
}\r
}\r
\r
- public static int fpsMin = 0;\r
- public static int fpsMax = 0;\r
+ public int fpsMin = int.MaxValue;\r
+ public int fpsMax = 0;\r
\r
- static void resetFps ()\r
+ void resetFps ()\r
{\r
fpsMin = int.MaxValue;\r
fpsMax = 0;\r
_fps = 0;\r
}\r
+ public string update = "";\r
#endregion\r
\r
+\r
GraphicObject c;\r
ProgressBar pb, pb2;\r
Label labMousePos, labPb, labF, labA, labH, labFps, labFpsMin, labFpsMax, labV,\r
//c2.HorizontalAlignment = HorizontalAlignment.Left;\r
//c2.VerticalAlignment = VerticalAlignment.Top;\r
c.Background.AdjustAlpha (0.5);\r
- labMousePos = c.FindByName ("labMouse") as Label;\r
- //pb = c.FindByName("pbBar") as ProgressBar;\r
- pb2 = c.FindByName("pbBar2") as ProgressBar;\r
- labPb = c.FindByName ("labPb") as Label;\r
+// labMousePos = c.FindByName ("labMouse") as Label;\r
+// //pb = c.FindByName("pbBar") as ProgressBar;\r
+// pb2 = c.FindByName("pbBar2") as ProgressBar;\r
+// labPb = c.FindByName ("labPb") as Label;\r
labF = c.FindByName ("labFocus") as Label;\r
labA = c.FindByName ("labActive") as Label;\r
labH = c.FindByName ("labHover") as Label;\r
- labFps = c.FindByName ("labFps") as Label;\r
- labFpsMin = c.FindByName ("labFpsMin") as Label;\r
- labFpsMax = c.FindByName ("labFpsMax") as Label;\r
- labV = c.FindByName ("labValue") as Label;\r
- labUpdate = c.FindByName ("labUpdate") as Label;\r
- slTest = c.FindByName ("slider") as Slider;\r
+// labFps = c.FindByName ("labFps") as Label;\r
+// labFpsMin = c.FindByName ("labFpsMin") as Label;\r
+// labFpsMax = c.FindByName ("labFpsMax") as Label;\r
+// labV = c.FindByName ("labValue") as Label;\r
+// labUpdate = c.FindByName ("labUpdate") as Label;\r
+// slTest = c.FindByName ("slider") as Slider;\r
colors = c.FindByName ("colors") as Group;\r
\r
\r
\r
int i = 0;\r
foreach (Color col in Color.ColorDic) {\r
- HorizontalStack s = colors.addChild (new HorizontalStack ());\r
+ HorizontalStack s = colors.addChild (new HorizontalStack () { Fit = true});\r
s.HorizontalAlignment = HorizontalAlignment.Left;\r
Border b = new Border () {\r
Bounds = new Size (32, 20),\r
if (i > 150)\r
break;\r
}\r
- ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));\r
+// ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));\r
}\r
void pFps_mousemove(object sender, MouseMoveEventArgs e)\r
{\r
\r
fps = (int)RenderFrequency;\r
\r
- labUpdate.Text = this.updateTime.ElapsedMilliseconds.ToString() + " ms";\r
\r
if (frameCpt > 200) {\r
resetFps ();\r
frameCpt = 0;\r
-\r
}\r
frameCpt++;\r
\r
- if (pb2.Value == pb2.Maximum)\r
- pb2.Value = 0;\r
- pb2.Value++;\r
-\r
- if (FocusedWidget==null)\r
- labF.Text = "- none -";\r
- else\r
- labF.Text = FocusedWidget.Name;\r
\r
- if (activeWidget==null)\r
- labA.Text = "- none -";\r
- else\r
- labA.Text = activeWidget.Name;\r
-\r
- if (hoverWidget==null)\r
- labH.Text = "- none -";\r
- else\r
- labH.Text = hoverWidget.Name;\r
+// if (FocusedWidget==null)\r
+// labF.Text = "- none -";\r
+// else\r
+// labF.Text = FocusedWidget.Name;\r
+//\r
+// if (activeWidget==null)\r
+// labA.Text = "- none -";\r
+// else\r
+// labA.Text = activeWidget.Name;\r
+//\r
+// if (hoverWidget==null)\r
+// labH.Text = "- none -";\r
+// else\r
+// labH.Text = hoverWidget.Name;\r
}\r
+ //public Point MousePosition;\r
+\r
protected override void OnMouseMove (MouseMoveEventArgs e)\r
{\r
base.OnMouseMove (e);\r
- labMousePos.Text = e.Position.ToString ();\r
+ //MousePosition = e.Position;\r
+ ValueChanged.Raise(this, new ValueChangeEventArgs ("MousePosition", e.Position.ToString()));\r
}\r
[STAThread]\r
static void Main ()\r
HorizontalAlignment="Left" VerticalAlignment="Top"\r
Margin="10" Width="-1" Height="-1" Focusable="True" >\r
\r
- <VerticalStack Name="vsFps" BorderWidth="1" Margin="5" Spacing="4">\r
- <HorizontalStack>\r
+ <VerticalStack Name="vsFps" BorderWidth="1" Margin="5" Spacing="4" Fit="true">\r
+ <HorizontalStack Height="-1">\r
<Label Text="Update:" FontColor="White" />\r
<Label Name="labUpdate" Text="{update}" FontSize="12" Background="DarkGreen"/>\r
</HorizontalStack>\r
- <HorizontalStack Name="hsFps" Background="Red" >\r
+ <HorizontalStack Height="-1" Name="hsFps" Background="Red" >\r
<Label Name="captionFps" Text="Fps:" />\r
<Label Name="valueFps" Text="{fps}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>\r
</HorizontalStack>\r
- <HorizontalStack Background="Red">\r
+ <HorizontalStack Height="-1" Background="Red">\r
<Label Text="Min:" Width = "30" />\r
<Label Text="{fpsMin}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>\r
</HorizontalStack>\r
- <HorizontalStack Background="Red" >\r
+ <HorizontalStack Height="-1" Background="Red" >\r
<Label Text="Max:" Width = "30"/>\r
<Label Text="{fpsMax}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>\r
</HorizontalStack>\r
<?xml version="1.0"?>\r
-<Group Name="MainGrp" Focusable="true"\r
+<Group Name="MainGrp"\r
Width="800" Height="500"\r
Background="0,5;0,5;0,5;0,5" Foreground="White"\r
Margin="10" >\r
- <Border Margin="10"\r
+ <Border Margin="10" CornerRadius="10"\r
Name="mainBorder"\r
BorderWidth="2" BorderColor="Transparent"\r
Focusable="True"\r
MouseEnter="{BorderColor = White}"\r
MouseLeave="{BorderColor = Transparent}">\r
-\r
- <HorizontalStack Name="hs0"\r
- WidgetSpacing="1" \r
- VerticalAlignment="Top">\r
- <Slider Orientation="Vertical" Height="300" Width="10" Background="Transparent" />\r
- <VerticalStack Name="vs1" Spacing="5">\r
- <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
- <Label Name="labMouse" Text="MousePos"/>\r
- <HorizontalStack WidgetSpacing="10">\r
- <VerticalStack Width="100">\r
- <Checkbox Name="chk1" Focusable="true"/>\r
+ <HorizontalStack WidgetSpacing="1">\r
+ <VerticalStack Width="-1">\r
+ <HorizontalStack WidgetSpacing="1" Fit="true">\r
+ <VerticalStack Fit="true">\r
+ <Label Text="{MousePosition}"/>\r
+ <HorizontalStack Name="hsFocus" Fit="true">\r
+ <Label Text="Focused:"/>\r
+ <Label Name="labFocus"/>\r
+ </HorizontalStack>\r
+ <HorizontalStack Fit="true">\r
+ <Label Text="Active:" Name="hsActive"/>\r
+ <Label Name="labActive"/>\r
+ </HorizontalStack>\r
+ <HorizontalStack Fit="true">\r
+ <Label Text="Hover:" Name="hsHover"/>\r
+ <Label Name="labHover"/>\r
+ </HorizontalStack>\r
+ </VerticalStack>\r
+ <VerticalStack Fit="true"> \r
+ <Checkbox Name="chk1"/>\r
<Checkbox Name="chk2" IsChecked="true"/>\r
- <Checkbox Name="chk3" Template="#go.Templates.Checkbox2.goml"/>\r
- <Checkbox Name="chk4">\r
+ <Checkbox Name="chk4" >\r
<Template>\r
- <HorizontalStack Margin="0" Spacing="1" Focusable="false">\r
- <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>\r
- <Label Name="Caption" Foreground="Black" Background="Yellow"/>\r
+ <HorizontalStack Fit="True" Margin="0" Spacing="1">\r
+ <Image Name="Image" Width="20" Height="20" Path="#go.Images.Icons.checkbox.svg"/>\r
+ <Label Name="Caption" Height="-1" Width="-1" Foreground="Black" Background="Yellow"/>\r
</HorizontalStack>\r
</Template>\r
</Checkbox>\r
</VerticalStack>\r
- <VerticalStack Width="100">\r
+ <VerticalStack Fit="true">\r
<RadioButton IsChecked="true"/>\r
<RadioButton/>\r
<RadioButton> \r
<Template>\r
- <HorizontalStack Background="Green" Margin="0" Spacing="1" Focusable="false">\r
- <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.radiobutton.svg"/>\r
+ <HorizontalStack Fit="true" Background="Green" Margin="0" Spacing="1" Focusable="false">\r
+ <Image Name="Image" Width="20" Height="20" Path="#go.Images.Icons.radiobutton.svg"/>\r
<Label Name="Caption"/>\r
</HorizontalStack>\r
</Template>\r
</RadioButton>\r
- <RadioButton/>\r
</VerticalStack>\r
- <Spinner Width="50" Value="5"></Spinner>\r
- </HorizontalStack>\r
-<!-- <ListBox Data="{TestList}"></ListBox>-->\r
- <HorizontalStack Name="hsPbar" Margin="5">\r
- <ProgressBar Name="pbBar" \r
- Width="200" Height="20"\r
- Minimum="0"\r
- Maximum="200"\r
- Value="{fps}"\r
- Foreground="BlueCrayola" Background="DarkGray"\r
- BorderWidth="2" BorderColor="White"/>\r
-<!-- <Label Name="labPb"\r
- Width="30"\r
- TextAlignment="RightCenter"/>-->\r
- </HorizontalStack>\r
- <HorizontalStack Name="hsFocus">\r
- <Label Text="Focused:"/>\r
- <Label Name="labFocus"/>\r
- </HorizontalStack>\r
- <HorizontalStack>\r
- <Label Text="Active:" Name="hsActive"/>\r
- <Label Name="labActive"/>\r
- </HorizontalStack>\r
- <HorizontalStack>\r
- <Label Text="Hover:" Name="hsHover"/>\r
- <Label Name="labHover"/>\r
</HorizontalStack>\r
- <Button Margin="5" BorderWidth="0" Width="-1" Height="-1" HorizontalAlignment="Center">\r
- <Label FontSize="18" Text="This is a test" Margin="5" Foreground="Black" />\r
- </Button>\r
<TextBoxWidget Name="textbox1" TextAlignment="LeftCenter" Font="droid,14" \r
- Width="300" Height="-1" Margin="2"\r
- BorderColor="White" BorderWidth="1"\r
+ Width="200" Height="-1" Margin="2" Background="White"\r
+ Forground="Black"\r
+ BorderColor="DimGray" BorderWidth="1"\r
Text="editable text"/>\r
- <GroupBox Title="Group Box" Width="300" Height="100" \r
- BorderColor="White" BorderWidth="2" Margin="3">\r
- <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>\r
- </GroupBox>\r
- <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
- <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>\r
</VerticalStack>\r
- <VerticalStack Width="-1" Height="-1" Margin="0" WidgetSpacing="1">\r
+ <VerticalStack Fit="true" Margin="0" WidgetSpacing="1">\r
<Button Margin="1" Width="150" Height="100">\r
<Image Path="#Tests.image.tetra.png"/>\r
</Button>\r
</Expandable>\r
<HorizontalStack>\r
<Label Text="Update" FontColor="White"/>\r
- <Label Name="labUpdate" Text="xxxx" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>\r
+ <Label Name="labUpdate" Text="{update}" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>\r
</HorizontalStack>\r
<HorizontalStack>\r
<Label Text="Fps:" Width = "30"/>\r
TextAlignment="Center" Background="AoEnglish"/>\r
</HorizontalStack>\r
</VerticalStack>\r
+ <HorizontalStack Width="-1">\r
+ <Scroller Name="scroller1" Background="DimGray" Width="-1" \r
+ Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">\r
+ <VerticalStack Name="colors" VerticalAlignment="Top" Margin="1" Fit="true">\r
+ <ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"\r
+ BorderWidth="2" BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>\r
+ <ProgressBar Width="100" Height="20" Value="{fps}" BorderWidth="2"\r
+ BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/> \r
+ </VerticalStack>\r
+ </Scroller>\r
+ <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"\r
+ Orientation="Vertical" Width="16" />\r
+ </HorizontalStack>\r
+ </HorizontalStack>\r
+<!-- <HorizontalStack Name="hs0"\r
+ WidgetSpacing="1" \r
+ VerticalAlignment="Top">\r
+ <Slider Orientation="Vertical" Height="300" Width="10" Background="Transparent" />\r
+ <VerticalStack Name="vs1" Spacing="5">\r
+ <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
+ <HorizontalStack WidgetSpacing="10">\r
+ \r
+\r
+ <Spinner Width="50" Value="5"></Spinner>\r
+ </HorizontalStack>\r
+ <HorizontalStack Name="hsPbar" Margin="5">\r
+ <ProgressBar Name="pbBar" \r
+ Width="200" Height="20"\r
+ Minimum="0"\r
+ Maximum="200"\r
+ Value="{fps}"\r
+ Foreground="BlueCrayola" Background="DarkGray"\r
+ BorderWidth="2" BorderColor="White"/>\r
+ </HorizontalStack>\r
+\r
+ <Button Margin="5" BorderWidth="0" Width="-1" Height="-1" HorizontalAlignment="Center">\r
+ <Label FontSize="18" Text="This is a test" Margin="5" Foreground="Black" />\r
+ </Button>\r
+\r
+ <GroupBox Title="Group Box" Width="300" Height="100" \r
+ BorderColor="White" BorderWidth="2" Margin="3">\r
+ <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>\r
+ </GroupBox>\r
+ <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />\r
+ <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>\r
+ </VerticalStack>\r
+ \r
<HorizontalStack Height="350" Width="-1">\r
<Scroller Name="scroller1" Background="DimGray" Height="0" Width="-1" \r
Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">\r
Orientation="Vertical" Width="16" />\r
</HorizontalStack>\r
</HorizontalStack>\r
-\r
- <Slider \r
+-->\r
+<!-- <Slider \r
Height="20" Width="100" \r
Background="Transparent"\r
- VerticalAlignment="Bottom" />\r
+ VerticalAlignment="Bottom" />-->\r
</Border>\r
</Group>
\ No newline at end of file
Margin="20" Focusable="True" Background="Gray">\r
\r
<Expandable Width="150" Height="-1" Margin="2" VerticalAlignment="Top">\r
- <VerticalStack Width="100" >\r
+ <VerticalStack Width="100" Height="-1">\r
<Checkbox Name="chk1"/>\r
<Checkbox Name="chk2" IsChecked="true"/>\r
<Checkbox Name="chk3"/>\r
<?xml version="1.0"?>\r
<!--<HorizontalStack Background="Gray" Margin="1">-->\r
-<Group Background="Gray" Margin="5" Height="-1" Width="-1">\r
+<Group Background="Gray" Margin="5" Height="200" Width="300">\r
<VerticalStack Background="Green" Margin="1">\r
- <HorizontalStack Width="-1" Height="-1" Margin="5" Background="Red">\r
- <Checkbox Height="100" Width="200" Background="Blue"/>\r
+ <HorizontalStack Width="0" Height="0" Margin="5" Background="Red">\r
+ <Checkbox Height="-1" Width="100" Background="Blue"/>\r
<!-- <Checkbox Height="-1" Width="-1"/>-->\r
</HorizontalStack>\r
</VerticalStack>\r
Focusable="True" CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">\r
<Template>\r
<Border BorderWidth="1" BorderColor="White" Margin="0" CornerRadius="20">\r
- <VerticalStack Height="0" Width="0" Margin="0">\r
- <Border BorderWidth="1" BorderColor="White" Height="-1" Width="0" Background="0,1;0,5;1,0;0,5">\r
- <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Width="0" Focusable="false" >\r
+ <VerticalStack Margin="0">\r
+ <Border BorderWidth="1" BorderColor="White" Height="-1" Background="0,1;0,5;1,0;0,5">\r
+ <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Focusable="false" >\r
<GraphicObject Width="5" Height="0"/>\r
<Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>\r
<Label Foreground="White" Width="0" Name="Title" Margin="1" TextAlignment="Center" />\r
</VerticalStack>\r
</Border>\r
</Template>\r
- <VerticalStack Name="contentVSStack" Height="0" Width="0" Margin="10" Spacing="10">\r
+ <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">\r
<Slider Name="slider" Height="10" Width="0"/>\r
\r
<HorizontalStack Width="-1" Height="-1" Margin="0" Background="Red">\r
- <Checkbox Height="-1" Width="-1"/>\r
- <Checkbox Height="-1" Width="-1"/>\r
+ <Checkbox Height="-1" Width="100"/>\r
+ <Checkbox Height="-1" Width="100"/>\r
</HorizontalStack>\r
<GroupBox Title="test" Height="-1" Width="-1" Margin="5">\r
- <VerticalStack Width="-1">\r
+ <VerticalStack Height="-1" Width="-1">\r
<RadioButton Caption="Radio 1"/>\r
<RadioButton Caption="Radio 2" IsChecked="true"/>\r
<RadioButton Caption="Radio 3"/>\r
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>test.GOLIBTests</StartupObject>
+ <StartupObject>test.GOLIBTest_4</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputPath>..\bin\$(configuration)</OutputPath>
<IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>
public Checkbox() : base()\r
{ \r
} \r
-\r
+ \r
protected override void loadTemplate(GraphicObject template = null)\r
{ \r
base.loadTemplate (template);\r
}\r
}\r
\r
+ [XmlAttributeAttribute()][DefaultValue(-1)]\r
+ public override int Height {\r
+ get { return base.Height; }\r
+ set { base.Height = value; }\r
+ }\r
[XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true\r
public override bool Focusable\r
{\r
{\r
base.loadTemplate (template);\r
\r
- _caption = this.child.FindByName ("Caption") as Label;\r
+ _caption = this.child.FindByName ("Caption") as Label;//TODO:should use bindings instead\r
_image = this.child.FindByName ("Image") as Image;\r
_image.SvgSub = "unchecked";\r
}\r
- \r
+\r
+ [XmlAttributeAttribute()][DefaultValue(-1)]\r
+ public override int Height {\r
+ get { return base.Height; }\r
+ set { base.Height = value; }\r
+ }\r
[XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true\r
public override bool Focusable\r
{\r