Skip to main content

Module foundation

Module foundation 

Source
Expand description

The contracts every component in this library implements.

Components are RenderOnce builders. They read the active theme from the application context instead of accepting a &Theme argument, and they derive both their GPUI element id and their semantic assertion id from a single caller-supplied Ident.

Re-exports§

pub use direction::ActiveDirection;
pub use direction::DirectionalExt;
pub use direction::LayoutDirection;
pub use direction::LogicalSide;
pub use direction::PhysicalSide;
pub use direction::set_layout_direction;

Modules§

direction
Which way the interface reads, and the logical styling that follows.

Structs§

Ident
One identity used for both the GPUI element and the semantic tree.
ThemeRegistry
The set of themes an application can switch between at runtime.

Enums§

ControlSize
The four control heights every interactive component resolves against.
Density
The information-density axis applications expose as a preference.
Elevation
Layer
Painting order for floating surfaces.

Traits§

ActiveTheme
Reads the active theme from any context that dereferences to App.
Disableable
A control that can refuse interaction.
FocusRing
The one focus treatment in the library.
HoverLift
The response a surface gives while the pointer is over it.
Pressable
The response a control gives while the pointer is held on it.
Selectable
A control that can present itself as the current choice.
Sizable
A control that resolves its metrics from the token control scale.
StyledExt
Token-addressed styling helpers.

Functions§

activate_theme
Switches the active theme and repaints every window.
set_density
Changes the density axis and repaints every window.
text
Creates text with an explicit complete type step and primary text tone.