|
Blender V5.0
|
#include "ED_fileselect.hh"Go to the source code of this file.
Macros | |
| #define | FSMENU_RECENT_MAX 10 |
Functions | |
| void | fsmenu_insert_entry (struct FSMenu *fsmenu, enum FSMenuCategory category, const char *path, const char *name, int icon, enum FSMenuInsert flag) |
| short | fsmenu_can_save (struct FSMenu *fsmenu, enum FSMenuCategory category, int idx) |
| void | fsmenu_remove_entry (struct FSMenu *fsmenu, enum FSMenuCategory category, int idx) |
| bool | fsmenu_write_file (struct FSMenu *fsmenu, const char *filepath) |
| void | fsmenu_read_bookmarks (struct FSMenu *fsmenu, const char *filepath) |
| void | fsmenu_read_system (struct FSMenu *fsmenu, int read_bookmarks) |
| void | fsmenu_free (void) |
| void | fsmenu_refresh_system_category (struct FSMenu *fsmenu) |
| int | fsmenu_get_active_indices (struct FSMenu *fsmenu, enum FSMenuCategory category, const char *dir) |
| #define FSMENU_RECENT_MAX 10 |
Definition at line 14 of file fsmenu.h.
Referenced by fsmenu_write_file().
| short fsmenu_can_save | ( | struct FSMenu * | fsmenu, |
| enum FSMenuCategory | category, | ||
| int | idx ) |
Return whether the entry was created by the user and can be saved and deleted
Definition at line 214 of file fsmenu.cc.
References ED_fsmenu_get_category(), FSMenuEntry::next, and FSMenuEntry::save.
| void fsmenu_free | ( | void | ) |
Frees all the memory associated with the fsmenu.
Definition at line 511 of file fsmenu.cc.
References fsmenu_free_ex(), and g_fsmenu.
Referenced by ED_file_exit(), and ED_file_read_bookmarks().
| int fsmenu_get_active_indices | ( | struct FSMenu * | fsmenu, |
| enum FSMenuCategory | category, | ||
| const char * | dir ) |
Get active index based on given directory.
Definition at line 516 of file fsmenu.cc.
References BLI_path_cmp, ED_fsmenu_get_category(), i, FSMenuEntry::next, and FSMenuEntry::path.
Referenced by file_refresh().
| void fsmenu_insert_entry | ( | struct FSMenu * | fsmenu, |
| enum FSMenuCategory | category, | ||
| const char * | path, | ||
| const char * | name, | ||
| int | icon, | ||
| enum FSMenuInsert | flag ) |
Inserts a new fsmenu entry with the given path. Duplicate entries are not added.
Definition at line 227 of file fsmenu.cc.
References ARRAY_SIZE, BLI_assert, BLI_path_is_rel(), BLI_path_ncmp, BLI_strdup(), BLI_string_joinN, DATA_, ED_fsmenu_entry_set_icon(), ED_fsmenu_get_category(), ED_fsmenu_set_category(), ELEM, flag, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_OTHER, FS_CATEGORY_RECENT, FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, FS_INSERT_FIRST, FS_INSERT_SAVE, FS_INSERT_SORTED, i, FSMenuEntry::icon, MEM_mallocN(), FSMenuEntry::name, name, FSMenuEntry::next, FSMenuEntry::path, FSMenuEntry::save, SEP, SEP_STR, STREQ, and STRNCPY().
Referenced by bookmark_add_exec(), file_execute(), fsmenu_read_bookmarks(), fsmenu_read_system(), and fsmenu_xdg_insert_entry().
| void fsmenu_read_bookmarks | ( | struct FSMenu * | fsmenu, |
| const char * | filepath ) |
reads the 'bookmarks' from the specified file
Definition at line 421 of file fsmenu.cc.
References BLI_fopen(), FILE_MAXDIR, FILE_MAXFILE, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, FS_INSERT_SAVE, fsmenu_insert_entry(), len, name, STRNCPY(), and STRPREFIX.
Referenced by ED_file_read_bookmarks().
| void fsmenu_read_system | ( | struct FSMenu * | fsmenu, |
| int | read_bookmarks ) |
adds system specific directories
Definition at line 261 of file fsmenu_system.cc.
References ARRAY_SIZE, b, BLI_dir_home(), BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_getenv(), BLI_is_dir(), BLI_path_join, CLOG_WARN, conv_utf_16_to_8(), conv_utf_8_to_16(), dirname(), ELEM, FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, FS_CATEGORY_OTHER, FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, FS_INSERT_LAST, FS_INSERT_SORTED, FS_UDIR_PATH, fsmenu_insert_entry(), fsmenu_xdg_insert_entry(), fsmenu_xdg_user_dirs_free(), fsmenu_xdg_user_dirs_parse(), i, LISTBASE_FOREACH, LOG, N_, name, direntry::relname, result, seed, SNPRINTF, STRPREFIX, U, UNLIKELY, and UNUSED_VARS.
Referenced by ED_file_read_bookmarks(), and fsmenu_refresh_system_category().
| void fsmenu_refresh_system_category | ( | struct FSMenu * | fsmenu | ) |
Refresh system directory menu
Definition at line 485 of file fsmenu.cc.
References ED_fsmenu_set_category(), FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, fsmenu_free_category(), and fsmenu_read_system().
Referenced by file_refresh_exec().
| void fsmenu_remove_entry | ( | struct FSMenu * | fsmenu, |
| enum FSMenuCategory | category, | ||
| int | idx ) |
Removes the fsmenu entry at the given index.
Definition at line 346 of file fsmenu.cc.
References ED_fsmenu_get_category(), ED_fsmenu_set_category(), MEM_freeN(), FSMenuEntry::next, FSMenuEntry::path, and FSMenuEntry::save.
Referenced by bookmark_cleanup_exec(), bookmark_delete_exec(), and reset_recent_exec().
| bool fsmenu_write_file | ( | struct FSMenu * | fsmenu, |
| const char * | filepath ) |
Saves the 'bookmarks' to the specified file.
Definition at line 379 of file fsmenu.cc.
References BLI_fopen(), ED_fsmenu_get_category(), FILE_MAX, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, fsmenu_entry_generate_name(), FSMENU_RECENT_MAX, FSMenuEntry::name, FSMenuEntry::next, FSMenuEntry::path, FSMenuEntry::save, and STREQ.
Referenced by ED_fsmenu_entry_set_name(), ED_fsmenu_entry_set_path(), and fsmenu_write_file_and_refresh_or_report_error().