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
Methods from Deref<Target = ImGuiContext>§
pub fn ActiveIdMouseButton(&self) -> i32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawContext
impl !RefUnwindSafe for RawContext
impl !Send for RawContext
impl !Sync for RawContext
impl Unpin for RawContext
impl !UnwindSafe for RawContext
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more