PropertyBase

Struct PropertyBase 

Source
pub struct PropertyBase { /* private fields */ }
Expand description

The base attributes of a property.

Implementations§

Source§

impl PropertyBase

Source

pub fn new( name: &'static str, options: &[&'static str], value_type: ValueType, widget_type: WidgetType, ) -> Self

Source

pub fn with_action_button(name: &'static str, options: &[&'static str]) -> Self

Source

pub fn with_action_check_box(name: &'static str) -> Self

Source

pub fn with_slider_f32(name: &'static str) -> Self

Source

pub fn with_slider_f64(name: &'static str) -> Self

Source

pub fn with_combo_box_i32(name: &'static str, options: &[&'static str]) -> Self

Source

pub fn with_combo_box_i64(name: &'static str, options: &[&'static str]) -> Self

Source

pub fn with_select_i32(name: &'static str, options: &[&'static str]) -> Self

Source

pub fn with_select_i64(name: &'static str, options: &[&'static str]) -> Self

Source

pub fn with_slider_i32(name: &'static str) -> Self

Source

pub fn with_slider_i64(name: &'static str) -> Self

Source

pub fn with_separator() -> Self

Source

pub fn with_spin_box_f32(name: &'static str) -> Self

Source

pub fn with_spin_box_f64(name: &'static str) -> Self

Source

pub fn with_spin_box_i32(name: &'static str) -> Self

Source

pub fn with_spin_box_i64(name: &'static str) -> Self

Source

pub fn with_switch(name: &'static str) -> Self

Source

pub fn with_text_box(name: &'static str) -> Self

Trait Implementations§

Source§

impl Clone for PropertyBase

Source§

fn clone(&self) -> PropertyBase

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PropertyBase

Source§

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

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

impl Default for PropertyBase

Source§

fn default() -> PropertyBase

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

impl Property for PropertyBase

Source§

fn id(&self) -> usize

Returns the id of the property.
Source§

fn set_id(&self, id: usize)

Change the id of the property.
Source§

fn name(&self) -> &'static str

Returns the name of the Property.
Source§

fn options(&self) -> &[&'static str]

Returns the Options of the Property.
Source§

fn value_type(&self) -> ValueType

Returns the Type of the Property Value.
Source§

fn widget_type(&self) -> WidgetType

Returns which Type of Widget to render the Property.
Source§

fn is_selectable(&self) -> bool

Returns true if the property can marked with selected.
Source§

fn is_selected(&self) -> bool

Returns true if the property marked with selected.
Source§

fn set_selected(&self, selected: bool)

Change the selected marker of the property.
Source§

fn is_visible(&self) -> bool

Returns true if the property visibile.
Source§

fn set_visible(&self, visible: bool)

Change the visibility of the property.
Source§

fn show(&self)

Change the visibility of the property to true.
Source§

fn hide(&self)

Change the visibility of the property to false.
Source§

fn as_property_action(&self) -> Option<&PropertyAction>

Casting to PropertyAction.
Source§

fn as_property_bool(&self) -> Option<&PropertyBool>

Casting to PropertyBool.
Source§

fn as_property_dummy(&self) -> Option<&PropertyDummy>

Casting to PropertyDummy.
Source§

fn as_property_f32<'l>(&self) -> Option<&(dyn PropertyNumber<f32> + 'l)>

Casting to dyn PropertyNumber.
Source§

fn as_property_f64<'l>(&self) -> Option<&(dyn PropertyNumber<f64> + 'l)>

Casting to dyn PropertyNumber.
Source§

fn as_property_i32<'l>(&self) -> Option<&(dyn PropertyNumber<i32> + 'l)>

Casting to dyn PropertyNumber.
Source§

fn as_property_i64<'l>(&self) -> Option<&(dyn PropertyNumber<i64> + 'l)>

Casting to dyn PropertyNumber.
Source§

fn as_property_string(&self) -> Option<&PropertyString>

Casting to PropertyString.
Source§

fn is_action_checked(&self) -> Option<bool>

Returns the checked state if the property is type of ValueType::Action.
Source§

fn trigger_action(&self, checked: bool) -> Option<bool>

Trigger the action if the property is type of ValueType::Action.
Source§

fn get_value_bool(&self) -> Option<bool>

Returns the bool value if the property is type of ValueType::Bool.
Source§

fn set_value_bool(&self, value: bool) -> Option<bool>

Change the bool value if the property is type of ValueType::Bool.
Source§

fn get_value_f32(&self) -> Option<f32>

Returns the f32 value if the property is type of ValueType::F32.
Source§

fn set_value_f32(&self, value: f32) -> Option<f32>

Change the f32 value if the property is type of ValueType::F32.
Source§

fn get_value_f64(&self) -> Option<f64>

Returns the f64 value if the property is type of ValueType::F64.
Source§

fn set_value_f64(&self, value: f64) -> Option<f64>

Change the f64 value if the property is type of ValueType::F64.
Source§

fn get_value_i32(&self) -> Option<i32>

Returns the i32 value if the property is type of ValueType::I32.
Source§

fn set_value_i32(&self, value: i32) -> Option<i32>

Change the i32 value if the property is type of ValueType::I32.
Source§

fn get_value_i64(&self) -> Option<i64>

Returns the i64 value if the property is type of ValueType::I64.
Source§

fn set_value_i64(&self, value: i64) -> Option<i64>

Change the i64 value if the property is type of ValueType::I64.
Source§

fn get_value_string(&self) -> Option<Ref<'_, str>>

Returns the &str value if the property is type of ValueType::String.
Source§

fn set_value_string<'l>(&self, value: &'l str) -> Option<Ref<'_, str>>

Auto Trait Implementations§

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> 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<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> 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.