diff --git a/Cauldron.Macos/Cauldron.Macos.csproj b/Cauldron.Macos/Cauldron.Macos.csproj index deae7bc..b1a5976 100644 --- a/Cauldron.Macos/Cauldron.Macos.csproj +++ b/Cauldron.Macos/Cauldron.Macos.csproj @@ -47,6 +47,9 @@ DiagnosticsPopoverController.cs + + ExplorerSidebarViewController.cs + @@ -60,11 +63,15 @@ + + + + diff --git a/Cauldron.Macos/ExplorerSidebarViewController.cs b/Cauldron.Macos/ExplorerSidebarViewController.cs new file mode 100644 index 0000000..4a0baf9 --- /dev/null +++ b/Cauldron.Macos/ExplorerSidebarViewController.cs @@ -0,0 +1,17 @@ +using System; +using AppKit; + +namespace Cauldron.Macos; + +public partial class ExplorerSidebarViewController : NSViewController +{ + public ExplorerSidebarViewController (IntPtr handle) : base (handle) { } + + public ExplorerSidebarViewController(ObjCRuntime.NativeHandle handle) : base(handle) { } + + partial void SidebarTabClicked(NSSegmentedControl sender) + { + // Select the corresponding tab + this.SidebarTabView.SelectAt(sender.SelectedSegment); + } +} diff --git a/Cauldron.Macos/ExplorerSidebarViewController.designer.cs b/Cauldron.Macos/ExplorerSidebarViewController.designer.cs new file mode 100644 index 0000000..ff6e00e --- /dev/null +++ b/Cauldron.Macos/ExplorerSidebarViewController.designer.cs @@ -0,0 +1,29 @@ +// WARNING +// +// This file has been generated automatically by Visual Studio to store outlets and +// actions made in the UI designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using Foundation; +using System.CodeDom.Compiler; + +namespace Cauldron.Macos +{ + [Register ("ExplorerSidebarViewController")] + partial class ExplorerSidebarViewController + { + [Outlet] + AppKit.NSTabView SidebarTabView { get; set; } + + [Action ("SidebarTabClicked:")] + partial void SidebarTabClicked (AppKit.NSSegmentedControl sender); + + void ReleaseDesignerOutlets () + { + if (SidebarTabView != null) { + SidebarTabView.Dispose (); + SidebarTabView = null; + } + } + } +} diff --git a/Cauldron.Macos/Main.storyboard b/Cauldron.Macos/Main.storyboard index 5eb2ba2..20f0105 100644 --- a/Cauldron.Macos/Main.storyboard +++ b/Cauldron.Macos/Main.storyboard @@ -529,7 +529,7 @@ - + @@ -714,36 +714,96 @@ - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + +