pub struct Context { /* private fields */ }
Expand description
The main ImGui context.
Implementations§
Source§impl Context
impl Context
pub unsafe fn new() -> Context
Sourcepub unsafe fn set_current(&mut self) -> CurrentContext<'_>
pub unsafe fn set_current(&mut self) -> CurrentContext<'_>
Makes this context the current one.
SAFETY: Do not make two different contexts current at the same time in the same thread.
Sourcepub fn invalidate_font_atlas(&mut self)
pub fn invalidate_font_atlas(&mut self)
The next time CurrentContext::do_frame()
is called, it will trigger a call to
UiBuilder::build_custom_atlas
.
Sourcepub fn set_ini_file_name(&mut self, ini_file_name: Option<&str>)
pub fn set_ini_file_name(&mut self, ini_file_name: Option<&str>)
Sets the ini file where ImGui persists its data.
By default is None, that means no file is saved.
Sourcepub fn ini_file_name(&self) -> Option<&str>
pub fn ini_file_name(&self) -> Option<&str>
Gets the ini file set previously by set_ini_file_name
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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