diff options
Diffstat (limited to '')
| -rw-r--r-- | native/src/overlay.rs | 26 | ||||
| -rw-r--r-- | native/src/overlay/element.rs | 2 | ||||
| -rw-r--r-- | native/src/overlay/menu.rs | 14 | 
3 files changed, 4 insertions, 38 deletions
diff --git a/native/src/overlay.rs b/native/src/overlay.rs index 905d3389..8c01581f 100644 --- a/native/src/overlay.rs +++ b/native/src/overlay.rs @@ -11,7 +11,7 @@ use crate::layout;  use crate::mouse;  use crate::renderer;  use crate::widget; -use crate::widget::tree::{self, Tree}; +use crate::widget::Tree;  use crate::{Clipboard, Layout, Point, Rectangle, Shell, Size};  /// An interactive component that can be displayed on top of other widgets. @@ -42,29 +42,7 @@ where          cursor_position: Point,      ); -    /// Returns the [`Tag`] of the [`Widget`]. -    /// -    /// [`Tag`]: tree::Tag -    fn tag(&self) -> tree::Tag { -        tree::Tag::stateless() -    } - -    /// Returns the [`State`] of the [`Widget`]. -    /// -    /// [`State`]: tree::State -    fn state(&self) -> tree::State { -        tree::State::None -    } - -    /// Returns the state [`Tree`] of the children of the [`Widget`]. -    fn children(&self) -> Vec<Tree> { -        Vec::new() -    } - -    /// Reconciliates the [`Widget`] with the provided [`Tree`]. -    fn diff(&self, _tree: &mut Tree) {} - -    /// Applies an [`Operation`] to the [`Widget`]. +    /// Applies a [`widget::Operation`] to the [`Overlay`].      fn operate(          &self,          _layout: Layout<'_>, diff --git a/native/src/overlay/element.rs b/native/src/overlay/element.rs index 9500df27..2c558086 100644 --- a/native/src/overlay/element.rs +++ b/native/src/overlay/element.rs @@ -104,7 +104,7 @@ where              .draw(renderer, theme, style, layout, cursor_position)      } -    /// Applies an [`Operation`] to the [`Element`]. +    /// Applies a [`widget::Operation`] to the [`Element`].      pub fn operate(          &self,          layout: Layout<'_>, diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 3b55eba1..2e4f70b5 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -9,7 +9,7 @@ use crate::text::{self, Text};  use crate::touch;  use crate::widget::container::{self, Container};  use crate::widget::scrollable::{self, Scrollable}; -use crate::widget::tree::{self, Tree}; +use crate::widget::Tree;  use crate::{      Clipboard, Color, Element, Layout, Length, Padding, Point, Rectangle,      Shell, Size, Vector, Widget, @@ -199,18 +199,6 @@ where      Renderer: text::Renderer,      Renderer::Theme: StyleSheet + container::StyleSheet,  { -    fn tag(&self) -> tree::Tag { -        self.container.tag() -    } - -    fn state(&self) -> tree::State { -        self.container.state() -    } - -    fn children(&self) -> Vec<Tree> { -        self.container.children() -    } -      fn layout(          &self,          renderer: &Renderer,  | 
