2011-09-18 14:43:46 -04:00
|
|
|
|
|
|
|
#include <ocarina/library.h>
|
|
|
|
#include <ocarina/body.h>
|
|
|
|
#include <ocarina/gtk.h>
|
2011-10-27 16:39:27 -04:00
|
|
|
#include <ocarina/songlist.h>
|
2011-09-18 14:43:46 -04:00
|
|
|
|
2011-09-18 18:07:59 -04:00
|
|
|
#include <libsaria/library.h>
|
|
|
|
#include <libsaria/track.h>
|
|
|
|
#include <libsaria/print.h>
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
using namespace std;
|
|
|
|
|
2011-09-18 14:43:46 -04:00
|
|
|
static SongList library_list;
|
2011-11-03 08:32:32 -04:00
|
|
|
static struct SongListFuncs library_funcs;
|
|
|
|
static list <MenuItem> library_menu;
|
2011-09-18 14:43:46 -04:00
|
|
|
|
2011-11-04 08:25:51 -04:00
|
|
|
static void test()
|
|
|
|
{
|
|
|
|
println("Test function!");
|
|
|
|
}
|
|
|
|
|
2011-10-29 15:55:48 -04:00
|
|
|
namespace ocarina
|
2011-10-29 15:35:30 -04:00
|
|
|
{
|
|
|
|
|
2011-10-29 15:55:48 -04:00
|
|
|
void library::refresh()
|
|
|
|
{
|
|
|
|
library_list.clear();
|
|
|
|
library_list.fill();
|
|
|
|
}
|
|
|
|
|
|
|
|
void library::init()
|
|
|
|
{
|
2011-11-04 08:25:51 -04:00
|
|
|
library_menu.push_back(MenuItem("Test", test));
|
2011-10-29 15:55:48 -04:00
|
|
|
library_funcs.for_each = libsaria::library::for_each;
|
|
|
|
library_funcs.size = libsaria::library::size;
|
|
|
|
|
2011-11-03 08:32:32 -04:00
|
|
|
library_list.init("Library", &library_funcs, &library_menu);
|
2011-10-29 15:55:48 -04:00
|
|
|
add_page(library_list.get_label(), library_list.get_window(), true);
|
|
|
|
ocarina::library::refresh();
|
|
|
|
}
|
2011-10-19 10:00:01 -04:00
|
|
|
|
2011-10-29 15:55:48 -04:00
|
|
|
};
|