pub struct RawContext(/* private fields */);
Expand description
Safe thin wrapper for ImGuiContext.
This has common read-only functions.
Implementations§
Source§impl RawContext
impl RawContext
Sourcepub fn get(&self) -> &ImGuiContext
pub fn get(&self) -> &ImGuiContext
Gets a reference to the native wrapper struct.
Source§impl RawContext
impl RawContext
Sourcepub fn cast(r: &ImGuiContext) -> &RawContext
pub fn cast(r: &ImGuiContext) -> &RawContext
Converts a native reference into a wrapper reference.
Sourcepub fn cast_mut(r: &mut ImGuiContext) -> &mut RawContext
pub fn cast_mut(r: &mut ImGuiContext) -> &mut RawContext
Converts a native reference into a wrapper reference.
It is safe because if you have a reference to the native reference, you already can change anything.
Source§impl RawContext
impl RawContext
Sourcepub unsafe fn current<'a>() -> &'a RawContext
pub unsafe fn current<'a>() -> &'a RawContext
Gets the current ImGui context.
SAFETY: unsafe because the reference lifetime is not well defined.
Sourcepub unsafe fn from_ptr<'a>(ptr: *mut ImGuiContext) -> &'a RawContext
pub unsafe fn from_ptr<'a>(ptr: *mut ImGuiContext) -> &'a RawContext
Converts a raw DearImGui context pointer into a `&RawContext``.
Sourcepub unsafe fn from_ptr_mut<'a>(ptr: *mut ImGuiContext) -> &'a mut RawContext
pub unsafe fn from_ptr_mut<'a>(ptr: *mut ImGuiContext) -> &'a mut RawContext
Converts a raw DearImGui context pointer into a `&mut RawContext``.
Sourcepub unsafe fn inner(&mut self) -> &mut ImGuiContext
pub unsafe fn inner(&mut self) -> &mut ImGuiContext
Gets a reference to the actual DearImGui context struct.
Sourcepub fn platform_io(&self) -> &PlatformIo
pub fn platform_io(&self) -> &PlatformIo
Returns a safe wrapper for the PlatformIo
.
Sourcepub unsafe fn platform_io_mut(&mut self) -> &mut PlatformIo
pub unsafe fn platform_io_mut(&mut self) -> &mut PlatformIo
Returns an unsafe mutable wrapper for the PlatformIo
.
Sourcepub fn io_mut(&mut self) -> &mut IoMut
pub fn io_mut(&mut self) -> &mut IoMut
Returns a safe mutable wrapper for the IO.
Use io_mut().inner()
to get the unsafe wrapper
Sourcepub fn get_main_viewport(&self) -> &Viewport
pub fn get_main_viewport(&self) -> &Viewport
Gets a reference to the main viewport