pub struct CommonProperties {Show 20 fields
pub id: LocalProperty<Option<String>>,
pub x: LocalProperty<Option<Size>>,
pub y: LocalProperty<Option<Size>>,
pub padding_x: LocalProperty<Option<Size>>,
pub padding_y: LocalProperty<Option<Size>>,
pub width: LocalProperty<Option<Size>>,
pub height: LocalProperty<Option<Size>>,
pub anchor_x: LocalProperty<Option<Size>>,
pub anchor_y: LocalProperty<Option<Size>>,
pub scale_x: LocalProperty<Option<Size>>,
pub scale_y: LocalProperty<Option<Size>>,
pub skew_x: LocalProperty<Option<Rotation>>,
pub skew_y: LocalProperty<Option<Rotation>>,
pub rotate: LocalProperty<Option<Rotation>>,
pub transform: LocalProperty<Option<Transform2D>>,
pub opacity: LocalProperty<Option<Opacity>>,
pub layout_role: LocalProperty<Option<LayoutRole>>,
pub unclippable: LocalProperty<Option<bool>>,
pub _raycastable: LocalProperty<Option<bool>>,
pub _suspended: LocalProperty<Option<bool>>,
}Expand description
Properties shared by every renderable Pax node.
Each property here is special-cased by the compiler when parsing element properties,
for example <SomeElement width={...} />.
Fields§
§id: LocalProperty<Option<String>>Optional stable node identifier.
x: LocalProperty<Option<Size>>Horizontal position.
y: LocalProperty<Option<Size>>Vertical position.
padding_x: LocalProperty<Option<Size>>Symmetric inner spacing applied to this node’s child layout area on the x axis.
padding_y: LocalProperty<Option<Size>>Symmetric inner spacing applied to this node’s child layout area on the y axis.
width: LocalProperty<Option<Size>>Horizontal extent.
height: LocalProperty<Option<Size>>Vertical extent.
anchor_x: LocalProperty<Option<Size>>Horizontal transform origin, relative to the node’s own bounds.
anchor_y: LocalProperty<Option<Size>>Vertical transform origin, relative to the node’s own bounds.
scale_x: LocalProperty<Option<Size>>Horizontal scale coefficient.
scale_y: LocalProperty<Option<Size>>Vertical scale coefficient.
skew_x: LocalProperty<Option<Rotation>>Horizontal skew.
skew_y: LocalProperty<Option<Rotation>>Vertical skew.
rotate: LocalProperty<Option<Rotation>>Rotation around the z axis.
transform: LocalProperty<Option<Transform2D>>Full composed transform.
opacity: LocalProperty<Option<Opacity>>Opacity of this node’s subtree. WGPU and browser Piet compose each canvas portion before fading it; live native surfaces currently fade separately.
layout_role: LocalProperty<Option<LayoutRole>>Controls whether this node participates in parent layout measurement and flow.
unclippable: LocalProperty<Option<bool>>Allows a node to render outside an ancestor clipping frame.
_raycastable: LocalProperty<Option<bool>>§_suspended: LocalProperty<Option<bool>>Implementations§
Source§impl CommonProperties
impl CommonProperties
pub fn get_default_properties_literal() -> Vec<(String, String)>
pub fn get_property_identifiers() -> Vec<(String, String)>
pub fn get_as_common_property() -> Vec<CommonProperty>
pub fn retrieve_property_scope(&self) -> HashMap<String, Variable>
Trait Implementations§
Source§impl Clone for CommonProperties
impl Clone for CommonProperties
Source§fn clone(&self) -> CommonProperties
fn clone(&self) -> CommonProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more