pub struct FilesApp {
tabs: Vec<TabState>,
active_tab: usize,
status: String,
last_win_w: u32,
last_win_h: u32,
alt_held: bool,
ctrl_held: bool,
shortcut_mgr: ShortcutManager,
}Fields§
§tabs: Vec<TabState>§active_tab: usize§status: String§last_win_w: u32§last_win_h: u32§alt_held: bool§ctrl_held: bool§shortcut_mgr: ShortcutManagerImplementations§
Source§impl FilesApp
impl FilesApp
pub fn new() -> Self
fn active_panel(&self) -> usize
fn set_active_panel(&mut self, val: usize)
fn active_state(&mut self) -> &mut FilerState
fn inactive_state(&mut self) -> &mut FilerState
fn refresh_all(&mut self)
fn get_active_file_path(&mut self) -> Option<String>
fn open_selected(&mut self)
fn copy_to_inactive_panel(&mut self)
fn move_to_inactive_panel(&mut self)
fn delete_selected(&mut self)
fn get_folders_at(path: &str) -> Vec<String>
fn draw_panel( &self, screen: &Screen, is_right: bool, px: u32, py: u32, pw: u32, ph: u32, active_panel: bool, )
Trait Implementations§
Source§impl App for FilesApp
impl App for FilesApp
fn name(&self) -> &str
Source§fn draw(
&mut self,
screen: &Screen,
win_x: u32,
win_y: u32,
win_w: u32,
win_h: u32,
)
fn draw( &mut self, screen: &Screen, win_x: u32, win_y: u32, win_w: u32, win_h: u32, )
ウィンドウ内の描画要求
Source§fn on_mouse(
&mut self,
_local_x: i32,
_local_y: i32,
_btn_left: bool,
_btn_right: bool,
_wheel: i32,
)
fn on_mouse( &mut self, _local_x: i32, _local_y: i32, _btn_left: bool, _btn_right: bool, _wheel: i32, )
マウスイベント。ローカル座標とホイール移動量が渡される。
fn active_tab(&self) -> usize
fn switch_tab(&mut self, idx: usize)
fn add_tab(&mut self)
共有されるバックバッファを返す
Source§fn instance_info(&self) -> String
fn instance_info(&self) -> String
インスタンス特有の情報(ファイル名やURLなど)を返す
Source§fn open_file_dialog(&mut self)
fn open_file_dialog(&mut self)
Alt+O: ファイルオープンダイアログを開く(未実装アプリはno-op)
Source§fn tab_thread_fn(&self) -> Option<fn()>
fn tab_thread_fn(&self) -> Option<fn()>
このアプリの各タブ用バックグラウンドスレッド関数を返す。
Some(fn) を返したアプリはタブ追加時にスケジューラでスレッドを起動する。
スレッド関数は引数なしの fn() で、グローバル Mutex 経由でアプリ状態と通信する。
fn get_dom_value(&self, _id: &str) -> Option<String>
fn set_dom_value(&mut self, _id: &str, _val: &str)
fn needs_timer_redraw(&self) -> bool
Source§fn get_buffer_updated_flag(&self) -> Option<Arc<AtomicBool>>
fn get_buffer_updated_flag(&self) -> Option<Arc<AtomicBool>>
ProxyApp の shared_buffer が更新されたことを通知する AtomicBool を返す。
ProxyApp でない通常のアプリは None を返す(デフォルト実装)。
Core 0 の dirty 判定がこのフラグを読んで矩形を登録する。
fn get_dom_content(&self, _id: &str) -> Option<String>
fn set_dom_content(&mut self, _id: &str, _val: &str)
Auto Trait Implementations§
impl Freeze for FilesApp
impl RefUnwindSafe for FilesApp
impl Send for FilesApp
impl Sync for FilesApp
impl Unpin for FilesApp
impl UnsafeUnpin for FilesApp
impl UnwindSafe for FilesApp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more