Skip to main content

Crate sweeten

Crate sweeten 

Source
Expand description

§sweeten

sweeten provides enhanced versions of common iced widgets with additional functionality for more complex use cases. It aims to maintain the simplicity and elegance of iced while offering “sweetened” variants with extended capabilities.

§Widgets

The following widgets are available in the widget module:

  • button — A button widget, with support for on_focus and on_blur messages.
  • column — Distribute content vertically, with support for drag-and-drop reordering via on_drag.
  • mouse_area — A container for capturing mouse events where all handlers receive the cursor position as a Point.
  • pick_list — A dropdown list of selectable options, with support for disabling items.
  • row — Distribute content horizontally, with support for drag-and-drop reordering via on_drag.
  • text_input — A text input field, with support for on_focus and on_blur messages.

§Usage

Import the widgets you need from sweeten::widget:

use sweeten::widget::{button, column, mouse_area, pick_list, row, text_input};

The widgets are designed to be drop-in replacements for their iced counterparts, with additional methods for the extended functionality.

Modules§

scrollable
Scrollables let users navigate an endless amount of content with a scrollbar.
text_editor
Text editors display a multi-line text input for text editing.
widget
Sweetened widgets for iced.

Macros§

column
Creates a Column with the given children.
row
Creates a Row with the given children.

Enums§

Theme
A built-in theme.

Functions§

button
Creates a new Button with the given content.
column
Creates a new Column with the given children.
mouse_area
Creates a new MouseArea for capturing mouse events.
pick_list
Creates a new PickList.
row
Creates a new Row with the given children.
scrollable
Creates a new Scrollable with the provided content.
text_editor
Creates a new TextEditor.
text_input
Creates a new TextInput.

Type Aliases§

Renderer
The default graphics renderer for iced.