[][src]Struct imgui_glfw_support::GlfwPlatform

pub struct GlfwPlatform { /* fields omitted */ }

Implementations

impl GlfwPlatform[src]

pub fn init(imgui: &mut Context) -> GlfwPlatform[src]

Initializes a glfw platform instance and configures imgui.

  • backend flgs are updated
  • keys are configured
  • platform name is set

pub unsafe fn set_clipboard_backend(&self, imgui: &mut Context, window: &Window)[src]

Adds platform clipboard integration for the provided window. The caller must ensure that the Window outlives the imgui Context and that any imgui functions that may access the clipboard are called from the main thread (the thread that's executing the event polling).

pub fn attach_window(
    &mut self,
    io: &mut Io,
    window: &Window,
    hidpi_mode: HiDpiMode
)
[src]

Attaches the platform instance to a glfw window.

  • framebuffer sacle (i.e. DPI factor) is set
  • display size is set

pub fn handle_event(&self, io: &mut Io, _window: &Window, event: &WindowEvent)[src]

Handles a glfw window event

  • keyboard state is updated
  • mouse state is updated

pub fn prepare_frame(
    &self,
    io: &mut Io,
    window: &mut Window
) -> Result<(), String>
[src]

Prepare the window for the next frame.

Call before calling the imgui-rs Context::frame function.

  • mouse cursor is repositioned if requested by imgui

pub fn prepare_render(&self, ui: &Ui<'_>, window: &mut Window)[src]

Prepare the window for rendering.

Call before calling the imgui backend renderer function (e.g. imgui_wgpu::Renderer::render).

  • the mouse cursor is changed or hidden if requested by imgui

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.