#include <gnome.h>
#include <gtkhtml/gtkhtml.h>


gint
main (gint argc, gchar *args [])
{
	GtkWidget *app;
	GtkWidget *vbox;
	gnome_init ("GtkHTML", "GtkHtml", argc, args);
	
	const gchar *html_source [] = { 
		"<table style=\"direction: rtl\" bgcolor=lightblue width=\"100%%\"><tr><td><B><FONT COLOR=Blue>Hello world!</FONT></B></td></tr></table>",
		"<table style=\"dir: rtl\" bgcolor=pink width=\"100%%\"><tr><td><B><FONT COLOR=Blue>Hello world!</FONT></B></td></tr></table>",
		"<table dir=rtl bgcolor=green width=\"100%%\"><tr><td><B><FONT COLOR=Blue>Hello world!</FONT></B></td></tr></table>",
		"<table direction=rtl bgcolor=black width=\"100%%\"><tr><td><B><FONT COLOR=Blue>Hello world!</FONT></B></td></tr></table>",
		"<table bgcolor=lightblue width=\"100%%\"><tr><td><B><FONT COLOR=Blue>Hello world! - control -</FONT></B></td></tr></table>"
	};

	vbox = gtk_vbox_new(FALSE, 10);
	app = gnome_app_new ("Example_1", "Example 1");
	gint i;

	for(i = 0; i < 5; i++)
	{
		GtkWidget *html;

		printf("%s", html_source[i]);
		GtkWidget *scrolled_window;
		html = gtk_html_new_from_string (html_source[i], -1);
		scrolled_window = gtk_scrolled_window_new (NULL, NULL);
		gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
						GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
		
			
		gtk_container_add (GTK_CONTAINER (scrolled_window), html);	
		gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE, TRUE, 5);
	}
	gnome_app_set_contents (GNOME_APP (app), vbox);
	gtk_window_set_default_size (GTK_WINDOW (app), 500, 400);
	gtk_widget_show_all (app);
	gtk_main ();
}




