Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bsttreestores.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BST_TREE_STORES_H__
3 #define __BST_TREE_STORES_H__
4 
5 #include "bstutils.hh"
6 
7 
8 /* --- file store --- */
9 enum {
10  BST_FILE_STORE_COL_ID,
11  BST_FILE_STORE_COL_FILE,
12  BST_FILE_STORE_COL_BASE_NAME,
13  BST_FILE_STORE_COL_WAVE_NAME,
14  BST_FILE_STORE_COL_SIZE,
15  BST_FILE_STORE_COL_TIME_USECS,
16  BST_FILE_STORE_COL_TIME_STR,
17  BST_FILE_STORE_COL_LOADER,
18  BST_FILE_STORE_COL_LOADABLE,
19  BST_FILE_STORE_N_COLS
20 };
21 GtkTreeModel* bst_file_store_create (void);
22 void bst_file_store_update_list (GtkTreeModel *model,
23  const gchar *search_path,
24  const gchar *filter);
25 void bst_file_store_forget_list (GtkTreeModel *model);
26 void bst_file_store_destroy (GtkTreeModel *model);
27 
28 
29 /* --- proxy stores --- */
30 enum {
31  BST_PROXY_STORE_SEQID,
32  BST_PROXY_STORE_NAME,
33  BST_PROXY_STORE_BLURB,
34  BST_PROXY_STORE_TYPE,
35  BST_PROXY_STORE_N_COLS
36 };
37 /* store based on a BseIt3mSeq */
38 GtkTreeModel* bst_item_seq_store_new (gboolean sorted);
39 void bst_item_seq_store_set (GtkTreeModel *self,
40  BseIt3mSeq *iseq);
41 gint bst_item_seq_store_add (GtkTreeModel *self,
42  SfiProxy proxy);
43 gint bst_item_seq_store_remove (GtkTreeModel *self,
44  SfiProxy proxy);
45 gint bst_item_seq_store_raise (GtkTreeModel *self,
46  SfiProxy proxy);
47 gboolean bst_item_seq_store_can_raise (GtkTreeModel *self,
48  SfiProxy proxy);
49 gint bst_item_seq_store_lower (GtkTreeModel *self,
50  SfiProxy proxy);
51 gboolean bst_item_seq_store_can_lower (GtkTreeModel *self,
52  SfiProxy proxy);
53 BseIt3mSeq* bst_item_seq_store_dup (GtkTreeModel *self);
54 SfiProxy bst_item_seq_store_get_proxy (GtkTreeModel *self,
55  gint row);
56 SfiProxy bst_item_seq_store_get_from_iter (GtkTreeModel *self,
57  GtkTreeIter *iter);
58 gboolean bst_item_seq_store_get_iter (GtkTreeModel *self,
59  GtkTreeIter *iter,
60  SfiProxy proxy);
61 /* store based on the child list of a container */
62 GxkListWrapper* bst_child_list_wrapper_store_new (void);
63 
64 
65 /* --- generic child list wrapper --- */
66 void bst_child_list_wrapper_setup (GxkListWrapper *self,
67  SfiProxy parent,
68  const gchar *child_type);
69 void bst_child_list_wrapper_set_listener (GxkListWrapper *self,
70  void (*listener) (GtkTreeModel *model,
71  SfiProxy item,
72  gboolean added));
73 void bst_child_list_wrapper_rebuild (GxkListWrapper *self);
74 SfiProxy bst_child_list_wrapper_get_proxy (GxkListWrapper *self,
75  gint row);
76 SfiProxy bst_child_list_wrapper_get_from_iter (GxkListWrapper *self,
77  GtkTreeIter *iter);
78 gboolean bst_child_list_wrapper_get_iter (GxkListWrapper *self,
79  GtkTreeIter *iter,
80  SfiProxy proxy);
81 void bst_child_list_wrapper_proxy_changed (GxkListWrapper *self,
82  SfiProxy item);
83 
84 
85 #endif /* __BST_TREE_STORES_H__ */