Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-11 02:09:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-11 02:09:45 +0300
commit9e2abbc9ba5d8edf3f43060122d683d0c6ae2525 (patch)
tree434079908c019b9481432c27d42d9e38318e0be0 /source/blender/editors/space_file/fsmenu.h
parent4f1e3875884506c017e03469658e9e7dadeeb500 (diff)
FileBrowser: Editable Bookmarks.
Bookmarks are now editable (i.e. you can rename them, and reorder them). They are also listed in regular UILists, so you can filter/sort them as usual too. Also, FileBrowser 'T' side area is changed to something similar to 3DView one, in this case because we need op panel to remain at the bottom, and later because we'll more than likely need tabs here! Thanks to Campbell and Sergey for reviews. Differential Revision: https://developer.blender.org/D1093
Diffstat (limited to 'source/blender/editors/space_file/fsmenu.h')
-rw-r--r--source/blender/editors/space_file/fsmenu.h35
1 files changed, 9 insertions, 26 deletions
diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h
index 831ec138474..fa925310c2b 100644
--- a/source/blender/editors/space_file/fsmenu.h
+++ b/source/blender/editors/space_file/fsmenu.h
@@ -37,43 +37,23 @@
/* XXX could become UserPref */
#define FSMENU_RECENT_MAX 10
-typedef enum FSMenuCategory {
- FS_CATEGORY_SYSTEM,
- FS_CATEGORY_SYSTEM_BOOKMARKS,
- FS_CATEGORY_BOOKMARKS,
- FS_CATEGORY_RECENT
-} FSMenuCategory;
-
-typedef enum FSMenuInsert {
- FS_INSERT_SORTED = (1 << 0),
- FS_INSERT_SAVE = (1 << 1),
- FS_INSERT_FIRST = (1 << 2), /* moves the item to the front of the list when its not already there */
- FS_APPEND_LAST = (1 << 3) /* just append to preseve delivered order */
-} FSMenuInsert;
+enum FSMenuCategory;
+enum FSMenuInsert;
struct FSMenu;
-
-struct FSMenu *fsmenu_get(void);
-
-/** Returns the number of entries in the Fileselect Menu */
-int fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category);
-
-/** Returns the fsmenu entry at \a index (or NULL if a bad index)
- * or a separator.
- */
-char *fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int index);
+struct FSMenuEntry;
/** Inserts a new fsmenu entry with the given \a path.
* Duplicate entries are not added.
* \param flag Options for inserting the entry.
*/
-void fsmenu_insert_entry(struct FSMenu *fsmenu, FSMenuCategory category, const char *path, const FSMenuInsert flag);
+void fsmenu_insert_entry(struct FSMenu *fsmenu, enum FSMenuCategory category, const char *path, const char *name, const enum FSMenuInsert flag);
/** Return whether the entry was created by the user and can be saved and deleted */
-short fsmenu_can_save(struct FSMenu *fsmenu, FSMenuCategory category, int index);
+short fsmenu_can_save(struct FSMenu *fsmenu, enum FSMenuCategory category, int index);
/** Removes the fsmenu entry at the given \a index. */
-void fsmenu_remove_entry(struct FSMenu *fsmenu, FSMenuCategory category, int index);
+void fsmenu_remove_entry(struct FSMenu *fsmenu, enum FSMenuCategory category, int index);
/** saves the 'bookmarks' to the specified file */
void fsmenu_write_file(struct FSMenu *fsmenu, const char *filename);
@@ -90,5 +70,8 @@ void fsmenu_free(void);
/** Refresh system directory menu */
void fsmenu_refresh_system_category(struct FSMenu *fsmenu);
+/** Get active index based on given directory. */
+int fsmenu_get_active_indices(struct FSMenu *fsmenu, enum FSMenuCategory category, const char *dir);
+
#endif