Introduce Tag and State opaque types in iced_pure::widget::tree
This commit is contained in:
parent
cff891833b
commit
35e9b75e41
16 changed files with 101 additions and 197 deletions
|
|
@ -7,8 +7,6 @@ use iced_native::renderer;
|
|||
use iced_native::text;
|
||||
use iced_native::{Clipboard, Hasher, Length, Point, Rectangle, Shell};
|
||||
|
||||
use std::any::{self, Any};
|
||||
|
||||
pub use iced_native::widget::Space;
|
||||
|
||||
impl<'a, Message, Renderer> Widget<Message, Renderer> for Space
|
||||
|
|
@ -16,20 +14,6 @@ where
|
|||
Message: Clone,
|
||||
Renderer: text::Renderer,
|
||||
{
|
||||
fn tag(&self) -> any::TypeId {
|
||||
any::TypeId::of::<()>()
|
||||
}
|
||||
|
||||
fn state(&self) -> Box<dyn Any> {
|
||||
Box::new(())
|
||||
}
|
||||
|
||||
fn diff(&self, _tree: &mut Tree) {}
|
||||
|
||||
fn children_state(&self) -> Vec<Tree> {
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
fn width(&self) -> Length {
|
||||
<Self as iced_native::Widget<Message, Renderer>>::width(self)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue