#![allow(dead_code)] use rat_event::{HandleEvent, MouseOnly, Outcome, Regular}; use rat_focus::{FocusFlag, HasFocus}; use rat_reloc::{relocate_area, RelocatableState}; use rat_text::HasScreenCursor; use ratatui::buffer::Buffer; use ratatui::layout::Rect; use ratatui::prelude::{StatefulWidget, Style}; use std::marker::PhantomData; #[derive(Debug, Default)] pub struct TextInputMock<'a> { style: Style, text: String, focus_style: Style, phantom_data: PhantomData<&'a ()>, } #[derive(Debug, Clone)] pub struct TextInputMockState { pub focus: FocusFlag, pub area: Rect, } impl<'a> TextInputMock<'a> { /// Sample text pub fn sample(mut self, text: impl Into) -> Self { self.text = text.into(); self } /// Base text style. pub fn style(mut self, style: impl Into