use crate::{ error::Error, strutil::TString, time::Instant, translations::TR, ui::{ component::{paginated::PageMsg, Component, ComponentExt, Event, EventCtx, Pad, Paginate}, constant, display::{self, Color}, geometry::{Insets, Rect}, util::animation_disabled, }, }; use super::{ theme, Button, ButtonContent, ButtonMsg, ButtonStyleSheet, Loader, LoaderMsg, ScrollBar, Swipe, SwipeDirection, }; /// Allows pagination of inner component. Shows scroll bar, confirm & cancel /// buttons. Optionally handles hold-to-confirm with loader. pub struct ButtonPage { /// Inner component. content: T, /// Cleared when page changes. pad: Pad, /// Swipe controller. swipe: Swipe, scrollbar: ScrollBar, /// Hold-to-confirm mode whenever this is `Some(loader)`. loader: Option, button_cancel: Option