fluid.style

Public Imports

fluid.border
public import fluid.border;
Undocumented in source.
fluid.default_theme
public import fluid.default_theme;
Undocumented in source.

Members

Enums

isAxisArray
eponymoustemplate isAxisArray(T)

An axis array is similar to a size array, but does not distinguish between invididual directions on a single axis. Thus, it contains only two values, one for the X axis, and one for the Y axis.

isSideArray
eponymoustemplate isSideArray(T)
isSomeSideArray
eponymoustemplate isSomeSideArray(T)

Side array is a static array defining a property separately for each side of a box, for example margin and border size. Order is as follows: [left, right, top, bottom]. You can use Style.Side to index this array with an enum.

Functions

color (from fluid.backend)
Color color(string hexCode) via public import fluid.backend : color;

Create a color from hex code.

getSide
float getSide(Rectangle rectangle, Style.Side side)

Get position of a rectangle's side, on the X axis if left or right, or on the Y axis if top or bottom.

makeTheme (from fluid.theme)
Theme makeTheme(Ts ) via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;
Undocumented in source.
normalizeSideArray
T[4] normalizeSideArray(T[n] values)
T[4] normalizeSideArray(T value)

Returns a side array created from either: another side array like it, a two item array with each representing an axis like [x, y], or a single item array or the element type to fill all values with it.

reverse
Style.Side reverse(Style.Side side)

Make a style point the other way around

shiftSide
Style.Side shiftSide(Style.Side side, int shift)

Shift the side clockwise (if positive) or counter-clockwise (if negative).

sideBottom
auto ref sideBottom(T sides)

Get a reference to the left, right, top or bottom side of the given side array.

sideLeft
auto ref sideLeft(T sides)
sideRight
auto ref sideRight(T sides)
sideTop
auto ref sideTop(T sides)

Get a reference to the left, right, top or bottom side of the given side array.

sideX
inout(ElementType!T[2]) sideX(T sides)
auto ref sideX(T sides)
inout(ElementType!T) sideX(T sides)

Get a reference to the X axis for the given side or axis array.

sideY
inout(ElementType!T[2]) sideY(T sides)
auto ref sideY(T sides)
inout(ElementType!T) sideY(T sides)

Get a reference to the Y axis for the given side or axis array.

when (from fluid.theme)
WhenRule!predicate when(Args args) via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Branch out in a rule to apply styling based on a runtime condition.

Structs

Breadcrumbs (from fluid.theme)
struct Breadcrumbs via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;
Undocumented in source.
ChildrenRule (from fluid.theme)
struct ChildrenRule via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

A version of Rule that affects children.

Field (from fluid.theme)
struct Field(string fieldName, T) via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Field allows defining and performing partial changes to members of Style.

Rule (from fluid.theme)
struct Rule via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Rules specify changes that are to be made to the node's style.

Selector (from fluid.theme)
struct Selector via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Selector is used to pick a node based on its type and specified tags.

Style
struct Style

Contains the style for a node.

Theme (from fluid.theme)
struct Theme via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Node theme.

WhenRule (from fluid.theme)
struct WhenRule(alias dg) via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;
Undocumented in source.

Templates

children (from fluid.theme)
template children(T : Node = Node, tags...) via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Create a rule that affects the children of a node. To be placed inside a regular rule.

rule (from fluid.theme)
template rule(T : Node = Node, tags...) via public import fluid.theme : makeTheme, Theme, Selector, rule, Rule, when, WhenRule, children, ChildrenRule, Field, Breadcrumbs;

Create a style rule for the given node.

Meta