pub struct Widget {
pub ctx: WidgetCtx,
pub style: Style,
pub children: Vec<Widget>,
pub content: Vec<Text>,
pub pos: Vec2,
pub id: u32,
pub callback: fn(&mut Widget),
}Fields§
§ctx: WidgetCtx§style: Style§children: Vec<Widget>§content: Vec<Text>§pos: Vec2§id: u32§callback: fn(&mut Widget)Implementations§
Trait Implementations§
Source§impl Stylable for Widget
impl Stylable for Widget
fn get_style(&mut self) -> &mut Style
fn foreground(self, col: Color) -> Self
fn background(self, col: Color) -> Self
fn position(self, x: Layout, y: Layout) -> Self
fn position_x(self, x: Layout) -> Self
fn position_y(self, y: Layout) -> Self
fn size(self, x: Layout, y: Layout) -> Self
fn size_x(self, x: Layout) -> Self
fn size_y(self, y: Layout) -> Self
fn margin(self, x: Layout, y: Layout) -> Self
fn margin_x(self, x: Layout) -> Self
fn margin_y(self, y: Layout) -> Self
fn attribute(self, attr: Attr) -> Self
fn remove_attribute(self, attr: Attr) -> Self
fn border(self, border: Border) -> Self
fn color(self, cs: ColorSet) -> Self
fn align(self, alignment: Alignment) -> Self
fn set_wrap(self, wrapping: bool) -> Self
fn style(self, style: Style) -> Self
Auto Trait Implementations§
impl Freeze for Widget
impl RefUnwindSafe for Widget
impl Send for Widget
impl Sync for Widget
impl Unpin for Widget
impl UnsafeUnpin for Widget
impl UnwindSafe for Widget
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