Trait arc_util::ui::Hideable

source ·
pub trait Hideable {
    // Required methods
    fn is_visible(&self) -> bool;
    fn visible_mut(&mut self) -> &mut bool;

    // Provided methods
    fn hide(&mut self) { ... }
    fn show(&mut self) { ... }
    fn toggle_visibility(&mut self) { ... }
    fn set_visibility(&mut self, visible: bool) { ... }
}
Expand description

Interface for hideable UI components.

Required Methods§

source

fn is_visible(&self) -> bool

Returns whether the component is currently visible.

source

fn visible_mut(&mut self) -> &mut bool

Returns a mutable reference to the component’s visibility state.

Provided Methods§

source

fn hide(&mut self)

Hides the component.

source

fn show(&mut self)

Shows the component.

source

fn toggle_visibility(&mut self)

Toggles the component’s visibility.

source

fn set_visibility(&mut self, visible: bool)

Sets the component’s visibility state.

Implementors§