Struct basalt::interface::bin::Bin

source ·
pub struct Bin { /* private fields */ }

Implementations§

source§

impl Bin

source

pub fn basalt(&self) -> Arc<Basalt>

source

pub fn basalt_ref(&self) -> &Arc<Basalt>

source

pub fn update_stats(&self) -> BinUpdateStats

source

pub fn ancestors(&self) -> Vec<Arc<Bin>>

source

pub fn attach_input_hook(&self, hook_id: InputHookID)

Attach an InputHookID to this Bin. When this Bin drops the hook will be removed.

source

pub fn on_press<C: KeyCombo, F>( self: &Arc<Self>, combo: C, method: F ) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState, &LocalKeyState) -> InputHookCtrl + Send + 'static,

source

pub fn on_release<C: KeyCombo, F>( self: &Arc<Self>, combo: C, method: F ) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState, &LocalKeyState) -> InputHookCtrl + Send + 'static,

source

pub fn on_hold<C: KeyCombo, F>( self: &Arc<Self>, combo: C, method: F ) -> InputHookIDwhere F: FnMut(InputHookTarget, &LocalKeyState, Option<Duration>) -> InputHookCtrl + Send + 'static,

source

pub fn on_character<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState, Char) -> InputHookCtrl + Send + 'static,

source

pub fn on_enter<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,

source

pub fn on_leave<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,

source

pub fn on_focus<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,

source

pub fn on_focus_lost<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,

source

pub fn on_scroll<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState, f32, f32) -> InputHookCtrl + Send + 'static,

source

pub fn on_cursor<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere F: FnMut(InputHookTarget, &WindowState, &LocalCursorState) -> InputHookCtrl + Send + 'static,

source

pub fn on_children_added<F: FnMut(&Arc<Bin>, &Vec<Arc<Bin>>) + Send + 'static>( self: &Arc<Self>, func: F )

source

pub fn on_children_removed<F: FnMut(&Arc<Bin>, &Vec<Weak<Bin>>) + Send + 'static>( self: &Arc<Self>, func: F )

source

pub fn on_update<F: FnMut(&Arc<Bin>, &PostUpdate) + Send + 'static>( self: &Arc<Self>, func: F )

source

pub fn on_update_once<F: FnMut(&Arc<Bin>, &PostUpdate) + Send + 'static>( self: &Arc<Self>, func: F )

source

pub fn wait_for_update(self: &Arc<Self>)

source

pub fn last_update(&self) -> Instant

source

pub fn keep_alive(&self, thing: Arc<dyn KeepAlive + Send + Sync>)

source

pub fn parent(&self) -> Option<Arc<Bin>>

source

pub fn children(&self) -> Vec<Arc<Bin>>

source

pub fn children_recursive(self: &Arc<Bin>) -> Vec<Arc<Bin>>

source

pub fn add_child(self: &Arc<Self>, child: Arc<Bin>)

source

pub fn add_children(self: &Arc<Self>, children: Vec<Arc<Bin>>)

source

pub fn take_children(self: &Arc<Self>) -> Vec<Arc<Bin>>

source

pub fn add_drag_events(self: &Arc<Self>, target_op: Option<Arc<Bin>>)

source

pub fn add_enter_text_events(self: &Arc<Self>)

source

pub fn add_button_fade_events(self: &Arc<Self>)

source

pub fn fade_out(self: &Arc<Self>, millis: u64)

source

pub fn fade_in(self: &Arc<Self>, millis: u64, target: f32)

source

pub fn calc_vert_overflow(self: &Arc<Bin>) -> f32

source

pub fn calc_hori_overflow(self: &Arc<Bin>) -> f32

source

pub fn post_update(&self) -> PostUpdate

source

pub fn id(&self) -> BinID

source

pub fn mouse_inside(&self, mouse_x: f32, mouse_y: f32) -> bool

source

pub fn visible(&self) -> bool

source

pub fn toggle_hidden(&self)

source

pub fn force_update(&self)

source

pub fn force_recursive_update(self: &Arc<Self>)

source

pub fn update_children(&self)

source

pub fn style(&self) -> Arc<BinStyle>

source

pub fn style_copy(&self) -> BinStyle

source

pub fn style_update(&self, copy: BinStyle) -> BinStyleValidation

source

pub fn hidden(self: &Arc<Self>, to: Option<bool>)

Trait Implementations§

source§

impl Debug for Bin

source§

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

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

impl Drop for Bin

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl PartialEq for Bin

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Bin

source§

impl KeepAlive for Bin

Auto Trait Implementations§

§

impl !RefUnwindSafe for Bin

§

impl Send for Bin

§

impl Sync for Bin

§

impl Unpin for Bin

§

impl !UnwindSafe for Bin

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.