s&box docs

public abstract class Editor.Layout : Editor.QObject

Broader workflow and conceptual references connected to this API.

Methods

Showing 17 methods

public Editor.Layout AddColumn(int stretch = 0, bool reversed = False)

Parameters

  • stretch: Default: 0
  • reversed: Default: False

public Editor.Layout AddFlow(int stretch = 0)

Parameters

  • stretch: Default: 0

public virtual T AddLayout(T layout, int stretch = 0)

Parameters

  • stretch: Default: 0

public Editor.Layout AddRow(int stretch = 0, bool reversed = False)

Parameters

  • stretch: Default: 0
  • reversed: Default: False

public virtual void AddSpacingCell(float size)

Add a spacing item

public virtual void AddStretchCell(int stretch = 0)

Add a stretch item

Parameters

  • stretch: Default: 0

public void Clear(bool deleteWidgets)

Remove all widgets from this layout, without deleting them outright.

Parameters

  • deleteWidgets: Also delete all the widgets.

public static Editor.Layout Column(bool reversed = False)

Parameters

  • reversed: Default: False

public static Editor.Layout Flow()

public static Editor.Layout Row(bool reversed = False)

Parameters

  • reversed: Default: False

Properties

Showing 7 properties

public Sandbox.TextFlag Editor.Layout.Alignment { get; set; }

An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.

public bool Editor.Layout.Enabled { get; set; }

An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.

public Sandbox.Rect Editor.Layout.InnerRect { get; set; }

The rect of this layout excluding margins

public Sandbox.UI.Margin Editor.Layout.Margin { get; set; }

The amount of space to leave free around the outside of the layout

public Sandbox.Rect Editor.Layout.OuterRect { get; set; }

The rect of this layout including margins

public float Editor.Layout.Spacing { get; set; }

The amount of space between items

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.Layout

On this page