Skip to content

TimeField

A segmented, keyboard-editable time field with hour, minute, second, and period parts.

Loading interactive demo…

#Import

Import TimeField from quickgui.

use quickgui::*;

#Usage

let field = TimeField::new("alarm");
field.root().flex_row()

#Anatomy

  • TimeField::root
  • TimeField::segment

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

TimeField

View source
pub fn new(root_id: impl Into<ElementId>) -> Self
root_idpub const fn root_id(self) -> ElementId—

Configures root id for this part.

pub const fn root_id(self) -> ElementId
View source
segment_idpub fn segment_id(self, segment: TimeSegment) -> ElementId—

Configures segment id for this part.

pub fn segment_id(self, segment: TimeSegment) -> ElementId
View source
segmentpub const fn segment(self, segment: TimeSegment) -> TimeFieldSegment—

Configures segment for this part.

pub const fn segment(self, segment: TimeSegment) -> TimeFieldSegment
View source

TimeField::root_with

View source
pub fn root_with(self, state: &TimeFieldState, root: Element) -> Element

Decorate an application-owned root without adding layout or appearance.

TimeField::root

View source
pub fn root(self, state: &TimeFieldState) -> Element

Create the unstyled root part. Use [`Self::root_with`] to supply an existing element.