pub struct WidgetBase {
pub colors: ColorBase,
pub visibility: bool,
pub size: Vector2D<Size>,
pub constraints: Vector2D<SizeConstraint>,
pub margin: Thickness,
pub border: BorderStyle,
pub alignment: (HorizontalAlignment, VerticalAlignment),
pub enabled: bool,
pub uid: WindowUID,
}Expand description
Base struct usable for implementations of Widget
Fields§
§colors: ColorBase§visibility: bool§size: Vector2D<Size>§constraints: Vector2D<SizeConstraint>§margin: Thickness§border: BorderStyle§alignment: (HorizontalAlignment, VerticalAlignment)§enabled: bool§uid: WindowUIDImplementations§
Source§impl WidgetBase
impl WidgetBase
Sourcepub const fn state_color(&self, is_enabled: bool) -> Option<Color>
pub const fn state_color(&self, is_enabled: bool) -> Option<Color>
Returns the color associated to the state
pub fn desired_size(&self, available_size: TPoint) -> TPoint
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WidgetBase
impl RefUnwindSafe for WidgetBase
impl Send for WidgetBase
impl Sync for WidgetBase
impl Unpin for WidgetBase
impl UnsafeUnpin for WidgetBase
impl UnwindSafe for WidgetBase
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