mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-21 19:17:41 -05:00
Each open nest gets a tab along the bottom of the window, above the status bar: the shown one is white with a blue line, a dot marks unsaved Auto Nest results, x closes it and + opens another. Inside a tab, Plates and Drawings tabs sit at the top of the left panel (Drawings lists each drawing's nested and required quantity) and the plate header with first/previous/next/last sits over the plate view. Each nest keeps its own plate and zoom when you switch. File > Open takes several files, and a file already open switches to its tab. File > Close and Close All, View > Next/Previous Nest and Ctrl+Tab/Ctrl+Shift+Tab switch or close nests. This version cannot save, so closing a nest with Auto Nest results, or exiting with any, asks first (Cancel is the default). Other nests can be opened and viewed while Auto Nest runs; the nest being nested cannot be closed until it finishes. Several nest paths on the command line open in tabs.
56 lines
2.5 KiB
XML
56 lines
2.5 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="OpenNest.Avalonia.MainWindow"
|
|
Title="OpenNest (Avalonia prototype)"
|
|
Width="1400" Height="860">
|
|
<DockPanel>
|
|
<Menu DockPanel.Dock="Top">
|
|
<MenuItem Header="_File">
|
|
<MenuItem x:Name="OpenMenuItem" Header="_Open..." InputGesture="Ctrl+O" Click="OnOpen" />
|
|
<MenuItem x:Name="CloseMenuItem" Header="_Close" Click="OnCloseNest" />
|
|
<MenuItem x:Name="CloseAllMenuItem" Header="Close A_ll" Click="OnCloseAll" />
|
|
<Separator />
|
|
<MenuItem Header="E_xit" Click="OnExit" />
|
|
</MenuItem>
|
|
<MenuItem Header="_Nest">
|
|
<MenuItem x:Name="AutoNestMenuItem" Header="_Auto Nest" Click="OnAutoNest" />
|
|
</MenuItem>
|
|
<MenuItem Header="_View">
|
|
<MenuItem Header="Zoom to _Fit" InputGesture="F" Click="OnFit" />
|
|
<MenuItem Header="_Previous Plate" InputGesture="PageUp" Click="OnPreviousPlate" />
|
|
<MenuItem Header="_Next Plate" InputGesture="PageDown" Click="OnNextPlate" />
|
|
<Separator />
|
|
<MenuItem Header="Next N_est" InputGesture="Ctrl+Tab" Click="OnNextNest" />
|
|
<MenuItem Header="Previous Ne_st" InputGesture="Ctrl+Shift+Tab" Click="OnPreviousNest" />
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<Border DockPanel.Dock="Top" Padding="4" BorderThickness="0,0,0,1" BorderBrush="#D0D0D0">
|
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
|
<Button x:Name="OpenButton" Content="Open" Click="OnOpen" />
|
|
<Button Content="Fit" Click="OnFit" />
|
|
<Button Content="Previous" Click="OnPreviousPlate" />
|
|
<Button Content="Next" Click="OnNextPlate" />
|
|
<Button x:Name="AutoNestButton" Content="Auto Nest" Click="OnAutoNest" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border DockPanel.Dock="Bottom" Padding="6,3" Background="#F0F0F0">
|
|
<TextBlock x:Name="Status" Text="Open a .nest file to begin." />
|
|
</Border>
|
|
|
|
<!-- One tab per open nest, along the bottom of the window. -->
|
|
<Border DockPanel.Dock="Bottom" Background="#E4E7EA">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
|
|
<StackPanel x:Name="TabStrip" Orientation="Horizontal" Margin="6,0,6,6" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<Panel>
|
|
<TextBlock x:Name="EmptyHint" Text="Open a .nest file to begin." Foreground="#6B7280"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" />
|
|
<ContentControl x:Name="NestHost" />
|
|
</Panel>
|
|
</DockPanel>
|
|
</Window>
|