Introduce selector flag and decouple iced_widget from iced_runtime
This commit is contained in:
parent
34a42b5ad4
commit
81d1eda7fe
22 changed files with 118 additions and 67 deletions
|
|
@ -12,10 +12,10 @@
|
|||
pub mod clipboard;
|
||||
pub mod font;
|
||||
pub mod keyboard;
|
||||
pub mod overlay;
|
||||
pub mod system;
|
||||
pub mod task;
|
||||
pub mod user_interface;
|
||||
pub mod widget;
|
||||
pub mod window;
|
||||
|
||||
pub use iced_core as core;
|
||||
|
|
@ -25,7 +25,6 @@ pub use iced_futures as futures;
|
|||
pub use task::Task;
|
||||
pub use user_interface::UserInterface;
|
||||
|
||||
use crate::core::widget;
|
||||
use crate::futures::futures::channel::oneshot;
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
|
@ -45,7 +44,7 @@ pub enum Action<T> {
|
|||
},
|
||||
|
||||
/// Run a widget operation.
|
||||
Widget(Box<dyn widget::Operation>),
|
||||
Widget(Box<dyn core::widget::Operation>),
|
||||
|
||||
/// Run a clipboard action.
|
||||
Clipboard(clipboard::Action),
|
||||
|
|
@ -67,8 +66,8 @@ pub enum Action<T> {
|
|||
}
|
||||
|
||||
impl<T> Action<T> {
|
||||
/// Creates a new [`Action::Widget`] with the given [`widget::Operation`].
|
||||
pub fn widget(operation: impl widget::Operation + 'static) -> Self {
|
||||
/// Creates a new [`Action::Widget`] with the given [`widget::Operation`](core::widget::Operation).
|
||||
pub fn widget(operation: impl core::widget::Operation + 'static) -> Self {
|
||||
Self::Widget(Box::new(operation))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue