2008-04-16 18:18:18 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 04/2008 by Olaf Rempel *
|
|
|
|
* razzor@kopf-tisch.de *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; version 2 of the License *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
2008-03-15 23:18:09 +01:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <gtkdatabox.h>
|
|
|
|
|
2008-03-18 19:30:21 +01:00
|
|
|
gint gui_graphtab_init(GtkNotebook *notebook)
|
2008-03-15 23:18:09 +01:00
|
|
|
{
|
|
|
|
GtkWidget *table = gtk_table_new(3, 3, FALSE);
|
|
|
|
GtkWidget *box = gtk_databox_new();
|
|
|
|
gtk_table_attach(GTK_TABLE(table), box, 1, 2, 1, 2,
|
|
|
|
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
|
|
|
|
GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 0);
|
|
|
|
|
|
|
|
GtkWidget *scrollbar = gtk_hscrollbar_new(gtk_databox_get_hadjustment(GTK_DATABOX(box)));
|
|
|
|
gtk_table_attach(GTK_TABLE(table), scrollbar, 1, 2, 2, 3,
|
|
|
|
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
|
|
|
|
GTK_FILL, 0, 0);
|
|
|
|
|
|
|
|
scrollbar = gtk_vscrollbar_new(gtk_databox_get_vadjustment(GTK_DATABOX(box)));
|
|
|
|
gtk_table_attach(GTK_TABLE(table), scrollbar, 2, 3, 1, 2,
|
|
|
|
GTK_FILL,
|
|
|
|
GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 0);
|
|
|
|
|
|
|
|
GtkWidget *ruler = gtk_hruler_new();
|
|
|
|
gtk_table_attach(GTK_TABLE(table), ruler, 1, 2, 0, 1,
|
|
|
|
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
|
|
|
|
GTK_FILL, 0, 0);
|
|
|
|
gtk_databox_set_hruler(GTK_DATABOX(box), GTK_RULER(ruler));
|
|
|
|
|
|
|
|
ruler = gtk_vruler_new();
|
|
|
|
gtk_table_attach (GTK_TABLE (table), ruler, 0, 1, 1, 2,
|
|
|
|
GTK_FILL,
|
|
|
|
GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 0);
|
|
|
|
gtk_databox_set_vruler(GTK_DATABOX(box), GTK_RULER(ruler));
|
|
|
|
|
2008-03-16 00:39:37 +01:00
|
|
|
/*
|
|
|
|
* TODO:
|
|
|
|
* komplette datenhaltung.. (wie skalieren?)
|
|
|
|
* legende der graphen
|
|
|
|
*/
|
2008-03-15 23:18:09 +01:00
|
|
|
|
|
|
|
GtkWidget *label = gtk_label_new(" Graph ");
|
|
|
|
return gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, label);
|
|
|
|
}
|