diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-03-11 02:14:41 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-03-11 02:14:41 +0300 |
commit | f7f0222a768de13f596ba147dd151aa8e812f975 (patch) | |
tree | 1aa8d1f50b665b9cf3a30fe974c164da02823ff0 /source/blender/editors/space_file/fsmenu.h | |
parent | a1082a6d32b980556b099f5c9f53c35c2654c42b (diff) |
2.5 filebrowser
(WIP commit)
- added categories SYSTEM, BOOKMARKS and RECENT to left panel (recent files not filled yet)
- selection for bookmarks now works by storing draw position, might do that for the file list too
- removed fsmenu button and Bookmark button from UI region
Diffstat (limited to 'source/blender/editors/space_file/fsmenu.h')
-rw-r--r-- | source/blender/editors/space_file/fsmenu.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h index f4291673a3e..d3ec17e9ffd 100644 --- a/source/blender/editors/space_file/fsmenu.h +++ b/source/blender/editors/space_file/fsmenu.h @@ -31,37 +31,38 @@ #ifndef BSE_FSMENU_H #define BSE_FSMENU_H - /** Returns the number of entries in the Fileselect Menu */ -int fsmenu_get_nentries (void); +typedef enum FSMenuCategory { + FS_CATEGORY_SYSTEM, + FS_CATEGORY_BOOKMARKS, + FS_CATEGORY_RECENT +} FSMenuCategory; - /** Returns true if the fsmenu entry at @a index exists and - * is a seperator. - */ -int fsmenu_is_entry_a_separator (int index); + /** Returns the number of entries in the Fileselect Menu */ +int fsmenu_get_nentries (FSMenuCategory category); /** Returns the fsmenu entry at @a index (or NULL if a bad index) * or a separator. */ -char* fsmenu_get_entry (int index); +char* fsmenu_get_entry (FSMenuCategory category, int index); - /** Returns a new menu description string representing the - * fileselect menu. Should be free'd with MEM_freeN. - */ -char* fsmenu_build_menu (void); +void fsmenu_select_entry (FSMenuCategory category, int index); - /** Append a seperator to the FSMenu, inserts always follow the - * last seperator. - */ -void fsmenu_append_separator (void); +int fsmenu_is_selected (FSMenuCategory category, int index); + + /** Sets the position of the fsmenu entry at @a index */ +void fsmenu_set_pos (FSMenuCategory category, int index, short xs, short ys); + + /** Returns the position of the fsmenu entry at @a index. return value is 1 if successful, 0 otherwise */ +int fsmenu_get_pos (FSMenuCategory category, int index, short* xs, short* ys); /** Inserts a new fsmenu entry with the given @a path. * Duplicate entries are not added. * @param sorted Should entry be inserted in sorted order? */ -void fsmenu_insert_entry (char *path, int sorted, short save); +void fsmenu_insert_entry (FSMenuCategory category, char *path, int sorted, short save); /** Removes the fsmenu entry at the given @a index. */ -void fsmenu_remove_entry (int index); +void fsmenu_remove_entry (FSMenuCategory category, int index); /** saves the 'bookmarks' to the specified file */ void fsmenu_write_file(const char *filename); |