pub struct LiveImageAttachment { /* private fields */ }Expand description
The UI-thread side of one attachment of a source to a widget, in one
window. Clone is an Rc clone; !Send. The widget’s rebuild or
destruction detaches it, as does the tree’s drop.
Implementations§
Source§impl LiveImageAttachment
impl LiveImageAttachment
Sourcepub fn consumer(&self) -> &LiveImageConsumer
pub fn consumer(&self) -> &LiveImageConsumer
What a widget hands Canvas::draw_live_image.
pub fn signals(&self) -> &LiveImageSignals
pub fn widget_id(&self) -> WidgetId
Sourcepub fn set_geometry(&self, geometry: ImageGeometry)
pub fn set_geometry(&self, geometry: ImageGeometry)
Record the placement the widget paints from, in its place_children,
so automation and lookups through the tree see it.
Sourcepub fn geometry(&self) -> Option<ImageGeometry>
pub fn geometry(&self) -> Option<ImageGeometry>
The placement last recorded; None before the first layout.
Sourcepub fn set_snapped_under(&self, transform: Option<Transform2D>)
pub fn set_snapped_under(&self, transform: Option<Transform2D>)
Record, in place_children, the transform the placement was snapped
to the device-pixel grid under: the widget’s effective transform
(WidgetArena::effective_transform), or None when the placement
does not snap. A transform scope changes without a layout pass; when
this transform changes in a way that moves the snap
(ImageGeometry::snaps_under either side), the tree lays the widget
out again, so it snaps anew.
Sourcepub fn is_detached(&self) -> bool
pub fn is_detached(&self) -> bool
Whether it was released: its widget was rebuilt or destroyed, or its tree dropped.