mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: refactor arranger to device
This commit is contained in:
parent
fa73821a0b
commit
89288f2920
40 changed files with 2015 additions and 1919 deletions
|
|
@ -2,19 +2,31 @@ use crate::*;
|
|||
|
||||
#[tengri_proc::expose]
|
||||
impl Browser {
|
||||
fn _todo_stub_path_buf (&self) -> PathBuf {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_stub_usize (&self) -> usize {
|
||||
todo!()
|
||||
}
|
||||
fn _todo_stub_arc_str (&self) -> Arc<str> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
#[tengri_proc::command(Browser)]
|
||||
impl BrowserCommand {
|
||||
//fn set_address (browser: &mut Browser, address: PathBuf) -> Perhaps<Self> {
|
||||
//Ok(None)
|
||||
//}
|
||||
//fn set_search (browser: &mut Browser, filter: Arc<str>) -> Perhaps<Self> {
|
||||
//Ok(None)
|
||||
//}
|
||||
//fn set_cursor (browser: &mut Browser, cursor: usize) -> Perhaps<Self> {
|
||||
//Ok(None)
|
||||
//}
|
||||
fn set_visible (browser: &mut Browser) -> Perhaps<Self> {
|
||||
Ok(None)
|
||||
}
|
||||
fn set_path (browser: &mut Browser, address: PathBuf) -> Perhaps<Self> {
|
||||
Ok(None)
|
||||
}
|
||||
fn set_search (browser: &mut Browser, filter: Arc<str>) -> Perhaps<Self> {
|
||||
Ok(None)
|
||||
}
|
||||
fn set_cursor (browser: &mut Browser, cursor: usize) -> Perhaps<Self> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
// Commands supported by [Browser]
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
use crate::*;
|
||||
use std::path::PathBuf;
|
||||
use std::ffi::OsString;
|
||||
|
||||
/// Browses for phrase to import/export
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Browser {
|
||||
pub cwd: PathBuf,
|
||||
pub dirs: Vec<(OsString, String)>,
|
||||
pub files: Vec<(OsString, String)>,
|
||||
pub filter: String,
|
||||
pub index: usize,
|
||||
pub scroll: usize,
|
||||
pub size: Measure<TuiOut>,
|
||||
pub cwd: PathBuf,
|
||||
pub dirs: Vec<(OsString, String)>,
|
||||
pub files: Vec<(OsString, String)>,
|
||||
pub filter: String,
|
||||
pub index: usize,
|
||||
pub scroll: usize,
|
||||
pub size: Measure<TuiOut>,
|
||||
}
|
||||
|
||||
impl Browser {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue