
#include <ocarina/page.h>
#include <ocarina/gtk.h>
#include <ocarina/footer.h>

#include <libsaria/print.h>

GtkAttachOptions GROW = GTK_FILL;
GtkAttachOptions SHRINK;

Page::Page(GtkWidget *content)
{
	table = gtk_table_new(3, 1, FALSE);
	add_content(content);
	gtk_widget_show(table);
}

Page::~Page()
{
}

void Page::add_content(GtkWidget *content)
{
	gtk_table_attach_defaults(GTK_TABLE(table), content, 0, 1, 0, 1);
}

void Page::remove_footer(GtkWidget *footer)
{
	gtk_container_remove(GTK_CONTAINER(table), footer);
}

void Page::add_footer(GtkWidget *footer)
{
	gtk_table_attach(GTK_TABLE(table), footer, 0, 1, 2, 3, GROW, SHRINK, 0, 0);
}

GtkWidget *Page::get_page()
{
	return table;
}
