pub struct FileSystem {
    pub file_client: FileClient,
    pub root_path: String,
    pub file_nodes: LiveIdMap<FileNodeId, FileNode>,
    pub tab_id_to_path: HashMap<LiveId, String>,
    pub tab_id_to_session: HashMap<LiveId, Session>,
    pub open_documents: HashMap<String, OpenDoc>,
}

Fields§

§file_client: FileClient§root_path: String§file_nodes: LiveIdMap<FileNodeId, FileNode>§tab_id_to_path: HashMap<LiveId, String>§tab_id_to_session: HashMap<LiveId, Session>§open_documents: HashMap<String, OpenDoc>

Implementations§

source§

impl FileSystem

source

pub fn init(&mut self, cx: &mut Cx)

source

pub fn get_session_mut(&mut self, tab_id: LiveId) -> Option<&mut Session>

source

pub fn handle_event( &mut self, cx: &mut Cx, event: &Event, ui: &WidgetRef ) -> Vec<FileSystemAction>

source

pub fn handle_event_with( &mut self, cx: &mut Cx, event: &Event, ui: &WidgetRef, dispatch_action: &mut dyn FnMut(&mut Cx, FileSystemAction) )

source

pub fn request_open_file(&mut self, tab_id: LiveId, path: String)

source

pub fn request_save_file(&mut self, tab_id: LiveId)

source

pub fn clear_decorations(&mut self, path: &str)

source

pub fn clear_all_decorations(&mut self)

source

pub fn redraw_view_by_path(&mut self, cx: &mut Cx, path: &str, dock: &DockRef)

source

pub fn redraw_all_views(&mut self, cx: &mut Cx, dock: &DockRef)

source

pub fn add_decoration(&mut self, path: &str, dec: Decoration)

source

pub fn draw_file_node( &self, cx: &mut Cx2d<'_>, file_node_id: FileNodeId, file_tree: &mut FileTree )

source

pub fn file_node_name(&self, file_node_id: FileNodeId) -> String

source

pub fn file_node_path(&self, file_node_id: FileNodeId) -> String

source

pub fn load_file_tree(&mut self, tree_data: FileTreeData)

Trait Implementations§

source§

impl Default for FileSystem

source§

fn default() -> FileSystem

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.