跳到正文

TimeField

可通过键盘编辑的分段时间字段,包含时、分、秒和上下午部分。

正在加载交互演示…

#导入

从 quickgui 导入 TimeField。

use quickgui::*;

#用法

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

#结构

  • TimeField::root
  • TimeField::segment

#API 参考

展开条目查看说明和完整签名。短横线表示声明中未记录默认值。

TimeField

查看源码
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
查看源码
segment_idpub fn segment_id(self, segment: TimeSegment) -> ElementId—

Configures segment id for this part.

pub fn segment_id(self, segment: TimeSegment) -> ElementId
查看源码
segmentpub const fn segment(self, segment: TimeSegment) -> TimeFieldSegment—

Configures segment for this part.

pub const fn segment(self, segment: TimeSegment) -> TimeFieldSegment
查看源码

TimeField::root_with

查看源码
pub fn root_with(self, state: &TimeFieldState, root: Element) -> Element

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

TimeField::root

查看源码
pub fn root(self, state: &TimeFieldState) -> Element

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