Struct three_d::GUI[][src]

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

Integration of egui, an immediate mode GUI.

Implementations

impl GUI[src]

pub fn new(context: &Context) -> Result<Self, Error>[src]

Creates a new GUI.

pub fn update<F: FnOnce(&CtxRef)>(
    &mut self,
    frame_input: &mut FrameInput,
    callback: F
) -> Result<bool, Error>
[src]

Initialises a new frame of the GUI and handles events. Construct the GUI (Add panels, widgets etc.) using the egui::CtxRef in the callback function. This function returns whether or not the GUI has changed, ie. if it consumes any events, and therefore needs to be rendered again.

pub fn render(&mut self) -> Result<(), Error>[src]

Render the GUI defined in the update function. Must be called in a render target render function, for example in the callback function of Screen::write.

Auto Trait Implementations

impl !RefUnwindSafe for GUI

impl !Send for GUI

impl !Sync for GUI

impl Unpin for GUI

impl !UnwindSafe for GUI

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.