/// </summary>
public Interface CurrentInterface {
get {
- if (ifaceControl.Count == 0) {//create default orthogonal interface
- addInterfaceControler (new InterfaceControler (
- new Rectangle (0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height)));
- focusedIdx = 0;
- }
+ checkDefaultIFace ();
return ifaceControl [focusedIdx].CrowInterface;
}
}
/// check if a default interface exists, create one if not
/// </summary>
void checkDefaultIFace (){
- if (ifaceControl.Count == 0)//create default orthogonal interface
+ if (ifaceControl.Count == 0) {//create default orthogonal interface
addInterfaceControler (new InterfaceControler (
- new Rectangle (0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height)));
+ new Rectangle (0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height)));
+ focusedIdx = 0;
+ }
}
/// <summary>
/// Load the content of the IML file pointed by path and add it to the current interface
}
protected virtual void GL_Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs otk_e)
{
- if (activeIdx == -2) {
- focusedIdx = -1;
+ if (activeIdx == -2) {
for (int i = 0; i < ifaceControl.Count; i++) {
if (ifaceControl [i].ProcessMouseMove (otk_e.X, otk_e.Y)) {
focusedIdx = i;
return;
}
}
- } else if (focusedIdx >= 0) {
- ifaceControl [focusedIdx].ProcessMouseMove (otk_e.X, otk_e.Y);
- return;
- }
- if (focusedIdx < 0)
- CrowMouseMove.Raise (sender, otk_e);
+ } if (ifaceControl [focusedIdx].ProcessMouseMove (otk_e.X, otk_e.Y))
+ return;
+
+ CrowMouseMove.Raise (sender, otk_e);
}
protected virtual void GL_Mouse_ButtonUp(object sender, OpenTK.Input.MouseButtonEventArgs otk_e)
{
<?xml version="1.0"?>
<GenericStack Orientation="Vertical" Spacing="0"
- Background="Onyx"
+ Background="{./Background}"
MouseEnter="{/caption.Foreground=White}"
MouseLeave="{/caption.Foreground=Gray}">
<HorizontalStack Margin="2" Left="{./TabOffset}"
- Name="TabTitle"
+ Name="TabTitle" Background="{./Background}"
HorizontalAlignment="Left"
Height="{./TabThickness}"
Width="Fit">
<Label Text="Selected Tab:"/>
<Label Text="{../../tabview1.SelectedTab}"/>
</HorizontalStack>
- <TabView Name="tabview1" Orientation="Horizontal" Spacing="24" Margin="50">
- <TabItem Name="TabItem1" Caption="tab item 1" >
+ <TabView Name="tabview1" Background="Onyx" Orientation="Horizontal" Spacing="14" Margin="50">
+ <TabItem Name="TabItem1" Caption="tab item 1" Background="Onyx">
<VerticalStack Margin="20">
<CheckBox/>
<CheckBox/>
<CheckBox/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem2" Caption="tab item 2" Background="Gray">
- <VerticalStack Background="DimGray" Height="Fit" Margin="10">
+ <TabItem Name="TabItem2" Caption="tab item 2" Background="Onyx">
+ <VerticalStack Height="Fit" Margin="10">
<RadioButton Fit="true"/>
<RadioButton/>
<RadioButton/>
<RadioButton/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem3" Caption="tab item 3" Background="Gray">
+ <TabItem Name="TabItem3" Background="Onyx" Caption="tab item 3">
<Container Margin="5" CornerRadius="2" >
<TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
</Container>
</TabItem>
- <TabItem Name="TabItem4" Caption="tab item 4" Margin="0" Background="Gray">
+ <TabItem Name="TabItem4" Background="Onyx" Caption="tab item 4" Margin="0">
<TextBox/>
</TabItem>
</TabView>