Table of Contents

Class RatatuiTerminalApps

Namespace
RatatuiUnity

Static bootstrap and registry for terminal apps. Each app registers itself via Register<T>(string, string, int) in a [RuntimeInitializeOnLoadMethod(AfterAssembliesLoaded)] static method, then this manager instantiates them all at BeforeSceneLoad.

public static class RatatuiTerminalApps
Inheritance
RatatuiTerminalApps
Inherited Members

Properties

Apps

All registered terminal apps, sorted by Order after bootstrap.

public static IReadOnlyList<TerminalAppHandle> Apps { get; }

Property Value

IReadOnlyList<TerminalAppHandle>

IsBooted

True when bootstrap has completed.

public static bool IsBooted { get; }

Property Value

bool

Methods

Close(string)

Close the app with the given id.

public static void Close(string id)

Parameters

id string

Close<T>()

Close the first app whose instance is of type T.

public static void Close<T>() where T : RatatuiTerminalApp

Type Parameters

T

Get(string)

Get the live app instance by id, or null if not found.

public static RatatuiTerminalApp Get(string id)

Parameters

id string

Returns

RatatuiTerminalApp

Get<T>()

Get the live app instance by type, or null if not found.

public static T Get<T>() where T : RatatuiTerminalApp

Returns

T

Type Parameters

T

IsOpen(string)

Return whether the app with the given id is open.

public static bool IsOpen(string id)

Parameters

id string

Returns

bool

Open(string)

Open the app with the given id. If already open, brings it to RatatuiFocusManager focus (keyboard input + window z-order).

public static void Open(string id)

Parameters

id string

Open<T>()

Open the first app whose instance is of type T. If already open, brings it to focus.

public static void Open<T>() where T : RatatuiTerminalApp

Type Parameters

T

Register<T>(string, string, int)

Register a terminal app. Call this from a [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] static method inside the app class so it is registered before bootstrap runs.

public static void Register<T>(string id, string displayName = null, int order = 0) where T : RatatuiTerminalApp

Parameters

id string
displayName string
order int

Type Parameters

T

Toggle(string)

Toggle the app with the given id.

public static void Toggle(string id)

Parameters

id string

Toggle<T>()

Toggle the first app whose instance is of type T.

public static void Toggle<T>() where T : RatatuiTerminalApp

Type Parameters

T