Pass visible bounds to Element::dispatch_event

This commit is contained in:
Antonio Scandurra 2022-04-07 15:10:09 +02:00
parent ae415ee49b
commit 73f2fd6b09
23 changed files with 37 additions and 4 deletions

View file

@ -85,7 +85,8 @@ impl Element for Align {
fn dispatch_event(
&mut self,
event: &Event,
_: pathfinder_geometry::rect::RectF,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -59,6 +59,7 @@ where
&mut self,
_: &crate::Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
_: &mut crate::EventContext,

View file

@ -81,6 +81,7 @@ impl Element for ConstrainedBox {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -247,6 +247,7 @@ impl Element for Container {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -52,6 +52,7 @@ impl Element for Empty {
&mut self,
_: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
_: &mut EventContext,

View file

@ -85,6 +85,8 @@ impl Element for EventHandler {
&mut self,
event: &Event,
bounds: RectF,
_: RectF,
visible_bounds: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -66,6 +66,7 @@ impl Element for Expanded {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -266,6 +266,7 @@ impl Element for Flex {
&mut self,
event: &Event,
bounds: RectF,
_: RectF,
remaining_space: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,
@ -391,6 +392,7 @@ impl Element for FlexItem {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -57,6 +57,7 @@ impl Element for Hook {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -81,6 +81,7 @@ impl Element for Image {
&mut self,
_: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
_: &mut EventContext,

View file

@ -166,6 +166,7 @@ impl Element for Label {
&mut self,
_: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
_: &mut EventContext,

View file

@ -253,6 +253,7 @@ impl Element for List {
&mut self,
event: &Event,
bounds: RectF,
_: RectF,
scroll_top: &mut ListOffset,
_: &mut (),
cx: &mut EventContext,
@ -872,6 +873,7 @@ mod tests {
&mut self,
_: &Event,
_: RectF,
_: RectF,
_: &mut (),
_: &mut (),
_: &mut EventContext,

View file

@ -100,6 +100,7 @@ impl Element for MouseEventHandler {
&mut self,
event: &Event,
bounds: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -44,6 +44,7 @@ impl Element for Overlay {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -51,6 +51,7 @@ impl Element for Stack {
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,

View file

@ -76,6 +76,7 @@ impl Element for Svg {
&mut self,
_: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
_: &mut EventContext,

View file

@ -172,6 +172,7 @@ impl Element for Text {
&mut self,
_: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
_: &mut EventContext,

View file

@ -281,6 +281,7 @@ where
&mut self,
event: &Event,
bounds: RectF,
_: RectF,
layout: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,