Windowclass

objectWidgetWindow
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.Window : Editor.Widget

Constructors1

Showing 1 constructors

public Window(Editor.Widget parent = null)PUBLICCONSTRUCTOR

ParameterTypeDescription
parent = nullWidget

Methods15

Showing 15 methods

public void Center()PUBLIC

Position the window at the centre of the screen, or main editor window if one is present.

Returns:void

public void Clear()PUBLIC

TODO this was a test, get rid of it

Returns:void

public virtual void Close()PUBLICVIRTUAL

Returns:void

protected virtual void OnClosed()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnResize()PROTECTEDVIRTUAL

Returns:void

public void RemoveToolBar(Editor.ToolBar bar)PUBLIC

ParameterTypeDescription
barToolBar
Returns:void

public virtual void RestoreFromStateCookie()PUBLICVIRTUAL

Called whenever the window should restore its state via the EditorCookie library, that was previously saved in `Editor.Window.SaveToStateCookie`. You should use `Editor.Window.StateCookie` in the cookie name.

Returns:void

public void RestoreState(string state)PUBLIC

ParameterTypeDescription
statestring
Returns:void

public string SaveState(int version = 0)PUBLIC

ParameterTypeDescription
version = 0int
Returns:string

public virtual void SaveToStateCookie()PUBLICVIRTUAL

Called whenever the window should save its state via the EditorCookie library, to be later restored in `Editor.Window.RestoreFromStateCookie`. This is useful to carry data across game sessions. You should use `Editor.Window.StateCookie` in the cookie name.

Returns:void

public virtual void Show()PUBLICVIRTUAL

Returns:void

Properties9

Showing 9 properties

public bool Editor.Window.CloseButtonVisible { get; set; }PUBLICGETSET

Returns:bool

public bool Editor.Window.IsDialog { get; set; }PUBLICGETSET

Returns:bool

public bool Editor.Window.StartCentered { get; set; }PUBLICGETSET

Initialises the window at the centre of the screen (or main editor window if one is present) by default.

Returns:bool

public string Editor.Window.StateCookie { get; set; }PUBLICGETSET

A unique identifier for this window, to store the window state across sessions using the Cookie library.

Returns:string

public string Editor.Window.Title { get; set; }PUBLICGETSET

Returns:string

On this page