Struct egui::WidgetInfo [−][src]
Describes a widget such as a crate::Button or a crate::TextEdit.
Fields
typ: WidgetTypeThe type of widget this is.
label: Option<String>The text on labels, buttons, checkboxes etc.
edit_text: Option<String>The contents of some editable text (for TextEdit fields).
selected: Option<bool>The current value of checkboxes and radio buttons.
value: Option<f64>The current value of sliders etc.
Implementations
impl WidgetInfo[src]
pub fn new(typ: WidgetType) -> Self[src]
pub fn labeled(typ: WidgetType, label: impl Into<String>) -> Self[src]
pub fn selected(
typ: WidgetType,
selected: bool,
label: impl Into<String>
) -> Self[src]
typ: WidgetType,
selected: bool,
label: impl Into<String>
) -> Self
checkboxes, radio-buttons etc
pub fn drag_value(value: f64) -> Self[src]
pub fn slider(value: f64, label: impl Into<String>) -> Self[src]
pub fn text_edit(edit_text: impl Into<String>) -> Self[src]
pub fn description(&self) -> String[src]
This can be used by a text-to-speech system to describe the widget.
Trait Implementations
impl Clone for WidgetInfo[src]
fn clone(&self) -> WidgetInfo[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for WidgetInfo[src]
impl PartialEq<WidgetInfo> for WidgetInfo[src]
fn eq(&self, other: &WidgetInfo) -> bool[src]
fn ne(&self, other: &WidgetInfo) -> bool[src]
impl StructuralPartialEq for WidgetInfo[src]
Auto Trait Implementations
impl RefUnwindSafe for WidgetInfo
impl Send for WidgetInfo
impl Sync for WidgetInfo
impl Unpin for WidgetInfo
impl UnwindSafe for WidgetInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,