Re-exports
pub use linkme;
pub use serde;
pub use serde_derive;
pub use serde_json;
pub use smallvec;
Modules
Macros
- Defines unit structs that can be used as actions. To use more complex data types as actions, annotate your type with the #[action] macro.
Structs
- Contains state associated with an active drag operation, started by dragging an element within the window or by dragging into the app from the underlying platform.
- Temporary(?) wrapper around RefCell
to help us debug any double borrows. Strongly consider removing after stabilization. - Indicates which region of the window is visible. Content falling outside of this mask will not be rendered. Currently, only rectangular content masks are supported, but we give the mask its own type to leave room to support more complex shapes in the future.
- Whether or not the element or a group that contains it is clicked by the mouse.
- The canonical implementation of
PlatformInputHandler
. CallWindowContext::handle_input
with an instance during your element’s paint. - A handle which can be used to track and manipulate the focused element in a window.
- A struct for storing font metrics. It is used to define the measurements of a typeface.
- The degree of blackness or stroke thickness of a font. This value ranges from 100.0 to 900.0, with 400.0 as normal.
- A future or stream that emits timed events.
- An offset from UTC.
- Provides access to application state in the context of a single window. Derefs to an
AppContext
, so you can also pass aWindowContext
to any method that takes anAppContext
and call anyAppContext
methods.
Enums
- Sets the distribution of space between and around content items For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
- Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
- A non-auto length that can be defined in pixels, rems, or percent of parent.
- Represents the two different phases when dispatching events.
- Sets the layout used for the children of this node
- The direction of the flexbox layout main axis.
- Controls whether flex items are forced onto one line or can wrap onto multiple lines.
- Allows italic or oblique faces to be selected.
- A length that can be defined in pixels, rems, percent of parent, or auto.
- How children overflowing their container should affect layout
- The positioning strategy for this item.
- The phase of a touch motion event. Based on the winit enum of the same name.
Constants
Statics
Traits
- Actions are used to implement keyboard-driven UI. When you declare an action, you can bind keys to the action in the keymap and listeners for that action in the element tree.
- FocusableView allows users of your view to easily focus it (using cx.focus_view(view))
- Implement this trait to allow views to handle textual input when implementing an editor, field, etc.
- ManagedView is a view (like a Modal, Popover, Menu, etc.) where the lifecycle of the view is handled by another view.
Functions
- overlay gives you a floating element that will avoid overflowing the window bounds. Its children should have no margin to avoid measurement issues.
- Returns the Golden Ratio, i.e.
~(1.0 + sqrt(5.0)) / 2.0
. - uniform_list provides lazy rendering for a set of items that are of uniform height. When rendered into a container with overflow-y: hidden and a fixed (or max) height, uniform_list will only render the visibile subset of items.
Type Definitions
- Used to control how the specified nodes is aligned. Overrides the parent Node’s
AlignItems
property. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis - Sets the distribution of space between and around content items For Flexbox it controls alignment in the main axis For Grid it controls alignment in the inline axis
Result<T, Error>
Attribute Macros
- Marks a function or static variable as a library/executable constructor. This uses OS-specific linker sections to call a specific function at load time.