
#include <ocarina/gtk.h>

static GtkWidget *tabs = NULL;

static void make_tabs()
{
	tabs = gtk_notebook_new();
	gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tabs), GTK_POS_LEFT);
	gtk_widget_show(tabs);
}

GtkWidget *get_tabs()
{
	if (tabs == NULL)
		make_tabs();
	return tabs;
}

void add_page(GtkWidget *label, GtkWidget *content, bool fill)
{
	gtk_notebook_append_page(GTK_NOTEBOOK(tabs), content, label);
	if (fill == true) {
		gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(tabs),
						   content,
						   TRUE,
						   TRUE,
						   GTK_PACK_START);
	}
};
