Skip to main content

FxProp

Struct FxProp 

Source
pub struct FxProp {
    pub typ: u8,
    pub dec: u8,
    pub slot: u8,
    pub flags: u8,
    pub name: &'static str,
    pub min: f64,
    pub max: f64,
    pub def: f64,
    pub def_y: f64,
    pub choices: &'static [&'static str],
}
Expand description

a property (FXPROP); slot i of the parameter block belongs to property i, except FP_PAN (2 slots) and FP_BLOB (max slots)

Fields§

§typ: u8§dec: u8§slot: u8§flags: u8§name: &'static str§min: f64§max: f64§def: f64

the default (FP_COLOR: the bits of this f64 are the ARGB colour)

§def_y: f64

FP_PAN: the y default (FXP_CHOICES of the asm record)

§choices: &'static [&'static str]

Implementations§

Source§

impl FxProp

Source

pub const fn new( typ: u8, dec: u8, slot: u8, flags: u8, name: &'static str, min: f64, max: f64, def: f64, ) -> FxProp

an FP_INT / DEC / BOOL / ANGLE / SEED / BLOB property (FXPROP)

Source

pub const fn choice( slot: u8, name: &'static str, max: f64, def: f64, choices: &'static [&'static str], ) -> FxProp

an FP_CHOICE property

Source

pub const fn color(slot: u8, name: &'static str, argb: u32) -> FxProp

an FP_COLOR property (FXPROPC: the default’s bits are the colour)

Source

pub const fn pan( slot: u8, name: &'static str, dec: u8, min: f64, max: f64, x: f64, y: f64, ) -> FxProp

an FP_PAN property (default x, y)

Source

pub fn def_color(&self) -> u32

the default colour of an FP_COLOR property

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.