Expand description
Provides datatypes used to describe an application’s style using the Azul GUI framework.
Structs§
- f32-based color, range 0.0 to 1.0 (similar to webrenders ColorF)
- u8-based color, range 0 to 255 (similar to webrenders ColorU)
- Css stylesheet - contains a parsed CSS stylesheet in “rule blocks”, i.e. blocks of key-value pairs associated with a selector path.
- Note: In theory, we could take a reference here, but this leads to horrible lifetime issues.
- Represents a full CSS path (i.e. the “div#id.class” selector belonging to a CSS “content group” (the following key-value block)).
- One block of rules that applies a bunch of rules to a “path” in the style, i.e.
div#myid.myclass -> { ("justify-content", "center") }
- A
DynamicCssProperty
is a type of css property that can be changed on possibly every frame by the Rust code - for example to implement anOn::Hover
behaviour. - Wrapper around an f32 value that is internally casted to an isize, in order to provide hash-ability (to avoid numerical instability).
- 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.
- Represents a
bottom
attribute - Represents a
flex-grow
attribute - Represents a
flex-shrink
attribute - Represents a
height
attribute - Represents a
left
attribute - Represents a
padding-bottom
attribute - Represents a
padding-left
attribute - Represents a
padding-right
attribute - Represents a
padding-top
attribute - Represents a
max-height
attribute - Represents a
max-width
attribute - Represents a
min-height
attribute - Represents a
min-width
attribute - Represents a
padding-bottom
attribute - Represents a
padding-left
attribute - Represents a
padding-right
attribute - Represents a
padding-top
attribute - Only used for calculations: Point coordinate (x, y) in layout space.
- Only used for calculations: Rectangle (x, y, width, height) in layout space.
- Represents a
right
attribute - Offsets of the border-width calculations
- Only used for calculations: Size (width, height) in layout space.
- Represents a
top
attribute - Represents a
width
attribute - Represents a normal
border
property (no image border / nine-patch border) - Wrapper around FloatValue, represents a percentage instead of just being a regular floating-point value, i.e
5
=5%
- Represents a parsed pair of
5px, 10px
values - useful for border radius calculation - FloatValue, but associated with a certain metric (i.e. px, em, etc.)
- Same as PixelValue, but doesn’t allow a “%” sign
- Stylistic options of the rectangle that don’t influence the layout
- Holds info necessary for layouting / styling scrollbars (-webkit-scrollbar)
- Width and height of the scrollbars at the side of the text field.
- Represents a
background-position
attribute - Represents a
border-bottom-width
attribute - Represents a
border-left-width
attribute - Represents a
border-bottom-width
attribute - Represents a
border-bottom-width
attribute - Represents a
border-bottom-width
attribute - Represents a
border-left-width
attribute - Represents a
border-left-width
attribute - Represents a
border-left-width
attribute - Represents a
border-right-width
attribute - Represents a
border-right-width
attribute - Represents a
border-right-width
attribute - Represents a
border-top-width
attribute - Represents a
border-top-width
attribute - Represents a
border-right-width
attribute - Represents a
border-top-width
attribute - Represents a
border-top-width
attribute - Represents a
font-family
attribute - Represents a
font-size
attribute - Represents a
letter-spacing
attribute - Represents a
line-height
attribute - Represents a
tab-width
attribute - Represents a
color
attribute - Represents a
word-spacing
attribute
Enums§
- Style of a
border
: solid, double, dash, ridge, etc. - What direction should a
box-shadow
be clipped in (inset or outset) - Contains one parsed
key: value
pair, static or dynamic - Represents one parsed CSS key-value pair, such as
"width: 20px"
=>CssProperty::Width(LayoutWidth::px(20.0))
- Represents a CSS key (for example
"border-radius"
=>BorderRadius
). You can also derive this key from aCssProperty
by callingCssProperty::get_type()
. - CSS direction (necessary for gradients). Can either be a fixed angle or a direction (“to right” / “to left”, etc.).
- Whether a
gradient
should be repeated or clamped to the edges. - Represents a
align-content
attribute - Represents a
align-items
attribute - Same as the
LayoutDirection
, but without the-reverse
properties, used in the layout solver, makes decisions based on horizontal / vertical direction easier to write. UseLayoutDirection::get_axis()
to get the axis for a givenLayoutDirection
. - Represents a
flex-direction
attribute - default:Column
- Represents a
flex-direction
attribute - default:Column
- Represents a
display
attribute - Represents a
float
attribute - Represents a
justify-content
attribute - Represents a
position
attribute - default:Static
- Represents a
flex-wrap
attribute - default:Wrap
- Signifies the type (i.e. the discriminant value) of a DOM node without carrying any of its associated data
- Enum representing the metric associated with a number (px, pt, em, etc.)
- Represents a
background-repeat
attribute - Represents a
background-size
attribute - Horizontal text alignment enum (left, center, right) - default:
Center
- Vertical text alignment enum (top, center, bottom) - default:
Center
Constants§
- Currently hard-coded: Height of one em in pixels
Traits§
- Interface that can be used to reload a stylesheet while an application is running. Initialize the
Window::new
with aBox<HotReloadHandle>
- this allows the hot-reloading to be independent of the source format, making CSS only one frontend format.
Functions§
- Returns a map useful for parsing the keys of CSS stylesheets