Trait modalkit_ratatui::Window
source · pub trait Window<I: ApplicationInfo>: WindowOps<I> + Sized {
// Required methods
fn id(&self) -> I::WindowId;
fn get_win_title(&self, store: &mut Store<I>) -> Line<'_>;
fn open(id: I::WindowId, store: &mut Store<I>) -> UIResult<Self, I>;
fn find(name: String, store: &mut Store<I>) -> UIResult<Self, I>;
fn posn(index: usize, store: &mut Store<I>) -> UIResult<Self, I>;
fn unnamed(store: &mut Store<I>) -> UIResult<Self, I>;
// Provided method
fn get_tab_title(&self, store: &mut Store<I>) -> Line<'_> { ... }
}
Expand description
A widget that the user can open and close on the screen.
Required Methods§
sourcefn get_win_title(&self, store: &mut Store<I>) -> Line<'_>
fn get_win_title(&self, store: &mut Store<I>) -> Line<'_>
Get the title to show in the window layout.
sourcefn open(id: I::WindowId, store: &mut Store<I>) -> UIResult<Self, I>
fn open(id: I::WindowId, store: &mut Store<I>) -> UIResult<Self, I>
Open a window that displays the content referenced by id
.
sourcefn find(name: String, store: &mut Store<I>) -> UIResult<Self, I>
fn find(name: String, store: &mut Store<I>) -> UIResult<Self, I>
Open a window given a name to lookup.
Provided Methods§
sourcefn get_tab_title(&self, store: &mut Store<I>) -> Line<'_>
fn get_tab_title(&self, store: &mut Store<I>) -> Line<'_>
Get the title to show in the tab list when this is the currently focused window.
The default implementation will use the same title as shown in the window.
Object Safety§
This trait is not object safe.