TimeInput view
A segmented time field over the host's own clock.
A view survives a frame. Hold it in an Entity with cx.new(..) and reach it with .update(..).
use gpui_kit::datetime::TimeInput;
Construct
new(ident: impl Into<Ident>, adapter: SharedDateAdapter, _window: &mut Window, cx: &mut Context<Self>) -> SelfOptions
Chain onto the value.
value(value: TimeOfDay) -> Self
seconds(seconds: bool) -> SelfCommands
Need a Context, so they need a view.
set_value(value: TimeOfDay, cx: &mut Context<Self>)
set_disabled(disabled: bool, cx: &mut Context<Self>)Queries
Only answer; they change nothing.
current() -> TimeOfDay
active_segment() -> Segment
clock() -> ClockReports
The variants of the event it emits. It never applies the change itself.
- Changed
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.