Blender V2.61 - r43446
|
Go to the source code of this file.
Defines | |
#define | FSMENU_RECENT_MAX 10 |
Typedefs | |
typedef enum FSMenuCategory | FSMenuCategory |
Enumerations | |
enum | FSMenuCategory { FS_CATEGORY_SYSTEM, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT } |
Functions | |
struct FSMenu * | fsmenu_get (void) |
int | fsmenu_get_nentries (struct FSMenu *fsmenu, FSMenuCategory category) |
char * | fsmenu_get_entry (struct FSMenu *fsmenu, FSMenuCategory category, int index) |
void | fsmenu_insert_entry (struct FSMenu *fsmenu, FSMenuCategory category, const char *path, int sorted, short save) |
short | fsmenu_can_save (struct FSMenu *fsmenu, FSMenuCategory category, int index) |
void | fsmenu_remove_entry (struct FSMenu *fsmenu, FSMenuCategory category, int index) |
void | fsmenu_write_file (struct FSMenu *fsmenu, const char *filename) |
void | fsmenu_read_bookmarks (struct FSMenu *fsmenu, const char *filename) |
void | fsmenu_read_system (struct FSMenu *fsmenu) |
void | fsmenu_free (struct FSMenu *fsmenu) |
Definition in file fsmenu.h.
#define FSMENU_RECENT_MAX 10 |
Definition at line 38 of file fsmenu.h.
Referenced by fsmenu_write_file().
typedef enum FSMenuCategory FSMenuCategory |
enum FSMenuCategory |
short fsmenu_can_save | ( | struct FSMenu * | fsmenu, |
FSMenuCategory | category, | ||
int | index | ||
) |
Return whether the entry was created by the user and can be saved and deleted
Definition at line 152 of file fsmenu.c.
References fsmenu_get_category(), _FSMenuEntry::next, and _FSMenuEntry::save.
Referenced by file_panel_category().
void fsmenu_free | ( | struct FSMenu * | fsmenu | ) |
Free's all the memory associated with the fsmenu
Definition at line 534 of file fsmenu.c.
References FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, FS_CATEGORY_SYSTEM, fsmenu_free_category(), and MEM_freeN().
Referenced by ED_file_exit().
struct FSMenu* fsmenu_get | ( | void | ) | [read] |
Definition at line 90 of file fsmenu.c.
References g_fsmenu, and MEM_callocN().
Referenced by bookmark_add_exec(), bookmark_delete_exec(), ED_file_exit(), ED_file_init(), file_exec(), and file_panel_category().
char* fsmenu_get_entry | ( | struct FSMenu * | fsmenu, |
FSMenuCategory | category, | ||
int | index | ||
) |
Returns the fsmenu entry at index (or NULL if a bad index) or a separator.
Definition at line 142 of file fsmenu.c.
References fsmenu_get_category(), _FSMenuEntry::next, NULL, and _FSMenuEntry::path.
Referenced by file_panel_category().
int fsmenu_get_nentries | ( | struct FSMenu * | fsmenu, |
FSMenuCategory | category | ||
) |
Returns the number of entries in the Fileselect Menu
Definition at line 131 of file fsmenu.c.
References fsmenu_get_category(), and _FSMenuEntry::next.
Referenced by bookmark_delete_exec(), file_panel_category(), and fsmenu_write_file().
void fsmenu_insert_entry | ( | struct FSMenu * | fsmenu, |
FSMenuCategory | category, | ||
const char * | path, | ||
int | sorted, | ||
short | save | ||
) |
Inserts a new fsmenu entry with the given path. Duplicate entries are not added.
sorted | Should entry be inserted in sorted order? |
Definition at line 162 of file fsmenu.c.
References BLI_path_cmp, BLI_strdup(), fsmenu_get_category(), fsmenu_set_category(), MEM_mallocN(), and _FSMenuEntry::next.
Referenced by bookmark_add_exec(), file_exec(), fsmenu_read_bookmarks(), and fsmenu_read_system().
void fsmenu_read_bookmarks | ( | struct FSMenu * | fsmenu, |
const char * | filename | ||
) |
reads the 'bookmarks' from the specified file
Definition at line 258 of file fsmenu.c.
References BLI_exists(), FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, fsmenu_insert_entry(), len(), NULL, and strlen().
Referenced by ED_file_init().
void fsmenu_read_system | ( | struct FSMenu * | fsmenu | ) |
adds system specific directories
Definition at line 288 of file fsmenu.c.
References BLI_exists(), BLI_snprintf(), err, FILE_MAX, FILE_MAXDIR, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_SYSTEM, fsmenu_insert_entry(), i, len(), NULL, and strlen().
Referenced by ED_file_init().
void fsmenu_remove_entry | ( | struct FSMenu * | fsmenu, |
FSMenuCategory | category, | ||
int | index | ||
) |
Removes the fsmenu entry at the given index.
Definition at line 203 of file fsmenu.c.
References fsmenu_get_category(), fsmenu_set_category(), MEM_freeN(), _FSMenuEntry::next, and NULL.
Referenced by bookmark_delete_exec().
void fsmenu_write_file | ( | struct FSMenu * | fsmenu, |
const char * | filename | ||
) |
saves the 'bookmarks' to the specified file
Definition at line 231 of file fsmenu.c.
References FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, fsmenu_get_category(), fsmenu_get_nentries(), FSMENU_RECENT_MAX, _FSMenuEntry::next, NULL, _FSMenuEntry::path, and _FSMenuEntry::save.
Referenced by bookmark_add_exec(), bookmark_delete_exec(), and file_exec().