use crate::align::*; use crate::direction::{Absolute, Direction, Relative}; use crate::event::{AnyCb, Event, EventResult, Key}; use crate::rect::Rect; use crate::theme::ColorStyle; use crate::view::{Margins, Selector, View}; use crate::views::{BoxedView, Button, DummyView, LastSizeView, TextView}; use crate::Cursive; use crate::Printer; use crate::Vec2; use crate::With; use std::cell::Cell; use std::cmp::max; use unicode_width::UnicodeWidthStr; /// Identifies currently focused element in [`Dialog`]. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum DialogFocus { /// Content element focused Content, /// One of buttons focused Button(usize), } struct ChildButton { button: LastSizeView