Expand description
Ready-made widgets. Every one takes its look from the theme and works with keyboard and mouse.
Re-exports§
pub use crate::date::TimeOfDay;
Structs§
- Accordion
- A vertical list of titled sections; each opens with a click or Enter to show its body.
- AppShell
- Builds the common application frame: a header on top, a sidebar on the left, the body beside it and a footer at the bottom.
- Appearance
- The appearance section of a settings page or a setup wizard: language, theme and icons as the
family shares them, reduced motion and the pillar, as rows of a
SettingsList. - Axis
- A row of labels along the edge of a chart: hours of a day, weekdays, months, or names of your own.
- Badge
- A status pill: a tinted surface with a marker dot and a word, and optionally a count.
- Bar
- One bar of a
BarChart. - BarChart
- Bars measured in eighths of a cell, with labels and values.
- BigText
- Text drawn large from block elements: digits,
:,.,%,-and the letters A to Z. - Breadcrumb
- The path to the current place, such as
workspace › quvyta › crates › src. - Button
- A button: the shape is its surface colour, never brackets.
- Card
Grid - Cards laid out in as many columns as fit, for a store’s apps, a launcher’s programs or a choice of profiles. Only the cards on screen are built and drawn, so a grid of ten thousand cards costs what one screen of them costs.
- Checkbox
- A box that is checked or not, with an optional label.
- Code
View - Code with syntax colours, line numbers and wrapping of long lines.
- Column
- A column of a
Table: a title, a width rule, an alignment and whether it can be sorted. - Command
Palette - A layer with a filter field over a list of commands, for running anything from the keyboard.
- Context
Item - One row of a menu: an action, a submenu or a gap between groups.
- Context
Menu - Wraps an area and opens a menu of
ContextItems at the pointer on a right click, or next to the focused widget on Shift+F10 or the menu key. - Copy
Value - A value on a raised surface that copies itself to the clipboard: an install command, a token, a URL.
- Date
Picker - A field showing a chosen date that opens a calendar to choose another.
- Divider
- A pause between groups of content.
- Duration
Input - A length of time edited segment by segment: hours and minutes, optionally seconds, each
followed by its unit in the active language:
1 h 30 min,1 sa 30 dk. - Empty
State - A centred block explaining why an area is empty and what to do about it.
- Field
- A labelled control: the label, the control the application adds inside, and under it a faint hint or, when there is one, the error in the danger colour with a marker.
- File
Browser - The application-owned state of a
FilePicker. - File
Details - What one entry is besides its name: its size, when it changed last, and its permissions.
- File
Entry - One entry of a folder.
- File
Manager - A folder as a tree, with every file operation on it.
- File
Manager State - What a file manager has read of its root folder, what is open in it, and what is selected.
- File
Picker - Browses folders and chooses a file or a folder.
- File
Work - A long operation the manager is running in the background right now.
- Folder
Entry - One entry of a folder, as a file manager reads it: a name and whether it can be opened.
- Form
- A column of
Fields that share one label layout, with an optional summary of problems above them. - Form
Errors - The problems of a form, in the order the application found them, each under the name of the control it belongs to.
- Form
Fields - Adds fields to a
ForminsideForm::show. - Gauge
- A one-row meter for a value in a range: label, meter and value.
- Ghost
- A light surface that fills its area with the accent mixed into whatever lies under it: no lines, no text, nothing to click. It shows where something will be, for a window dragged as a ghost over a slow connection (the window stays put, only this moves, and it lands in one frame when the button comes up) and for the area a window would snap to.
- Heatmap
- A grid of days as tones: one cell per value, a column per week, the tone carrying how much that day holds.
- Help
Layer - A layer listing every key binding: the hints of the current screen first, then the
application’s keymap actions, then the framework’s. Labels come from the language files
(
keys.<action>andquvyta.keys.<action>), keys from the keymap, so rebinding a key or switching the language updates the list. - Hold
ToConfirm - A control that sends its message only after a key or the mouse button is held on it.
- Icon
Button - A button that is one icon: a space, the glyph and a space, three cells in every glyph mode.
- KeyHints
- A bar of key hints such as
tab next ctrl q quit, fed from the keymap and from hints the application adds for the current screen. - Legend
- The names behind the tones of a chart: a patch of colour and the name it stands for.
- List
- A vertical list that only draws the rows it shows, so it stays fast with any number of items.
For a very long list, keep the items as an
Arc<[ListItem]>in your state and pass it toList::shared, so they are not built again every frame. - List
Item - One row of a
List. - LogBuffer
- A bounded store of log lines: when full, pushing drops the oldest line.
- LogLine
- One line of a log.
- LogView
- A view of a
LogBufferthat follows new lines as they arrive. - Markdown
- Rendered Markdown: headings with the accent pillar, wrapped paragraphs, lists, quotes and highlighted code blocks. Horizontal rules become space, never a drawn line.
- Menu
- The navigation column of an application: groups of destinations under faint headings.
- Menu
Group - A group of items in a
Menu, with an optional faint heading. - Menu
Item - One destination in a
Menu. - Modal
- A dialog over a dimmed screen: a title, any content and action buttons.
- Naming
- The dialog that asks for a name, while it is open.
- Number
Input - A text field for a number: typing edits it like a text input, Up and Down step it.
- Page
Transition - Wraps the current page and animates whenever its key changes.
- Palette
Command - One command of a
CommandPalette. - Panel
- A surface one step above its background, optionally titled, selectable and pressable.
- Popover
- Content shown as a layer next to an anchor, such as a filter panel under a button.
- Progress
Bar - A bar that fills as work completes, or sweeps while the amount is unknown.
- Radio
Group - A set of options of which exactly one is chosen, for a few choices that should all stay
visible. For many choices use a
Select. - RailTab
- One tab of a
TabRail. - RowMark
- How one row of a file manager looks, beyond what the manager itself knows.
- Scroll
Metrics - Position of a scrolled view: how many rows exist, how many are visible and the first visible row.
- Scroll
View - Shows content taller than its area and scrolls it with the wheel, the scrollbar or the
keyboard (↑/↓, PgUp/PgDn, Home/End while focused). When focus moves to a widget inside that
is out of view, the view scrolls to it. When a widget inside asks to show a part of itself
with
PaintCx::reveal, such as a code view going to a line, the view glides just far enough to show it, or jumps there when motion is reduced. - Section
- The title of one section of an
Accordionor aWidgetDock: a label with an optional icon and a faint detail on the right, such as a count. - Segmented
- Side-by-side segments of one surface, of which the filled one is chosen: for two to five short, mutually exclusive choices such as a view mode, where the choice should read at a glance.
- Select
- A field showing the chosen option that opens a list of options as a layer.
- Series
- One series of a
BarChart: a name and one value per category. - Setting
Row - One setting of a
SettingsList: a label, an optional description and the control added withSettingsRows::row. - Settings
List - Settings, one per row: the label (and a faint description) on the left, its control anchored on the right.
- Settings
Rows - Adds headings and rows to a
SettingsListinsideSettingsList::show. - Setup
- The application-owned state of a
SetupWizard: which step it is on, what has been chosen on the appearance step and how the Nerd Font install is going. - Setup
Wizard - The first-run wizard: the appearance step the framework draws and drives, then a step for each
one the application adds, on the
Wizardevery other flow uses. - Shimmer
Text - A working message such as “processing”: either light passing over the letters or growing
dots. One pass takes the theme’s
motion.shimmer; with reduced motion the text is still. - Side
Panel - A panel docked to the left or right of a body, on its own surface.
- Skeleton
- A placeholder in the shape of content that is on its way: text lines, an avatar or a block.
- Slider
- A value chosen along a range by moving a knob on a rail.
- Span
- A run of text with its own look inside a
Text. - Sparkline
- A compact trend: one column per value, newest on the right, measured in eighths of a cell.
- Spinner
- A one-cell indicator that something is working, with an optional label.
- Splitter
- Two panes that share an area: side by side with
Splitter::columns, stacked withSplitter::rows. The application owns the size of the first pane; the second takes the rest. - Steps
- Where a sequence of steps stands: finished steps carry a check in the success colour, the current step is bold with an accent marker, and upcoming steps are faint. Steps are set apart by space and tone; nothing connects them.
- Switch
- An on/off switch that applies at once, with an optional label.
- TabRail
- Tabs stacked down the side of the screen, such as the open projects of an IDE.
- Table
- Rows of cells under a header row. Only the rows on screen are drawn, so a table stays fast
with any number of rows; pass the rows as an
Arc<[TableRow]>kept in your state to avoid copying them every frame. - Table
Cell - One cell: text, optionally with a glyph before it and a colour.
- Table
Row - One row of a
Table. - Tabs
- A row of tabs. The open tab is a raised surface; tabs are never boxed or bracketed.
- Task
List - Shows a
Tasksmodel as rows built from existing widgets. - Text
- Text that wraps to its width, or is cut with
…when wrapping is off. - Text
Area - A multi-line text field with word wrap, scrolling and real editing.
- Text
Input - A text field with real editing: cursor, selection, word jumps, undo and clipboard.
- Time
Block - One block of a
Timeline: a stretch of the day with a name, such as work from 09:00 to 11:10. - Time
Input - A time of day edited segment by segment: hours and minutes, optionally seconds, on a 24-hour clock written the same in every language.
- Timeline
- A day as a strip: blocks of colour for what filled it, the empty track for the gaps between them — breaks, sleep, time not recorded.
- Toast
- A notification: a status marker and icon, a title, an optional body and action, and the shared three-cell close mark at the end of the title row.
- Tooltip
- Wraps widgets and shows a short text next to them after the pointer rests on them for the
theme’s
motion.hover-delay. - Tree
- Nested rows that open and close, like folders.
- Tree
Drop - A drop of nodes into another node that a droppable tree asks for. The tree never changes the application’s nodes; the application moves them.
- Tree
Move - A move of one node among its siblings that a reorderable tree asks for.
The tree never changes the application’s nodes;
applydoes the bookkeeping on the application’s own list of siblings. - Tree
Node - One node of a
Tree, identified by a key that stays the same while the tree changes. - Widget
Dock - A vertical stack of titled widgets filling the area it is given, like the side panel of an IDE: each widget opens and closes, and open widgets share the height between them.
- Window
- A window: a title strip one row tall above a body, with no border lines, for applications
that put surfaces where the user drags them, such as a desktop or a tool box. Place it with
View::placeinside a stack; the body is built withView::add_with. - Wizard
- A flow of pages the user goes through in order:
Stepson top, the current step’s page, and a row of buttons.
Enums§
- Appearance
Change - A change made on the
Appearancerows. The application hands it back toAppearance::update, which saves it and returns the command that shows it. - Checkbox
Style - How a
Checkboxlooks. - Closed
- What closing a
SidePanelleaves behind. - Collapsed
Marker - What the one-cell marker of a tab in a collapsed
TabRailshows. - Column
Width - How wide a
Columnis. - Corner
- The screen corner toasts stack in.
- Duration
Error - Why a written length of time could not be read.
messagesays it in the active language. - Duration
Unit - A unit of a length of time.
- File
Change - What an operation changed, by key.
- File
Error - Why a file operation was not done.
- File
Manager Msg - Something that happened in a
FileManager. - File
Picker Msg - Something that happened in a
FilePicker. Hand every message toFileBrowser::update, exceptFilePickerMsg::Chosen, which is the result. - File
View - The shape a file manager draws its folder in.
- Gradient
- Which way a
BigTextgradient runs. - Item
Kind - What kind of row an item is.
- Language
- A language
CodeViewcan colour. - Line
Mark - How a line of a diff changed; see
CodeView::line_marks. - Line
Tone - The tone of highlighted lines; see
CodeView::highlight_lines. - Listing
Error - Why a folder could not be read.
- LogLevel
- How important a log line is.
- NameFor
- What the name the dialog asks for is for.
- Name
Problem - Why a name cannot be used, as the person types it.
- Overflow
- What a
Tabsstrip does when its tabs do not fit. - Pick
Mode - Whether a picker chooses files or folders.
- Placement
- The side of its anchor a layer prefers. When the layer does not fit there it flips to the opposite side, and it is always kept on screen.
- Radio
Style - How the options of a
RadioGroupare marked. - Scrollbar
Style - How a scrollbar is drawn. The theme picks one with
[style.scrollbar] style = "…"; scrolling widgets can pin one with theirscrollbaroption. - Setup
Msg - Something that happened on the first step of a
SetupWizard, or on its buttons. Every one of them goes toSetup::update; the application never answers one itself. - Shimmer
Style - How
ShimmerTextmoves. - Side
- Which side a
SidePanelis docked to. - Sort
Direction - Which way a sorted column is ordered.
- Spinner
Style - How a
Spinnermoves. Every style is a built-in cell animation with Nerd Font, Unicode and ASCII frames, which themes and applications can replace. - Switch
Style - How a
Switchlooks. - TabEdit
- A change a closable or reorderable tab view asks for. Tab views never change the
application’s tabs themselves;
TabEdit::applydoes the bookkeeping on the application’s own list. - TabWidth
- How wide each tab of a
Tabsstrip is. - Toast
Kind - What a toast reports; picks its status colour and icon.
- Window
Edge - An edge or a corner of a window being resized, see
WindowEvent::Resize. - Window
Event - What the pointer did to a
Window, sent throughWindow::on_event.
Functions§
- child_
key - The key of the entry
nameinside the folderparent. - copy_
into - Copies the entry
keyinto the folderinto, keeping its name; a folder is copied with everything in it. - is_
inside - Whether
keynames an entry under a root: a path of plain names, none of them empty,.or.., and not starting at/. - is_
within - Whether
keyisfolderor somewhere below it. - name_of
- The name of the entry
key, without the folders before it. - parent_
key - The key of the folder an entry is in, the root for an entry directly in it.
- parse_
duration - Reads a length of time written by hand, in any language
i18nknows. - read_
folder - Reads the entries of
folder, folders first, then by name ignoring case. Blocks on the file system: call it fromCommand::perform, never fromview.
Type Aliases§
- Listing
- What reading a folder gave.