using System.Collections.Generic; using System.Numerics; using Dalamud.Bindings.ImGui; namespace Dalamud.Interface.Windowing; /// /// Represents a ImGui window for use with the built-in . /// public interface IWindow { /// /// Gets or sets the namespace of the window. /// string? Namespace { get; set; } /// /// Gets or sets the name of the window. /// If you have multiple windows with the same name, you will need to /// append an unique ID to it by specifying it after "###" behind the window title. /// string WindowName { get; set; } /// /// Gets or sets a value indicating whether the window is focused. /// bool IsFocused { get; set; } /// /// Gets or sets a value indicating whether this window is to be closed with a hotkey, like Escape, and keep game addons open in turn if it is closed. /// bool RespectCloseHotkey { get; set; } /// /// Gets or sets a value indicating whether this window should not generate sound effects when opening and closing. /// bool DisableWindowSounds { get; set; } /// /// Gets or sets a value representing the sound effect id to be played when the window is opened. /// uint OnOpenSfxId { get; set; } /// /// Gets or sets a value representing the sound effect id to be played when the window is closed. /// uint OnCloseSfxId { get; set; } /// /// Gets or sets a value indicating whether this window should not fade in and out, regardless of the users' /// preference. /// bool DisableFadeInFadeOut { get; set; } /// /// Gets or sets the position of this window. /// Vector2? Position { get; set; } /// /// Gets or sets the condition that defines when the position of this window is set. /// ImGuiCond PositionCondition { get; set; } /// /// Gets or sets the size of the window. The size provided will be scaled by the global scale. /// Vector2? Size { get; set; } /// /// Gets or sets the condition that defines when the size of this window is set. /// ImGuiCond SizeCondition { get; set; } /// /// Gets or sets the size constraints of the window. The size constraints provided will be scaled by the global scale. /// WindowSizeConstraints? SizeConstraints { get; set; } /// /// Gets or sets a value indicating whether this window is collapsed. /// bool? Collapsed { get; set; } /// /// Gets or sets the condition that defines when the collapsed state of this window is set. /// ImGuiCond CollapsedCondition { get; set; } /// /// Gets or sets the window flags. /// ImGuiWindowFlags Flags { get; set; } /// /// Gets or sets a value indicating whether this ImGui window will be forced to stay inside the main game window. /// bool ForceMainWindow { get; set; } /// /// Gets or sets this window's background alpha value. /// float? BgAlpha { get; set; } /// /// Gets or sets a value indicating whether this ImGui window should display a close button in the title bar. /// bool ShowCloseButton { get; set; } /// /// Gets or sets a value indicating whether this window should offer to be pinned via the window's titlebar context menu. /// bool AllowPinning { get; set; } /// /// Gets or sets a value indicating whether this window should offer to be made click-through via the window's titlebar context menu. /// bool AllowClickthrough { get; set; } /// /// Gets or sets a list of available title bar buttons. /// /// If or are set to true, and this features is not /// disabled globally by the user, an internal title bar button to manage these is added when drawing, but it will /// not appear in this collection. If you wish to remove this button, set both of these values to false. /// List TitleBarButtons { get; set; } /// /// Gets or sets a value indicating whether this window will stay open. /// bool IsOpen { get; set; } /// /// Gets or sets a value indicating whether this window will request focus from the window system next frame. /// public bool RequestFocus { get; set; } /// /// Toggle window is open state. /// void Toggle(); /// /// Bring this window to the front. /// void BringToFront(); /// /// Code to always be executed before the open-state of the window is checked. /// void PreOpenCheck(); /// /// Additional conditions for the window to be drawn, regardless of its open-state. /// /// /// True if the window should be drawn, false otherwise. /// /// /// Not being drawn due to failing this condition will not change focus or trigger OnClose. /// This is checked before PreDraw, but after Update. /// bool DrawConditions(); /// /// Code to be executed before conditionals are applied and the window is drawn. /// void PreDraw(); /// /// Code to be executed after the window is drawn. /// void PostDraw(); /// /// Code to be executed every time the window renders. /// /// /// In this method, implement your drawing code. /// You do NOT need to ImGui.Begin your window. /// void Draw(); /// /// Code to be executed when the window is opened. /// void OnOpen(); /// /// Code to be executed when the window is closed. /// void OnClose(); /// /// Code to be executed when the window is safe to be disposed or removed from the window system. /// Doing so in may result in animations not playing correctly. /// void OnSafeToRemove(); /// /// Code to be executed every frame, even when the window is collapsed. /// void Update(); }