Module pixel_widgets::widget [−][src]
Expand description
User interface widgets
Widgets are defined using the Widget
trait.
You can choose to implement widgets yourself, or you can use the built in widgets defined in this module.
Since the whole Component
every time it is mutated,
most widgets need to keep track of some kind of state across rebuilds.
This is managed automatically by the component, identified by the key
method.
When implementing custom widgets, you need to make sure that the returned u64
key is as unique as possible.
You also need to make sure that the custom widgets do not remember absolute layouts.
Widgets like Scroll
can change the layout without needing a rebuild of the ui.
Modules
A clickable button
Layout child widgets vertically
Drag and drop zones
Pick an item from a dropdown box
Dummy widget that has a custom widget name
A widget that wraps around a content widget
Just an image
Editable text input
Stack child widgets on top of each other, while only the topmost receives events.
A context menu with nestable items
A panel with a fixed size and location within it’s parent
Prelude widgets
A bar that fills up according to a value.
Layout child widgets horizontally
View a small section of larger widget, with scrollbars.
A slider for easily picking some number
Empty widget
Widget that renders a paragraph of text.
A clickable button that toggles some bool
.
A window with a title and a content widget that can be moved by dragging the title.
Structs
Context for posting messages and requesting redraws of the ui.
Traits
A user interface widget.
Type Definitions
Storage for style states