Remove implicit_size from the Item vtable

Use the preferred size in the layouting_info instead.
This commit is contained in:
Olivier Goffart 2021-05-04 15:33:04 +02:00 committed by Olivier Goffart
parent c6103aa9ce
commit 81473c2541
9 changed files with 31 additions and 159 deletions

View file

@ -43,7 +43,7 @@ pub enum BuiltinFunction {
ColorBrighter, ColorBrighter,
ColorDarker, ColorDarker,
Rgb, Rgb,
ImplicitItemSize, ImplicitLayoutInfo,
RegisterCustomFontByPath, RegisterCustomFontByPath,
RegisterCustomFontByMemory, RegisterCustomFontByMemory,
} }
@ -97,18 +97,8 @@ impl BuiltinFunction {
BuiltinFunction::StringIsFloat => { BuiltinFunction::StringIsFloat => {
Type::Function { return_type: Box::new(Type::Bool), args: vec![Type::String] } Type::Function { return_type: Box::new(Type::Bool), args: vec![Type::String] }
} }
BuiltinFunction::ImplicitItemSize => Type::Function { BuiltinFunction::ImplicitLayoutInfo => Type::Function {
return_type: Box::new(Type::Struct { return_type: Box::new(crate::layout::layout_info_type()),
fields: [
("width".to_string(), Type::LogicalLength),
("height".to_string(), Type::LogicalLength),
]
.iter()
.cloned()
.collect(),
name: Some("Size".to_string()),
node: None,
}),
args: vec![Type::ElementReference], args: vec![Type::ElementReference],
}, },
BuiltinFunction::ColorBrighter => Type::Function { BuiltinFunction::ColorBrighter => Type::Function {

View file

@ -1434,7 +1434,7 @@ fn compile_expression(
"[](const auto &a){ auto e1 = std::end(a); auto e2 = const_cast<char*>(e1); auto r = std::strtod(std::begin(a), &e2); return e1 == e2 ? r : 0; }" "[](const auto &a){ auto e1 = std::end(a); auto e2 = const_cast<char*>(e1); auto r = std::strtod(std::begin(a), &e2); return e1 == e2 ? r : 0; }"
.into() .into()
} }
BuiltinFunction::ImplicitItemSize => { BuiltinFunction::ImplicitLayoutInfo => {
unreachable!() unreachable!()
} }
BuiltinFunction::ColorBrighter => { BuiltinFunction::ColorBrighter => {
@ -1570,21 +1570,21 @@ fn compile_expression(
panic!("internal error: argument to SetFocusItem must be an element") panic!("internal error: argument to SetFocusItem must be an element")
} }
} }
Expression::BuiltinFunctionReference(BuiltinFunction::ImplicitItemSize) => { Expression::BuiltinFunctionReference(BuiltinFunction::ImplicitLayoutInfo) => {
if arguments.len() != 1 { if arguments.len() != 1 {
panic!("internal error: incorrect argument count to ImplicitItemSize call"); panic!("internal error: incorrect argument count to ImplicitLayoutInfo call");
} }
if let Expression::ElementReference(item) = &arguments[0] { if let Expression::ElementReference(item) = &arguments[0] {
let item = item.upgrade().unwrap(); let item = item.upgrade().unwrap();
let item = item.borrow(); let item = item.borrow();
let native_item = item.base_type.as_native(); let native_item = item.base_type.as_native();
format!("{vt}->implicit_size({{{vt}, const_cast<sixtyfps::{ty}*>(&self->{id})}}, &window)", format!("{vt}->layouting_info({{&sixtyfps::private_api::{vt}, const_cast<sixtyfps::{ty}*>(&self->{id})}}, &window)",
vt = native_item.cpp_vtable_getter, vt = native_item.cpp_vtable_getter,
ty = native_item.class_name, ty = native_item.class_name,
id = item.id id = item.id
) )
} else { } else {
panic!("internal error: argument to ImplicitItemSize must be an element") panic!("internal error: argument to ImplicitLayoutInfo must be an element")
} }
} }
Expression::BuiltinFunctionReference(BuiltinFunction::RegisterCustomFontByPath) => { Expression::BuiltinFunctionReference(BuiltinFunction::RegisterCustomFontByPath) => {

View file

@ -1101,7 +1101,7 @@ fn compile_expression(expr: &Expression, component: &Rc<Component>) -> TokenStre
BuiltinFunction::ASin => quote!((|a| (a as f64).asin().to_degrees())), BuiltinFunction::ASin => quote!((|a| (a as f64).asin().to_degrees())),
BuiltinFunction::ACos => quote!((|a| (a as f64).acos().to_degrees())), BuiltinFunction::ACos => quote!((|a| (a as f64).acos().to_degrees())),
BuiltinFunction::ATan => quote!((|a| (a as f64).atan().to_degrees())), BuiltinFunction::ATan => quote!((|a| (a as f64).atan().to_degrees())),
BuiltinFunction::SetFocusItem | BuiltinFunction::ShowPopupWindow | BuiltinFunction::ImplicitItemSize => { BuiltinFunction::SetFocusItem | BuiltinFunction::ShowPopupWindow | BuiltinFunction::ImplicitLayoutInfo => {
panic!("internal error: should be handled directly in CallFunction") panic!("internal error: should be handled directly in CallFunction")
} }
BuiltinFunction::StringToFloat => { BuiltinFunction::StringToFloat => {
@ -1225,19 +1225,19 @@ fn compile_expression(expr: &Expression, component: &Rc<Component>) -> TokenStre
panic!("internal error: argument to SetFocusItem must be an element") panic!("internal error: argument to SetFocusItem must be an element")
} }
} }
Expression::BuiltinFunctionReference(BuiltinFunction::ImplicitItemSize) => { Expression::BuiltinFunctionReference(BuiltinFunction::ImplicitLayoutInfo) => {
if arguments.len() != 1 { if arguments.len() != 1 {
panic!("internal error: incorrect argument count to ImplicitItemSize call"); panic!("internal error: incorrect argument count to ImplicitLayoutInfo call");
} }
if let Expression::ElementReference(item) = &arguments[0] { if let Expression::ElementReference(item) = &arguments[0] {
let item = item.upgrade().unwrap(); let item = item.upgrade().unwrap();
let item = item.borrow(); let item = item.borrow();
let item_id = format_ident!("{}", item.id); let item_id = format_ident!("{}", item.id);
quote!( quote!(
Self::FIELD_OFFSETS.#item_id.apply_pin(_self).implicit_size(&_self.window) Self::FIELD_OFFSETS.#item_id.apply_pin(_self).layouting_info(&_self.window)
) )
} else { } else {
panic!("internal error: argument to ImplicitItemSize must be an element") panic!("internal error: argument to ImplicitLayoutInfo must be an element")
} }
} }
Expression::BuiltinFunctionReference(BuiltinFunction::RegisterCustomFontByPath) => { Expression::BuiltinFunctionReference(BuiltinFunction::RegisterCustomFontByPath) => {

View file

@ -159,13 +159,13 @@ fn make_default_implicit(elem: &ElementRc, property: &str) {
Expression::StructFieldAccess { Expression::StructFieldAccess {
base: Expression::FunctionCall { base: Expression::FunctionCall {
function: Box::new(Expression::BuiltinFunctionReference( function: Box::new(Expression::BuiltinFunctionReference(
BuiltinFunction::ImplicitItemSize, BuiltinFunction::ImplicitLayoutInfo,
)), )),
arguments: vec![Expression::ElementReference(Rc::downgrade(elem))], arguments: vec![Expression::ElementReference(Rc::downgrade(elem))],
source_location: None, source_location: None,
} }
.into(), .into(),
name: property.into(), name: format!("preferred_{}", property),
} }
.into() .into()
}); });
@ -189,7 +189,7 @@ fn make_default_aspect_ratio_preserving_binding(
let implicit_size_var = Box::new(Expression::ReadLocalVariable { let implicit_size_var = Box::new(Expression::ReadLocalVariable {
name: "image_implicit_size".into(), name: "image_implicit_size".into(),
ty: match BuiltinFunction::ImplicitItemSize.ty() { ty: match BuiltinFunction::ImplicitLayoutInfo.ty() {
Type::Function { return_type, .. } => *return_type, Type::Function { return_type, .. } => *return_type,
_ => panic!("invalid type for ImplicitItemSize built-in function"), _ => panic!("invalid type for ImplicitItemSize built-in function"),
}, },
@ -200,7 +200,7 @@ fn make_default_aspect_ratio_preserving_binding(
name: "image_implicit_size".into(), name: "image_implicit_size".into(),
value: Box::new(Expression::FunctionCall { value: Box::new(Expression::FunctionCall {
function: Box::new(Expression::BuiltinFunctionReference( function: Box::new(Expression::BuiltinFunctionReference(
BuiltinFunction::ImplicitItemSize, BuiltinFunction::ImplicitLayoutInfo,
)), )),
arguments: vec![Expression::ElementReference(Rc::downgrade(elem))], arguments: vec![Expression::ElementReference(Rc::downgrade(elem))],
source_location: None, source_location: None,
@ -215,13 +215,13 @@ fn make_default_aspect_ratio_preserving_binding(
.into(), .into(),
rhs: Box::new(Expression::StructFieldAccess { rhs: Box::new(Expression::StructFieldAccess {
base: implicit_size_var.clone(), base: implicit_size_var.clone(),
name: missing_size_property.to_string(), name: format!("preferred_{}", missing_size_property),
}), }),
op: '*', op: '*',
}), }),
rhs: Box::new(Expression::StructFieldAccess { rhs: Box::new(Expression::StructFieldAccess {
base: implicit_size_var, base: implicit_size_var,
name: given_size_property.to_string(), name: format!("preferred_{}", given_size_property),
}), }),
op: '/', op: '/',
}, },

View file

@ -95,9 +95,6 @@ pub struct ItemVTable {
pub layouting_info: pub layouting_info:
extern "C" fn(core::pin::Pin<VRef<ItemVTable>>, window: &ComponentWindow) -> LayoutInfo, extern "C" fn(core::pin::Pin<VRef<ItemVTable>>, window: &ComponentWindow) -> LayoutInfo,
pub implicit_size:
extern "C" fn(core::pin::Pin<VRef<ItemVTable>>, window: &ComponentWindow) -> Size,
/// Event handler for mouse and touch event. This function is called before being called on children. /// Event handler for mouse and touch event. This function is called before being called on children.
/// Then, depending on the return value, it is called for the children, and their children, then /// Then, depending on the return value, it is called for the children, and their children, then
/// [`Self::input_event`] is called on the children, and finaly [`Self::input_event`] is called /// [`Self::input_event`] is called on the children, and finaly [`Self::input_event`] is called
@ -214,10 +211,6 @@ impl Item for Rectangle {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -285,10 +278,6 @@ impl Item for BorderRectangle {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -374,10 +363,6 @@ impl Item for TouchArea {
LayoutInfo::default() LayoutInfo::default()
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
event: MouseEvent, event: MouseEvent,
@ -492,10 +477,6 @@ impl Item for FocusScope {
LayoutInfo::default() LayoutInfo::default()
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -587,10 +568,6 @@ impl Item for Clip {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -659,10 +636,6 @@ impl Item for Opacity {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -727,10 +700,6 @@ impl Item for Rotate {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -815,10 +784,6 @@ impl Item for Path {
LayoutInfo::default() LayoutInfo::default()
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -901,10 +866,6 @@ impl Item for Flickable {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
event: MouseEvent, event: MouseEvent,
@ -1025,10 +986,6 @@ impl Item for Window {
LayoutInfo::default() LayoutInfo::default()
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -1128,10 +1085,6 @@ impl Item for BoxShadow {
LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() } LayoutInfo { horizontal_stretch: 1., vertical_stretch: 1., ..LayoutInfo::default() }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,

View file

@ -72,7 +72,7 @@ impl Item for Image {
} }
fn layouting_info(self: Pin<&Self>, window: &ComponentWindow) -> LayoutInfo { fn layouting_info(self: Pin<&Self>, window: &ComponentWindow) -> LayoutInfo {
let natural_size = self.implicit_size(window); let natural_size = window.0.image_size(Self::FIELD_OFFSETS.source.apply_pin(self));
LayoutInfo { LayoutInfo {
preferred_width: natural_size.width, preferred_width: natural_size.width,
preferred_height: natural_size.height, preferred_height: natural_size.height,
@ -80,10 +80,6 @@ impl Item for Image {
} }
} }
fn implicit_size(self: Pin<&Self>, window: &ComponentWindow) -> Size {
window.0.image_size(Self::FIELD_OFFSETS.source.apply_pin(self))
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -147,7 +143,7 @@ impl Item for ClippedImage {
} }
fn layouting_info(self: Pin<&Self>, window: &ComponentWindow) -> LayoutInfo { fn layouting_info(self: Pin<&Self>, window: &ComponentWindow) -> LayoutInfo {
let natural_size = self.implicit_size(window); let natural_size = window.0.image_size(Self::FIELD_OFFSETS.source.apply_pin(self));
LayoutInfo { LayoutInfo {
preferred_width: natural_size.width, preferred_width: natural_size.width,
preferred_height: natural_size.height, preferred_height: natural_size.height,
@ -155,10 +151,6 @@ impl Item for ClippedImage {
} }
} }
fn implicit_size(self: Pin<&Self>, window: &ComponentWindow) -> Size {
window.0.image_size(Self::FIELD_OFFSETS.source.apply_pin(self))
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,

View file

@ -133,7 +133,8 @@ impl Item for Text {
&|| self.unresolved_font_request(), &|| self.unresolved_font_request(),
Self::FIELD_OFFSETS.text.apply_pin(self), Self::FIELD_OFFSETS.text.apply_pin(self),
) { ) {
let mut min_size = font_metrics.text_size(&self.text()); let implicit_size = font_metrics.text_size(&self.text());
let mut min_size = implicit_size;
match self.overflow() { match self.overflow() {
TextOverflow::elide => { TextOverflow::elide => {
min_size.width = font_metrics.text_size("").width; min_size.width = font_metrics.text_size("").width;
@ -146,6 +147,8 @@ impl Item for Text {
LayoutInfo { LayoutInfo {
min_width: min_size.width.ceil(), min_width: min_size.width.ceil(),
min_height: min_size.height.ceil(), min_height: min_size.height.ceil(),
preferred_width: implicit_size.width.ceil(),
preferred_height: implicit_size.height.ceil(),
..LayoutInfo::default() ..LayoutInfo::default()
} }
} else { } else {
@ -153,18 +156,6 @@ impl Item for Text {
} }
} }
fn implicit_size(self: Pin<&Self>, window: &ComponentWindow) -> Size {
window
.0
.font_metrics(
&self.cached_rendering_data,
&|| self.unresolved_font_request(),
Self::FIELD_OFFSETS.text.apply_pin(self),
)
.map(|metrics| metrics.text_size(&self.text()).ceil())
.unwrap_or_default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -276,11 +267,13 @@ impl Item for TextInput {
&|| self.unresolved_font_request(), &|| self.unresolved_font_request(),
Self::FIELD_OFFSETS.text.apply_pin(self), Self::FIELD_OFFSETS.text.apply_pin(self),
) { ) {
let size = font_metrics.text_size("********************"); let size = font_metrics.text_size("********************").ceil();
LayoutInfo { LayoutInfo {
min_width: size.width, min_width: size.width,
min_height: size.height, min_height: size.height,
preferred_width: size.width,
preferred_height: size.height,
horizontal_stretch: 1., horizontal_stretch: 1.,
..LayoutInfo::default() ..LayoutInfo::default()
} }
@ -289,18 +282,6 @@ impl Item for TextInput {
} }
} }
fn implicit_size(self: Pin<&Self>, window: &ComponentWindow) -> Size {
window
.0
.font_metrics(
&self.cached_rendering_data,
&|| self.unresolved_font_request(),
Self::FIELD_OFFSETS.text.apply_pin(self),
)
.map(|metrics| metrics.text_size(&self.text()).ceil())
.unwrap_or_default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,

View file

@ -389,7 +389,7 @@ pub fn eval_expression(e: &Expression, local_context: &mut EvalLocalContext) ->
let a: u8 = (255. * a).max(0.).min(255.) as u8; let a: u8 = (255. * a).max(0.).min(255.) as u8;
Value::Brush(Brush::SolidColor(Color::from_argb_u8(a, r, g, b))) Value::Brush(Brush::SolidColor(Color::from_argb_u8(a, r, g, b)))
} }
Expression::BuiltinFunctionReference(BuiltinFunction::ImplicitItemSize) => { Expression::BuiltinFunctionReference(BuiltinFunction::ImplicitLayoutInfo) => {
if arguments.len() != 1 { if arguments.len() != 1 {
panic!("internal error: incorrect argument count to ImplicitItemSize") panic!("internal error: incorrect argument count to ImplicitItemSize")
} }
@ -408,15 +408,7 @@ pub fn eval_expression(e: &Expression, local_context: &mut EvalLocalContext) ->
let item_ref = unsafe { item_info.item_from_component(enclosing_component.as_ptr()) }; let item_ref = unsafe { item_info.item_from_component(enclosing_component.as_ptr()) };
let window = window_ref(component).unwrap(); let window = window_ref(component).unwrap();
item_ref.as_ref().layouting_info(&window).into()
let size = item_ref.as_ref().implicit_size(&window);
let values = [
("width".to_string(), Value::Number(size.width as f64)),
("height".to_string(), Value::Number(size.height as f64)),
]
.iter()
.map(|(name, value)| (name.clone(), value.clone())).collect();
Value::Struct(values)
} else { } else {
panic!("internal error: argument to ImplicitItemWidth must be an element") panic!("internal error: argument to ImplicitItemWidth must be an element")
} }

View file

@ -190,10 +190,6 @@ impl Item for NativeButton {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -320,10 +316,6 @@ impl Item for NativeCheckBox {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -478,10 +470,6 @@ impl Item for NativeSpinBox {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -692,10 +680,6 @@ impl Item for NativeSlider {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -946,10 +930,6 @@ impl Item for NativeGroupBox {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -1095,10 +1075,6 @@ impl Item for NativeLineEdit {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -1254,10 +1230,6 @@ impl Item for NativeScrollView {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -1581,10 +1553,6 @@ impl Item for NativeStandardListViewItem {
result result
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,
@ -1694,10 +1662,6 @@ impl Item for NativeComboBox {
} }
} }
fn implicit_size(self: Pin<&Self>, _window: &ComponentWindow) -> Size {
Default::default()
}
fn input_event_filter_before_children( fn input_event_filter_before_children(
self: Pin<&Self>, self: Pin<&Self>,
_: MouseEvent, _: MouseEvent,