pub struct ClosableTag {
pub close: AtomicBool,
}
Expand description
A tag to mark a container as closable.
Usually set via UiBuilder::closable
.
Ui::close
will find the closest parent ClosableTag
and set its close
field to true
.
Use Ui::should_close
to check if close has been called.
Fields§
§close: AtomicBool
Implementations§
Source§impl ClosableTag
impl ClosableTag
pub const NAME: &'static str = "egui_close_tag"
Sourcepub fn should_close(&self) -> bool
pub fn should_close(&self) -> bool
Returns true
if ClosableTag::set_close
has been called.
Trait Implementations§
Source§impl Debug for ClosableTag
impl Debug for ClosableTag
Source§impl Default for ClosableTag
impl Default for ClosableTag
Source§fn default() -> ClosableTag
fn default() -> ClosableTag
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ClosableTag
impl RefUnwindSafe for ClosableTag
impl Send for ClosableTag
impl Sync for ClosableTag
impl Unpin for ClosableTag
impl UnwindSafe for ClosableTag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more