Style

Description

static class Tinman.Engine.GUI.Styles.Style

Defines some common component styles and variants.

Public / Constants

Background​Color


public static readonly attribute BackgroundColor → (StyleProperty<int64>)

The background color (see Colors) of the component.

This style is used by the following components:

Baseline


public static readonly attribute Baseline → (StyleProperty<int32>)

The default baseline.

This style is used by the following components:

Defaults to 0.

Border


public static readonly attribute Border → (StyleProperty<BorderStyle>)

The border style of the component.

This style is used by the following components:

Defaults to BorderStyle.Default.

Debug​Show​Baselines


[DebugHelper]
public static readonly attribute DebugShowBaselines → (StyleProperty<bool>)

Show baselines of components?

This style is used by the following components:

Defaults to false.

Debug​Show​Bounds


[DebugHelper]
public static readonly attribute DebugShowBounds → (StyleProperty<bool>)

Show bounds of components?

This style is used by the following components:

Defaults to false.

Debug​Show​Focusable


[DebugHelper]
public static readonly attribute DebugShowFocusable → (StyleProperty<bool>)

Show all focusable components?

This style is used by the following components:

Defaults to false.

Foreground​Color


public static readonly attribute ForegroundColor → (StyleProperty<int64>)

The foreground color (see Colors) of the component.

This style is used by the following components:

Highlight​Color


public static readonly attribute HighlightColor → (StyleProperty<int64>)

The highlight color (see Colors) of the component.

This style is used by the following components:

Icon


public static readonly attribute Icon → (StyleProperty<IResourceHandle>)

The icon image to show, specified as a Bitmap resource.

This style is used by the following components:

Defaults to null.

Label


public static readonly attribute Label → (StyleProperty<string>)

The localized label to show for a label identifier (see Localized).

When setting this style, StyleClass.Name must be equal to the string constant value of the label identifier and StyleClass.Variant must be null.

When set to the empty string, the default localization string will be used, even if a custom localization string string is defined by a parent component.

Defaults to null.

Padding


public static readonly attribute Padding → (StyleProperty<int32>)

The inner padding of the component; if negative, IPixelFontInfo.Padding of TextFont will be used.

This style is used by the following components:

This style is ignored by Containers, which use Container.LayoutInsets instead.

Defaults to 0.

Shadow


public static readonly attribute Shadow → (StyleProperty<ShadowStyle>)

Shadow style of component.

This style is used by the following components:

Defaults to ShadowStyle.Default.

Size


public static readonly attribute Size → (StyleProperty<Vec2I>)

The default layout size.

This style is used by the following components:

Defaults to Vec2I.Zero.

Text​Align


public static readonly attribute TextAlign → (StyleProperty<Anchor>)

Alignment of text.

This style is used by the following components:

Defaults to Anchor.TopLeft.

Text​Color


public static readonly attribute TextColor → (StyleProperty<int64>)

The text color (see Colors) of the component.

This style is used by the following components:

Text​Font


public static readonly attribute TextFont → (StyleProperty<IResourceHandle>)

The text font to use for drawing the textual content of components, specified as a PixelFont resource.

This style is used by the following components:

  • Component: default font to use for drawing textual content.

Text​Font​Hint


public static readonly attribute TextFontHint → (StyleProperty<IResourceHandle>)

The text font to use for drawing small textual hints, specified as a PixelFont resource.

This style is used by the following components:

  • Component: default font to use for textural hints (e.g. keyboard shortcuts).

Defaults to PixelFont.HandleSmall.

Variant​Inner


public constant VariantInner → ("inner":string)

A pre-defined Panel style variant for inner panels (i.e. panels that are nested in another one).

The WidgetGui defines the following default styles for this style variant: Border, Shadow.