Show / Hide Table of Contents

Class Window

Base class you can use to implement an ImGui window for use with the built-in WindowSystem.

Inheritance
System.Object
Window
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dalamud.Interface.Windowing
Assembly: Dalamud.dll
Syntax
public abstract class Window

Constructors

| Improve this Doc View Source

Window(String, ImGuiWindowFlags, Boolean)

Initializes a new instance of the Window class.

Declaration
protected Window(string name, ImGuiWindowFlags flags = ImGuiWindowFlags.None, bool forceMainWindow = false)
Parameters
Type Name Description
System.String name

The name/ID of this 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.

ImGuiWindowFlags flags

The ImGuiWindowFlags of this window.

System.Boolean forceMainWindow

Whether or not this window should be limited to the main game window.

Properties

| Improve this Doc View Source

BgAlpha

Gets or sets this window's background alpha value.

Declaration
public float? BgAlpha { get; set; }
Property Value
Type Description
System.Nullable<System.Single>
| Improve this Doc View Source

Collapsed

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

Declaration
public bool? Collapsed { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>
| Improve this Doc View Source

CollapsedCondition

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

Declaration
public ImGuiCond CollapsedCondition { get; set; }
Property Value
Type Description
ImGuiCond
| Improve this Doc View Source

Flags

Gets or sets the window flags.

Declaration
public ImGuiWindowFlags Flags { get; set; }
Property Value
Type Description
ImGuiWindowFlags
| Improve this Doc View Source

ForceMainWindow

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

Declaration
public bool ForceMainWindow { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsFocused

Gets a value indicating whether the window is focused.

Declaration
public bool IsFocused { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsOpen

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

Declaration
public bool IsOpen { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Namespace

Gets or sets the namespace of the window.

Declaration
public string Namespace { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Position

Gets or sets the position of this window.

Declaration
public Vector2? Position { get; set; }
Property Value
Type Description
System.Nullable<System.Numerics.Vector2>
| Improve this Doc View Source

PositionCondition

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

Declaration
public ImGuiCond PositionCondition { get; set; }
Property Value
Type Description
ImGuiCond
| Improve this Doc View Source

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
public bool RespectCloseHotkey { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Size

Gets or sets the size of the window.

Declaration
public Vector2? Size { get; set; }
Property Value
Type Description
System.Nullable<System.Numerics.Vector2>
| Improve this Doc View Source

SizeCondition

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

Declaration
public ImGuiCond SizeCondition { get; set; }
Property Value
Type Description
ImGuiCond
| Improve this Doc View Source

SizeConstraints

Gets or sets the size constraints of the window.

Declaration
public Window.WindowSizeConstraints? SizeConstraints { get; set; }
Property Value
Type Description
System.Nullable<Window.WindowSizeConstraints>
| Improve this Doc View Source

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
public string WindowName { get; set; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

Draw()

Code to be executed every time the window renders.

Declaration
public abstract void Draw()
Remarks

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

| Improve this Doc View Source

DrawConditions()

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

Declaration
public virtual bool DrawConditions()
Returns
Type Description
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.

| Improve this Doc View Source

OnClose()

Code to be executed when the window is closed.

Declaration
public virtual void OnClose()
| Improve this Doc View Source

OnOpen()

Code to be executed when the window is opened.

Declaration
public virtual void OnOpen()
| Improve this Doc View Source

PostDraw()

Code to be executed after the window is drawn.

Declaration
public virtual void PostDraw()
| Improve this Doc View Source

PreDraw()

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

Declaration
public virtual void PreDraw()
| Improve this Doc View Source

PreOpenCheck()

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

Declaration
public virtual void PreOpenCheck()
| Improve this Doc View Source

Toggle()

Toggle window is open state.

Declaration
public void Toggle()
| Improve this Doc View Source

Update()

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

Declaration
public virtual void Update()
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX