pub struct Bin { /* private fields */ }
Implementations
sourceimpl Bin
impl Bin
pub fn basalt(&self) -> Arc<Basalt>
pub fn basalt_ref(&self) -> &Arc<Basalt>
pub fn update_stats(&self) -> BinUpdateStats
pub fn ancestors(&self) -> Vec<Arc<Bin>>
sourcepub fn attach_input_hook(&self, hook_id: InputHookID)
pub fn attach_input_hook(&self, hook_id: InputHookID)
Attach an InputHookID
to this Bin
. When this Bin
drops the hook will be removed.
pub fn on_press<C: KeyCombo, F>(
self: &Arc<Self>,
combo: C,
method: F
) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState, &LocalKeyState) -> InputHookCtrl + Send + 'static,
pub fn on_release<C: KeyCombo, F>(
self: &Arc<Self>,
combo: C,
method: F
) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState, &LocalKeyState) -> InputHookCtrl + Send + 'static,
pub fn on_hold<C: KeyCombo, F>(
self: &Arc<Self>,
combo: C,
method: F
) -> InputHookIDwhere
F: FnMut(InputHookTarget, &LocalKeyState, Option<Duration>) -> InputHookCtrl + Send + 'static,
pub fn on_character<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState, Char) -> InputHookCtrl + Send + 'static,
pub fn on_enter<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,
pub fn on_leave<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,
pub fn on_focus<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,
pub fn on_focus_lost<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState) -> InputHookCtrl + Send + 'static,
pub fn on_scroll<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState, f32, f32) -> InputHookCtrl + Send + 'static,
pub fn on_cursor<F>(self: &Arc<Self>, method: F) -> InputHookIDwhere
F: FnMut(InputHookTarget, &WindowState, &LocalCursorState) -> InputHookCtrl + Send + 'static,
pub fn on_children_added<F: FnMut(&Arc<Bin>, &Vec<Arc<Bin>>) + Send + 'static>(
self: &Arc<Self>,
func: F
)
pub fn on_children_removed<F: FnMut(&Arc<Bin>, &Vec<Weak<Bin>>) + Send + 'static>(
self: &Arc<Self>,
func: F
)
pub fn on_update<F: FnMut(&Arc<Bin>, &PostUpdate) + Send + 'static>(
self: &Arc<Self>,
func: F
)
pub fn on_update_once<F: FnMut(&Arc<Bin>, &PostUpdate) + Send + 'static>(
self: &Arc<Self>,
func: F
)
pub fn wait_for_update(self: &Arc<Self>)
pub fn last_update(&self) -> Instant
pub fn keep_alive(&self, thing: Arc<dyn KeepAlive + Send + Sync>)
pub fn parent(&self) -> Option<Arc<Bin>>
pub fn children(&self) -> Vec<Arc<Bin>>
pub fn children_recursive(self: &Arc<Bin>) -> Vec<Arc<Bin>>
pub fn add_child(self: &Arc<Self>, child: Arc<Bin>)
pub fn add_children(self: &Arc<Self>, children: Vec<Arc<Bin>>)
pub fn take_children(self: &Arc<Self>) -> Vec<Arc<Bin>>
pub fn add_drag_events(self: &Arc<Self>, target_op: Option<Arc<Bin>>)
pub fn add_enter_text_events(self: &Arc<Self>)
pub fn fade_out(self: &Arc<Self>, millis: u64)
pub fn fade_in(self: &Arc<Self>, millis: u64, target: f32)
pub fn calc_vert_overflow(self: &Arc<Bin>) -> f32
pub fn calc_hori_overflow(self: &Arc<Bin>) -> f32
pub fn post_update(&self) -> PostUpdate
pub fn id(&self) -> BinID
pub fn mouse_inside(&self, mouse_x: f32, mouse_y: f32) -> bool
pub fn visible(&self) -> bool
pub fn force_update(&self)
pub fn force_recursive_update(self: &Arc<Self>)
pub fn update_children(&self)
pub fn style(&self) -> Arc<BinStyle>
pub fn style_copy(&self) -> BinStyle
pub fn style_update(&self, copy: BinStyle)
pub fn set_raw_back_img(&self, img: Arc<BstImageView>)
pub fn set_raw_img_yuv_422(
&self,
width: u32,
height: u32,
data: Vec<u8>
) -> Result<(), String>
pub fn separate_raw_image(
&self,
width: u32,
height: u32,
data: Vec<u8>
) -> Result<(), String>
pub fn remove_raw_back_img(&self)
Trait Implementations
impl Eq for Bin
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more