teamlead-dashboard/src/TUI/Components/Controls/HeaderContainer.cs

48 lines
1.4 KiB
C#
Raw Normal View History

2024-03-06 21:49:54 +00:00
using TUI.Components.Controls.Statics;
using TUI.Components.Controls.Statics.Hints;
using TUI.Engine.Nodes;
2024-03-08 08:24:47 +00:00
using TUI.Engine.Nodes.Attributes;
2024-03-06 21:49:54 +00:00
using TUI.Engine.Nodes.Attributes.Alignments;
2024-03-08 08:24:47 +00:00
using TUI.Engine.Nodes.Attributes.Orientations;
using TUI.Engine.Nodes.Attributes.Resizings;
2024-03-06 21:49:54 +00:00
using TUI.Engine.Nodes.Containers;
using TUI.Engine.Theme;
namespace TUI.Components.Controls;
2024-03-08 08:24:47 +00:00
public abstract class ContainerBase : IContainer
2024-03-06 21:49:54 +00:00
{
public Orientation Orientation => Orientation.Horizontal;
2024-03-08 08:24:47 +00:00
public Resizing ResizingHorizontal => Resizing.Adaptive;
public Resizing ResizingVertical => Resizing.Hug;
public Size Fixed { get; }
public abstract Nodes GetNodes();
}
public class HeaderContainer : ContainerBase, IContainer
{
public override Nodes GetNodes()
2024-03-06 21:49:54 +00:00
{
2024-03-08 08:24:47 +00:00
var versionHints = new VersionHints()
.Set(Indentation.Default);
2024-03-06 21:49:54 +00:00
2024-03-08 08:24:47 +00:00
var tagsHints = new TagHints()
.Set(Indentation.Default);
2024-03-06 21:49:54 +00:00
2024-03-08 08:24:47 +00:00
var appTypeHints = new AppTypeHints()
.Set(Indentation.Default);
2024-03-06 21:49:54 +00:00
2024-03-08 08:24:47 +00:00
var hotkeysHints = new HotkeysHint()
.Set(Indentation.Default);
2024-03-06 21:49:54 +00:00
2024-03-08 08:24:47 +00:00
var logo = new Logo()
.Set(AlignmentHorizontal.Right)
.Set(left: Indentation.Default, bottom: Indentation.Default, right: Indentation.Default);
2024-03-06 21:49:54 +00:00
2024-03-08 08:24:47 +00:00
return new Nodes { versionHints, tagsHints, appTypeHints, hotkeysHints, logo };
2024-03-06 21:49:54 +00:00
}
2024-03-08 08:24:47 +00:00
}