Struct imgui_wgpu::simple_api::Config[][src]

pub struct Config<State: 'static> {
    pub window_title: String,
    pub initial_window_width: f32,
    pub initial_window_height: f32,
    pub on_resize: &'static dyn Fn(&PhysicalSize<u32>, &mut State, f64),
    pub on_event: &'static dyn Fn(&WindowEvent<'_>, &mut State),
    pub font_size: Option<f32>,
    pub background_color: Color,
}

use Default::default if you don't need anything specific.

Fields

window_title: String

name of the window

initial_window_width: f32

can be used to resize the window

initial_window_height: f32

can be used to resize the window

on_resize: &'static dyn Fn(&PhysicalSize<u32>, &mut State, f64)

if you want to adjust your imgui window to match the size of the outer window this makes it possible to have a "fullscreen" imgui window spanning the whole current window.

on_event: &'static dyn Fn(&WindowEvent<'_>, &mut State)

called after the premade events have been handled which includes close request if you think you need to handle this, this api abstraction is probably to high level and you may want to copy the code from hello_world.rs and adapt directly

font_size: Option<f32>

font size

background_color: Color

color that fills the window

Trait Implementations

impl<State> Default for Config<State>[src]

Auto Trait Implementations

impl<State> !RefUnwindSafe for Config<State>[src]

impl<State> !Send for Config<State>[src]

impl<State> !Sync for Config<State>[src]

impl<State> Unpin for Config<State>[src]

impl<State> !UnwindSafe for Config<State>[src]

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> Downcast<T> for T

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

impl<T> Instrument 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.

impl<T> Upcast<T> for T