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
DynamicCssPropertyis a type of css property that can be changed on possibly every frame by the Rust code - for example to implement anOn::Hoverbehaviour. - 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
bottomattribute - Layout
Flex Grow - Represents a
flex-growattribute - Layout
Flex Shrink - Represents a
flex-shrinkattribute - Layout
Height - Represents a
heightattribute - Layout
Left - Represents a
leftattribute - Layout
Margin Bottom - Represents a
padding-bottomattribute - Layout
Margin Left - Represents a
padding-leftattribute - Layout
Margin Right - Represents a
padding-rightattribute - Layout
Margin Top - Represents a
padding-topattribute - Layout
MaxHeight - Represents a
max-heightattribute - Layout
MaxWidth - Represents a
max-widthattribute - Layout
MinHeight - Represents a
min-heightattribute - Layout
MinWidth - Represents a
min-widthattribute - Layout
Padding Bottom - Represents a
padding-bottomattribute - Layout
Padding Left - Represents a
padding-leftattribute - Layout
Padding Right - Represents a
padding-rightattribute - Layout
Padding Top - Represents a
padding-topattribute - 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
rightattribute - 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
topattribute - Layout
Width - Represents a
widthattribute - Linear
Gradient - Nine
Patch Border - Normal
Border - Represents a normal
borderproperty (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, 10pxvalues - 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-positionattribute - Style
Border Bottom Color - Represents a
border-bottom-widthattribute - Style
Border Bottom Left Radius - Represents a
border-left-widthattribute - Style
Border Bottom Right Radius - Represents a
border-bottom-widthattribute - Style
Border Bottom Style - Represents a
border-bottom-widthattribute - Style
Border Bottom Width - Represents a
border-bottom-widthattribute - Style
Border Left Color - Represents a
border-left-widthattribute - Style
Border Left Style - Represents a
border-left-widthattribute - Style
Border Left Width - Represents a
border-left-widthattribute - Style
Border Right Color - Represents a
border-right-widthattribute - Style
Border Right Style - Represents a
border-right-widthattribute - Style
Border Right Width - Represents a
border-right-widthattribute - Style
Border Side - Style
Border TopColor - Represents a
border-top-widthattribute - Style
Border TopLeft Radius - Represents a
border-top-widthattribute - Style
Border TopRight Radius - Represents a
border-right-widthattribute - Style
Border TopStyle - Represents a
border-top-widthattribute - Style
Border TopWidth - Represents a
border-top-widthattribute - Style
Font Family - Represents a
font-familyattribute - Style
Font Size - Represents a
font-sizeattribute - Style
Letter Spacing - Represents a
letter-spacingattribute - Style
Line Height - Represents a
line-heightattribute - Style
TabWidth - Represents a
tab-widthattribute - Style
Text Color - Represents a
colorattribute - Style
Word Spacing - Represents a
word-spacingattribute - 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-shadowbe clipped in (inset or outset) - Combined
CssProperty Type - CssDeclaration
- Contains one parsed
key: valuepair, 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 aCssPropertyby 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
gradientshould be repeated or clamped to the edges. - Gradient
Type - Layout
Align Content - Represents a
align-contentattribute - Layout
Align Items - Represents a
align-itemsattribute - Layout
Axis - Same as the
LayoutDirection, but without the-reverseproperties, 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-directionattribute - default:Column - Layout
Direction - Represents a
flex-directionattribute - default:Column - Layout
Display - Represents a
displayattribute - Layout
Float - Represents a
floatattribute - Layout
Justify Content - Represents a
justify-contentattribute - Layout
Position - Represents a
positionattribute - default:Static - Layout
Wrap - Represents a
flex-wrapattribute - 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-xoroverflow-yproperty, 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-repeatattribute - Style
Background Size - Represents a
background-sizeattribute - 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::newwith 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