pub struct PropertyBase { /* private fields */ }Expand description
The base attributes of a property.
Implementations§
Source§impl PropertyBase
impl PropertyBase
pub fn new( name: &'static str, options: &[&'static str], value_type: ValueType, widget_type: WidgetType, ) -> Self
pub fn with_action_check_box(name: &'static str) -> Self
pub fn with_slider_f32(name: &'static str) -> Self
pub fn with_slider_f64(name: &'static str) -> Self
pub fn with_combo_box_i32(name: &'static str, options: &[&'static str]) -> Self
pub fn with_combo_box_i64(name: &'static str, options: &[&'static str]) -> Self
pub fn with_select_i32(name: &'static str, options: &[&'static str]) -> Self
pub fn with_select_i64(name: &'static str, options: &[&'static str]) -> Self
pub fn with_slider_i32(name: &'static str) -> Self
pub fn with_slider_i64(name: &'static str) -> Self
pub fn with_separator() -> Self
pub fn with_spin_box_f32(name: &'static str) -> Self
pub fn with_spin_box_f64(name: &'static str) -> Self
pub fn with_spin_box_i32(name: &'static str) -> Self
pub fn with_spin_box_i64(name: &'static str) -> Self
pub fn with_switch(name: &'static str) -> Self
pub fn with_text_box(name: &'static str) -> Self
Trait Implementations§
Source§impl Clone for PropertyBase
impl Clone for PropertyBase
Source§fn clone(&self) -> PropertyBase
fn clone(&self) -> PropertyBase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PropertyBase
impl Debug for PropertyBase
Source§impl Default for PropertyBase
impl Default for PropertyBase
Source§fn default() -> PropertyBase
fn default() -> PropertyBase
Returns the “default value” for a type. Read more
Source§impl Property for PropertyBase
impl Property for PropertyBase
Source§fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Returns the Type of the Property Value.
Source§fn widget_type(&self) -> WidgetType
fn widget_type(&self) -> WidgetType
Returns which Type of Widget to render the Property.
Source§fn is_selectable(&self) -> bool
fn is_selectable(&self) -> bool
Returns
true if the property can marked with selected.Source§fn is_selected(&self) -> bool
fn is_selected(&self) -> bool
Returns
true if the property marked with selected.Source§fn set_selected(&self, selected: bool)
fn set_selected(&self, selected: bool)
Change the
selected marker of the property.Source§fn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Returns
true if the property visibile.Source§fn set_visible(&self, visible: bool)
fn set_visible(&self, visible: bool)
Change the visibility of the property.
Source§fn as_property_action(&self) -> Option<&PropertyAction>
fn as_property_action(&self) -> Option<&PropertyAction>
Casting to PropertyAction.
Source§fn as_property_bool(&self) -> Option<&PropertyBool>
fn as_property_bool(&self) -> Option<&PropertyBool>
Casting to PropertyBool.
Source§fn as_property_dummy(&self) -> Option<&PropertyDummy>
fn as_property_dummy(&self) -> Option<&PropertyDummy>
Casting to PropertyDummy.
Source§fn as_property_f32<'l>(&self) -> Option<&(dyn PropertyNumber<f32> + 'l)>
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)>
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)>
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)>
fn as_property_i64<'l>(&self) -> Option<&(dyn PropertyNumber<i64> + 'l)>
Casting to dyn PropertyNumber.
Source§fn as_property_string(&self) -> Option<&PropertyString>
fn as_property_string(&self) -> Option<&PropertyString>
Casting to PropertyString.
Source§fn is_action_checked(&self) -> Option<bool>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>>
fn get_value_string(&self) -> Option<Ref<'_, str>>
Returns the
&str value if the property is type of ValueType::String.fn set_value_string<'l>(&self, value: &'l str) -> Option<Ref<'_, str>>
Auto Trait Implementations§
impl !Freeze for PropertyBase
impl !RefUnwindSafe for PropertyBase
impl Send for PropertyBase
impl !Sync for PropertyBase
impl Unpin for PropertyBase
impl UnwindSafe for PropertyBase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more