Expand description
Provides datatypes used to describe an application’s style using the Azul GUI framework.
Structs§
- Border
Side - BoxShadow
PreDisplay Item - 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.
- CssImage
Id - Note: In theory, we could take a reference here, but this leads to horrible lifetime issues.
- CssKey
Map - CssPath
- Represents a full CSS path (i.e. the “div#id.class” selector belonging to a CSS “content group” (the following key-value block)).
- CssRule
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") }
- Dynamic
CssProperty - 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. - Float
Value - Wrapper around an f32 value that is internally casted to an isize, in order to provide hash-ability (to avoid numerical instability).
- FontId
- Gradient
Stop Pre - HotReload
Override Handler - 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.
- Layout
Bottom - Represents a
bottom
attribute - Layout
Flex Grow - Represents a
flex-grow
attribute - Layout
Flex Shrink - Represents a
flex-shrink
attribute - Layout
Height - Represents a
height
attribute - Layout
Left - Represents a
left
attribute - Layout
Margin Bottom - Represents a
padding-bottom
attribute - Layout
Margin Left - Represents a
padding-left
attribute - Layout
Margin Right - Represents a
padding-right
attribute - Layout
Margin Top - Represents a
padding-top
attribute - Layout
MaxHeight - Represents a
max-height
attribute - Layout
MaxWidth - Represents a
max-width
attribute - Layout
MinHeight - Represents a
min-height
attribute - Layout
MinWidth - Represents a
min-width
attribute - Layout
Padding Bottom - Represents a
padding-bottom
attribute - Layout
Padding Left - Represents a
padding-left
attribute - Layout
Padding Right - Represents a
padding-right
attribute - Layout
Padding Top - Represents a
padding-top
attribute - Layout
Point - Only used for calculations: Point coordinate (x, y) in layout space.
- Layout
Rect - Only used for calculations: Rectangle (x, y, width, height) in layout space.
- Layout
Right - Represents a
right
attribute - Layout
Side Offsets - Offsets of the border-width calculations
- Layout
Size - Only used for calculations: Size (width, height) in layout space.
- Layout
Top - Represents a
top
attribute - Layout
Width - Represents a
width
attribute - Linear
Gradient - Nine
Patch Border - Normal
Border - Represents a normal
border
property (no image border / nine-patch border) - Percentage
Value - Wrapper around FloatValue, represents a percentage instead
of just being a regular floating-point value, i.e
5
=5%
- Pixel
Size - Represents a parsed pair of
5px, 10px
values - useful for border radius calculation - Pixel
Value - FloatValue, but associated with a certain metric (i.e. px, em, etc.)
- Pixel
Value NoPercent - Same as PixelValue, but doesn’t allow a “%” sign
- Radial
Gradient - Rect
Layout - Rect
Style - Stylistic options of the rectangle that don’t influence the layout
- Rule
Iterator - Scrollbar
Info - Holds info necessary for layouting / styling scrollbars (-webkit-scrollbar)
- Scrollbar
Style - Width and height of the scrollbars at the side of the text field.
- Style
Background Position - Represents a
background-position
attribute - Style
Border Bottom Color - Represents a
border-bottom-width
attribute - Style
Border Bottom Left Radius - Represents a
border-left-width
attribute - Style
Border Bottom Right Radius - Represents a
border-bottom-width
attribute - Style
Border Bottom Style - Represents a
border-bottom-width
attribute - Style
Border Bottom Width - Represents a
border-bottom-width
attribute - Style
Border Left Color - Represents a
border-left-width
attribute - Style
Border Left Style - Represents a
border-left-width
attribute - Style
Border Left Width - Represents a
border-left-width
attribute - Style
Border Right Color - Represents a
border-right-width
attribute - Style
Border Right Style - Represents a
border-right-width
attribute - Style
Border Right Width - Represents a
border-right-width
attribute - Style
Border Side - Style
Border TopColor - Represents a
border-top-width
attribute - Style
Border TopLeft Radius - Represents a
border-top-width
attribute - Style
Border TopRight Radius - Represents a
border-right-width
attribute - Style
Border TopStyle - Represents a
border-top-width
attribute - Style
Border TopWidth - Represents a
border-top-width
attribute - Style
Font Family - Represents a
font-family
attribute - Style
Font Size - Represents a
font-size
attribute - Style
Letter Spacing - Represents a
letter-spacing
attribute - Style
Line Height - Represents a
line-height
attribute - Style
TabWidth - Represents a
tab-width
attribute - Style
Text Color - Represents a
color
attribute - Style
Word Spacing - Represents a
word-spacing
attribute - Stylesheet
Enums§
- Background
Position Horizontal - Background
Position Vertical - Border
Details - Border
Style - Style of a
border
: solid, double, dash, ridge, etc. - Border
Style NoNone - BoxShadow
Clip Mode - What direction should a
box-shadow
be clipped in (inset or outset) - Combined
CssProperty Type - CssDeclaration
- Contains one parsed
key: value
pair, static or dynamic - CssNth
Child Selector - CssPath
Pseudo Selector - CssPath
Selector - CssProperty
- Represents one parsed CSS key-value pair, such as
"width: 20px"
=>CssProperty::Width(LayoutWidth::px(20.0))
- CssProperty
Type - Represents a CSS key (for example
"border-radius"
=>BorderRadius
). You can also derive this key from aCssProperty
by callingCssProperty::get_type()
. - CssProperty
Value - Direction
- CSS direction (necessary for gradients). Can either be a fixed angle or a direction (“to right” / “to left”, etc.).
- Direction
Corner - Extend
Mode - Whether a
gradient
should be repeated or clamped to the edges. - Gradient
Type - Layout
Align Content - Represents a
align-content
attribute - Layout
Align Items - Represents a
align-items
attribute - Layout
Axis - 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
. - Layout
BoxSizing - Represents a
flex-direction
attribute - default:Column
- Layout
Direction - Represents a
flex-direction
attribute - default:Column
- Layout
Display - Represents a
display
attribute - Layout
Float - Represents a
float
attribute - Layout
Justify Content - Represents a
justify-content
attribute - Layout
Position - Represents a
position
attribute - default:Static
- Layout
Wrap - Represents a
flex-wrap
attribute - default:Wrap
- Node
Type Path - Signifies the type (i.e. the discriminant value) of a DOM node without carrying any of its associated data
- Node
Type Path Parse Error - Overflow
- Represents a
overflow-x
oroverflow-y
property, seeTextOverflowBehaviour
- default:Auto
- Shape
- Size
Metric - Enum representing the metric associated with a number (px, pt, em, etc.)
- Style
Background Content - Style
Background Repeat - Represents a
background-repeat
attribute - Style
Background Size - Represents a
background-size
attribute - Style
Cursor - Style
Text Alignment Horz - Horizontal text alignment enum (left, center, right) - default:
Center
- Style
Text Alignment Vert - Vertical text alignment enum (top, center, bottom) - default:
Center
Constants§
Traits§
- Format
AsCss Value - HotReload
Handler - 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§
- get_
css_ key_ map - Returns a map useful for parsing the keys of CSS stylesheets