r499: This commit was manufactured by cvs2svn to create tag 'r1_2_1-last'.
[cinelerra_cv/mob.git] / hvirtual / guicast / bcrecentlist.h
blobd76f18b62e8f78b4540fafc3cda73587a9636aa2
1 #ifndef BCRECENTLIST_H
2 #define BCRECENTLIST_H
4 #include "bclistbox.h"
5 #include "bctextbox.inc"
6 #include "defaults.inc"
8 // Maintain a list of text items (up to 'max') from session to session.
9 // List automatically saved to Cinelerra_rc as 'RECENT_prefix_0', etc.
10 // Item value is written to 'text_box' when item is selected (if textbox set)
12 #define RECENT_MAX_ITEMS 10
13 #define RECENT_POPUP_HEIGHT 100
15 class BC_RecentList : public BC_ListBox
17 public:
18 BC_RecentList(const char *type, Defaults *defaults,
19 BC_TextBox *textbox, int max,
20 int x, int y, int w, int h);
21 BC_RecentList(const char *type, Defaults *defaults);
22 BC_RecentList(const char *type, Defaults *defaults,
23 BC_TextBox *textbox);
25 ~BC_RecentList();
27 int handle_event();
28 int load_items(const char *prefix = NULL);
29 int add_item(const char *prefix, char *text);
31 ArrayList<BC_ListBoxItem*> items;
32 private:
33 const char *type;
34 BC_TextBox *textbox;
35 Defaults *defaults;
38 #endif /* BCRECENTLIST_H */