[][src]Struct imgui::ImageButton

#[must_use]
pub struct ImageButton<'ui> { /* fields omitted */ }

Represent an image button about to be drawn. See Ui::image.

Create your image button using the builder pattern then ImageButton::build it.

Methods

impl<'ui> ImageButton<'ui>[src]

pub fn new<S>(_: &Ui<'ui>, texture_id: ImTexture, size: S) -> Self where
    S: Into<ImVec2>, 
[src]

pub fn size<T: Into<ImVec2>>(self, size: T) -> Self[src]

Set size (default based on texture)

pub fn uv0<T: Into<ImVec2>>(self, uv0: T) -> Self[src]

Set uv0 (default [0.0, 0.0])

pub fn uv1<T: Into<ImVec2>>(self, uv1: T) -> Self[src]

Set uv1 (default [1.0, 1.0])

pub fn frame_padding(self, frame_padding: i32) -> Self[src]

Set frame padding (default: uses frame padding from style). frame_padding < 0: uses frame padding from style (default) frame_padding = 0: no framing frame_padding > 0: set framing size

pub fn tint_col<T: Into<ImVec4>>(self, tint_col: T) -> Self[src]

Set tint color (default: no tint color)

pub fn background_col<T: Into<ImVec4>>(self, bg_col: T) -> Self[src]

Set background color (default: no background color)

pub fn build(self) -> bool[src]

Draw image button where the cursor currently is

Auto Trait Implementations

impl<'ui> Send for ImageButton<'ui>

impl<'ui> Sync for ImageButton<'ui>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]