m3e/timepicker_dial
TimepickerDial is a clock‑face surface for selecting hours and minutes using a movable hand.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
format: timepicker_format.TimepickerFormat,
hour: option.Option(Float),
max_time: option.Option(time_parts.TimeParts),
min_time: option.Option(time_parts.TimeParts),
minute: option.Option(Float),
second: option.Option(Float),
show_seconds: ShowSeconds,
period: timepicker_period.TimepickerPeriod,
view: timepicker_view.TimepickerView,
)
}
Constructors
-
Config( format: timepicker_format.TimepickerFormat, hour: option.Option(Float), max_time: option.Option(time_parts.TimeParts), min_time: option.Option(time_parts.TimeParts), minute: option.Option(Float), second: option.Option(Float), show_seconds: ShowSeconds, period: timepicker_period.TimepickerPeriod, view: timepicker_view.TimepickerView, )
ShowSeconds is whether to show seconds.
pub type ShowSeconds {
IsShowSeconds
IsNotShowSeconds
}
Constructors
-
IsShowSeconds -
IsNotShowSeconds
TimepickerDial is a View Model for this component
Fields:
- format: Whether to use a 12‑hour or 24‑hour clock.
- hour: The hour, in 24-hour time, from 0..23.
- max_time: The maximum time that can be selected.
- min_time: The minimum time that can be selected.
- minute: The minute, from 0..59.
- second: The second, from 0..59.
- show_seconds: Whether to show seconds.
- period: The 12-hour time period.
- view: The view used to input time.
pub opaque type TimepickerDial
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_format: timepicker_format.TimepickerFormat
pub const default_hour: option.Option(Float)
pub const default_max_time: option.Option(time_parts.TimeParts)
pub const default_min_time: option.Option(time_parts.TimeParts)
pub const default_minute: option.Option(Float)
pub const default_period: timepicker_period.TimepickerPeriod
pub const default_second: option.Option(Float)
pub const default_show_seconds: ShowSeconds
pub const default_view: timepicker_view.TimepickerView
pub fn format(
record: TimepickerDial,
format: timepicker_format.TimepickerFormat,
) -> TimepickerDial
format sets the value of format for this TimepickerDial.
pub fn from_config(config: Config) -> TimepickerDial
from_config creates a new TimepickerDial from the given configuration.
pub fn hour(
record: TimepickerDial,
hour: option.Option(Float),
) -> TimepickerDial
hour sets the value of hour for this TimepickerDial.
pub fn max_time(
record: TimepickerDial,
max_time: option.Option(time_parts.TimeParts),
) -> TimepickerDial
max_time sets the value of max_time for this TimepickerDial.
pub fn min_time(
record: TimepickerDial,
min_time: option.Option(time_parts.TimeParts),
) -> TimepickerDial
min_time sets the value of min_time for this TimepickerDial.
pub fn minute(
record: TimepickerDial,
minute: option.Option(Float),
) -> TimepickerDial
minute sets the value of minute for this TimepickerDial.
pub fn new() -> TimepickerDial
new creates a new TimepickerDial with the default configuration.
pub fn period(
record: TimepickerDial,
period: timepicker_period.TimepickerPeriod,
) -> TimepickerDial
period sets the value of period for this TimepickerDial.
pub fn render(
model: TimepickerDial,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a TimepickerDial
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a TimepickerDial Config
pub fn second(
record: TimepickerDial,
second: option.Option(Float),
) -> TimepickerDial
second sets the value of second for this TimepickerDial.
pub fn show_seconds(
record: TimepickerDial,
show_seconds: ShowSeconds,
) -> TimepickerDial
show_seconds sets the value of show_seconds for this TimepickerDial.
pub fn view(
record: TimepickerDial,
view: timepicker_view.TimepickerView,
) -> TimepickerDial
view sets the value of view for this TimepickerDial.