StandardLayout

public static class StandardLayout
Provides access to layout and drawing methods.

Fields

GroupNameBar

#
public const int GroupNameBar = 18
Gets the height of the group name bar.

GroupPadding

#
public const int GroupPadding = 14
Gets the padding between the contents and the boundary of a group.

IconPadding

#
public const int IconPadding = 2
Gets the amount of padding around object icons.

IconSize

#
public const int IconSize = 24
Gets the size for document object icons. Component, floating parameters etc.

LargeObjectHeight

#
public const int LargeObjectHeight = 120
Gets the ideal height large objects get at construction by default.

LargeObjectWidth

#
public const int LargeObjectWidth = 240
Gets the ideal width large objects get at construction by default.

ModsPadding

#
public const int ModsPadding = 4
Gets the amount of padding before and after modifier icon bars.

ModsSize

#
public const int ModsSize = 14
Gets the size for modifier icons.

ModsSpacing

#
public const int ModsSpacing = 2
Gets the amount of spacing between modifier icons.

NamePadding

#
public const int NamePadding = 4
Gets the amount of padding before and after display names.

ParameterMinHeight

#
public const int ParameterMinHeight = 20
Gets the minimum allowed height for input and output parameters.

ParameterMinWidth

#
public const int ParameterMinWidth = 60
Gets the minimum allowed width for floating parameters.

PinAttachedHeight

#
public const int PinAttachedHeight = 20
Gets the height for attached pins.

PinFloatingHeight

#
public const int PinFloatingHeight = 20
Gets the height for free-floating pins.

SpecialButtonWidth

#
public const int SpecialButtonWidth = 14
Gets the width of the button which pops up the UI on special input parameters.

Methods

DrawModifierIcons

#
public static RectangleF[] DrawModifierIcons(Context context, ModifierIcons icons, Color background, RectangleF bounds, bool leftToRight)
Draw modifier icons into a rectangle.
context (Context)Graphics context.
icons (ModifierIcons)Icons to draw.
background (Color)Background colour, usually the Apex colour of the underlying slab.
bounds (RectangleF)Bounds for icons.
leftToRight (bool)If true, icons will be stacked from left-to-right.

LeftToRightStack

#
public static RectangleF[] LeftToRightStack(float axis, float boundary, params (float before, SizeF size, float after)[] elements)
Perform a left-to-right stacking layout of several boxes.
axis (float)Y coordinate of horizontal layout axis.
boundary (float)X coordinate of left boundary.
elements (params (float before, SizeF size, float after)[])Collection of layout elements (left-padding, width+height, right-padding).
Array of rectangles.

MeasureModifierIcons

#
public static SizeF MeasureModifierIcons(ModifierIcons icons)
Measure the size needed to host a set of modifier icons.
icons (ModifierIcons)

RightToLeftStack

#
public static RectangleF[] RightToLeftStack(float axis, float boundary, params (float before, SizeF size, float after)[] elements)
Perform a right-to-left stacking layout of several boxes.
axis (float)Y coordinate of horizontal layout axis.
boundary (float)X coordinate of right boundary.
elements (params (float before, SizeF size, float after)[])Collection of layout elements (left-padding, width+height, right-padding).
Array of rectangles.