Skip to main content

WidgetKind

Enum WidgetKind 

Source
pub enum WidgetKind<'a> {
Show 37 variants Panel, Label(&'a str), Button(&'a str), ProgressBar { value: f32, }, Toggle { label: &'a str, on: bool, }, Checkbox { label: &'a str, checked: bool, }, Slider { value: f32, min: f32, max: f32, }, ValueLabel { label: &'a str, value: i32, }, IconButton { icon: char, label: &'a str, }, List { items: &'a [&'a str], selected: usize, offset: usize, visible_rows: usize, }, ScrollView { offset_y: i32, content_h: u32, }, Tabs { labels: &'a [&'a str], selected: usize, }, Dialog { title: &'a str, body: &'a str, }, Toast { text: &'a str, ttl_ms: u32, }, Meter { value: f32, min: f32, max: f32, }, ArcGauge { value: f32, min: f32, max: f32, start_deg: i32, end_deg: i32, thickness: u8, antialias: bool, major_ticks: u8, minor_ticks: u8, show_value: bool, }, Gauge { value: f32, min: f32, max: f32, major_ticks: u8, minor_ticks: u8, show_value: bool, }, GaugeNeedle { value: f32, min: f32, max: f32, start_deg: i32, end_deg: i32, }, Chart { values: &'a [f32], min: f32, max: f32, thickness: u8, fill_under: bool, markers: bool, mode: ChartMode, show_grid: bool, show_axes: bool, show_labels: bool, }, Spinner { phase: f32, }, Dropdown { items: &'a [&'a str], selected: usize, open: bool, }, Roller { items: &'a [&'a str], selected: usize, }, Table { rows: &'a [&'a [&'a str]], separators: bool, cell_padding: u8, align: TextAlign, }, TextArea { text_buf: [u8; 128], text_len: u8, cursor: usize, placeholder: &'a str, selection: Option<(usize, usize)>, cursor_visible: bool, read_only: bool, single_line: bool, accept_newline: bool, }, Keyboard { keys: &'a [char], selected: usize, cols: u8, alt_keys: Option<&'a [char]>, layout: KeyboardLayout, target: Option<WidgetId>, }, Image { image: ImageRef<'a>, fit: ImageFit, }, Border, Spacer, Menu { items: &'a [&'a str], selected: usize, }, PeekReveal { icon: ImageRef<'a>, title: &'a str, subtitle: &'a str, progress: f32, }, GlanceTile { icon: char, title: &'a str, subtitle: &'a str, highlighted: bool, }, CardDeck { titles: &'a [&'a str], selected: usize, }, Reel { player: ReelPlayer<'a>, fit: ImageFit, }, StateSurface { state: SurfaceState, title: &'a str, message: &'a str, action: Option<&'a str>, busy_phase: f32, }, HeadsUpBanner { level: NotificationLevel, text: &'a str, ttl_ms: u32, }, NotificationActionSheet { level: NotificationLevel, title: &'a str, body: &'a str, actions: &'a [&'a str], selected: usize, open: bool, }, FeedTimeline { items: &'a [&'a str], selected: usize, offset: usize, visible_rows: usize, expanded: bool, },
}

Variants§

§

Panel

§

Label(&'a str)

§

Button(&'a str)

§

ProgressBar

Fields

§value: f32
§

Toggle

Fields

§label: &'a str
§on: bool
§

Checkbox

Fields

§label: &'a str
§checked: bool
§

Slider

Fields

§value: f32
§min: f32
§max: f32
§

ValueLabel

Fields

§label: &'a str
§value: i32
§

IconButton

Fields

§icon: char
§label: &'a str
§

List

Fields

§items: &'a [&'a str]
§selected: usize
§offset: usize
§visible_rows: usize
§

ScrollView

Fields

§offset_y: i32
§content_h: u32
§

Tabs

Fields

§labels: &'a [&'a str]
§selected: usize
§

Dialog

Fields

§title: &'a str
§body: &'a str
§

Toast

Fields

§text: &'a str
§ttl_ms: u32
§

Meter

Fields

§value: f32
§min: f32
§max: f32
§

ArcGauge

Fields

§value: f32
§min: f32
§max: f32
§start_deg: i32
§end_deg: i32
§thickness: u8
§antialias: bool
§major_ticks: u8
§minor_ticks: u8
§show_value: bool
§

Gauge

Fields

§value: f32
§min: f32
§max: f32
§major_ticks: u8
§minor_ticks: u8
§show_value: bool
§

GaugeNeedle

Fields

§value: f32
§min: f32
§max: f32
§start_deg: i32
§end_deg: i32
§

Chart

Fields

§values: &'a [f32]
§min: f32
§max: f32
§thickness: u8
§fill_under: bool
§markers: bool
§show_grid: bool
§show_axes: bool
§show_labels: bool
§

Spinner

Fields

§phase: f32
§

Dropdown

Fields

§items: &'a [&'a str]
§selected: usize
§open: bool
§

Roller

Fields

§items: &'a [&'a str]
§selected: usize
§

Table

Fields

§rows: &'a [&'a [&'a str]]
§separators: bool
§cell_padding: u8
§

TextArea

Fields

§text_buf: [u8; 128]
§text_len: u8
§cursor: usize
§placeholder: &'a str
§selection: Option<(usize, usize)>
§cursor_visible: bool
§read_only: bool
§single_line: bool
§accept_newline: bool
§

Keyboard

Fields

§keys: &'a [char]
§selected: usize
§cols: u8
§alt_keys: Option<&'a [char]>
§

Image

Fields

§image: ImageRef<'a>
§

Border

§

Spacer

§

Menu

Fields

§items: &'a [&'a str]
§selected: usize
§

PeekReveal

Fields

§icon: ImageRef<'a>
§title: &'a str
§subtitle: &'a str
§progress: f32
§

GlanceTile

Fields

§icon: char
§title: &'a str
§subtitle: &'a str
§highlighted: bool
§

CardDeck

Fields

§titles: &'a [&'a str]
§selected: usize
§

Reel

Fields

§player: ReelPlayer<'a>
§

StateSurface

Fields

§title: &'a str
§message: &'a str
§action: Option<&'a str>
§busy_phase: f32
§

HeadsUpBanner

Fields

§text: &'a str
§ttl_ms: u32
§

NotificationActionSheet

Fields

§title: &'a str
§body: &'a str
§actions: &'a [&'a str]
§selected: usize
§open: bool
§

FeedTimeline

Fields

§items: &'a [&'a str]
§selected: usize
§offset: usize
§visible_rows: usize
§expanded: bool

Implementations§

Source§

impl WidgetKind<'_>

Source

pub const fn focusable(self) -> bool

Trait Implementations§

Source§

impl<'a> Clone for WidgetKind<'a>

Source§

fn clone(&self) -> WidgetKind<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for WidgetKind<'a>

Source§

impl<'a> Debug for WidgetKind<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for WidgetKind<'a>

Source§

fn default() -> WidgetKind<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> PartialEq for WidgetKind<'a>

Source§

fn eq(&self, other: &WidgetKind<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> StructuralPartialEq for WidgetKind<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for WidgetKind<'a>

§

impl<'a> RefUnwindSafe for WidgetKind<'a>

§

impl<'a> Send for WidgetKind<'a>

§

impl<'a> Sync for WidgetKind<'a>

§

impl<'a> Unpin for WidgetKind<'a>

§

impl<'a> UnsafeUnpin for WidgetKind<'a>

§

impl<'a> UnwindSafe for WidgetKind<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.