pub struct Viewport(/* private fields */);Implementations§
Source§impl Viewport
impl Viewport
Sourcepub fn get(&self) -> &ImGuiViewport
pub fn get(&self) -> &ImGuiViewport
Gets a reference to the native wrapper struct.
Source§impl Viewport
impl Viewport
Sourcepub fn cast(r: &ImGuiViewport) -> &Viewport
pub fn cast(r: &ImGuiViewport) -> &Viewport
Converts a native reference into a wrapper reference.
Sourcepub fn cast_mut(r: &mut ImGuiViewport) -> &mut Viewport
pub fn cast_mut(r: &mut ImGuiViewport) -> &mut Viewport
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 Viewport
impl Viewport
pub fn id(&self) -> ImGuiID
pub fn flags(&self) -> ViewportFlags
pub fn pos(&self) -> Vector2
pub fn size(&self) -> Vector2
pub fn work_pos(&self) -> Vector2
pub fn work_size(&self) -> Vector2
pub fn center(&self) -> Vector2
pub fn work_center(&self) -> Vector2
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Viewport
impl !RefUnwindSafe for Viewport
impl !Send for Viewport
impl !Sync for Viewport
impl Unpin for Viewport
impl !UnwindSafe for Viewport
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
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> ⓘ
Converts
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> ⓘ
Converts
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