PropertyI64

Struct PropertyI64 

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

A 64-bit signed integer typed property.

Implementations§

Source§

impl PropertyI64

Source

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

Create an new Integer32 Property with ComboBox rendering.

§Panic

The options must be not empty.

Source

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

Create an new Integer32 Property with Select rendering.

§Panic

The options must be not empty.

Source

pub fn with_slider( name: &'static str, range: (i64, i64), step: i64, def_val: i64, ) -> Self

Create an new Integer32 Property with Slider rendering.

Source

pub fn with_spin_box( name: &'static str, range: (i64, i64), step: i64, def_val: i64, ) -> Self

Create an new Integer32 Property with SpinBox rendering.

Trait Implementations§

Source§

impl Debug for PropertyI64

Source§

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

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

impl Property for PropertyI64

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_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_i64<'l>(&self) -> Option<&(dyn PropertyNumber<i64> + 'l)>

Casting to dyn PropertyNumber.
Source§

fn is_selectable(&self) -> bool

Returns true if the property can marked with selected.
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_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>>

Source§

impl PropertyNumber<i64> for PropertyI64

Source§

unsafe fn value_mut_ptr(&self) -> *mut i64

§Safety
Source§

fn range(&self) -> (i64, i64)

Returns the min/max range of the property value.
Source§

fn step(&self) -> i64

Returns the increase/decrease step of the property value.
Source§

fn step_forward(&self) -> i64

Increase the value of the property by step and return the new value.
Source§

fn step_backward(&self) -> i64

Decrease the value of the property by step and return the new value.
Source§

fn def_val(&self) -> i64

Returns the default value of the property.
Source§

fn value(&self) -> i64

Returns the value of the property.
Source§

fn value_mut(&self) -> &mut i64

Returns the mutable reference of the property value.
Source§

fn set_value(&self, value: i64) -> i64

Change the value of the property.
Source§

impl Send for PropertyI64

Source§

impl Sync for PropertyI64

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