Struct makepad_studio::file_system::file_system::FileSystem
source · 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
impl FileSystem
pub fn init(&mut self, cx: &mut Cx)
pub fn get_session_mut(&mut self, tab_id: LiveId) -> Option<&mut Session>
pub fn handle_event( &mut self, cx: &mut Cx, event: &Event, ui: &WidgetRef ) -> Vec<FileSystemAction>
pub fn handle_event_with( &mut self, cx: &mut Cx, event: &Event, ui: &WidgetRef, dispatch_action: &mut dyn FnMut(&mut Cx, FileSystemAction) )
pub fn request_open_file(&mut self, tab_id: LiveId, path: String)
pub fn request_save_file(&mut self, tab_id: LiveId)
pub fn clear_decorations(&mut self, path: &str)
pub fn clear_all_decorations(&mut self)
pub fn redraw_view_by_path(&mut self, cx: &mut Cx, path: &str, dock: &DockRef)
pub fn redraw_all_views(&mut self, cx: &mut Cx, dock: &DockRef)
pub fn add_decoration(&mut self, path: &str, dec: Decoration)
pub fn draw_file_node( &self, cx: &mut Cx2d<'_>, file_node_id: FileNodeId, file_tree: &mut FileTree )
pub fn file_node_name(&self, file_node_id: FileNodeId) -> String
pub fn file_node_path(&self, file_node_id: FileNodeId) -> String
pub fn load_file_tree(&mut self, tree_data: FileTreeData)
Trait Implementations§
source§impl Default for FileSystem
impl Default for FileSystem
source§fn default() -> FileSystem
fn default() -> FileSystem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for FileSystem
impl !Send for FileSystem
impl !Sync for FileSystem
impl Unpin for FileSystem
impl !UnwindSafe for FileSystem
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