Remove dispatch_event from Element trait

This commit is contained in:
Nathan Sobo 2022-10-16 13:08:25 -06:00
parent d25c6b15a6
commit 12eab6551f
26 changed files with 288 additions and 736 deletions

View file

@ -4,8 +4,8 @@ use crate::{
geometry::{rect::RectF, vector::Vector2F},
json::ToJson,
presenter::MeasurementContext,
Axis, DebugContext, Element, ElementBox, Event, EventContext, LayoutContext, MouseRegion,
PaintContext, SizeConstraint,
Axis, DebugContext, Element, ElementBox, LayoutContext, MouseRegion, PaintContext,
SizeConstraint,
};
use serde_json::json;
@ -225,18 +225,6 @@ impl Element for Overlay {
cx.scene.pop_stacking_context();
}
fn dispatch_event(
&mut self,
event: &Event,
_: RectF,
_: RectF,
_: &mut Self::LayoutState,
_: &mut Self::PaintState,
cx: &mut EventContext,
) -> bool {
self.child.dispatch_event(event, cx)
}
fn rect_for_text_range(
&self,
range_utf16: Range<usize>,