Skip to main content
Version: 15.x (API 15) [Current]

Interface IWindow

Represents a ImGui window for use with the built-in Dalamud.Interface.Windowing.WindowSystem.

Assembly: Dalamud.dll​
Declaration
public interface IWindow

Derived:
Dalamud.Interface.Windowing.Window

Properties​

Namespace​

Gets or sets the namespace of the window.

Declaration
string? Namespace { get; set; }

WindowName​

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.

Declaration
string WindowName { get; set; }

IsFocused​

Gets or sets a value indicating whether the window is focused.

Declaration
bool IsFocused { get; set; }

IsHovered​

Gets or sets a value indicating whether the window is hovered.

Declaration
bool IsHovered { get; set; }

RespectCloseHotkey​

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.

Declaration
bool RespectCloseHotkey { get; set; }

InhibitAtkCollision​

Gets or sets a value indicating whether this window inhibits the game cursor from interacting with native elements underneath the hovered window.

Declaration
bool InhibitAtkCollision { get; set; }
Remarks​

This is feature is disabled when Gamepad Mode is enabled.

DisableWindowSounds​

Gets or sets a value indicating whether this window should not generate sound effects when opening and closing.

Declaration
bool DisableWindowSounds { get; set; }

OnOpenSfxId​

Gets or sets a value representing the sound effect id to be played when the window is opened.

Declaration
uint OnOpenSfxId { get; set; }

OnCloseSfxId​

Gets or sets a value representing the sound effect id to be played when the window is closed.

Declaration
uint OnCloseSfxId { get; set; }

DisableFadeInFadeOut​

Gets or sets a value indicating whether this window should not fade in and out, regardless of the users' preference.

Declaration
bool DisableFadeInFadeOut { get; set; }

Position​

Gets or sets the position of this window.

Declaration
Vector2? Position { get; set; }

PositionCondition​

Gets or sets the condition that defines when the position of this window is set.

Declaration
ImGuiCond PositionCondition { get; set; }

Size​

Gets or sets the size of the window. The size provided will be scaled by the global scale.

Declaration
Vector2? Size { get; set; }

SizeCondition​

Gets or sets the condition that defines when the size of this window is set.

Declaration
ImGuiCond SizeCondition { get; set; }

SizeConstraints​

Gets or sets the size constraints of the window. The size constraints provided will be scaled by the global scale.

Declaration
WindowSizeConstraints? SizeConstraints { get; set; }

Collapsed​

Gets or sets a value indicating whether this window is collapsed.

Declaration
bool? Collapsed { get; set; }

CollapsedCondition​

Gets or sets the condition that defines when the collapsed state of this window is set.

Declaration
ImGuiCond CollapsedCondition { get; set; }

Flags​

Gets or sets the window flags.

Declaration
ImGuiWindowFlags Flags { get; set; }

ForceMainWindow​

Gets or sets a value indicating whether this ImGui window will be forced to stay inside the main game window.

Declaration
bool ForceMainWindow { get; set; }

BgAlpha​

Gets or sets this window's background alpha value.

Declaration
float? BgAlpha { get; set; }

ShowCloseButton​

Gets or sets a value indicating whether this ImGui window should display a close button in the title bar.

Declaration
bool ShowCloseButton { get; set; }

AllowPinning​

Gets or sets a value indicating whether this window should offer to be pinned via the window's titlebar context menu.

Declaration
bool AllowPinning { get; set; }

AllowClickthrough​

Gets or sets a value indicating whether this window should offer to be made click-through via the window's titlebar context menu.

Declaration
bool AllowClickthrough { get; set; }

AllowBackgroundBlur​

Gets or sets a value indicating whether this window should apply a blur effect to the background behind it when drawn, if the user has enabled this feature globally.

Declaration
bool AllowBackgroundBlur { get; set; }

IsPinned​

Gets or sets a value indicating whether this window is pinned.

Declaration
bool IsPinned { get; set; }

IsClickthrough​

Gets or sets a value indicating whether this window is click-through.

Declaration
bool IsClickthrough { get; set; }

IsTopMost​

Gets or sets a value indicating whether this window is top-most. Only applies to windows that are not on the main viewport.

Declaration
bool IsTopMost { get; set; }

TitleBarButtons​

Gets or sets a list of available title bar buttons.

If Dalamud.Interface.Windowing.IWindow.AllowPinning or Dalamud.Interface.Windowing.IWindow.AllowClickthrough 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.

Declaration
List<TitleBarButton> TitleBarButtons { get; set; }

IsOpen​

Gets or sets a value indicating whether this window will stay open.

Declaration
bool IsOpen { get; set; }

RequestFocus​

Gets or sets a value indicating whether this window will request focus from the window system next frame.

Declaration
bool RequestFocus { get; set; }

Methods​

Toggle()​

Toggle window is open state.

Declaration
void Toggle()

BringToFront()​

Bring this window to the front.

Declaration
void BringToFront()

PreOpenCheck()​

Code to always be executed before the open-state of the window is checked.

Declaration
void PreOpenCheck()

DrawConditions()​

Additional conditions for the window to be drawn, regardless of its open-state.

Declaration
bool DrawConditions()
Returns​

System.Boolean: True if the window should be drawn, false otherwise.

Remarks​

Not being drawn due to failing this condition will not change focus or trigger OnClose. This is checked before PreDraw, but after Update.

PreDraw()​

Code to be executed before conditionals are applied and the window is drawn.

Declaration
void PreDraw()

PostDraw()​

Code to be executed after the window is drawn.

Declaration
void PostDraw()

Draw()​

Code to be executed every time the window renders.

Declaration
void Draw()
Remarks​

In this method, implement your drawing code. You do NOT need to ImGui.Begin your window.

OnOpen()​

Code to be executed when the window is opened.

Declaration
void OnOpen()

OnClose()​

Code to be executed when the window is closed.

Declaration
void OnClose()

OnSafeToRemove()​

Code to be executed when the window is safe to be disposed or removed from the window system. Doing so in Dalamud.Interface.Windowing.IWindow.OnClose() may result in animations not playing correctly.

Declaration
void OnSafeToRemove()

Update()​

Code to be executed every frame, even when the window is collapsed.

Declaration
void Update()