mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 11:20:45 +00:00
Add Dialog::buttons to iterate on buttons
This commit is contained in:
parent
56f81eee7c
commit
3058816f1a
@ -216,6 +216,13 @@ impl Dialog {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns an iterator on this buttons for this dialog.
|
||||||
|
pub fn buttons_mut<'a>(
|
||||||
|
&'a mut self
|
||||||
|
) -> Box<'a + Iterator<Item = &'a mut Button>> {
|
||||||
|
Box::new(self.buttons.iter_mut().map(|b| &mut b.button.view))
|
||||||
|
}
|
||||||
|
|
||||||
// Private methods
|
// Private methods
|
||||||
|
|
||||||
// An event is received while the content is in focus
|
// An event is received while the content is in focus
|
||||||
|
Loading…
Reference in New Issue
Block a user