Struct silkenweb_html::elements::CanvasBuilder
source · pub struct CanvasBuilder(_);
Implementations§
source§impl CanvasBuilder
impl CanvasBuilder
pub fn id(self, value: impl AttributeValue<String>) -> Self
pub fn class(self, value: impl AttributeValue<String>) -> Self
sourcepub fn height(self, value: impl AttributeValue<String>) -> Self
pub fn height(self, value: impl AttributeValue<String>) -> Self
The height of the coordinate space in CSS pixels. Defaults to 150.
sourcepub fn width(self, value: impl AttributeValue<String>) -> Self
pub fn width(self, value: impl AttributeValue<String>) -> Self
The width of the coordinate space in CSS pixels. Defaults to 300.
source§impl CanvasBuilder
impl CanvasBuilder
pub fn on_blur(
self,
f: impl 'static + FnMut(FocusEvent, HtmlCanvasElement)
) -> Self
pub fn on_click(
self,
f: impl 'static + FnMut(MouseEvent, HtmlCanvasElement)
) -> Self
pub fn on_change(self, f: impl 'static + FnMut(Event, HtmlCanvasElement)) -> Self
pub fn on_dblclick(
self,
f: impl 'static + FnMut(MouseEvent, HtmlCanvasElement)
) -> Self
pub fn on_focusout(
self,
f: impl 'static + FnMut(FocusEvent, HtmlCanvasElement)
) -> Self
pub fn on_input(
self,
f: impl 'static + FnMut(InputEvent, HtmlCanvasElement)
) -> Self
pub fn on_keydown(
self,
f: impl 'static + FnMut(KeyboardEvent, HtmlCanvasElement)
) -> Self
pub fn on_keyup(
self,
f: impl 'static + FnMut(KeyboardEvent, HtmlCanvasElement)
) -> Self
pub fn effect(self, f: impl Effect<HtmlCanvasElement>) -> Self
Trait Implementations§
source§impl Builder for CanvasBuilder
impl Builder for CanvasBuilder
source§impl DomElement for CanvasBuilder
impl DomElement for CanvasBuilder
type Target = HtmlCanvasElement
fn dom_element(&self) -> Self::Target
source§impl From<CanvasBuilder> for Element
impl From<CanvasBuilder> for Element
source§fn from(builder: CanvasBuilder) -> Self
fn from(builder: CanvasBuilder) -> Self
Converts to this type from the input type.
source§impl From<CanvasBuilder> for ElementBuilder
impl From<CanvasBuilder> for ElementBuilder
source§fn from(builder: CanvasBuilder) -> Self
fn from(builder: CanvasBuilder) -> Self
Converts to this type from the input type.