Crate azul_css

Source
Expand description

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

Macros§

impl_option
impl_option_inner
impl_result
impl_result_inner
impl_vec
impl_vec_as_hashmap
impl_vec_clone
impl_vec_debug
impl_vec_eq
impl_vec_hash
impl_vec_mut
NOTE: impl_vec_mut can only exist for vectors that are known to be library-allocated!
impl_vec_ord
impl_vec_partialeq
impl_vec_partialord

Structs§

AngleValue
FloatValue, but associated with a certain metric (i.e. px, em, etc.)
AzString
BorderSide
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)
ConicGradient
Css
Css stylesheet - contains a parsed CSS stylesheet in “rule blocks”, i.e. blocks of key-value pairs associated with a selector path.
CssDeclarationVec
CssKeyMap
CssNthChildPattern
CssPath
Represents a full CSS path (i.e. the “div#id.class” selector belonging to a CSS “content group” (the following key-value block)).
CssPathSelectorVec
CssPropertyVec
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") }
CssRuleBlockVec
DirectionCorners
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.
F32Vec
FloatValue
Wrapper around an f32 value that is internally casted to an isize, in order to provide hash-ability (to avoid numerical instability).
FontData
FontMetrics
FontRef
InterpolateResolver
LayoutBorderBottomWidth
Represents a border-bottom-width attribute
LayoutBorderLeftWidth
Represents a border-left-width attribute
LayoutBorderRightWidth
Represents a border-right-width attribute
LayoutBorderTopWidth
Represents a border-top-width attribute
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.
LayoutRectVec
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
LinearColorStop
LinearGradient
NinePatchBorder
NormalBorder
Represents a normal border property (no image border / nine-patch border)
NormalizedLinearColorStop
NormalizedLinearColorStopVec
NormalizedRadialColorStop
NormalizedRadialColorStopVec
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
PixelValueNoPercent
Same as PixelValue, but doesn’t allow a “%” sign
RadialColorStop
RadialGradient
RuleIterator
ScrollbarInfo
Holds info necessary for layouting / styling scrollbars (-webkit-scrollbar)
ScrollbarStyle
Scrollbar style
StringVec
StyleBackgroundContentVec
StyleBackgroundPosition
Represents a background-position attribute
StyleBackgroundPositionVec
StyleBackgroundRepeatVec
StyleBackgroundSizeVec
StyleBlur
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
StyleBorderLeftColor
Represents a border-left-width attribute
StyleBorderLeftStyle
Represents a border-left-width attribute
StyleBorderRightColor
Represents a border-right-width attribute
StyleBorderRightStyle
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
StyleBoxShadow
StyleColorMatrix
StyleFilterOffset
StyleFilterVec
StyleFontFamilyVec
StyleFontSize
Represents a font-size attribute
StyleLetterSpacing
Represents a letter-spacing attribute
StyleLineHeight
Represents a line-height attribute
StyleOpacity
Represents an opacity attribute
StylePerspectiveOrigin
Represents a perspective-origin attribute
StyleTabWidth
Represents a tab-width attribute
StyleTextColor
Represents a color attribute
StyleTransformMatrix2D
StyleTransformMatrix3D
StyleTransformOrigin
Represents a transform-origin attribute
StyleTransformRotate3D
StyleTransformScale2D
StyleTransformScale3D
StyleTransformSkew2D
StyleTransformTranslate2D
StyleTransformTranslate3D
StyleTransformVec
StyleWordSpacing
Represents a word-spacing attribute
Stylesheet
StylesheetVec
SvgCubicCurve
SvgPoint
SvgQuadraticCurve
SvgRect
SvgVector
U8Vec
U16Vec
U32Vec

Enums§

AngleMetric
AnimationInterpolationFunction
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
CssDeclarationVecDestructor
CssNthChildSelector
CssPathPseudoSelector
CssPathSelector
CssPathSelectorVecDestructor
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
CssPropertyVecDestructor
CssRuleBlockVecDestructor
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.
F32VecDestructor
LayoutAlignContent
Represents a align-content attribute
LayoutAlignItems
Represents a align-items attribute
LayoutAxis
Same as the LayoutFlexDirection, but without the -reverse properties, used in the layout solver, makes decisions based on horizontal / vertical direction easier to write. Use LayoutFlexDirection::get_axis() to get the axis for a given LayoutFlexDirection.
LayoutBoxSizing
Represents a flex-direction attribute - default: Column
LayoutDisplay
Represents a display attribute
LayoutFlexDirection
Represents a flex-direction attribute - default: Column
LayoutFlexWrap
Represents a flex-wrap attribute - default: Wrap
LayoutFloat
Represents a float attribute
LayoutJustifyContent
Represents a justify-content attribute
LayoutOverflow
Represents a overflow-x or overflow-y property, see TextOverflowBehaviour - default: Auto
LayoutPosition
Represents a position attribute - default: Static
LayoutRectVecDestructor
NodeTypeTag
Signifies the type (i.e. the discriminant value) of a DOM node without carrying any of its associated data
NodeTypeTagParseError
NodeTypeTagParseErrorOwned
NormalizedLinearColorStopVecDestructor
NormalizedRadialColorStopVecDestructor
OptionAngleValue
OptionAzString
OptionColorU
OptionCssProperty
OptionF32
OptionF64
OptionFontRef
OptionI16
OptionI32
OptionLayoutAlignContentValue
OptionLayoutAlignItemsValue
OptionLayoutBottomValue
OptionLayoutBoxSizingValue
OptionLayoutDisplayValue
OptionLayoutFlexDirectionValue
OptionLayoutFlexGrowValue
OptionLayoutFlexShrinkValue
OptionLayoutFlexWrapValue
OptionLayoutFloatValue
OptionLayoutHeightValue
OptionLayoutJustifyContentValue
OptionLayoutLeftValue
OptionLayoutMarginBottomValue
OptionLayoutMarginLeftValue
OptionLayoutMarginRightValue
OptionLayoutMarginTopValue
OptionLayoutMaxHeightValue
OptionLayoutMaxWidthValue
OptionLayoutMinHeightValue
OptionLayoutMinWidthValue
OptionLayoutOverflowValue
OptionLayoutPaddingBottomValue
OptionLayoutPaddingLeftValue
OptionLayoutPaddingRightValue
OptionLayoutPaddingTopValue
OptionLayoutPoint
OptionLayoutPositionValue
OptionLayoutRect
OptionLayoutRightValue
OptionLayoutSize
OptionLayoutTopValue
OptionLayoutWidthValue
OptionPercentageValue
OptionPixelValueNoPercent
OptionStringVec
OptionSvgPoint
OptionU8Vec
OptionU16
OptionU32
RadialGradientSize
Shape
SizeMetric
Enum representing the metric associated with a number (px, pt, em, etc.)
StringVecDestructor
StyleBackfaceVisibility
Represents a backface-visibility attribute
StyleBackgroundContent
StyleBackgroundContentVecDestructor
StyleBackgroundPositionVecDestructor
StyleBackgroundRepeat
Represents a background-repeat attribute
StyleBackgroundRepeatVecDestructor
StyleBackgroundSize
Represents a background-size attribute
StyleBackgroundSizeVecDestructor
StyleCompositeFilter
StyleCursor
StyleFilter
StyleFilterVecDestructor
StyleFontFamily
Represents a font-family attribute
StyleFontFamilyVecDestructor
StyleMixBlendMode
StyleTextAlign
Horizontal text alignment enum (left, center, right) - default: Center
StyleTransform
Represents an opacity attribute
StyleTransformVecDestructor
StyleVerticalAlign
Vertical text alignment enum (top, center, bottom) - default: Center
StylesheetVecDestructor
U8VecDestructor
U16VecDestructor
U32VecDestructor

Constants§

EM_HEIGHT
Currently hard-coded: Height of one em in pixels
PT_TO_PX

Traits§

PrintAsCssValue

Functions§

get_css_key_map
Returns a map useful for parsing the keys of CSS stylesheets

Type Aliases§

CssContentGroup
LayoutAlignContentValue
LayoutAlignItemsValue
LayoutBorderBottomWidthValue
LayoutBorderLeftWidthValue
LayoutBorderRightWidthValue
LayoutBorderTopWidthValue
LayoutBottomValue
LayoutBoxSizingValue
LayoutDisplayValue
LayoutFlexDirectionValue
LayoutFlexGrowValue
LayoutFlexShrinkValue
LayoutFlexWrapValue
LayoutFloatValue
LayoutHeightValue
LayoutJustifyContentValue
LayoutLeftValue
LayoutMarginBottomValue
LayoutMarginLeftValue
LayoutMarginRightValue
LayoutMarginTopValue
LayoutMaxHeightValue
LayoutMaxWidthValue
LayoutMinHeightValue
LayoutMinWidthValue
LayoutOverflowValue
LayoutPaddingBottomValue
LayoutPaddingLeftValue
LayoutPaddingRightValue
LayoutPaddingTopValue
LayoutPositionValue
LayoutRightValue
LayoutTopValue
LayoutWidthValue
ScrollbarStyleValue
StyleBackfaceVisibilityValue
StyleBackgroundContentVecValue
StyleBackgroundPositionVecValue
StyleBackgroundRepeatVecValue
StyleBackgroundSizeVecValue
StyleBorderBottomColorValue
StyleBorderBottomLeftRadiusValue
StyleBorderBottomRightRadiusValue
StyleBorderBottomStyleValue
StyleBorderLeftColorValue
StyleBorderLeftStyleValue
StyleBorderRightColorValue
StyleBorderRightStyleValue
StyleBorderTopColorValue
StyleBorderTopLeftRadiusValue
StyleBorderTopRightRadiusValue
StyleBorderTopStyleValue
StyleBoxShadowValue
StyleCursorValue
StyleFilterVecValue
StyleFontFamilyVecValue
StyleFontSizeValue
StyleLetterSpacingValue
StyleLineHeightValue
StyleMixBlendModeValue
StyleOpacityValue
StylePerspectiveOriginValue
StyleTabWidthValue
StyleTextAlignValue
StyleTextColorValue
StyleTransformOriginValue
StyleTransformVecValue
StyleWordSpacingValue