pub struct Canvas {
pub element_data: ElementData,
pub render_list: Vec<RenderCommand>,
}Fields§
§element_data: ElementData§render_list: Vec<RenderCommand>Implementations§
Source§impl Canvas
impl Canvas
pub fn new() -> Canvas
pub fn component(self) -> ComponentSpecification
pub fn key(self, key: &str) -> Canvas
pub fn props(self, props: Props) -> Canvas
pub fn id(self, id: &str) -> Canvas
pub fn hovered(self) -> Canvas
pub fn pressed(self) -> Canvas
pub fn disabled(self) -> Canvas
pub fn focused(self) -> Canvas
Trait Implementations§
Source§impl ElementStyles for Canvas
impl ElementStyles for Canvas
fn styles_mut(&mut self) -> &mut Style
fn background(self, color: AlphaColor<Srgb>) -> Self
fn margin<U>(self, top: U, right: U, bottom: U, left: U) -> Self
fn padding<U>(self, top: U, right: U, bottom: U, left: U) -> Self
fn border_width<U>(self, top: U, right: U, bottom: U, left: U) -> Self
fn border_radius<U>(self, top: U, right: U, bottom: U, left: U) -> Self
fn border_color(self, color: AlphaColor<Srgb>) -> Self
fn border_color_top(self, color: AlphaColor<Srgb>) -> Self
fn border_color_right(self, color: AlphaColor<Srgb>) -> Self
fn border_color_bottom(self, color: AlphaColor<Srgb>) -> Self
fn border_color_left(self, color: AlphaColor<Srgb>) -> Self
fn display(self, display: Display) -> Self
fn wrap(self, wrap: Wrap) -> Self
fn justify_content(self, justify_content: AlignContent) -> Self
fn align_items(self, align_items: AlignItems) -> Self
fn flex_direction(self, flex_direction: FlexDirection) -> Self
fn flex_grow(self, flex_grow: f32) -> Self
fn flex_shrink(self, flex_shrink: f32) -> Self
fn flex_basis<U>(self, flex_basis: U) -> Self
fn width<U>(self, width: U) -> Self
fn height<U>(self, height: U) -> Self
fn max_width<U>(self, max_width: U) -> Self
fn max_height<U>(self, max_height: U) -> Self
fn min_width<U>(self, min_width: U) -> Self
fn min_height<U>(self, min_height: U) -> Self
fn overflow_x(self, overflow: Overflow) -> Self
fn overflow_y(self, overflow: Overflow) -> Self
fn color(self, color: AlphaColor<Srgb>) -> Self
fn font_family(self, font_family: &str) -> Self
fn font_size(self, font_size: f32) -> Self
fn font_weight(self, font_weight: Weight) -> Self
fn font_style(self, font_style: FontStyle) -> Self
fn overflow(self, overflow: Overflow) -> Self
fn position(self, position: Position) -> Self
fn inset<U>(self, top: U, right: U, bottom: U, left: U) -> Self
fn scrollbar_width(self, scrollbar_width: f32) -> Self
fn box_sizing(self, box_sizing: BoxSizing) -> Self
fn gap<U>(self, gap: U) -> Self
fn row_gap<U>(self, row_gap: U) -> Self
fn column_gap<U>(self, column_gap: U) -> Self
fn scrollbar_color( self, scroll_thumb_color: AlphaColor<Srgb>, scroll_track_color: AlphaColor<Srgb>, ) -> Self
fn visible(self, visible: bool) -> Self
Auto Trait Implementations§
impl Freeze for Canvas
impl !RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl !UnwindSafe for Canvas
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.