/* ***********************IMPORTANT *********************************************
 *  Copyright (C) 2004-2007 Thierry Lagarde <tlagarde@users.sourceforge.net>
 *  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; either 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 Library General Public License for more details.
 *
 *
 *                      ********************
 *
 *
 * You are highly encouraged to send your changes to <tlagarde@users.sourceforge.net>
 * for possible incorporation into the main distribution.
 * By sending these changes to <tlagarde@users.sourceforge.net>,
 * it is assumed that you are offering <tlagarde@users.sourceforge.net>
 * the unlimited, non-exclusive right to reuse, modify, and relicense the code.
 *
 *
 *                      ********************
 *
 *  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.
 **************************************************************************************/
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>

#include <gtk/gtk.h>

#include "Snmp_Callbacks.h"
#include "Snmp_Interface.h"
#include "../Declaration_Constante.h"
#include "Root_Interface.h"

GtkWidget *create_win_Snmp (void)
{
	scrolledwindow_Snmp = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Snmp);
	gtk_container_add (GTK_CONTAINER (viewport_Modules), scrolledwindow_Snmp);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Snmp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

	viewport_Snmp = gtk_viewport_new (NULL, NULL);
	gtk_widget_show (viewport_Snmp);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Snmp), viewport_Snmp);
	gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport_Snmp), GTK_SHADOW_NONE);

	vbox_Snmp = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_Snmp);
	gtk_container_add (GTK_CONTAINER (viewport_Snmp), vbox_Snmp);

	scrolledwindow_Snmp_Liste = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Snmp_Liste);
	gtk_box_pack_start (GTK_BOX (vbox_Snmp), scrolledwindow_Snmp_Liste, TRUE, TRUE, 11);
	gtk_widget_set_size_request (scrolledwindow_Snmp_Liste, 312, 136);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Snmp_Liste), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow_Snmp_Liste), GTK_SHADOW_IN);

	treeview_Snmp = gtk_tree_view_new ();
	gtk_widget_show (treeview_Snmp);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Snmp_Liste), treeview_Snmp);
	
	hbox_Snmp_Button = gtk_hbox_new (FALSE, 0);
	gtk_widget_show (hbox_Snmp_Button);
	gtk_box_pack_start (GTK_BOX (vbox_Snmp), hbox_Snmp_Button, FALSE, TRUE, 6);

	fixed_Snmp_Button_Gauche = gtk_fixed_new ();
	gtk_widget_show (fixed_Snmp_Button_Gauche);
	gtk_box_pack_start (GTK_BOX (hbox_Snmp_Button), fixed_Snmp_Button_Gauche, TRUE, TRUE, 0);

	button_Snmp_Refresh = gtk_button_new_from_stock ("gtk-refresh");
	gtk_widget_show (button_Snmp_Refresh);
	gtk_box_pack_start (GTK_BOX (hbox_Snmp_Button), button_Snmp_Refresh, FALSE, FALSE, 6);
	gtk_widget_set_size_request (button_Snmp_Refresh, 96, 32);

	button_Snmp_Fermer = gtk_button_new_from_stock ("gtk-close");
	gtk_widget_show (button_Snmp_Fermer);
	gtk_box_pack_start (GTK_BOX (hbox_Snmp_Button), button_Snmp_Fermer, FALSE, FALSE, 6);
	gtk_widget_set_size_request (button_Snmp_Fermer, 96, 32);

	fixed_Snmp_Button_Droite = gtk_fixed_new ();
	gtk_widget_show (fixed_Snmp_Button_Droite);
	gtk_box_pack_start (GTK_BOX (hbox_Snmp_Button), fixed_Snmp_Button_Droite, TRUE, TRUE, 0);

	g_signal_connect ((gpointer) button_Snmp_Refresh, "clicked", G_CALLBACK (on_button_Snmp_Refresh_clicked), NULL);
	g_signal_connect ((gpointer) button_Snmp_Fermer, "clicked", G_CALLBACK (on_button_Snmp_Fermer_clicked), NULL);

	return scrolledwindow_Snmp;
}
