qamp/Qrakhen.TilingFrames/Models/TilingFrame.cs

61 lines
1.7 KiB
C#

using CopaData.FileInspector.GUI.Models;
namespace CopaData.FileInspector.GUI.TilingPanels.Models;
/// <summary>
/// Base data class for content that is displayed for a <see cref="TilingHost"/>'s tabs or stand-alone pop-out windows.<br/>
/// Anything that you can physically see from the root <see cref="TilingPanel"/> is a <see cref="TilingFrame"/>.<br/>
/// Serving a header text, pin state and button configuration properties.
/// </summary>
public abstract class TilingFrame : Observable
{
/// <inheritdoc cref="HeaderText"/>
private string _headerText = string.Empty;
/// <summary>
/// The title of the tab that will be displayed inside the tab button.
/// </summary>
public string HeaderText
{
get => _headerText;
set => SetField(ref _headerText, value);
}
/// <inheritdoc cref="FrameButtons"/>
private FrameButtons _frameButtons = FrameButtons.Default;
/// <summary>
/// The buttons to be displayed next to the header.
/// </summary>
public FrameButtons FrameButtons
{
get => _frameButtons;
set => SetField(ref _frameButtons, value);
}
/// <inheritdoc cref="IsPinned"/>
private bool _isPinned = false;
/// <summary>
/// The title of the tab that will be displayed inside the tab button.
/// </summary>
public bool IsPinned
{
get => _isPinned;
set => SetField(ref _isPinned, value);
}
/// <inheritdoc cref="Parent" />
private TilingHost? _parent;
/// <summary>
/// The parent hosting this frame.
/// </summary>
public TilingHost? Parent
{
get => _parent;
set => SetField(ref _parent, value);
}
public virtual object? GetOptions() => null;
public virtual void SetOptions(object? options) { }
public virtual object? GetHelp() => null;
}