pub struct Builder<'a, T> {
pub entity: Entity,
pub state: &'a mut State,
/* private fields */
}Expand description
Contains an entity id and a mutable reference to state and can be used to set properties of a widget at build time
Fields§
§entity: Entity§state: &'a mut StateImplementations§
Source§impl<'a, T> Builder<'a, T>
impl<'a, T> Builder<'a, T>
Sourcepub fn on_press<F>(self, handler: F) -> Builder<'a, T>
pub fn on_press<F>(self, handler: F) -> Builder<'a, T>
Sets the general callback for pressing a widget
pub fn set_name(self, name: &str) -> Builder<'a, T>
Sourcepub fn set_element(self, element: &str) -> Builder<'a, T>
pub fn set_element(self, element: &str) -> Builder<'a, T>
Sets the element name of the entity
pub fn set_disabled(self, value: bool) -> Builder<'a, T>
Sourcepub fn set_hoverable(self, value: bool) -> Builder<'a, T>
pub fn set_hoverable(self, value: bool) -> Builder<'a, T>
Sets whether the entity can be hovered
Sourcepub fn set_focusable(self, value: bool) -> Builder<'a, T>
pub fn set_focusable(self, value: bool) -> Builder<'a, T>
Sets whether the entity can be focused
Sourcepub fn set_opacity(self, value: f32) -> Builder<'a, T>
pub fn set_opacity(self, value: f32) -> Builder<'a, T>
Sets the opacity of the entity
Sourcepub fn set_checked(self, value: bool) -> Builder<'a, T>
pub fn set_checked(self, value: bool) -> Builder<'a, T>
Sets the checked state of the entity
Sourcepub fn set_z_order(self, value: i32) -> Builder<'a, T>
pub fn set_z_order(self, value: i32) -> Builder<'a, T>
Sets the z-order of the entity
Sourcepub fn set_clip_widget(self, value: Entity) -> Builder<'a, T>
pub fn set_clip_widget(self, value: Entity) -> Builder<'a, T>
Sets the clip widget of the entity. The clip bounds of the entity are set to the bounds of the clip widget
pub fn set_text(self, value: &str) -> Builder<'a, T>
pub fn set_font(self, value: &str) -> Builder<'a, T>
pub fn set_tooltip(self, value: &str) -> Builder<'a, T>
Sourcepub fn set_display(self, value: Display) -> Builder<'a, T>
pub fn set_display(self, value: Display) -> Builder<'a, T>
Sets the display type of the entity
pub fn set_visibility(self, value: Visibility) -> Builder<'a, T>
pub fn set_overflow(self, value: Overflow) -> Builder<'a, T>
pub fn set_background_color(self, value: Color) -> Builder<'a, T>
pub fn set_background_image(self, value: Rc<()>) -> Builder<'a, T>
pub fn set_background_gradient(self, value: LinearGradient) -> Builder<'a, T>
pub fn set_outer_shadow_h_offset(self, value: Units) -> Builder<'a, T>
pub fn set_outer_shadow_v_offset(self, value: Units) -> Builder<'a, T>
pub fn set_outer_shadow_color(self, value: Color) -> Builder<'a, T>
pub fn set_outer_shadow_blur(self, value: Units) -> Builder<'a, T>
pub fn set_inner_shadow_h_offset(self, value: Units) -> Builder<'a, T>
pub fn set_inner_shadow_v_offset(self, value: Units) -> Builder<'a, T>
pub fn set_inner_shadow_color(self, value: Color) -> Builder<'a, T>
pub fn set_inner_shadow_blur(self, value: Units) -> Builder<'a, T>
pub fn set_space(self, value: Units) -> Builder<'a, T>
pub fn set_left(self, value: Units) -> Builder<'a, T>
pub fn set_right(self, value: Units) -> Builder<'a, T>
pub fn set_top(self, value: Units) -> Builder<'a, T>
pub fn set_bottom(self, value: Units) -> Builder<'a, T>
pub fn set_width(self, value: Units) -> Builder<'a, T>
pub fn set_height(self, value: Units) -> Builder<'a, T>
pub fn set_min_width(self, value: Units) -> Builder<'a, T>
pub fn set_max_width(self, value: Units) -> Builder<'a, T>
pub fn set_min_height(self, value: Units) -> Builder<'a, T>
pub fn set_max_height(self, value: Units) -> Builder<'a, T>
pub fn set_min_left(self, value: Units) -> Builder<'a, T>
pub fn set_min_right(self, value: Units) -> Builder<'a, T>
pub fn set_min_top(self, value: Units) -> Builder<'a, T>
pub fn set_min_bottom(self, value: Units) -> Builder<'a, T>
pub fn set_max_left(self, value: Units) -> Builder<'a, T>
pub fn set_max_right(self, value: Units) -> Builder<'a, T>
pub fn set_max_top(self, value: Units) -> Builder<'a, T>
pub fn set_max_bottom(self, value: Units) -> Builder<'a, T>
pub fn set_border_color(self, value: Color) -> Builder<'a, T>
pub fn set_border_width(self, value: Units) -> Builder<'a, T>
pub fn set_border_corner_shape(self, value: BorderCornerShape) -> Builder<'a, T>
pub fn set_border_top_left_shape( self, value: BorderCornerShape, ) -> Builder<'a, T>
pub fn set_border_top_right_shape( self, value: BorderCornerShape, ) -> Builder<'a, T>
pub fn set_border_bottom_left_shape( self, value: BorderCornerShape, ) -> Builder<'a, T>
pub fn set_border_bottom_right_shape( self, value: BorderCornerShape, ) -> Builder<'a, T>
pub fn set_border_radius(self, value: Units) -> Builder<'a, T>
pub fn set_border_radius_top_left(self, value: Units) -> Builder<'a, T>
pub fn set_border_radius_top_right(self, value: Units) -> Builder<'a, T>
pub fn set_border_radius_bottom_left(self, value: Units) -> Builder<'a, T>
pub fn set_border_radius_bottom_right(self, value: Units) -> Builder<'a, T>
pub fn set_color(self, value: Color) -> Builder<'a, T>
pub fn set_font_size(self, value: f32) -> Builder<'a, T>
pub fn set_next_focus(self, value: Entity) -> Builder<'a, T>
pub fn set_prev_focus(self, value: Entity) -> Builder<'a, T>
pub fn set_focus(self, next: Entity, prev: Entity) -> Builder<'a, T>
pub fn set_rotate(self, rotate: f32) -> Builder<'a, T>
pub fn set_scale(self, scale: f32) -> Builder<'a, T>
pub fn set_child_left(self, value: Units) -> Builder<'a, T>
pub fn set_child_right(self, value: Units) -> Builder<'a, T>
pub fn set_child_top(self, value: Units) -> Builder<'a, T>
pub fn set_child_bottom(self, value: Units) -> Builder<'a, T>
pub fn set_row_between(self, value: Units) -> Builder<'a, T>
pub fn set_col_between(self, value: Units) -> Builder<'a, T>
pub fn set_child_space(self, value: Units) -> Builder<'a, T>
pub fn set_position_type(self, value: PositionType) -> Builder<'a, T>
pub fn set_layout_type(self, value: LayoutType) -> Builder<'a, T>
pub fn set_row_index(self, value: usize) -> Builder<'a, T>
pub fn set_col_index(self, value: usize) -> Builder<'a, T>
pub fn set_row_span(self, value: usize) -> Builder<'a, T>
pub fn set_col_span(self, value: usize) -> Builder<'a, T>
pub fn set_grid_rows(self, value: Vec<Units>) -> Builder<'a, T>
pub fn set_grid_cols(self, value: Vec<Units>) -> Builder<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Builder<'a, T>
impl<'a, T> !RefUnwindSafe for Builder<'a, T>
impl<'a, T> !Send for Builder<'a, T>
impl<'a, T> !Sync for Builder<'a, T>
impl<'a, T> Unpin for Builder<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for Builder<'a, T>
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