Struct imgui_winit_support::WinitPlatform[][src]

pub struct WinitPlatform { /* fields omitted */ }
Expand description

winit backend platform state

Implementations

Initializes a winit platform instance and configures imgui.

This function configures imgui-rs in the following ways:

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

Attaches the platform instance to a winit window.

This function configures imgui-rs in the following ways:

  • framebuffer scale (= DPI factor) is set
  • display size is set

Returns the current DPI factor.

The value might not be the same as the winit DPI factor (depends on the used DPI mode)

Scales a logical size coming from winit using the current DPI mode.

This utility function is useful if you are using a DPI mode other than default, and want your application to use the same logical coordinates as imgui-rs.

Scales a logical position coming from winit using the current DPI mode.

This utility function is useful if you are using a DPI mode other than default, and want your application to use the same logical coordinates as imgui-rs.

Scales a logical position for winit using the current DPI mode.

This utility function is useful if you are using a DPI mode other than default, and want your application to use the same logical coordinates as imgui-rs.

Handles a winit event.

This function performs the following actions (depends on the event):

  • window size / dpi factor changes are applied
  • keyboard state is updated
  • mouse state is updated

Frame preparation callback.

Call this before calling the imgui-rs context frame function. This function performs the following actions:

  • mouse cursor is repositioned (if requested by imgui-rs)

Render preparation callback.

Call this before calling the imgui-rs UI render_with/render function. This function performs the following actions:

  • mouse cursor is changed and/or hidden (if requested by imgui-rs)

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.