pub struct Ui<'a> { /* private fields */ }Implementations§
Source§impl<'a> Ui<'a>
impl<'a> Ui<'a>
pub fn adhoc<'v, A>(&self, view: A) -> A::Outputwhere
A: Adhoc<'v>,
pub fn show<'v, B>(&self, args: B) -> Response<<B::View as View>::Response>where
B: Builder<'v>,
pub fn show_children<'v, B, R>(
&self,
args: B,
show: impl FnOnce(&Self) -> R,
) -> Response<(<B::View as View>::Response, R)>where
B: Builder<'v>,
R: 'static,
Source§impl<'a> Ui<'a>
impl<'a> Ui<'a>
pub fn client_rect(&self) -> Rect
pub fn current_available_rect(&self) -> Rect
pub fn frame_count(&self) -> u64
pub fn dt(&self) -> f32
pub fn size_changed(&self) -> Option<Vec2>
pub fn palette(&self) -> Ref<'_, Palette>
pub fn set_palette(&self, palette: Palette)
Source§impl<'a> Ui<'a>
impl<'a> Ui<'a>
pub fn key_pressed(&self, keybind: impl Into<Keybind>) -> bool
pub fn cursor_pos(&self) -> Pos2
pub fn is_hovered(&self) -> bool
pub fn is_parent_hovered(&self) -> bool
pub fn is_focused(&self) -> bool
pub fn is_parent_focused(&self) -> bool
pub fn set_focus(&self, id: impl Into<Option<ViewId>>)
Source§impl<'a> Ui<'a>
impl<'a> Ui<'a>
pub fn layer<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn new_layer<R>(
&self,
layer: Layer,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn float<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
Source§impl<'a> Ui<'a>
impl<'a> Ui<'a>
pub fn center<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn aligned<R>(
&self,
align: Align2,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn margin<R>(
&self,
margin: impl Into<Margin>,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn background<R>(
&self,
bg: impl Into<Rgba>,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn offset<R>(
&self,
offset: impl Into<Pos2>,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn exact_size<R>(
&self,
size: impl Into<Size>,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn exact_height<R>(
&self,
height: i32,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn exact_width<R>(
&self,
width: i32,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn constrain<R>(
&self,
constrain: Constrain,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn unconstrained<R>(
&self,
unconstrained: Unconstrained,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn draggable<R>(
&self,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<(Option<DraggingResponse>, R)>where
R: 'static,
pub fn mouse_area<R>(
&self,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<(MouseAreaResponse, R)>where
R: 'static,
pub fn key_area<R>(
&self,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<(KeyAreaResponse, R)>where
R: 'static,
pub fn progress(&self, value: f32) -> Response
pub fn text_input(&self, focus: bool) -> Response<TextInputResponse>
pub fn slider(&self, value: &mut f32) -> Response
pub fn toggle<R>(
&self,
state: bool,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<(ToggleResponse, R)>where
R: 'static,
pub fn toggle_switch(&self, value: &mut bool) -> Response<ToggleResponse>
pub fn checkbox( &self, value: &mut bool, label: impl Into<Str>, ) -> Response<bool>
pub fn todo_value( &self, value: &mut bool, label: impl Into<Str>, ) -> Response<bool>
pub fn selected( &self, value: &mut bool, label: impl Into<Str>, ) -> Response<bool>
pub fn radio<V>(
&self,
value: V,
existing: &mut V,
label: impl Into<Str>,
) -> Response<bool>where
V: PartialEq,
pub fn label(&self, data: impl Into<Str>) -> Response
pub fn expand<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn flex<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn vertical_wrap<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn horizontal_wrap<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn expand_space(&self) -> Response
pub fn expand_axis(&self) -> Response
pub fn separator(&self) -> Response
pub fn vertical<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn horizontal<R>(&self, show: impl FnOnce(&Ui<'_>) -> R) -> Response<R>where
R: 'static,
pub fn border<R>(
&self,
border: Border,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
pub fn frame<R>(
&self,
border: Border,
title: impl Into<Str>,
show: impl FnOnce(&Ui<'_>) -> R,
) -> Response<R>where
R: 'static,
Auto Trait Implementations§
impl<'a> Freeze for Ui<'a>
impl<'a> !RefUnwindSafe for Ui<'a>
impl<'a> !Send for Ui<'a>
impl<'a> !Sync for Ui<'a>
impl<'a> Unpin for Ui<'a>
impl<'a> !UnwindSafe for Ui<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more