|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Manages the file browser functionality, including loading files, setting the current selection, adding and removing locations (bookmarks), and saving the locations. More...
#include <src/gui/backend/backend/file_manager.h>
Public Member Functions | |
| void | load_files () |
| Loads the files under the current selection. | |
| void | set_selection (FileBrowserLocation &sel, bool load_files, bool save_to_settings) |
| Sets the current selection and optionally loads the files and saves the location to the settings. | |
| void | add_location_and_save (const fs::path &abs_path) |
| Adds a new location (bookmark) to the saved locations and saves the settings. | |
| void | remove_location_and_save (const fs::path &location, bool skip_if_standard) |
| Removes the given location (bookmark) from the saved locations and saves the settings. | |
Data Fields | |
| std::vector< FileDescriptor > | files |
| The file descriptors for the files under the current collection/location. | |
| std::vector< FileBrowserLocation > | locations |
| The default and user-defined locations (bookmarks). | |
| std::unique_ptr< FileBrowserLocation > | selection |
| The current selection in the top window. | |
Manages the file browser functionality, including loading files, setting the current selection, adding and removing locations (bookmarks), and saving the locations.
Definition at line 100 of file file_manager.h.
| void FileManager::add_location_and_save | ( | const fs::path & | abs_path | ) |
Adds a new location (bookmark) to the saved locations and saves the settings.
| abs_path | The absolute path of the new location to add. |
| void FileManager::remove_location_and_save | ( | const fs::path & | location, |
| bool | skip_if_standard ) |
Removes the given location (bookmark) from the saved locations and saves the settings.
| location | The location to remove. |
| skip_if_standard | Whether to skip removal if the location is a standard location. |
| void FileManager::set_selection | ( | FileBrowserLocation & | sel, |
| bool | load_files, | ||
| bool | save_to_settings ) |
Sets the current selection and optionally loads the files and saves the location to the settings.
| sel | The new file browser location to select. |
| load_files | Whether to load the files under the new selection. |
| save_to_settings | Whether to save the new selection to the settings. |
| std::vector<FileDescriptor> FileManager::files |
The file descriptors for the files under the current collection/location.
This is updated whenever the location or collection selection changes.
Definition at line 160 of file file_manager.h.
| std::vector<FileBrowserLocation> FileManager::locations |
The default and user-defined locations (bookmarks).
Definition at line 165 of file file_manager.h.
| std::unique_ptr<FileBrowserLocation> FileManager::selection |
The current selection in the top window.
Definition at line 170 of file file_manager.h.