summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-04 03:24:44 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-04 03:24:44 +0200
commit6eb3dd7e5edc8847875c288c41d1dec8b1dad06e (patch)
treed4b8ff42a57d520e90fe8d854d83cc3a9377e06f /src
parent54ad92ce913629d1d1f623f4b14d51244554a59c (diff)
downloadiced-6eb3dd7e5edc8847875c288c41d1dec8b1dad06e.tar.gz
iced-6eb3dd7e5edc8847875c288c41d1dec8b1dad06e.tar.bz2
iced-6eb3dd7e5edc8847875c288c41d1dec8b1dad06e.zip
Implement `focus_previous` operation
Diffstat (limited to 'src')
-rw-r--r--src/widget.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widget.rs b/src/widget.rs
index 2333aa28..c3b6d83b 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -215,6 +215,14 @@ pub use svg::Svg;
use crate::Command;
use iced_native::widget::operation;
+/// Focuses the previous focusable widget.
+pub fn focus_previous<Message>() -> Command<Message>
+where
+ Message: 'static,
+{
+ Command::widget(operation::focus_previous())
+}
+
/// Focuses the next focusable widget.
pub fn focus_next<Message>() -> Command<Message>
where