alternetsoft / AlternetUI

MIT License
22 stars 2 forks source link

Docking? #101

Closed Shadowblitz16 closed 6 months ago

Shadowblitz16 commented 6 months ago

I was looking at the aui manager example and I don't quite understand it.

namespace SMBXR.Editor;

using Alternet.UI;

public class MainWindow : Window
{
    public MenuBar    MenuBar  { get; } = new();

    public LevelBar   LevelBar { get; } = new();

    public AuiManager Docker   { get; } = new();
    public LayoutPanel Panel { get; } = new();

    public LevelWindow LevelWindow { get; } = new LevelWindow();
    public MainWindow()
    {
        Menu = MenuBar;

        LevelWindow.Show();

        Panel   .Dock = DockStyle.Fill;
        LevelBar.Dock = DockStyle.Bottom;
        Children.Add(Panel   );
        Children.Add(LevelBar);

        Docker.SetFlags        (AuiManagerOption.Default | AuiManagerOption.AllowActivePane);
        Docker.SetManagedWindow(Panel);

        var pane = Docker.CreatePaneInfo().CenterPane().PaneBorder(false);
        Docker.AddPane(LevelWindow, pane);
    }
}
Shadowblitz16 commented 6 months ago

Also this seems to crash for me ... Docker.SetDefaultSplitterSashProps();

It's looking for user32.dll which would be windows only... image

generalloki commented 6 months ago

I can't suggest to use AuiManager and other Aui controls. After testing it's features and functionality, we found that it works badly under Linux and MacOs. Also there are some limitations in the Aui controls which are critical.

I suggest to use:

generalloki commented 6 months ago

I am closing this as AuiManager and other Aui controls are hidden now. I suggest to use SplittedPanel, SideBarPanel, GenericToolBar instead of Aui controls