Struct carbide_core::Ui [−][src]
Ui
is the most important type within carbide and is necessary for rendering and maintaining
widget state.
Ui Handles the following:
- Contains the state of all widgets which can be indexed via their widget::Id.
- Stores rendering state for each widget until the end of each render cycle.
- Contains the theme used for default styling of the widgets.
- Maintains the latest user input state (for mouse and keyboard).
- Maintains the latest window dimensions.
Fields
fonts: Map
Manages all fonts that have been loaded by the user.
win_w: f64
Window width.
win_h: f64
Window height.
widgets: Box<dyn Widget<S>>
environment: Environment<S>
Implementations
impl<S: GlobalState> Ui<S>
[src]
pub fn handle_event(&mut self, event: Input, global_state: &mut S)
[src]
pub fn draw(&mut self) -> CPrimitives
[src]
Draw the Ui
in it's current state.
NOTE: If you don't need to redraw your carbide GUI every frame, it is recommended to use the
Ui::draw_if_changed
method instead.
pub fn mouse_cursor(&self) -> MouseCursor
[src]
Get mouse cursor state.
Trait Implementations
impl<'a, S: GlobalState> AsRef<Ui<S>> for UiCell<'a, S>
[src]
impl<S: Debug> Debug for Ui<S> where
S: GlobalState,
[src]
S: GlobalState,
Auto Trait Implementations
impl<S> !RefUnwindSafe for Ui<S>
[src]
impl<S> !Send for Ui<S>
[src]
impl<S> !Sync for Ui<S>
[src]
impl<S> Unpin for Ui<S>
[src]
impl<S> !UnwindSafe for Ui<S>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,