diff --git a/src/views/dialog.rs b/src/views/dialog.rs index 63a610b..14f2b75 100644 --- a/src/views/dialog.rs +++ b/src/views/dialog.rs @@ -216,6 +216,13 @@ impl Dialog { self } + /// Returns an iterator on this buttons for this dialog. + pub fn buttons_mut<'a>( + &'a mut self + ) -> Box<'a + Iterator> { + Box::new(self.buttons.iter_mut().map(|b| &mut b.button.view)) + } + // Private methods // An event is received while the content is in focus