Skip to main content

Sp

Struct Sp 

Source
pub struct Sp<'a> {
Show 17 fields pub x: i32, pub y: i32, pub w: i32, pub h: i32, pub state: u32, pub ev: u32, pub flags: u32, pub icon: u32, pub label: Option<&'a str>, pub value: i32, pub value2: i32, pub s: [i32; 4], pub label2: Option<&'a str>, pub f: f64, pub img: Option<&'a Rc<Surface>>, pub img_ver: u32, pub track: Option<&'a Track>,
}
Expand description

the SP record: inputs of a widget’s size / paint call (SP_* of style.inc)

Fields§

§x: i32

placed rectangle (px; filled before the paint call)

§y: i32§w: i32§h: i32§state: u32

0 rest, 1 hover, 2 pressed, 3 disabled

§ev: u32

EV_* of behave()

§flags: u32

ST_* / BOX_* / MIF_* / RG_* flags of the widget

§icon: u32

icon code point (0 = none)

§label: Option<&'a str>§value: i32§value2: i32§s: [i32; 4]

kept by the style from its size call to its paint call (SP_S0 .. SP_S3)

§label2: Option<&'a str>

the 8-byte SP_VALUE variants: a second text (menu accelerator, info bar message)

§f: f64

… an f64 (angle degrees)

§img: Option<&'a Rc<Surface>>

SP_LABEL variants: a thumbnail (pan), a TRACK record (value sliders: flags, n, stops)

§img_ver: u32§track: Option<&'a Track>

Implementations§

Source§

impl Sp<'_>

Source

pub fn rect(&self) -> [i32; 4]

Source

pub fn place(&mut self, r: [i32; 4])

Trait Implementations§

Source§

impl<'a> Clone for Sp<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for Sp<'a>

Source§

impl<'a> Default for Sp<'a>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Sp<'a>

§

impl<'a> !Send for Sp<'a>

§

impl<'a> !Sync for Sp<'a>

§

impl<'a> !UnwindSafe for Sp<'a>

§

impl<'a> Forget for Sp<'a>

§

impl<'a> Freeze for Sp<'a>

§

impl<'a> Unpin for Sp<'a>

§

impl<'a> UnsafeUnpin for Sp<'a>

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> ErasedDestructor for T
where T: 'static,

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

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.