Show / Hide Table of Contents

Struct ImPane

The ImPane is a stack allocated convenience struct to create draggable and collapsible panes.

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: InitialPrefabs.NimGui
Assembly: InitialPrefabs.ImGui.dll
Syntax
public ref struct ImPane

Constructors

ImPane(String, float2, float2, ImPaneFlags, Boolean)

Disposable stack-only struct to conveniently call BeginPane and EndPane. This uses the default color schemes. How to use the dispose pattern

using (var pane = new ImPane(label, position, size)) {
    // Write your pane logic here
}
Declaration
public ImPane(string title, float2 position, float2 size, ImPaneFlags flags = (ImPaneFlags)0, bool autoLayout = false)
Parameters
Type Name Description
System.String title

The title of the pane

Unity.Mathematics.float2 position

The initial position of the pane

Unity.Mathematics.float2 size

The size of the pane

ImPaneFlags flags

Any flags which define the initial behavior of the Pane

System.Boolean autoLayout

Optionally, you can force the pane to automically layout the window

ImPane(String, float2, float2, in ImPaneStyle, in ImButtonStyle, ImPaneFlags, Boolean)

Disposable stack-only struct to conveniently call BeginPane and EndPane. How to use the dispose pattern

using (var pane = new ImPane(label, position, size, windowStyle, buttonStyle)) {
    // Write your pane logic here
}
Declaration
public ImPane(string title, float2 position, float2 size, in ImPaneStyle paneStyle, in ImButtonStyle buttonStyle, ImPaneFlags flags = (ImPaneFlags)0, bool autoLayout = false)
Parameters
Type Name Description
System.String title

The title of the pane

Unity.Mathematics.float2 position

The initial position of the pane

Unity.Mathematics.float2 size

The size of the pane

ImPaneStyle paneStyle

The style of the pane

ImButtonStyle buttonStyle

The style of the button

ImPaneFlags flags

Any flags which define the initial behavior of the Pane

System.Boolean autoLayout

Optionally, you can force the pane to automically layout the window

ImPane(UInt32, String, float2, float2, ImPaneFlags, in ImPaneStyle, in ImButtonStyle, Boolean)

Disposable stack-only struct to conveniently call BeginPane and EndPane. You can supply a unique id instead of the BeginPane method hashing the label.

How to use the dispose pattern
using (var pane = new ImPane(label, position, size)) {
    // Write your pane logic here
}
Declaration
public ImPane(uint controlID, string title, float2 position, float2 size, ImPaneFlags flags, in ImPaneStyle paneStyle, in ImButtonStyle buttonStyle, bool autoLayout = false)
Parameters
Type Name Description
System.UInt32 controlID

A unique ID for the pane

System.String title

The title of the pane

Unity.Mathematics.float2 position

The initial position of the pane

Unity.Mathematics.float2 size

The size of the pane

ImPaneFlags flags
ImPaneStyle paneStyle

The style of the pane

ImButtonStyle buttonStyle

The style of the button

System.Boolean autoLayout

Optionally, you can force the pane to automically layout the window

Fields

IsVisible

Internally checks if the pane should show. This property is set using the out parameter of ImGui.BeginPane(...) method.

Declaration
public readonly bool IsVisible
Field Value
Type Description
System.Boolean

Methods

Dispose()

Declaration
public void Dispose()
In This Article
Back to top Generated by DocFX