[][src]Crate azul_css

Provides datatypes used to describe an application's style using the Azul GUI framework.

Structs

BorderSide
BoxShadowPreDisplayItem
ColorF

f32-based color, range 0.0 to 1.0 (similar to webrenders ColorF)

ColorU

u8-based color, range 0 to 255 (similar to webrenders ColorU)

Css

Css stylesheet - contains a parsed CSS stylesheet in "rule blocks", i.e. blocks of key-value pairs associated with a selector path.

CssImageId

Note: In theory, we could take a reference here, but this leads to horrible lifetime issues.

CssKeyMap
CssPath

Represents a full CSS path (i.e. the "div#id.class" selector belonging to a CSS "content group" (the following key-value block)).

CssRuleBlock

One block of rules that applies a bunch of rules to a "path" in the style, i.e. div#myid.myclass -> { ("justify-content", "center") }

DynamicCssProperty

A DynamicCssProperty is a type of css property that can be changed on possibly every frame by the Rust code - for example to implement an On::Hover behaviour.

FloatValue

Wrapper around an f32 value that is internally casted to an isize, in order to provide hash-ability (to avoid numerical instability).

FontId
GradientStopPre
HotReloadOverrideHandler

Custom hot-reloader combinator that can be used to merge hot-reloaded styles onto a base style. Can be useful when working from a base configuration, such as the OS-native styles.

LayoutBottom

Represents a bottom attribute

LayoutFlexGrow

Represents a flex-grow attribute

LayoutFlexShrink

Represents a flex-shrink attribute

LayoutHeight

Represents a height attribute

LayoutLeft

Represents a left attribute

LayoutMarginBottom

Represents a padding-bottom attribute

LayoutMarginLeft

Represents a padding-left attribute

LayoutMarginRight

Represents a padding-right attribute

LayoutMarginTop

Represents a padding-top attribute

LayoutMaxHeight

Represents a max-height attribute

LayoutMaxWidth

Represents a max-width attribute

LayoutMinHeight

Represents a min-height attribute

LayoutMinWidth

Represents a min-width attribute

LayoutPaddingBottom

Represents a padding-bottom attribute

LayoutPaddingLeft

Represents a padding-left attribute

LayoutPaddingRight

Represents a padding-right attribute

LayoutPaddingTop

Represents a padding-top attribute

LayoutPoint

Only used for calculations: Point coordinate (x, y) in layout space.

LayoutRect

Only used for calculations: Rectangle (x, y, width, height) in layout space.

LayoutRight

Represents a right attribute

LayoutSideOffsets

Offsets of the border-width calculations

LayoutSize

Only used for calculations: Size (width, height) in layout space.

LayoutTop

Represents a top attribute

LayoutWidth

Represents a width attribute

LinearGradient
NinePatchBorder
NormalBorder

Represents a normal border property (no image border / nine-patch border)

PercentageValue

Wrapper around FloatValue, represents a percentage instead of just being a regular floating-point value, i.e 5 = 5%

PixelSize

Represents a parsed pair of 5px, 10px values - useful for border radius calculation

PixelValue

FloatValue, but associated with a certain metric (i.e. px, em, etc.)

PixelValueNoPercent

Same as PixelValue, but doesn't allow a "%" sign

RadialGradient
RectLayout
RectStyle

Stylistic options of the rectangle that don't influence the layout

RuleIterator
ScrollbarInfo

Holds info necessary for layouting / styling scrollbars (-webkit-scrollbar)

ScrollbarStyle

Width and height of the scrollbars at the side of the text field.

StyleBackgroundPosition

Represents a background-position attribute

StyleBorderBottomColor

Represents a border-bottom-width attribute

StyleBorderBottomLeftRadius

Represents a border-left-width attribute

StyleBorderBottomRightRadius

Represents a border-bottom-width attribute

StyleBorderBottomStyle

Represents a border-bottom-width attribute

StyleBorderBottomWidth

Represents a border-bottom-width attribute

StyleBorderLeftColor

Represents a border-left-width attribute

StyleBorderLeftStyle

Represents a border-left-width attribute

StyleBorderLeftWidth

Represents a border-left-width attribute

StyleBorderRightColor

Represents a border-right-width attribute

StyleBorderRightStyle

Represents a border-right-width attribute

StyleBorderRightWidth

Represents a border-right-width attribute

StyleBorderSide
StyleBorderTopColor

Represents a border-top-width attribute

StyleBorderTopLeftRadius

Represents a border-top-width attribute

StyleBorderTopRightRadius

Represents a border-right-width attribute

StyleBorderTopStyle

Represents a border-top-width attribute

StyleBorderTopWidth

Represents a border-top-width attribute

StyleFontFamily

Represents a font-family attribute

StyleFontSize

Represents a font-size attribute

StyleLetterSpacing

Represents a letter-spacing attribute

StyleLineHeight

Represents a line-height attribute

StyleTabWidth

Represents a tab-width attribute

StyleTextColor

Represents a color attribute

StyleWordSpacing

Represents a word-spacing attribute

Stylesheet

Enums

BackgroundPositionHorizontal
BackgroundPositionVertical
BorderDetails
BorderStyle

Style of a border: solid, double, dash, ridge, etc.

BorderStyleNoNone
BoxShadowClipMode

What direction should a box-shadow be clipped in (inset or outset)

CombinedCssPropertyType
CssDeclaration

Contains one parsed key: value pair, static or dynamic

CssNthChildSelector
CssPathPseudoSelector
CssPathSelector
CssProperty

Represents one parsed CSS key-value pair, such as "width: 20px" => CssProperty::Width(LayoutWidth::px(20.0))

CssPropertyType

Represents a CSS key (for example "border-radius" => BorderRadius). You can also derive this key from a CssProperty by calling CssProperty::get_type().

CssPropertyValue
Direction

CSS direction (necessary for gradients). Can either be a fixed angle or a direction ("to right" / "to left", etc.).

DirectionCorner
ExtendMode

Whether a gradient should be repeated or clamped to the edges.

GradientType
LayoutAlignContent

Represents a align-content attribute

LayoutAlignItems

Represents a align-items attribute

LayoutAxis

Same as the LayoutDirection, but without the -reverse properties, used in the layout solver, makes decisions based on horizontal / vertical direction easier to write. Use LayoutDirection::get_axis() to get the axis for a given LayoutDirection.

LayoutBoxSizing

Represents a flex-direction attribute - default: Column

LayoutDirection

Represents a flex-direction attribute - default: Column

LayoutDisplay

Represents a display attribute

LayoutFloat

Represents a float attribute

LayoutJustifyContent

Represents a justify-content attribute

LayoutPosition

Represents a position attribute - default: Static

LayoutWrap

Represents a flex-wrap attribute - default: Wrap

NodeTypePath

Signifies the type (i.e. the discriminant value) of a DOM node without carrying any of its associated data

NodeTypePathParseError
Overflow

Represents a overflow-x or overflow-y property, see TextOverflowBehaviour - default: Auto

Shape
SizeMetric

Enum representing the metric associated with a number (px, pt, em, etc.)

StyleBackgroundContent
StyleBackgroundRepeat

Represents a background-repeat attribute

StyleBackgroundSize

Represents a background-size attribute

StyleCursor
StyleTextAlignmentHorz

Horizontal text alignment enum (left, center, right) - default: Center

StyleTextAlignmentVert

Vertical text alignment enum (top, center, bottom) - default: Center

Constants

EM_HEIGHT

Currently hard-coded: Height of one em in pixels

PT_TO_PX

Traits

FormatAsCssValue
HotReloadHandler

Interface that can be used to reload a stylesheet while an application is running. Initialize the Window::new with a Box<HotReloadHandle> - this allows the hot-reloading to be independent of the source format, making CSS only one frontend format.

Functions

get_css_key_map

Returns a map useful for parsing the keys of CSS stylesheets

Type Definitions

CssContentGroup