Skip to main content

InspectRenderDefault

Trait InspectRenderDefault 

Source
pub trait InspectRenderDefault<T> {
    // Required methods
    fn render(
        data: &[&T],
        label: &'static str,
        ui: &Ui<'_>,
        args: &InspectArgsDefault,
    );
    fn render_mut(
        data: &mut [&mut T],
        label: &'static str,
        ui: &Ui<'_>,
        args: &InspectArgsDefault,
    ) -> bool;
}
Expand description

Renders a value using the default widget

Required Methods§

Source

fn render( data: &[&T], label: &'static str, ui: &Ui<'_>, args: &InspectArgsDefault, )

Render the element in an immutable way (i.e. static text)

(Hopefully in the future this can be better. See https://github.com/ocornut/imgui/issues/211)

Source

fn render_mut( data: &mut [&mut T], label: &'static str, ui: &Ui<'_>, args: &InspectArgsDefault, ) -> bool

Render the element in a mutable way. Using this trait, the default widget to use is based on the type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl InspectRenderDefault<String> for String

Source§

fn render( data: &[&String], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, )

Source§

fn render_mut( data: &mut [&mut String], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, ) -> bool

Source§

impl InspectRenderDefault<bool> for bool

Source§

fn render( data: &[&bool], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, )

Source§

fn render_mut( data: &mut [&mut bool], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, ) -> bool

Source§

impl InspectRenderDefault<f32> for f32

Source§

fn render( data: &[&f32], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, )

Source§

fn render_mut( data: &mut [&mut f32], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, ) -> bool

Source§

impl InspectRenderDefault<u32> for u32

Source§

fn render( data: &[&u32], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, )

Source§

fn render_mut( data: &mut [&mut u32], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, ) -> bool

Source§

impl InspectRenderDefault<usize> for usize

Source§

fn render( data: &[&usize], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, )

Source§

fn render_mut( data: &mut [&mut usize], label: &'static str, ui: &Ui<'_>, _args: &InspectArgsDefault, ) -> bool

Source§

impl<T: InspectRenderDefault<T>> InspectRenderDefault<Option<T>> for Option<T>

Source§

fn render( data: &[&Option<T>], label: &'static str, ui: &Ui<'_>, args: &InspectArgsDefault, )

Source§

fn render_mut( data: &mut [&mut Option<T>], label: &'static str, ui: &Ui<'_>, args: &InspectArgsDefault, ) -> bool

Implementors§