valadoc r10 - in trunk: . src/doclets src/doclets/devhelp/deps src/doclets/devhelp/doclet src/doclets/devhelp/linkhelper src/doclets/devhelp/taglets/author src/doclets/devhelp/taglets/link src/doclets/devhelp/taglets/parameter src/doclets/devhelp/taglets/return src/doclets/devhelp/taglets/see src/doclets/devhelp/taglets/string src/doclets/devhelp/taglets/throws src/doclets/devhelp/taglets/version src/doclets/html/deps src/doclets/html/doclet src/doclets/html/linkhelper src/doclets/html/taglets/author src/doclets/html/taglets/link src/doclets/html/taglets/parameter src/doclets/html/taglets/return src/doclets/html/taglets/see src/doclets/html/taglets/throws src/doclets/html/taglets/version src/doclets/htmlhelpers src/doclets/valadoc.org/doclet src/doclets/valadoc.org/linkhelper src/doclets/valadoc.org/taglets/author src/doclets/valadoc.org/taglets/link src/doclets/valadoc.org/taglets/parameter src/doclets/valadoc.org/taglets/return src/doclets/valadoc.org/taglets/see s rc/doclets/valadoc.org/taglets/string src/doclets/valadoc.org/taglets/throws src/doclets/valadoc.org/taglets/version src/libvaladoc



Author: flobrosch
Date: Tue Nov  4 22:35:00 2008
New Revision: 10
URL: http://svn.gnome.org/viewvc/valadoc?rev=10&view=rev

Log:

 - valadoc.org-doclet, html-doclet, devhelp-doclet
  - cleanups




Added:
   trunk/src/doclets/htmlhelpers/
   trunk/src/doclets/htmlhelpers/Makefile.am
   trunk/src/doclets/htmlhelpers/htmlhelpers.vala
Modified:
   trunk/configure.in
   trunk/src/doclets/Makefile.am
   trunk/src/doclets/devhelp/deps/style.css
   trunk/src/doclets/devhelp/doclet/Makefile.am
   trunk/src/doclets/devhelp/doclet/template.vala
   trunk/src/doclets/devhelp/linkhelper/Makefile.am
   trunk/src/doclets/devhelp/linkhelper/helper.vala
   trunk/src/doclets/devhelp/taglets/author/Makefile.am
   trunk/src/doclets/devhelp/taglets/link/Makefile.am
   trunk/src/doclets/devhelp/taglets/link/taglet.vala
   trunk/src/doclets/devhelp/taglets/parameter/Makefile.am
   trunk/src/doclets/devhelp/taglets/return/Makefile.am
   trunk/src/doclets/devhelp/taglets/see/Makefile.am
   trunk/src/doclets/devhelp/taglets/see/taglet.vala
   trunk/src/doclets/devhelp/taglets/string/Makefile.am
   trunk/src/doclets/devhelp/taglets/throws/Makefile.am
   trunk/src/doclets/devhelp/taglets/version/Makefile.am
   trunk/src/doclets/html/deps/main.css
   trunk/src/doclets/html/doclet/Makefile.am
   trunk/src/doclets/html/doclet/template.vala
   trunk/src/doclets/html/linkhelper/Makefile.am
   trunk/src/doclets/html/linkhelper/helper.vala
   trunk/src/doclets/html/taglets/author/Makefile.am
   trunk/src/doclets/html/taglets/link/Makefile.am
   trunk/src/doclets/html/taglets/link/taglet.vala
   trunk/src/doclets/html/taglets/parameter/Makefile.am
   trunk/src/doclets/html/taglets/return/Makefile.am
   trunk/src/doclets/html/taglets/see/Makefile.am
   trunk/src/doclets/html/taglets/see/taglet.vala
   trunk/src/doclets/html/taglets/throws/Makefile.am
   trunk/src/doclets/html/taglets/version/Makefile.am
   trunk/src/doclets/valadoc.org/doclet/Makefile.am
   trunk/src/doclets/valadoc.org/doclet/template.vala
   trunk/src/doclets/valadoc.org/linkhelper/Makefile.am
   trunk/src/doclets/valadoc.org/linkhelper/helper.vala
   trunk/src/doclets/valadoc.org/taglets/author/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/link/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/link/taglet.vala
   trunk/src/doclets/valadoc.org/taglets/parameter/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/return/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/see/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/see/taglet.vala
   trunk/src/doclets/valadoc.org/taglets/string/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/throws/Makefile.am
   trunk/src/doclets/valadoc.org/taglets/version/Makefile.am
   trunk/src/libvaladoc/doctree.vala
   trunk/src/libvaladoc/drawer.vala

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Nov  4 22:35:00 2008
@@ -54,6 +54,7 @@
                  src/libvaladoc/Makefile
                  src/vapi/Makefile
                  src/doclets/Makefile
+                 src/doclets/htmlhelpers/Makefile
                  src/doclets/html/Makefile
                  src/doclets/html/linkhelper/Makefile
                  src/doclets/html/doclet/Makefile

Modified: trunk/src/doclets/Makefile.am
==============================================================================
--- trunk/src/doclets/Makefile.am	(original)
+++ trunk/src/doclets/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -4,6 +4,7 @@
 
 
 SUBDIRS = \
+          htmlhelpers \
           html    \
           devhelp    \
           valadoc.org    \

Modified: trunk/src/doclets/devhelp/deps/style.css
==============================================================================
--- trunk/src/doclets/devhelp/deps/style.css	(original)
+++ trunk/src/doclets/devhelp/deps/style.css	Tue Nov  4 22:35:00 2008
@@ -80,7 +80,7 @@
 
 .site_content {
 	font-size: 10px;
-	margin-left: 255px;
+	margin-left: 5px;
 	margin-right: 5px;
 	text-align: left;
 }

Modified: trunk/src/doclets/devhelp/doclet/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/doclet/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/doclet/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -12,7 +12,7 @@
 
 
 libdoclet.vala.stamp: $(libdoclet_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libxml-2.0 --pkg libhtmlhelper-1.0 --vapidir . --pkg docletconfig --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libxml-2.0 --pkg libhtmlhelper-1.0 --vapidir . --pkg docletconfig --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -34,6 +34,7 @@
 AM_CFLAGS =  -g               \
 	-DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/devhelp/\" \
 	-I ../../../libvaladoc/   \
+	-I ../../htmlhelpers/     \
 	-I ../linkhelper/         \
 	-I ../                    \
 	$(GLIB_CFLAGS)            \
@@ -45,12 +46,13 @@
 libdoclet_la_LDFLAGS = -module -avoid-version
 
 
-libdoclet_la_LIBADD =                 \
-	../../../libvaladoc/libvaladoc.la \
-	../linkhelper/libhtmlhelper.la    \
-	$(LIBXML2_LIBS)                   \
-	$(GLIB_LIBS)                      \
-	$(LIBVALA_LIBS)                   \
+libdoclet_la_LIBADD =                   \
+	../../../libvaladoc/libvaladoc.la   \
+	../../htmlhelpers/libhtmlhelpers.la \
+	../linkhelper/libhtmlhelper.la      \
+	$(LIBXML2_LIBS)                     \
+	$(GLIB_LIBS)                        \
+	$(LIBVALA_LIBS)                     \
 	$(NULL)
 
 

Modified: trunk/src/doclets/devhelp/doclet/template.vala
==============================================================================
--- trunk/src/doclets/devhelp/doclet/template.vala	(original)
+++ trunk/src/doclets/devhelp/doclet/template.vala	Tue Nov  4 22:35:00 2008
@@ -17,6 +17,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
+
 using Valadoc;
 using GLib;
 using Xml;
@@ -24,445 +25,13 @@
 
 
 
-
-
-public class Valadoc.LangletIndex : Valadoc.Langlet, Valadoc.LinkHelper {
-	public Valadoc.Settings settings {
-		construct set;
-		protected get;
+public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.HtmlHelper {
+	protected override string get_link ( Basic element, Basic pos ) {
+		return this.get_html_link ( this.settings, element, pos );
 	}
 
 	public LangletIndex ( Settings settings ) {
-		this.settings = settings;
-	}
-
-	private Basic position = null;
-
-	private inline bool is_basic_type ( string name ) {
-		string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
-				"long", "ulong", "size_t", "ssize_t", "int8", "uint8", "int16", "uint16", "int32",
-				"uint32", "int64", "uint64", "float", "double", "time_t", "unichar", "string"
-			};
-
-		foreach ( string str in basic_types ) {
-			if ( str == name )
-				return true;
-		}
-
-		return false;
-	}
-
-	private void write_type_name ( DataType? datatype, GLib.FileStream file ) {
-		if ( datatype == null ) {
-			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
-			return ;
-		}
-
-		string typename = datatype.full_name (  );
-		if ( datatype.parent.name == null && (datatype is Class || datatype is Struct) ) {
-			if ( this.is_basic_type ( typename ) ) {
-				string link = this.get_link( datatype );
-				if ( link == null )
-					file.printf ( "<span class=\"%s\">%s</span>", css_basic_type, typename );
-				else
-					file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_basic_type, link, typename );
-				return ;
-			}
-		}
-
-		string link = this.get_link( datatype );
-		if ( link == null )
-		file.printf ( "<span class=\"%s\">%s</span>", css_other_type, typename );
-		else
-			file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_other_type, link, typename );
-	}
-
-	private void write_type_reference_name ( TypeReference type_reference, GLib.FileStream file ) {
-		if ( type_reference.type_name == "void" ) {
-			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
-		}
-		else {
-			if ( type_reference.data_type == null  ) {
-				file.printf ( "<font class=\"%s\">%s</font>", css_other_type, type_reference.type_name );
-			}
-			else {
-				this.write_type_name ( type_reference.data_type, file );
-			}
-		}
-	}
-
-	private void write_type_reference_template_arguments ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
-		Gee.Collection<TypeReference> arglst = type_reference.get_type_arguments ( );
-		int size = arglst.size;
-		if ( size == 0 )
-			return ;
-
-		file.puts ( "<" );
-		int i = 0;
-
-		foreach ( TypeReference arg in arglst ) {
-			i++;
-
-			this.write_nested_type_referene ( arg, file );
-			if ( i != size )
-				file.puts ( ", " );
-		}
-
-		file.puts ( ">" );
-	}
-
-	private void write_nested_type_referene ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
-		if ( type_reference.type_name == null )
-			return ;
-
-		if ( type_reference.is_weak )
-			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
-
-		this.write_type_reference_name ( type_reference, file );
-		this.write_type_reference_template_arguments ( type_reference, file );
-
-		if ( type_reference.is_array ) {
-			string str = string.nfill ( type_reference.array_rank-1, ',');
-			file.printf ( "[%s]", str );
-		}
-
-		if ( type_reference.pass_ownership ) {
-			file.putc ( '#' );
-		}
-
-		if ( type_reference.is_nullable ) {
-			file.putc ( '?' );
-		}
-
-		string str = string.nfill ( type_reference.pointer_rank, '*' );
-		file.puts ( str );
-
-	}
-
-	public override void write_type_reference ( Valadoc.TypeReference type_reference, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		if ( type_reference == null )
-			return ;
-
-		this.write_nested_type_referene ( type_reference, file );
-		file.putc ( ' ' );
-	}
-
-	private void write_formal_parameter ( FormalParameter param, GLib.FileStream file ) {
-		if ( param.ellipsis ) {
-			file.puts ( " ..." );
-		}
-		else {
-			if ( param.is_out )
-				file.printf ( "<span class=\"%s\">out</span> ", css_keyword );
-			else if ( param.is_ref )
-				file.printf ( "<span class=\"%s\">ref</span> ", css_keyword );
-
-			this.write_type_reference ( param.type_reference, file );
-			file.printf ( " %s", param.name );
-		}
-	}
-
-	public override void write_parameter_list ( ParameterListHandler thandler, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		bool open_bracket = false;
-
-		Gee.ArrayList<FormalParameter> params = thandler.param_list;
-		int size = params.size;
-		int i = 0;
-
-		file.putc ( '(' );
-
-		foreach ( FormalParameter param in params ) {
-			i++;
-
-			if ( param.default_value != null && open_bracket == false ) {
-				file.printf ( "<span class=\"%s\">[", css_optional_parameter );
-				open_bracket = true;
-			}
-
-			this.write_formal_parameter ( param, file );
-			if ( i != size ) {
-				file.puts ( ", " );
-			}
-			else if ( open_bracket == true ) {
-				file.puts ( "]</span>" );
-			}
-		}
-
-		file.putc ( ')' );
-	}
-
-	private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) {
-		Gee.ReadOnlyCollection<TypeReference> error_domains = exception_handler.get_error_domains ();
-		int size = error_domains.size;
-		int i = 1;
-
-		if ( size == 0 )
-			return ;
-
-		file.printf ( " <span class=\"%s\">throws</span> ", css_keyword );
-
-		foreach ( TypeReference type_reference in error_domains ) {
-			this.write_type_reference ( type_reference, file );
-			if ( error_domains.size > i ) {
-				file.puts ( ", " );
-			}
-			i++;
-		}
-	}
-
-	public override void write_method ( void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent ) {
-		this.position = m;
-
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( m, file );
-
-		if ( m.is_abstract )
-			modifiers.append ( " abstract" );
-		if ( m.is_virtual )
-			modifiers.append ( " virtual" );
-		if ( m.is_override )
-			modifiers.append ( " override" );
-		if ( m.is_static )
-			modifiers.append ( " static" );
-		if ( m.is_inline )
-			modifiers.append ( " inline" );
-
-		file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
-		this.write_type_reference ( m.return_type, file );
-		file.puts ( m.name );
-		this.write_parameter_list ( m, file );
-		this.write_exception_list ( m, file );
-	}
-
-	public override void write_type_parameter ( TypeParameter param, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		file.puts ( param.datatype_name );
-	}
-
-	public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		int i = 1;
-
-		var lst = thandler.get_template_param_list( );
-		if ( lst.size == 0 )
-			return ;
-
-		file.puts ( "&lt;" ); // <
-
-
-		foreach ( TypeParameter param in lst ) {
-			param.write ( this, file );
-			if ( lst.size > i )
-				file.puts ( ", " );
-
-			i++;
-		}
-		file.puts ( "&gt;" ); // >
-	}
-
-	public override void write_field ( Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr ) {
-		this.position = field;
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( field, file );
-
-		if ( field.is_volatile )
-			file.printf ( " <span class=\"%s\">volatile</span>", css_keyword );
-
-		this.write_type_reference ( field.type_reference, file );
-
-		file.printf ( " %s", field.name );
-	}
-
-	public override void write_constant ( Constant constant, ConstantHandler parent, void* ptr ) {
-		this.position = constant;
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( constant, file );
-		file.printf ( " <span class=\"%s\"> const </span>", css_keyword );
-		this.write_type_reference ( constant.type_reference, file );
-		file.printf ( " %s", constant.name );
-	}
-
-	public override void write_property_accessor ( Valadoc.PropertyAccessor propac, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		Property prop = (Property)propac.parent;
-
-		if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
-			// FIXME: PropertyAccessor isn't a SymbolAccessibility. (Valac-Bug.)
-			if ( propac.is_public )
-				file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
-			else if ( propac.is_protected )
-				file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
-			else if ( propac.is_private )
-				file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
-		}
-
-
-		if ( propac.is_get ) {
-			file.printf ( "<span class=\"%s\"> get</span>;", css_keyword );
-		}
-		else if ( propac.is_set ) {
-			if ( propac.is_construct ) {
-				file.printf ( "<span class=\"%s\"> construct</span> ", css_keyword );
-			}
-
-			file.printf ( "<span class=\"%s\"> set</span>;", css_keyword );
-		}
-	}
-
-	public override void write_property ( Valadoc.Property prop, void* ptr ) {
-		this.position = prop;
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( prop, file );
-
-		if ( prop.is_virtual )
-			modifiers.append ( " virtual " );
-		if ( prop.is_abstract )
-			modifiers.append ( " abstract " );
-		if ( prop.is_override )
-			modifiers.append ( " override " );
-
-
-		this.write_type_reference ( prop.return_type, file );
-		file.printf ( " <span class=\"%s\">%s</span>%s { ", css_keyword, modifiers.str, prop.name );
-
-		if ( prop.setter != null )
-			this.write_property_accessor ( prop.setter, file );
-
-
-		file.printf ( " " );
-
-		if ( prop.getter != null )
-			this.write_property_accessor ( prop.getter, file );
-
-		file.printf ( " }" );
-	}
-
-	public override void write_signal ( Valadoc.Signal sig, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = sig;
-
-		this.write_accessor ( sig, file );
-
-		file.printf ( " <span class=\"%s\">signal</span> ", css_keyword );
-		this.write_type_reference ( sig.return_type, file );
-		file.printf ( " %s ", sig.name );
-		this.write_parameter_list ( sig, file );
-	}
-
-	public override void write_enum_value ( Valadoc.EnumValue enval, void* ptr ) {
-	}
-
-	public override void write_error_code ( Valadoc.ErrorCode errcode, void* ptr ) {
-	}
-
-	public override void write_delegate ( Valadoc.Delegate del, void* ptr ) {
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = del;
-
-		this.write_accessor ( del, file );
-
-		file.printf ( " <span class=\"%s\">delegate</span> ", css_keyword );
-		this.write_type_reference ( del.return_type, file );
-		file.printf ( " %s ", del.name );
-		this.write_parameter_list ( del, file );
-		this.write_exception_list ( del, file );
-	}
-
-	public override void write_enum ( Valadoc.Enum en, void* ptr ) {
-	}
-
-	public override void write_error_domain ( Valadoc.ErrorDomain errdom, void* ptr ) {
-	}
-
-	private void write_accessor ( Valadoc.SymbolAccessibility element, GLib.FileStream file ) {
-		if ( element.is_public )
-			file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
-		else if ( element.is_protected )
-			file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
-		else if ( element.is_private )
-			file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
-	}
-
-
-	public override void write_struct ( Valadoc.Struct stru, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = stru;
-
-		this.write_accessor ( stru, file );
-		file.printf ( "<span class=\"%s\">struct</span> %s", css_keyword, stru.name );
-		this.write_template_parameters ( stru, ptr );
-		this.write_inheritance_list ( stru, file );
-	}
-
-	private void write_inheritance_list ( Valadoc.ContainerDataType dtype, GLib.FileStream file ) {
-		Gee.Collection<DataType> lst = dtype.get_parent_types ( );
-		int size = lst.size;
-		int i = 1;
-
-		if ( size == 0 )
-			return ;
-
-		file.puts ( " : " );
-
-		foreach ( DataType cntype in lst ) {
-			this.write_type_name ( cntype, file );
-			if ( size > i )
-				file.puts ( ", " );
-
-			i++;
-		}
-
-		file.putc ( ' ' );
-	}
-
-	public override void write_class ( Valadoc.Class cl, void* ptr ) {
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = cl;
-
-		this.write_accessor ( cl, file );
-
-		if ( cl.is_abstract )
-			modifiers.append ( "abstract " );
-		else if ( cl.is_static )
-			modifiers.append ( "static " );
-
-		file.printf ( "<span class=\"%s\">%s class</span> %s", css_keyword, modifiers.str, cl.name );
-
-		this.write_template_parameters ( cl, file );
-		this.write_inheritance_list ( cl, file );
-	}
-
-	public override void write_interface ( Valadoc.Interface iface, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = iface;
-
-		this.write_accessor ( iface, file );
-
-		if ( iface.is_static  )
-			file.printf ( "<span class=\"%s\">static interface</span> %s", css_keyword, iface.name );
-		else
-			file.printf ( "<span class=\"%s\">interface</span> %s", css_keyword, iface.name );
-
-		this.write_template_parameters ( iface, ptr );
-		this.write_inheritance_list ( iface, file );
-	}
-
-	public override void write_namespace ( Valadoc.Namespace ns, void* ptr ) {
-	}
-
-	public override void write_file ( Valadoc.Package file, void* ptr ) {
+		base ( settings );
 	}
 }
 
@@ -471,7 +40,6 @@
 
 
 
-
 public enum KeywordType {
 	NAMESPACE = 0,
 	CLASS = 1,
@@ -566,41 +134,24 @@
 }
 
 
-public class Valadoc.HtmlDoclet : Valadoc.Doclet, Valadoc.LinkHelper {
-	private Valadoc.LangletIndex langlet;
 
-	private DevhelpFormat devhelp;
 
-	private const string css_style_body = "site_body";
-	private const string css_site_header = "site_header";
+
+//public string get_html_link ( Settings settings, Basic el, Basic? pos ) {
+//	return "../" + this.get_package_name ( tag.file.name ) + "/" + tag.full_name () + ".html";
+//}
+
+
+
+
+
+
+public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper {
 	private string package_dir_name = "";
+	private DevhelpFormat devhelp;
 
-	private void write_file_header_template ( GLib.FileStream file, string title ) {
-		file.puts ( "<html>\n" );
-		file.puts ( "\t<head>\n" );
-		file.puts ( "\t\t<title>Vala Binding Reference</title>\n" );
-		file.printf ( "\t\t<link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\" />\n" );
-		file.puts ( "\t</head>\n" );
-		file.puts ( "\t<body>\n\n" );
-
-		file.printf ( "\t<div class=\"%s\">\n", this.css_site_header );
-		file.printf ( "\t\t%s Reference Manual\n", title );
-		file.puts ( "\t</div>\n\n" );
-
-		file.printf ( "\t\t<div class=\"%s\">\n", this.css_style_body );
-	}
-
-	private void write_file_footer ( GLib.FileStream file ) {
-		file.puts ( "\t</div>\n" );
-
-		file.puts ( "\t<div style= \"clear: left\">\n" );
-		file.puts ( "\t\t<br />\n" );
-		file.puts ( "\t\t<div class=\"site_foother\">\n" );
-		file.puts ( "\t\t\tcreated by <a href=\"http://www.valadoc.org\";>valadoc</a>\n" );
-		file.puts ( "\t\t</div>\n" );
-		file.puts ( "\t</div>\n" );
-		file.puts ( "\t</body>\n" );
-		file.puts ( "</html>" );
+	protected override string get_link ( Valadoc.Basic p1, Valadoc.Basic p2 ) {
+		return this.get_html_link ( this.settings, p1, p2 );		
 	}
 
 	private string get_path ( Valadoc.Basic element ) {
@@ -611,11 +162,11 @@
 		return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + element.full_name () + ".html";
 	}
 
-	private string get_img_path ( Valadoc.Basic element ) {
+	protected override string get_img_path ( Valadoc.Basic element ) {
 		return "img/" + element.full_name () + ".png";
 	}
 
-	private string get_img_real_path ( Valadoc.Basic element ) {
+	protected override string get_img_real_path ( Valadoc.Basic element ) {
 		return this.settings.get_real_path ( ) + "/" + this.package_dir_name + "/" + "img/" + element.full_name () + ".png";
 	}
 
@@ -634,30 +185,12 @@
 		this.devhelp = new DevhelpFormat ( settings.pkg_name, "" );
 	}
 
-	private void write_image_block ( GLib.FileStream file, DataType element ) {
-		string rpath = this.get_img_real_path ( element );
-		string path = this.get_img_path ( element );
-
-		if ( element is Class ) {
-			Diagrams.write_class_diagram ( (Class)element, rpath );
-		}
-		else if ( element is Interface ) {
-			Diagrams.write_interface_diagram ( (Interface)element, rpath );
-		}
-		else if ( element is Struct ) {
-			Diagrams.write_struct_diagram ( (Struct)element, rpath );
-		}
-
-		file.printf ( "<h2 cass=\"%s\">Object Hierarchy:</h2>\n", css_title );
-		file.printf ( "<img cass=\"%s\" src=\"%s\"/>\n", css_diagram, path );
-	}
-
 	private string vala_file_package_name;
 	private bool visited_non_package = false;
 
 
 	public override void visit_package ( Package file ) {
-		string pkg_name = get_package_name ( file.name );
+		string pkg_name = file.name;
 		string path = this.settings.get_real_path () + pkg_name + "/";
 		this.package_dir_name = pkg_name;
 
@@ -668,7 +201,7 @@
 		this.devhelp = new DevhelpFormat ( pkg_name, "" );
 
 		GLib.FileStream ifile = GLib.FileStream.open ( path + "index.htm", "w" );
-		this.write_file_header_template ( ifile, pkg_name );
+		this.write_file_header ( ifile, "style.css", pkg_name );
 		this.write_file_footer ( ifile );
 		ifile = null;
 
@@ -677,19 +210,12 @@
 		this.devhelp.save_file ( path + pkg_name + ".devhelp2" );
 	}
 
-	public void write_namespace_content ( GLib.FileStream file, Namespace ns ) {
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, (ns.name == null)? "Global Namespace" : ns.full_name() );
-		file.printf ( "<hr class=\"%s\" />\n", css_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		ns.write_comment ( file );
-	}
-
 	public override void visit_namespace ( Namespace ns ) {
 		string rpath = this.get_real_path ( ns );
 		string path = this.get_path ( ns );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w" );
-		this.write_file_header_template ( file, ns.full_name() );
+		this.write_file_header ( file, "style.css", ns.full_name() );
 		this.write_namespace_content ( file, ns );
 		this.write_file_footer ( file );
 		file = null;
@@ -716,198 +242,6 @@
 		}
 	}
 
-	private void write_child_classes ( GLib.FileStream file, ClassHandler clh ) {
-		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ();
-		if ( classes.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Classes:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Class subcl in classes ) {
-				string name;
-				if ( subcl.is_abstract ) {
-					name = "<i>" + subcl.name + "</i>";
-				}
-				else {
-					name = subcl.name;
-				}
-
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_class, css_navi_link, this.get_link(subcl), name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_enums ( GLib.FileStream file, EnumHandler eh ) {
-		Gee.Collection<Enum> enums = eh.get_enum_list ();
-		if ( enums.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Enum en in enums ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_enum, css_navi_link, this.get_link(en), en.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_structs ( GLib.FileStream file, StructHandler struh ) {
-		Gee.Collection<Struct> structs = struh.get_struct_list ();
-		if ( structs.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Structs:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Struct stru in structs ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_struct, css_navi_link, this.get_link(stru), stru.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_methods ( GLib.FileStream file, MethodHandler mh ) {
-		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ();
-		if ( methods.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Methods:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Method m in methods ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m), m.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_delegates ( GLib.FileStream file, DelegateHandler dh ) {
-		Gee.Collection<Delegate> delegates = dh.get_delegate_list ();
-		if ( delegates.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Delegates:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Delegate d in delegates ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_delegate, css_navi_link, this.get_link(d), d.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh ) {
-		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ();
-		if ( methods.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Construction Methods:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Method m in methods ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m), m.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_signals ( GLib.FileStream file, SignalHandler sh ) {
-		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ();
-		if ( signals.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Signals:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Signal sig in signals ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_signal, css_navi_link, this.get_link(sig), sig.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_properties ( GLib.FileStream file, PropertyHandler ph ) {
-		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ();
-		if ( properties.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Properties:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Property prop in properties ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_property, css_navi_link, this.get_link(prop), prop.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_fields ( GLib.FileStream file, FieldHandler fh ) {
-		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ();
-		if ( fields.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Fields:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Field f in fields ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_fields, css_navi_link, this.get_link(f), f.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_constants ( GLib.FileStream file, ConstantHandler ch ) {
-		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ();
-		if ( constants.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Constants:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Constant c in constants ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_constant, css_navi_link, this.get_link(c), c.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_error_values ( GLib.FileStream file, ErrorDomain errdom ) {
-		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ();
-		if ( error_codes.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Error Codes:</h3>\n", css_title );
-			file.printf ( "<table class=\"%s\">\n", css_errordomain_table );
-			foreach ( ErrorCode errcode in error_codes ) {
-				file.puts ( "<tr>\n" );
-				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_errordomain_table_name, errcode.name, errcode.name );
-				file.printf ( "\t<td class=\"%s\">\n", css_errordomain_table_text );
-
-				errcode.write_comment ( file );
-
-				file.puts ( "\t</td>\n" );
-				file.puts ( "</tr>\n" );
-			}
-			file.puts ( "</table>\n" );
-		}
-	}
-
-	private void write_child_enum_values ( GLib.FileStream file, Enum en ) {
-		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ();
-		if ( enum_values.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Enum Values:</h3>\n", css_title );
-			file.printf ( "<table class=\"%s\">\n", css_enum_table );
-			foreach ( EnumValue enval in enum_values ) {
-				file.puts ( "<tr>\n" );
-				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_enum_table_name, enval.name, enval.name );
-				file.printf ( "\t<td class=\"%s\">\n", css_enum_table_text );
-
-				enval.write_comment ( file );
-
-				file.puts ( "\t</td>\n" );
-				file.puts ( "</tr>\n" );
-			}
-			file.puts ( "</table>\n" );
-		}
-	}
-
-	public void write_interface_content ( GLib.FileStream file, Interface iface ) {
-		string full_name = iface.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-
-		this.write_image_block ( file, iface );
-
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_interface ( iface, file );
-		file.printf ( "\n</div>\n" );
-
-		iface.write_comment ( file );
-		this.write_namespace_note ( file, iface );
-		this.write_package_note ( file, iface );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_classes ( file, iface );
-		this.write_child_structs ( file, iface );
-		this.write_child_delegates ( file, iface );
-		this.write_child_methods ( file, iface );
-		this.write_child_signals ( file, iface );
-		this.write_child_properties ( file, iface );
-		this.write_child_fields ( file, iface );
-	}
-
 	public override void visit_interface ( Interface iface ) {
 		string rpath = this.get_real_path ( iface );
 		string path = this.get_path ( iface );
@@ -928,40 +262,12 @@
 		this.devhelp.add_keyword ( KeywordType.INTERFACE, iface.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, iface.full_name() );
+		this.write_file_header ( file, "style.css", iface.full_name() );
 		this.write_interface_content ( file, iface );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_class_content ( GLib.FileStream file, Class cl ) {
-		string full_name = cl.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-
-		this.write_image_block ( file, cl );
-
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_class ( cl, file );
-		file.printf ( "\n</div>\n" );
-		cl.write_comment ( file );
-		this.write_namespace_note ( file, cl );
-		this.write_package_note ( file, cl );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_construction_methods ( file, cl );
-		this.write_child_classes ( file, cl );
-		this.write_child_structs ( file, cl );
-		this.write_child_enums ( file, cl );
-		this.write_child_delegates ( file, cl );
-		this.write_child_methods ( file, cl );
-		this.write_child_signals ( file, cl );
-		this.write_child_properties ( file, cl );
-		this.write_child_fields ( file, cl );
-		this.write_child_constants ( file, cl );
-	}
-
 	public override void visit_class ( Class cl ) {
 		string rpath = this.get_real_path ( cl );
 		string path = this.get_path ( cl );
@@ -985,34 +291,12 @@
 
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, cl.full_name() );
+		this.write_file_header ( file, "style.css", cl.full_name() );
 		this.write_class_content ( file, cl );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_struct_content ( GLib.FileStream file, Struct stru ) {
-		string full_name = stru.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-
-		this.write_image_block ( file, stru );
-
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		stru.write_comment ( file );
-		this.write_namespace_note ( file, stru );
-		this.write_package_note ( file, stru );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_struct ( stru, file );
-		file.printf ( "\n</div>\n" );
-
-		this.write_child_construction_methods ( file, stru );
-		this.write_child_methods ( file, stru );
-		this.write_child_fields ( file, stru );
-		this.write_child_constants ( file, stru );
-	}
-
 	public override void visit_struct ( Struct stru ) {
 		string rpath = this.get_real_path ( stru );
 		string path = this.get_path ( stru );
@@ -1030,25 +314,14 @@
 
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, stru.full_name() );
+		this.write_file_header ( file, "style.css", stru.full_name() );
+
+		// HIER CRASHT ES!!
 		this.write_struct_content ( file, stru );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_error_domain_content ( GLib.FileStream file, ErrorDomain errdom ) {
-		string full_name = errdom.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		errdom.write_comment ( file );
-		this.write_namespace_note ( file, errdom );
-		this.write_package_note ( file, errdom );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_error_values ( file, errdom );
-		this.write_child_methods ( file, errdom );
-	}
-
 	public override void visit_error_domain ( ErrorDomain errdom ) {
 		string rpath = this.get_real_path ( errdom );
 		string path = this.get_path ( errdom );
@@ -1059,25 +332,12 @@
 		this.devhelp.add_chapter ( errdom.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, errdom.full_name() );
+		this.write_file_header ( file, "style.css", errdom.full_name() );
 		this.write_error_domain_content ( file, errdom );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_enum_content ( GLib.FileStream file, Enum en ) {
-		string full_name = en.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		en.write_comment ( file );
-		this.write_namespace_note ( file, en );
-		this.write_package_note ( file, en );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_enum_values ( file, en );
-		this.write_child_methods ( file, en );
-	}
-
 	public override void visit_enum ( Enum en ) {
 		string rpath = this.get_real_path ( en );
 		string path = this.get_path ( en );
@@ -1089,44 +349,12 @@
 		this.devhelp.add_chapter ( en.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, en.full_name() );
+		this.write_file_header ( file, "style.css", en.full_name() );
 		this.write_enum_content ( file, en );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_property_content ( GLib.FileStream file, Property prop ) {
-		string full_name = prop.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_property ( prop, file );
-		file.printf ( "\n</div>\n" );
-		prop.write_comment ( file );
-	}
-
-	private void write_package_note ( GLib.FileStream file, Basic element ) {
-		string package = element.package;
-		if ( package == null )
-			return ;
-
-		file.printf ( "\n\n<br />\n<b>Package:</b> %s\n\n", package );
-	}
-
-	private void write_namespace_note ( GLib.FileStream file, Basic element ) {
-		for ( ; element is Namespace == false; element = element.parent )
-			;
-
-		if ( element.parent == null )
-			return ;
-
-		if ( element.name == null )
-			return ;
-
-		file.printf ( "\n\n<br />\n<b>Namespace:</b> %s\n\n", element.full_name() );
-	}
-
 	public override void visit_property ( Property prop ) {
 		string rpath = this.get_real_path ( prop );
 		string path = this.get_path ( prop );
@@ -1135,27 +363,12 @@
 		this.devhelp.add_chapter ( prop.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, prop.full_name() );
+		this.write_file_header ( file, "style.css", prop.full_name() );
 		this.write_property_content ( file, prop );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_constant_content ( GLib.FileStream file, Constant constant, ConstantHandler parent ) {
-		string full_name = constant.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_constant ( constant, parent, file );
-		file.printf ( "\n</div>\n" );
-		constant.write_comment ( file );
-		if ( constant.parent is Namespace ) {
-			this.write_namespace_note ( file, constant );
-			this.write_package_note ( file, constant );
-		}
-	}
-
 	public override void visit_constant ( Constant constant, ConstantHandler parent ) {
 		string rpath = this.get_real_path ( constant );
 		string path = this.get_path ( constant );
@@ -1164,27 +377,12 @@
 		this.devhelp.add_chapter ( constant.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, constant.full_name() );
+		this.write_file_header ( file, "style.css", constant.full_name() );
 		this.write_constant_content ( file, constant, parent );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_field_content ( GLib.FileStream file, Field field, FieldHandler parent ) {
-		string full_name = field.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_field ( field, parent, file );
-		file.printf ( "\n</div>\n" );
-		field.write_comment ( file );
-		if ( field.parent is Namespace ) {
-			this.write_namespace_note ( file, field );
-			this.write_package_note ( file, field );
-		}
-	}
-
 	public override void visit_field ( Field field, FieldHandler parent ) {
 		string rpath = this.get_real_path ( field );
 		string path = this.get_path ( field );
@@ -1193,7 +391,7 @@
 		this.devhelp.add_chapter ( field.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, field.full_name() );
+		this.write_file_header ( file, "style.css", field.full_name() );
 		this.write_field_content ( file, field, parent );
 		this.write_file_footer ( file );
 		file = null;
@@ -1205,21 +403,6 @@
 	public override void visit_enum_value ( EnumValue enval ) {
 	}
 
-	public void write_delegate_content ( GLib.FileStream file, Delegate del ) {
-		string full_name = del.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_delegate ( del, file );
-		file.printf ( "\n</div>\n" );
-		del.write_comment ( file );
-		if ( del.parent is Namespace ) {
-			this.write_namespace_note ( file, del );
-			this.write_package_note ( file, del );
-		}
-	}
-
 	public override void visit_delegate ( Delegate del ) {
 		string rpath = this.get_real_path ( del );
 		string path = this.get_path ( del );
@@ -1228,23 +411,12 @@
 		this.devhelp.add_chapter ( del.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, del.full_name() );
+		this.write_file_header ( file, "style.css", del.full_name() );
 		this.write_delegate_content ( file, del );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_signal_content ( GLib.FileStream file, Signal sig ) {
-		string full_name = sig.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_signal ( sig, file );
-		file.printf ( "\n</div>\n" );
-		sig.write_comment ( file );
-	}
-
 	public override void visit_signal ( Signal sig ) {
 		string rpath = this.get_real_path ( sig );
 		string path = this.get_path ( sig );
@@ -1253,27 +425,12 @@
 		this.devhelp.add_chapter ( sig.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, sig.full_name() );
+		this.write_file_header ( file, "style.css", sig.full_name() );
 		write_signal_content ( file, sig );
 		this.write_file_footer ( file );
 		file = null;
 	}
 
-	public void write_method_content ( GLib.FileStream file, Method m , Valadoc.MethodHandler parent ) {
-		string full_name = m.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_method ( file, m, parent );
-		file.printf ( "\n</div>\n" );
-		m.write_comment ( file );
-		if ( m.parent is Namespace ) {
-			this.write_namespace_note ( file, m );
-			this.write_package_note ( file, m );
-		}
-	}
-
 	public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
 		string rpath = this.get_real_path ( m );
 		string path = this.get_path ( m );
@@ -1282,7 +439,7 @@
 		this.devhelp.add_chapter ( m.name, path );
 
 		GLib.FileStream file = GLib.FileStream.open ( rpath, "w");
-		this.write_file_header_template ( file, m.full_name() );
+		this.write_file_header ( file, "style.css", m.full_name() );
 		this.write_method_content ( file, m, parent );
 		this.write_file_footer ( file );
 		file = null;

Modified: trunk/src/doclets/devhelp/linkhelper/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/linkhelper/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/linkhelper/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
-	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0  --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
 	touch $@
 
 
@@ -29,6 +29,7 @@
 
 AM_CFLAGS =             \
 	-I ../../../libvaladoc/   \
+	-I ../../htmlhelpers/  \
 	$(LIBVALA_CFLAGS)   \
 	$(GLIB_CFLAGS)      \
 	$(NULL)
@@ -36,6 +37,7 @@
 
 libhtmlhelper_la_LIBADD = \
 	../../../libvaladoc/libvaladoc.la \
+	../../htmlhelpers/libhtmlhelpers.la \
 	$(LIBVALA_LIBS)                \
 	$(GLIB_LIBS)                   \
 	$(NULL)

Modified: trunk/src/doclets/devhelp/linkhelper/helper.vala
==============================================================================
--- trunk/src/doclets/devhelp/linkhelper/helper.vala	(original)
+++ trunk/src/doclets/devhelp/linkhelper/helper.vala	Tue Nov  4 22:35:00 2008
@@ -17,118 +17,27 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-using GLib;
-
-
 
-/* css-class-names: */
-public const string css_inline_navigation = "main_inline_navigation";
-public const string css_inline_navigation_property = "main_inline_navigation_property";
-public const string css_inline_navigation_method = "main_inline_navigation_method";
-public const string css_inline_navigation_signal = "main_inline_navigation_signal";
-public const string css_inline_navigation_fields = "main_inline_navigation_fields";
-public const string css_inline_navigation_class = "main_inline_navigation_class";
-public const string css_inline_navigation_enum = "main_inline_navigation_enum";
-public const string css_inline_navigation_struct = "main_inline_navigation_struct";
-public const string css_inline_navigation_delegate = "main_inline_navigation_delegate";
-public const string css_inline_navigation_constant = "main_inline_navigation_constant";
-
-public const string css_navi_package_index = "navi_package_index";
-public const string css_navi_package = "navi_package";
-public const string css_navi_construction_method = "navi_construction_method";
-public const string css_navi_error_domain = "navi_error_domain";
-public const string css_navi_namespace = "navi_namespace";
-public const string css_navi_method = "navi_method";
-public const string css_navi_struct = "navi_struct";
-public const string css_navi_iface = "navi_iface";
-public const string css_navi_field = "navi_field";
-public const string css_navi_class = "navi_class";
-public const string css_navi_enum = "navi_enum";
-public const string css_navi_link = "navi_link";
-public const string css_navi_constant = "navi_constant";
-public const string css_navi_prop = "navi_prop";
-public const string css_navi_del = "navi_del";
-public const string css_navi_sig = "navi_sig";
-public const string css_navi = "navi_main";
-public const string css_navi_enval = "main_navi_enval";
-public const string css_navi_errdomcode = "main_navi_errdomcode";
-public const string css_navi_hr = "navi_hr";
-
-public const string css_errordomain_table_name = "main_errordomain_table_name";
-public const string css_errordomain_table_text = "main_errordomain_table_text";
-public const string css_errordomain_table = "main_errordomain_table";
-
-
-public const string css_enum_table_name = "main_enum_table_name";
-public const string css_enum_table_text = "main_enum_table_text";
-public const string css_enum_table = "main_enum_table";
-
-public const string css_diagram = "main_diagram";
-public const string css_see_list = "main_see_list";
-public const string css_exception_table = "main_parameter_table";
-public const string css_parameter_table_text = "main_parameter_table_text";
-public const string css_parameter_table_name = "main_parameter_table_name";
-public const string css_parameter_table = "main_parameter_table";
-public const string css_title = "main_title";
-public const string css_other_type = "main_other_type";
-public const string css_basic_type  = "main_basic_type";
-public const string css_keyword  = "main_keyword";
-public const string css_optional_parameter  = "main_optional_parameter";
-public const string css_code_definition = "main_code_definition";
-public const string css_headline_hr = "main_hr";
-public const string css_hr = "main_hr";
-public const string css_list_errdom = "main_list_errdom";
-public const string css_list_en = "main_list_en";
-public const string css_list_ns = "main_list_ns";
-public const string css_list_cl = "main_list_cl";
-public const string css_list_iface = "main_list_iface";
-public const string css_list_stru = "main_list_stru";
-public const string css_list_field = "main_list_field";
-public const string css_list_prop = "main_list_prop";
-public const string css_list_del = "main_list_del";
-public const string css_list_sig = "main_list_sig";
-public const string css_list_m = "main_list_m";
-
-
-
-public interface Valadoc.LinkHelper : Object {
-	private static string package_name = null;
-
-	public abstract Settings settings {
-		construct set;
-		get;
-	}
+using Valadoc;
+using GLib;
 
-	private string get_dirname ( string file_name ) {
-		if ( file_name[file_name.len()-1] == '/' )
-			return GLib.Path.get_dirname ( file_name );
-		else
-			return GLib.Path.get_basename ( file_name );
-	}
 
-	protected string get_package_name ( string file_path ) {
-		if ( file_path.has_suffix (".vapi") ) {
-			string file_name = GLib.Path.get_basename (file_path);
-			return file_name.ndup ( file_name.size() - ".vapi".size() );
+public interface Valadoc.HtmlHelper {
+	protected string? get_html_link ( Settings settings, Basic element, Basic pos ) {
+		string tmp = "";
+		string prefix = "";
+	
+		if ( element != pos ) {
+			prefix =  "../" + element.file.name;
 		}
 
-		return this.settings.pkg_name;
-	}
-
-	public string get_file_name ( Valadoc.Basic tag ) {
-		Valadoc.Basic pos = tag;
 
-		while ( pos != null ) {
-			if ( pos is Valadoc.Package )
-				return pos.name;
-
-			pos = pos.parent;
+		if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
+			tmp = "#" + element.name;
+			element = element.parent;
 		}
-		return null;
-	}
 
-	protected string? get_link ( Valadoc.Basic tag ) {
-		return "../" + this.get_package_name ( tag.file.name ) + "/" + tag.full_name () + ".html";
+		return prefix + "/" + element.full_name () + ".html" + tmp;
 	}
 }
 

Modified: trunk/src/doclets/devhelp/taglets/author/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/author/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/author/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletversion_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/link/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/link/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/link/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletlink.vala.stamp: $(libtagletlink_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletlink_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/devhelp/taglets/link/taglet.vala	(original)
+++ trunk/src/doclets/devhelp/taglets/link/taglet.vala	Tue Nov  4 22:35:00 2008
@@ -24,7 +24,7 @@
 
 
 
-public class LinkHtmlTaglet : InlineTaglet, LinkHelper {
+public class LinkHtmlTaglet : InlineTaglet, HtmlHelper {
 	private string content;
 	private string path;
 
@@ -45,7 +45,8 @@
 		}
 
 		this.settings = settings;
-		this.path = this.get_link ( element );
+		this.path = this.get_html_link ( this.settings, element, me );
+
 		this.content = str;
 		return true;
 	}

Modified: trunk/src/doclets/devhelp/taglets/parameter/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/parameter/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/parameter/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletparameter_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/return/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/return/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/return/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletXXXX_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/see/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/see/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/see/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletsee_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/devhelp/taglets/see/taglet.vala	(original)
+++ trunk/src/doclets/devhelp/taglets/see/taglet.vala	Tue Nov  4 22:35:00 2008
@@ -23,7 +23,7 @@
 using Gee;
 
 
-public class SeeHtmlTaglet : MainTaglet, LinkHelper {
+public class SeeHtmlTaglet : MainTaglet, HtmlHelper {
 	private string name;
 	private string path;
 
@@ -76,8 +76,10 @@
 		}
 
 		this.settings = settings;
-		this.path = this.get_link ( element );
-		this.name = str;
+
+
+		this.path = this.get_html_link ( this.settings, element, me );
+		this.name = element.full_name();
 		return true;
 	}
 

Modified: trunk/src/doclets/devhelp/taglets/string/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/string/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/string/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletstring.vala.stamp: $(libtagletstring_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletstring_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/throws/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/throws/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/throws/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libexceptionparameter_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/devhelp/taglets/version/Makefile.am
==============================================================================
--- trunk/src/doclets/devhelp/taglets/version/Makefile.am	(original)
+++ trunk/src/doclets/devhelp/taglets/version/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletversion_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/deps/main.css
==============================================================================
--- trunk/src/doclets/html/deps/main.css	(original)
+++ trunk/src/doclets/html/deps/main.css	Tue Nov  4 22:35:00 2008
@@ -191,7 +191,7 @@
 .navi_method, .main_inline_navigation_method {
 	list-style-image: url(method.png)
 }
-.navi_struct, .main_list_stru {
+.navi_struct, .main_list_stru, .main_inline_navigation_struct {
 	list-style-image: url(struct.png)
 }
 .navi_iface, .main_list_iface {

Modified: trunk/src/doclets/html/doclet/Makefile.am
==============================================================================
--- trunk/src/doclets/html/doclet/Makefile.am	(original)
+++ trunk/src/doclets/html/doclet/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libdoclet.vala.stamp: $(libdoclet_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libhtmlhelper-1.0 --basedir . --vapidir . --pkg docletconfig --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libhtmlhelper-1.0 --basedir . --vapidir . --pkg docletconfig --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -33,6 +33,7 @@
 AM_CFLAGS =  -g               \
 	-DPACKAGE_PLUGINDIR=\"$(libdir)/valadoc/plugins/template/\" \
 	-I ../../../libvaladoc/   \
+	-I ../../htmlhelpers/     \
 	-I ../linkhelper/         \
 	-I ../                    \
 	$(GLIB_CFLAGS)            \
@@ -43,11 +44,12 @@
 libdoclet_la_LDFLAGS = -module -avoid-version
 
 
-libdoclet_la_LIBADD =                 \
-	../../../libvaladoc/libvaladoc.la \
-	../linkhelper/libhtmlhelper.la    \
-	$(GLIB_LIBS)                      \
-	$(LIBVALA_LIBS)                   \
+libdoclet_la_LIBADD =                   \
+	../../htmlhelpers/libhtmlhelpers.la \
+	../../../libvaladoc/libvaladoc.la   \
+	../linkhelper/libhtmlhelper.la      \
+	$(GLIB_LIBS)                        \
+	$(LIBVALA_LIBS)                     \
 	$(NULL)
 
 

Modified: trunk/src/doclets/html/doclet/template.vala
==============================================================================
--- trunk/src/doclets/html/doclet/template.vala	(original)
+++ trunk/src/doclets/html/doclet/template.vala	Tue Nov  4 22:35:00 2008
@@ -25,475 +25,13 @@
 
 
 
-
-
-public class Valadoc.LangletIndex : Valadoc.Langlet, Valadoc.LinkHelper {
-	public Valadoc.Settings settings {
-		construct set;
-		protected get;
+public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.LinkHelper {
+	protected override string get_link ( Basic element, Basic pos ) {
+		return this.get_html_link ( this.settings, element, pos );
 	}
 
 	public LangletIndex ( Settings settings ) {
-		this.settings = settings;
-	}
-
-	private Basic position = null;
-
-	private inline bool is_basic_type ( string name ) {
-		string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
-				"long", "ulong", "size_t", "ssize_t", "int8", "uint8", "int16", "uint16", "int32",
-				"uint32", "int64", "uint64", "float", "double", "time_t", "unichar", "string"
-			};
-
-		foreach ( string str in basic_types ) {
-			if ( str == name )
-				return true;
-		}
-
-		return false;
-	}
-
-	private void write_type_name ( DataType? datatype, GLib.FileStream file ) {
-		if ( datatype == null ) {
-			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
-			return ;
-		}
-
-		string typename = datatype.full_name ();
-		if ( datatype.parent.name == null && (datatype is Class || datatype is Struct) ) {
-			if ( this.is_basic_type ( typename ) ) {
-				string link = this.get_link(datatype, this.position );
-				if ( link == null )
-					file.printf ( "<span class=\"%s\">%s</span>", css_basic_type, typename );
-				else
-					file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_basic_type, link, typename );
-				return ;
-			}
-		}
-
-		string link = this.get_link(datatype, this.position);
-		if ( link == null )
-		file.printf ( "<span class=\"%s\">%s</span>", css_other_type, typename );
-		else
-			file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_other_type, link, typename );
-	}
-
-	private void write_type_reference_name ( TypeReference type_reference, GLib.FileStream file ) {
-		if ( type_reference.type_name == "void" ) {
-			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
-		}
-		else {
-			if ( type_reference.data_type == null  ) {
-				file.printf ( "<font class=\"%s\">%s</font>", css_other_type, type_reference.type_name );
-			}
-			else {
-				this.write_type_name ( type_reference.data_type, file );
-			}
-		}
-	}
-
-	private void write_type_reference_template_arguments ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
-		Gee.Collection<TypeReference> arglst = type_reference.get_type_arguments ( );
-		int size = arglst.size;
-		if ( size == 0 )
-			return ;
-
-		file.puts ( "<" );
-		int i = 0;
-
-		foreach ( TypeReference arg in arglst ) {
-			i++;
-
-			this.write_nested_type_referene ( arg, file );
-			if ( i != size )
-				file.puts ( ", " );
-		}
-
-		file.puts ( ">" );
-	}
-
-	private void write_nested_type_referene ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
-		if ( type_reference.type_name == null )
-			return ;
-
-		if ( type_reference.is_weak )
-			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
-
-		this.write_type_reference_name ( type_reference, file );
-		this.write_type_reference_template_arguments ( type_reference, file );
-
-		if ( type_reference.is_array ) {
-			string str = string.nfill ( type_reference.array_rank-1, ',');
-			file.printf ( "[%s]", str );
-		}
-
-		if ( type_reference.pass_ownership ) {
-			file.putc ( '#' );
-		}
-
-		if ( type_reference.is_nullable ) {
-			file.putc ( '?' );
-		}
-
-		string str = string.nfill ( type_reference.pointer_rank, '*' );
-		file.puts ( str );
-
-	}
-
-	public override void write_type_reference ( Valadoc.TypeReference type_reference, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		if ( type_reference == null )
-			return ;
-
-		this.write_nested_type_referene ( type_reference, file );
-		file.putc ( ' ' );
-
-		/*
-		if ( type_reference.is_weak ) {
-			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
-		}
-
-		this.write_type_name ( type_reference.data_type, file );
-
-		if ( type_reference.is_array ) {
-			string str = string.nfill ( type_reference.array_rank-1, ',');
-			file.printf ( "[%s]", str );
-		}
-
-		if ( type_reference.pass_ownership ) {
-			file.putc ( '#' );
-		}
-
-		if ( type_reference.is_nullable ) {
-			file.putc ( '?' );
-		}
-
-		string str = string.nfill ( type_reference.pointer_rank, '*' );
-		file.puts ( str );
-		*/
-	}
-
-	private void write_formal_parameter ( FormalParameter param, GLib.FileStream file ) {
-		if ( param.ellipsis ) {
-			file.puts ( " ..." );
-		}
-		else {
-			if ( param.is_out )
-				file.printf ( "<span class=\"%s\">out</span> ", css_keyword );
-			else if ( param.is_ref )
-				file.printf ( "<span class=\"%s\">ref</span> ", css_keyword );
-
-			this.write_type_reference ( param.type_reference, file );
-			file.printf ( " %s", param.name );
-		}
-	}
-
-	public override void write_parameter_list ( ParameterListHandler thandler, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		bool open_bracket = false;
-
-		Gee.ArrayList<FormalParameter> params = thandler.param_list;
-		int size = params.size;
-		int i = 0;
-
-		file.putc ( '(' );
-
-		foreach ( FormalParameter param in params ) {
-			i++;
-
-			if ( param.default_value != null && open_bracket == false ) {
-				file.printf ( "<span class=\"%s\">[", css_optional_parameter );
-				open_bracket = true;
-			}
-
-			this.write_formal_parameter ( param, file );
-			if ( i != size ) {
-				file.puts ( ", " );
-			}
-			else if ( open_bracket == true ) {
-				file.puts ( "]</span>" );
-			}
-		}
-
-		file.putc ( ')' );
-	}
-
-	private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) {
-		Gee.ReadOnlyCollection<TypeReference> error_domains = exception_handler.get_error_domains ();
-		int size = error_domains.size;
-		int i = 1;
-
-		if ( size == 0 )
-			return ;
-
-		file.printf ( " <span class=\"%s\">throws</span> ", css_keyword );
-
-		foreach ( TypeReference type_reference in error_domains ) {
-			if ( type_reference == null ) {
-				file.printf ( "<span class=\"%s\">GLib.Error</span>", css_other_type );
-			}
-			else {
-				this.write_type_reference ( type_reference, file );
-			}
-
-			if ( error_domains.size > i ) {
-				file.puts ( ", " );
-			}
-			i++;
-		}
-	}
-
-	public override void write_method ( void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent ) {
-		this.position = m;
-
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( m, file );
-
-		if ( m.is_abstract )
-			modifiers.append ( " abstract" );
-		if ( m.is_virtual )
-			modifiers.append ( " virtual" );
-		if ( m.is_override )
-			modifiers.append ( " override" );
-		if ( m.is_static )
-			modifiers.append ( " static" );
-		if ( m.is_inline )
-			modifiers.append ( " inline" );
-
-		file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
-		this.write_type_reference ( m.return_type, file );
-		file.puts ( m.name );
-		file.puts ( " " );
-		this.write_parameter_list ( m, file );
-		this.write_exception_list ( m, file );
-	}
-
-	public override void write_type_parameter ( TypeParameter param, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		file.puts ( param.datatype_name );
-	}
-
-	public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		int i = 1;
-
-		var lst = thandler.get_template_param_list( );
-		if ( lst.size == 0 )
-			return ;
-
-		file.puts ( "&lt;" ); // <
-
-		foreach ( TypeParameter param in lst ) {
-			param.write ( this, file );
-			if ( lst.size > i )
-				file.puts ( ", " );
-
-			i++;
-		}
-		file.puts ( "&gt;" ); // >
-	}
-
-	public override void write_field ( Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr ) {
-		this.position = field;
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( field, file );
-
-		if ( field.is_volatile )
-			file.printf ( " <span class=\"%s\">volatile</span>", css_keyword );
-
-		this.write_type_reference ( field.type_reference, file );
-
-		file.printf ( " %s", field.name );
-	}
-
-	public override void write_constant ( Constant constant, ConstantHandler parent, void* ptr ) {
-		this.position = constant;
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( constant, file );
-		file.printf ( " <span class=\"%s\"> const </span>", css_keyword );
-		this.write_type_reference ( constant.type_reference, file );
-		file.printf ( " %s", constant.name );
-	}
-
-	public override void write_property_accessor ( Valadoc.PropertyAccessor propac, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		Property prop = (Property)propac.parent;
-
-		if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
-			// FIXME: PropertyAccessor isn't a SymbolAccessibility. (Valac-Bug.)
-			if ( propac.is_public )
-				file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
-			else if ( propac.is_protected )
-				file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
-			else if ( propac.is_private )
-				file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
-		}
-
-
-		if ( propac.is_get ) {
-			file.printf ( "<span class=\"%s\"> get</span>;", css_keyword );
-		}
-		else if ( propac.is_set ) {
-			if ( propac.is_construct ) {
-				file.printf ( "<span class=\"%s\"> construct</span> ", css_keyword );
-			}
-
-			file.printf ( "<span class=\"%s\"> set</span>;", css_keyword );
-		}
-	}
-
-	public override void write_property ( Valadoc.Property prop, void* ptr ) {
-		this.position = prop;
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( prop, file );
-
-		if ( prop.is_virtual )
-			modifiers.append ( " virtual " );
-		if ( prop.is_abstract )
-			modifiers.append ( " abstract " );
-		if ( prop.is_override )
-			modifiers.append ( " override " );
-
-
-		this.write_type_reference ( prop.return_type, file );
-		file.printf ( " <span class=\"%s\">%s</span>%s { ", css_keyword, modifiers.str, prop.name );
-
-		if ( prop.setter != null )
-			this.write_property_accessor ( prop.setter, file );
-
-
-		file.printf ( " " );
-
-		if ( prop.getter != null )
-			this.write_property_accessor ( prop.getter, file );
-
-		file.printf ( " }" );
-	}
-
-	public override void write_signal ( Valadoc.Signal sig, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = sig;
-
-		this.write_accessor ( sig, file );
-
-		file.printf ( " <span class=\"%s\">signal</span> ", css_keyword );
-		this.write_type_reference ( sig.return_type, file );
-		file.printf ( " %s ", sig.name );
-		this.write_parameter_list ( sig, file );
-	}
-
-	public override void write_enum_value ( Valadoc.EnumValue enval, void* ptr ) {
-	}
-
-	public override void write_error_code ( Valadoc.ErrorCode errcode, void* ptr ) {
-	}
-
-	public override void write_delegate ( Valadoc.Delegate del, void* ptr ) {
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = del;
-
-		this.write_accessor ( del, file );
-
-		file.printf ( " <span class=\"%s\">delegate</span> ", css_keyword );
-		this.write_type_reference ( del.return_type, file );
-		file.printf ( " %s ", del.name );
-		this.write_parameter_list ( del, file );
-		this.write_exception_list ( del, file );
-	}
-
-	public override void write_enum ( Valadoc.Enum en, void* ptr ) {
-	}
-
-	public override void write_error_domain ( Valadoc.ErrorDomain errdom, void* ptr ) {
-	}
-
-	private void write_accessor ( Valadoc.SymbolAccessibility element, GLib.FileStream file ) {
-		if ( element.is_public )
-			file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
-		else if ( element.is_protected )
-			file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
-		else if ( element.is_private )
-			file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
-	}
-
-
-	public override void write_struct ( Valadoc.Struct stru, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = stru;
-
-		this.write_accessor ( stru, file );
-		file.printf ( "<span class=\"%s\">struct</span> %s", css_keyword, stru.name );
-		this.write_template_parameters ( stru, ptr );
-		this.write_inheritance_list ( stru, file );
-	}
-
-	private void write_inheritance_list ( Valadoc.ContainerDataType dtype, GLib.FileStream file ) {
-		Gee.Collection<DataType> lst = dtype.get_parent_types ( );
-		int size = lst.size;
-		int i = 1;
-
-		if ( size == 0 )
-			return ;
-
-		file.puts ( " : " );
-
-		foreach ( DataType cntype in lst ) {
-			this.write_type_name ( cntype, file );
-			if ( size > i )
-				file.puts ( ", " );
-
-			i++;
-		}
-
-		file.putc ( ' ' );
-	}
-
-	public override void write_class ( Valadoc.Class cl, void* ptr ) {
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = cl;
-
-		this.write_accessor ( cl, file );
-
-		if ( cl.is_abstract )
-			modifiers.append ( "abstract " );
-		else if ( cl.is_static )
-			modifiers.append ( "static " );
-
-		file.printf ( "<span class=\"%s\">%s class</span> %s", css_keyword, modifiers.str, cl.name );
-
-		this.write_template_parameters ( cl, file );
-		this.write_inheritance_list ( cl, file );
-	}
-
-	public override void write_interface ( Valadoc.Interface iface, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = iface;
-
-		this.write_accessor ( iface, file );
-
-		if ( iface.is_static  )
-			file.printf ( "<span class=\"%s\">static interface</span> %s", css_keyword, iface.name );
-		else
-			file.printf ( "<span class=\"%s\">interface</span> %s", css_keyword, iface.name );
-
-		this.write_template_parameters ( iface, ptr );
-		this.write_inheritance_list ( iface, file );
-	}
-
-	public override void write_namespace ( Valadoc.Namespace ns, void* ptr ) {
-	}
-
-	public override void write_file ( Valadoc.Package file, void* ptr ) {
+		base ( settings );
 	}
 }
 
@@ -502,529 +40,32 @@
 
 
 
-public class Valadoc.HtmlDoclet : Valadoc.Doclet, Valadoc.LinkHelper {
-	private Valadoc.LangletIndex langlet;
-
+public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 	private string current_path = null;
 	private string package_name = null;
 	private bool is_vapi = false;
 
 	private int directory_level = 1;
 
-	private void write_navi_entry_html_template ( GLib.FileStream file, string style, string content ) {
-		file.printf ( "\t<li class=\"%s\">%s</li>\n", style, content );
-	}
-
-	private void write_navi_entry_html_template_with_link ( GLib.FileStream file, string style, string link, string content ) {
-		file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", style, css_navi_link, link, content );
-	}
-
-	private void write_navi_entry ( GLib.FileStream file, Basic element, Basic pos, string style, bool link, bool full_name = false ) {
-		string name;
-
-		if ( element is Class ) {
-			if ( ((Class)element).is_abstract )
-				name = "<i>" + element.name +"</i>";
-			else
-				name = element.name;
-		}
-		else if ( element is Package ) {
-			string path = this.get_file_name ( element );
-			name = this.get_package_name ( path );
-		}
-		else if ( full_name == true && element is Namespace ) {
-			string tmp = ((Namespace)element).full_name ();
-			name = (element.name == null)? "Global Namespace" : tmp;
-		}
-		else {
-			string tmp = element.name;
-			name = (tmp == null)? "Global Namespace" : tmp;
-		}
-
-		if ( link == true )
-			this.write_navi_entry_html_template_with_link ( file, style, this.get_link (element, pos), name );
-		else
-			this.write_navi_entry_html_template ( file, style, name );
-	}
-
-	private void write_navi_top_entry ( GLib.FileStream file, Basic element, Basic mself ) {
-		string name = (element.name == null)? "Global Namespace" : element.name;
-		string style = null;
-
-		if ( element is Namespace )
-			style = css_navi_namespace;
-		else if ( element is Enum )
-			style = css_navi_enum;
-		else if ( element is ErrorDomain )
-			style = css_navi_error_domain;
-		else if ( element is Struct )
-			style = css_navi_struct;
-		else if ( element is Class )
-			style = css_navi_class;
-		else if ( element is Interface )
-			style = css_navi_iface;
-		else if ( element is Package ) {
-			name = this.get_package_name ( element.name );
-			style = css_navi_package;
+ 	private string get_css_link ( ) {
+		GLib.StringBuilder css_path = new GLib.StringBuilder ( );
+		for ( int i = 0; this.directory_level > i; i++ ) {
+			css_path.append ( "../" );
 		}
-
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		if ( element == mself )
-			this.write_navi_entry ( file, element, mself, style, false );
-		else
-			this.write_navi_entry ( file, element, mself, style, true );
-
-		file.puts ( "</ul>\n" );
-		file.printf ( "\n<hr class=\"%s\">\n", css_navi_hr );
+		css_path.append ( "main.css" );
+		return css_path.str;
 	}
 
-
-	private void write_top_element_template ( GLib.FileStream file, string link ) {
-		file.printf ( "<ul class=\"%s\">\n\t\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">Packages</a></li>\n</ul>\n<hr class=\"%s\">\n", css_navi, css_navi_package_index, css_navi_link, link, css_navi_hr );
+	protected override string get_link ( Valadoc.Basic element, Valadoc.Basic pos ) {
+		return this.get_html_link ( this.settings, element, pos );
 	}
 
-	private void write_top_element ( GLib.FileStream file, Basic pos ) {
-		string top = this.get_top_link ( pos );
+	protected override void write_top_element ( GLib.FileStream file, Basic pos ) {
+		string top = get_html_top_link ( pos );
 		this.write_top_element_template ( file, top+"index.html" );
 	}
 
-	private void write_top_elements ( GLib.FileStream file, Basic element, Basic? mself ) {
-		Gee.ArrayList<Basic> lst = new Gee.ArrayList<Basic> ();
-		Basic pos = element;
-
-		if ( mself == null )
-			mself = element;
-
-		string file_name = this.get_file_name ( element );
-		string package_name = this.get_package_name ( file_name );
-
-		this.write_top_element ( file, mself );
-
-		while ( pos != null ) {
-			lst.add ( pos );
-			pos = pos.parent;
-		}
-
-		for ( int i = lst.size-1; i >= 0  ; i-- ) {
-			Basic el = lst.get ( i );
-			this.write_navi_top_entry ( file, el, mself );
-		}
-	}
-
-
-	private void fetch_subnamespace_names ( NamespaceHandler pos, Gee.ArrayList<Namespace> lst ) {
-		Gee.ReadOnlyCollection<Namespace> nspaces = pos.get_namespace_list ();
-
-		foreach ( Namespace ns in nspaces ) {
-			lst.add ( ns );
-			this.fetch_subnamespace_names ( ns, lst );
-		}
-	}
-
-	private void write_navi_file ( GLib.FileStream file, Package efile ) {
-		Gee.ArrayList<Namespace> ns_list = new Gee.ArrayList<Namespace> ();
-		this.fetch_subnamespace_names (efile, ns_list );
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_element_template ( file, "../index.html" );
-		file.printf ( "\t\t\t\t<ul class=\"%s\">\n", css_navi );
-
-		foreach ( Namespace ns in ns_list ) {
-			this.write_navi_entry ( file, ns, efile, css_navi_namespace, true, true );
-		}
-
-		file.puts ( "\t\t\t\t</ul>\n" );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_namespace ( GLib.FileStream file, Namespace ns ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, ns, ns );
-		this.write_navi_child_namespaces_inline ( file, ns, ns );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_child_namespaces_inline ( GLib.FileStream file, Namespace ns, Basic mself ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_namespaces_without_childs ( file, ns, mself );
-		this.write_navi_child_classes_without_childs ( file, ns, mself );
-		this.write_navi_child_interfaces_without_childs ( file, ns, mself );
-		this.write_navi_child_structs_without_childs ( file, ns, mself );
-		this.write_navi_child_enums_without_childs ( file, ns, mself );
-		this.write_navi_child_error_domains_without_childs ( file, ns, mself );
-		this.write_navi_child_delegates ( file, ns, mself );
-		this.write_navi_child_methods ( file, ns, mself );
-		this.write_navi_child_fields ( file, ns, mself );
-		this.write_navi_child_constants ( file, ns, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_child_namespaces ( GLib.FileStream file, Namespace ns, Basic mself ) {
-		this.write_top_elements ( file, ns, mself );
-		this.write_navi_child_namespaces_inline ( file, ns, mself );
-	}
-
-	private void write_navi_struct_inline ( GLib.FileStream file, Struct stru, Basic mself ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_construction_methods ( file, stru, mself );
-		this.write_navi_child_methods ( file, stru, mself );
-		this.write_navi_child_fields ( file, stru, mself );
-		this.write_navi_child_constants ( file, stru, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_struct ( GLib.FileStream file, Struct stru, Basic mself ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, stru, mself );
-		this.write_navi_struct_inline ( file, stru, mself );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_interface_inline ( GLib.FileStream file, Interface iface, Basic mself ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_delegates ( file, iface, mself );
-		this.write_navi_child_methods ( file, iface, mself );
-		this.write_navi_child_signals ( file, iface, mself );
-		this.write_navi_child_properties ( file, iface, mself );
-		this.write_navi_child_fields ( file, iface, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_interface ( GLib.FileStream file, Interface iface, Basic mself ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, iface, mself );
-		this.write_navi_interface_inline ( file, iface, mself );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_enum_inline ( GLib.FileStream file, Enum en, Basic mself ) {
-		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ( );
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		foreach ( EnumValue env in enum_values ) {
-			this.write_navi_entry ( file, env, mself, css_navi_enval, true );
-		}
-
-		this.write_navi_child_methods ( file, en, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_enum ( GLib.FileStream file, Enum en, Basic mself ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, en, mself );
-		this.write_navi_enum_inline ( file, en, mself );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_error_domain_inline ( GLib.FileStream file, ErrorDomain errdom, Basic mself ) {
-		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ( );
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		foreach ( ErrorCode ec in error_codes ) {
-			this.write_navi_entry ( file, ec, mself, css_navi_errdomcode, true );
-		}
-
-		this.write_navi_child_methods ( file, errdom, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_error_domain ( GLib.FileStream file, ErrorDomain errdom, Basic mself ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, errdom, mself );
-		this.write_navi_error_domain_inline ( file, errdom, mself );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_class_inline ( GLib.FileStream file, Class cl, Basic mself ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_construction_methods ( file, cl, mself );
-		this.write_navi_child_classes_without_childs ( file, cl, mself );
-		this.write_navi_child_structs_without_childs ( file, cl, mself );
-		this.write_navi_child_enums_without_childs ( file, cl, mself );
-		this.write_navi_child_delegates ( file, cl, mself );
-		this.write_navi_child_methods ( file, cl, mself );
-		this.write_navi_child_signals ( file, cl, mself );
-		this.write_navi_child_properties ( file, cl, mself );
-		this.write_navi_child_fields ( file, cl, mself );
-		this.write_navi_child_constants ( file, cl, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_class ( GLib.FileStream file, Class cl, Basic mself ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, cl, mself );
-		this.write_navi_class_inline ( file, cl, mself );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_method ( GLib.FileStream file, Method m ) {
-		Basic parent = m.parent;
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-
-		this.write_top_elements ( file, parent, m );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, m );
-		else if ( m.parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, m );
-		else if ( m.parent is Struct )
-			this.write_navi_struct_inline ( file, (Struct)parent, m );
-		else if ( m.parent is Enum )
-			this.write_navi_enum_inline ( file, (Enum)parent, m );
-		else if ( m.parent is ErrorDomain )
-			this.write_navi_error_domain_inline ( file, (ErrorDomain)parent, m );
-		else if ( m.parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, m );
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_property ( GLib.FileStream file, Property prop ) {
-		Basic parent = prop.parent;
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, prop.parent, prop );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, prop );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, prop );
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_signal ( GLib.FileStream file, Signal sig ) {
-		Basic parent = sig.parent;
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-
-		this.write_top_elements ( file, sig.parent, sig );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, sig );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, sig );
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_constant ( GLib.FileStream file, Constant c ) {
-		Basic parent = c.parent;
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, parent, c );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, c );
-		else  if ( parent is Struct )
-			this.write_navi_struct_inline ( file, (Struct)parent, c );
-		else  if ( parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, c );
-		//else if ( parent is Interface )
-		//	this.write_navi_interface_inline ( file, (Interface)parent, c );
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_field ( GLib.FileStream file, Field f ) {
-		Basic parent = f.parent;
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, parent, f );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, f );
-		else if ( parent is Struct )
-			this.write_navi_struct_inline ( file, (Struct)parent, f );
-		else if ( parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, f );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, f );
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_navi_delegate ( GLib.FileStream file, Delegate del ) {
-		Basic parent = del.parent;
-
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
-		this.write_top_elements ( file, parent, del );
-
-		if ( parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, del );
-		else if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, del );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, del );
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-
-	private void write_navi_child_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, Basic mself ) {
-		foreach ( Method m in methods ) {
-			if ( m == mself )
-				this.write_navi_entry ( file, m, mself, css_navi_construction_method, false );
-			else
-				this.write_navi_entry ( file, m, mself, css_navi_construction_method, true );
-		}
-	}
-
-	private void write_navi_child_methods ( GLib.FileStream file, MethodHandler mh, Basic mself ) {
-		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ( );
-		this.write_navi_child_methods_collection ( file, methods, mself );
-	}
-
-	private void write_navi_child_classes_without_childs_collection ( GLib.FileStream file, Gee.Collection<Class> classes, Basic mself ) {
-		foreach ( Class cl in classes ) {
-			if ( cl == mself )
-				this.write_navi_entry ( file, cl, mself, css_navi_class, false );
-			else
-				this.write_navi_entry ( file, cl, mself, css_navi_class, true );
-		}
-	}
-
-	private void write_navi_child_classes_without_childs ( GLib.FileStream file, ClassHandler clh, Basic mself ) {
-		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ( );
-		this.write_navi_child_classes_without_childs_collection ( file, classes, mself );
-	}
-
-	private void write_navi_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, Basic mself ) {
-		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ( );
-		this.write_navi_child_methods_collection ( file, methods, mself );
-	}
-
-	private void write_navi_child_signals ( GLib.FileStream file, SignalHandler sh, Basic mself ) {
-		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ( );
-
-		foreach ( Signal sig in signals ) {
-			if ( sig == mself )
-				this.write_navi_entry ( file, sig, mself, css_navi_sig, false );
-			else
-				this.write_navi_entry ( file, sig, mself, css_navi_sig, true );
-		}
-	}
-
-	private void write_navi_child_properties ( GLib.FileStream file, PropertyHandler ph, Basic mself ) {
-		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ( );
-
-		foreach ( Property p in properties ) {
-			if ( p == mself )
-				this.write_navi_entry ( file, p, mself, css_navi_prop, false );
-			else
-				this.write_navi_entry ( file, p, mself, css_navi_prop, true );
-		}
-	}
-
-	private void write_navi_child_fields_collection ( GLib.FileStream file, Gee.Collection<Field> fields, Basic mself ) {
-		foreach ( Field f in fields ) {
-			if ( f == mself )
-				this.write_navi_entry ( file, f, mself, css_navi_field, false );
-			else
-				this.write_navi_entry ( file, f, mself, css_navi_field, true );
-		}
-	}
-
-	private void write_navi_child_fields ( GLib.FileStream file, FieldHandler fh, Basic mself ) {
-		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ( );
-		this.write_navi_child_fields_collection ( file, fields, mself );
-	}
-
-	private void write_navi_child_constants_collection ( GLib.FileStream file, Gee.Collection<Constant> constants, Basic mself ) {
-		foreach ( Constant c in constants ) {
-			if ( c == mself )
-				this.write_navi_entry ( file, c, mself, css_navi_constant, false );
-			else
-				this.write_navi_entry ( file, c, mself, css_navi_constant, true );
-		}
-	}
-
-	private void write_navi_child_constants ( GLib.FileStream file, ConstantHandler ch, Basic mself ) {
-		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ( );
-		this.write_navi_child_constants_collection ( file, constants, mself );
-	}
-
-	private void write_navi_child_structs_without_childs_collection ( GLib.FileStream file, Gee.Collection<Struct> structs, Basic mself ) {
-		foreach ( Struct stru in structs ) {
-			if ( stru == mself )
-				this.write_navi_entry ( file, stru, mself, css_navi_struct, false );
-			else
-				this.write_navi_entry ( file, stru, mself, css_navi_struct, true );
-		}
-	}
-
-	private void write_navi_child_structs_without_childs ( GLib.FileStream file, StructHandler strh, Basic mself ) {
-		Gee.Collection<Struct> structs = strh.get_struct_list ( );
-		this.write_navi_child_structs_without_childs_collection ( file, structs, mself );
-	}
-
-	private void write_navi_child_delegates_collection ( GLib.FileStream file, Gee.Collection<Delegate> delegates, Basic mself ) {
-		foreach ( Delegate del in delegates ) {
-			if ( del == mself )
-				this.write_navi_entry ( file, del, mself, css_navi_del, false );
-			else
-				this.write_navi_entry ( file, del, mself, css_navi_del, true );
-		}
-	}
-
-	private void write_navi_child_delegates ( GLib.FileStream file, DelegateHandler delh, Basic mself ) {
-		Gee.Collection<Delegate> delegates = delh.get_delegate_list ( );
-		this.write_navi_child_delegates_collection ( file, delegates, mself );
-	}
-
-	private void write_navi_child_interfaces_without_childs_collection ( GLib.FileStream file, Gee.Collection<Interface> interfaces, Basic mself ) {
-		foreach ( Interface iface in interfaces ) {
-			if ( iface == mself )
-				this.write_navi_entry ( file, iface, mself, css_navi_iface, false );
-			else
-				this.write_navi_entry ( file, iface, mself, css_navi_iface, true );
-		}
-	}
-
-	private void write_navi_child_interfaces_without_childs ( GLib.FileStream file, Namespace ifh, Basic mself ) {
-		Gee.Collection<Interface> interfaces = ifh.get_interface_list ( );
-		this.write_navi_child_interfaces_without_childs_collection ( file, interfaces, mself );
-	}
-
-	private void write_navi_child_enums_without_childs_collection ( GLib.FileStream file, Gee.Collection<Enum> enums, Basic mself ) {
-		foreach ( Enum en in enums ) {
-			if ( en == mself )
-				this.write_navi_entry ( file, en, mself, css_navi_enum, false );
-			else
-				this.write_navi_entry ( file, en, mself, css_navi_enum, true );
-		}
-	}
-
-	private void write_navi_child_enums_without_childs ( GLib.FileStream file, EnumHandler eh, Basic mself ) {
-		Gee.Collection<Enum> enums = eh.get_enum_list ( );
-		this.write_navi_child_enums_without_childs_collection ( file, enums, mself );
-	}
 
-	private void write_navi_child_error_domains_without_childs_collection ( GLib.FileStream file, Gee.Collection<ErrorDomain> errordomains, Basic mself ) {
-		foreach ( ErrorDomain errdom in errordomains ) {
-			if ( errdom == mself )
-				this.write_navi_entry ( file, errdom, mself, css_navi_error_domain, false );
-			else
-				this.write_navi_entry ( file, errdom, mself, css_navi_error_domain, true );
-		}
-	}
-
-	private void write_navi_child_error_domains_without_childs ( GLib.FileStream file, Namespace errdomh, Basic mself ) {
-		Gee.Collection<ErrorDomain> errordomains = errdomh.get_error_domain_list ( );
-		this.write_navi_child_error_domains_without_childs_collection ( file, errordomains, mself );
-	}
-
-	private void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, Basic mself ) {
-		Gee.ReadOnlyCollection<Namespace> namespaces = nsh.get_namespace_list ( );
-		foreach ( Namespace ns in namespaces ) {
-			if ( ns == mself )
-				this.write_navi_entry ( file, ns, mself, css_navi_namespace, false );
-			else
-				this.write_navi_entry ( file, ns, mself, css_navi_namespace, true );
-		}
-	}
 
 	private string get_full_path ( Basic element ) {
 		if ( element.name == null )
@@ -1044,8 +85,7 @@
 				str.prepend ( pos.name );
 		}
 
-		string file_path = get_file_name ( element );
-		string package_name = get_package_name ( file_path )  + "/";
+		string package_name = element.file.name  + "/";
 
 		str.prepend ( package_name );
 		str.append_unichar ( '/' );
@@ -1064,34 +104,16 @@
 		this.langlet = new Valadoc.LangletIndex ( settings );
 	}
 
-	private void write_image_block ( GLib.FileStream file, DataType element ) {
-		string realimgpath = this.current_path + "tree.png";
-		string imgpath = "tree.png";
-
-		if ( element is Class ) {
-			Diagrams.write_class_diagram ( (Class)element, realimgpath );
-		}
-		else if ( element is Interface ) {
-			Diagrams.write_interface_diagram ( (Interface)element, realimgpath );
-		}
-		else if ( element is Struct ) {
-			Diagrams.write_struct_diagram ( (Struct)element, realimgpath );
-		}
-
-		file.printf ( "<h2 cass=\"%s\">Object Hierarchy:</h2>\n", css_title );
-		file.printf ( "<img cass=\"%s\" src=\"%s\"/>\n", css_diagram, imgpath );
+	protected override string get_img_real_path ( Basic element ) {
+		return this.current_path + "tree.png";
 	}
 
-	private void write_file_content ( GLib.FileStream file, Package f ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, this.package_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.puts ( "\t\t\t</div>\n" );
+	protected override string get_img_path ( Basic element ) {
+		return "tree.png";
 	}
 
 	public override void visit_package ( Package file ) {
-		this.package_name = this.get_package_name ( file.name );
+		this.package_name = file.name;
 
 		this.is_vapi = file.is_external_package;
 		if ( this.is_vapi )
@@ -1102,7 +124,7 @@
 
 		var rt = DirUtils.create ( new_path, 0777 );
 		GLib.FileStream sfile = GLib.FileStream.open ( new_path + "index.html", "w" );
-		this.write_file_header ( sfile );
+		this.write_file_header ( sfile, this.get_css_link ( ), file.name );
 		this.write_navi_file ( sfile, file );
 		this.write_file_content ( sfile, file );
 		this.write_file_footer ( sfile );
@@ -1127,12 +149,12 @@
 
 
 	~HtmlDoclet () {
-		this.directory_level = 1;
+		this.directory_level = 0;
 		copy_directory ( Config.doclet_path + "deps/", this.settings.path );
 
 		GLib.FileStream sfile = GLib.FileStream.open ( this.settings.path + "index.html", "w" );
 		string title = ( this.settings.pkg_name == null )? "" : this.settings.pkg_name;
-		this.write_file_header_template ( sfile, title, 0 );
+		this.write_file_header ( sfile, this.get_css_link ( ), title );
 
 		if ( this.source_namespaces.size > 0 ) {
 			sfile.printf ( "<h2 class=\"%s\">Namespaces:</h2>\n", css_title );
@@ -1152,468 +174,22 @@
 				continue;
 
 			if ( this.settings.with_deps )
-				sfile.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s/index.html\">%s</a></li>\n", css_inline_navigation_package, css_navi_link, this.get_package_name(file.name), this.get_package_name(file.name) );
+				sfile.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s/index.html\">%s</a></li>\n", css_inline_navigation_package, css_navi_link, file.name, file.name );
 			else
-				sfile.printf ( "\t<li class=\"%s\">%s</li>\n", css_inline_navigation_package, this.get_package_name(file.name) );
+				sfile.printf ( "\t<li class=\"%s\">%s</li>\n", css_inline_navigation_package, file.name );
 		}
 
 		sfile.puts ( "</ul>\n" );
 		this.write_file_footer ( sfile );
 	}
 
-	public void write_namespace_content ( GLib.FileStream file, Namespace ns ) {
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, (ns.name == null)? "Global Namespace" : ns.full_name () );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		ns.write_comment ( file );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private void write_child_classes ( GLib.FileStream file, ClassHandler clh ) {
-		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ();
-		if ( classes.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Classes:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Class subcl in classes ) {
-				string name;
-				if ( subcl.is_abstract ) {
-					name = "<i>" + subcl.name + "</i>";
-				}
-				else {
-					name = subcl.name;
-				}
-
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_class, css_navi_link, this.get_link(subcl, clh), name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_enums ( GLib.FileStream file, EnumHandler eh ) {
-		Gee.Collection<Enum> enums = eh.get_enum_list ();
-		if ( enums.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Enum en in enums ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_enum, css_navi_link, this.get_link(en, eh), en.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_structs ( GLib.FileStream file, StructHandler struh ) {
-		Gee.Collection<Struct> structs = struh.get_struct_list ();
-		if ( structs.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Structs:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Struct stru in structs ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_struct, css_navi_link, this.get_link(stru, struh), stru.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_methods ( GLib.FileStream file, MethodHandler mh ) {
-		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ();
-		if ( methods.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Methods:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Method m in methods ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m, mh), m.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_delegates ( GLib.FileStream file, DelegateHandler dh ) {
-		Gee.Collection<Delegate> delegates = dh.get_delegate_list ();
-		if ( delegates.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Delegates:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Delegate d in delegates ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_delegate, css_navi_link, this.get_link(d, dh), d.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh ) {
-		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ();
-		if ( methods.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Construction Methods:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Method m in methods ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m, cmh), m.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_signals ( GLib.FileStream file, SignalHandler sh ) {
-		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ();
-		if ( signals.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Signals:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Signal sig in signals ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_signal, css_navi_link, this.get_link(sig, sh), sig.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_properties ( GLib.FileStream file, PropertyHandler ph ) {
-		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ();
-		if ( properties.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Properties:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Property prop in properties ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_property, css_navi_link, this.get_link(prop, ph), prop.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_fields ( GLib.FileStream file, FieldHandler fh ) {
-		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ();
-		if ( fields.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Fields:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Field f in fields ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_fields, css_navi_link, this.get_link(f, fh), f.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_constants ( GLib.FileStream file, ConstantHandler ch ) {
-		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ();
-		if ( constants.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Constants:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Constant c in constants ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_constant, css_navi_link, this.get_link(c, ch), c.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_error_values ( GLib.FileStream file, ErrorDomain errdom ) {
-		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ();
-		if ( error_codes.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Error Codes:</h3>\n", css_title );
-			file.printf ( "<table class=\"%s\">\n", css_errordomain_table );
-			foreach ( ErrorCode errcode in error_codes ) {
-				file.puts ( "<tr>\n" );
-				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_errordomain_table_name, errcode.name, errcode.name );
-				file.printf ( "\t<td class=\"%s\">\n", css_errordomain_table_text );
-
-				errcode.write_comment ( file );
-
-				file.puts ( "\t</td>\n" );
-				file.puts ( "</tr>\n" );
-			}
-			file.puts ( "</table>\n" );
-		}
-	}
-
-	private void write_child_enum_values ( GLib.FileStream file, Enum en ) {
-		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ();
-		if ( enum_values.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Enum Values:</h3>\n", css_title );
-			file.printf ( "<table class=\"%s\">\n", css_enum_table );
-			foreach ( EnumValue enval in enum_values ) {
-				file.puts ( "<tr>\n" );
-				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_enum_table_name, enval.name, enval.name );
-				file.printf ( "\t<td class=\"%s\">\n", css_enum_table_text );
-
-				enval.write_comment ( file );
-
-				file.puts ( "\t</td>\n" );
-				file.puts ( "</tr>\n" );
-			}
-			file.puts ( "</table>\n" );
-		}
-	}
-
-	public void write_interface_content ( GLib.FileStream file, Interface iface ) {
-		string full_name = iface.full_name ();
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		this.write_image_block ( file, iface );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_interface ( iface, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		iface.write_comment ( file );
-		this.write_namespace_note ( file, iface );
-		this.write_package_note ( file, iface );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_classes ( file, iface );
-		this.write_child_structs ( file, iface );
-		this.write_child_delegates ( file, iface );
-		this.write_child_methods ( file, iface );
-		this.write_child_signals ( file, iface );
-		this.write_child_properties ( file, iface );
-		this.write_child_fields ( file, iface );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_class_content ( GLib.FileStream file, Class cl ) {
-		string full_name = cl.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		this.write_image_block ( file, cl );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_class ( cl, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		cl.write_comment ( file );
-		this.write_namespace_note ( file, cl );
-		this.write_package_note ( file, cl );
-		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_construction_methods ( file, cl );
-		this.write_child_classes ( file, cl );
-		this.write_child_structs ( file, cl );
-		this.write_child_enums ( file, cl );
-		this.write_child_delegates ( file, cl );
-		this.write_child_methods ( file, cl );
-		this.write_child_signals ( file, cl );
-		this.write_child_properties ( file, cl );
-		this.write_child_fields ( file, cl );
-		this.write_child_constants ( file, cl );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_struct_content ( GLib.FileStream file, Struct stru ) {
-		string full_name = stru.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		this.write_image_block ( file, stru );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		stru.write_comment ( file );
-		this.write_namespace_note ( file, stru );
-		this.write_package_note ( file, stru );
-		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_struct ( stru, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		this.write_child_construction_methods ( file, stru );
-		this.write_child_methods ( file, stru );
-		this.write_child_fields ( file, stru );
-		this.write_child_constants ( file, stru );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_error_domain_content ( GLib.FileStream file, ErrorDomain errdom ) {
-		string full_name = errdom.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		errdom.write_comment ( file );
-		this.write_namespace_note ( file, errdom );
-		this.write_package_note ( file, errdom );
-		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_error_values ( file, errdom );
-		this.write_child_methods ( file, errdom );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_enum_content ( GLib.FileStream file, Enum en ) {
-		string full_name = en.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		en.write_comment ( file );
-		this.write_namespace_note ( file, en );
-		this.write_package_note ( file, en );
-		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_enum_values ( file, en );
-		this.write_child_methods ( file, en );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_property_content ( GLib.FileStream file, Property prop ) {
-		string full_name = prop.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_property ( prop, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		prop.write_comment ( file );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_constant_content ( GLib.FileStream file, Constant constant, ConstantHandler parent ) {
-		string full_name = constant.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_constant ( constant, parent, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		constant.write_comment ( file );
-
-		if ( constant.parent is Namespace ) {
-			this.write_namespace_note ( file, constant );
-		}
-
-		this.write_package_note ( file, constant );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_field_content ( GLib.FileStream file, Field field, FieldHandler parent ) {
-		string full_name = field.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_field ( field, parent, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		field.write_comment ( file );
-
-		if ( field.parent is Namespace ) {
-			this.write_namespace_note ( file, field );
-		}
-
-		this.write_package_note ( file, field );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_delegate_content ( GLib.FileStream file, Delegate del ) {
-		string full_name = del.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_delegate ( del, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		del.write_comment ( file );
-
-		if ( del.parent is Namespace ) {
-			this.write_namespace_note ( file, del );
-			this.write_package_note ( file, del );
-		}
-
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_signal_content ( GLib.FileStream file, Signal sig ) {
-		string full_name = sig.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_signal ( sig, file );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		sig.write_comment ( file );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	public void write_method_content ( GLib.FileStream file, Method m , Valadoc.MethodHandler parent ) {
-		string full_name = m.full_name ( );
-		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
-		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_method ( file, m, parent );
-		file.printf ( "\n\t\t\t\t</div>\n" );
-		m.write_comment ( file );
-
-		if ( m.parent is Namespace ) {
-			this.write_namespace_note ( file, m );
-		}
-
-		this.write_package_note ( file, m );
-		file.puts ( "\t\t\t</div>\n" );
-	}
-
-	private string css_site_header = "site_header";
-
-	private void write_file_header_template ( GLib.FileStream file, string title, int level ) {
-		GLib.StringBuilder css_path = new GLib.StringBuilder ( );
-		for ( int i = 0; level > i; i++ ) {
-			css_path.append ( "../" );
-		}
-
-		css_path.append ( "main.css" );
-
-		file.puts ( "<html>\n" );
-		file.puts ( "\t<head>\n" );
-		file.puts ( "\t\t<title>Vala Binding Reference</title>\n" );
-		file.printf ( "\t\t<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\" />\n", css_path.str );
-		file.puts ( "\t</head>\n" );
-		file.puts ( "\t<body>\n\n" );
-
-		file.printf ( "\t<div class=\"%s\">\n", this.css_site_header );
-		file.printf ( "\t\t%s Reference Manual\n", title );
-		file.puts ( "\t</div>\n\n" );
-
-		file.printf ( "\t\t<div class=\"%s\">\n", this.css_style_body );
-	}
-
-	private void write_package_note ( GLib.FileStream file, Basic element ) {
-		string package = element.package;
-		if ( package == null )
-			return ;
-
-		file.printf ( "\n\n<br />\n<b>Package:</b> %s\n\n", package );
-	}
-
-	private void write_namespace_note ( GLib.FileStream file, Basic element ) {
-		for ( ; element is Namespace == false; element = element.parent )
-			;
-
-		if ( element.parent == null )
-			return ;
-
-		if ( element.name == null )
-			return ;
-
-		file.printf ( "\n\n<br />\n<b>Namespace:</b> %s\n\n", ((Namespace)element).full_name () );
-	}
-
-	private void write_file_header ( GLib.FileStream file ) {
-		this.write_file_header_template ( file, this.package_name, this.directory_level );
-	}
-
-	private const string css_style_navigation = "site_navigation";
-	private const string css_style_content = "site_content";
-	private const string css_style_body = "site_body";
-
-
-	private void write_file_footer ( GLib.FileStream file ) {
-		file.puts ( "\t</div>\n" );
-
-		file.puts ( "\t<div style= \"clear: left\">\n" );
-		file.puts ( "\t\t<br />\n" );
-		file.puts ( "\t\t<div class=\"site_foother\">\n" );
-		file.puts ( "\t\t\tcreated by <a href=\"http://www.valadoc.org\";>valadoc</a>\n" );
-		file.puts ( "\t\t</div>\n" );
-		file.puts ( "\t</div>\n" );
-		file.puts ( "\t</body>\n" );
-		file.puts ( "</html>" );
-	}
-
 	public override void visit_property ( Property prop ) {
 		string path = this.current_path + prop.name + "/";
 		var rt = DirUtils.create ( path, 0777 );
 		this.directory_level++;
 
 		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), prop.name );
 		this.write_navi_property ( file, prop );
 		this.write_property_content ( file, prop );
 		this.write_file_footer ( file );
@@ -1628,7 +204,7 @@
 		var rt = DirUtils.create ( path, 0777 );
 		this.directory_level++;
 		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), constant.name );
 		this.write_navi_constant ( file, constant );
 		this.write_constant_content ( file, constant, parent );
 		this.write_file_footer ( file );
@@ -1641,7 +217,7 @@
 		var rt = DirUtils.create ( path, 0777 );
 		this.directory_level++;
 		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), field.name );
 		this.write_navi_field ( file, field );
 		this.write_field_content ( file, field, parent );
 		this.write_file_footer ( file );
@@ -1655,7 +231,7 @@
 
 		this.directory_level++;
 		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), del.name );
 		this.write_navi_delegate ( file, del );
 		this.write_delegate_content ( file, del );
 		this.write_file_footer ( file );
@@ -1670,7 +246,7 @@
 		var rt = DirUtils.create ( path, 0777 );
 
 		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), sig.name );
 		this.write_navi_signal ( file, sig );
 		write_signal_content ( file, sig );
 		this.write_file_footer ( file );
@@ -1685,7 +261,7 @@
 
 		this.directory_level++;
 		GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), m.name );
 		this.write_navi_method ( file, m );
 		this.write_method_content ( file, m, parent );
 		this.write_file_footer ( file );
@@ -1713,7 +289,7 @@
 
 		var rt = DirUtils.create ( this.current_path, 0777 );
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), ns.name );
 		this.write_navi_namespace ( file, ns );
 		this.write_namespace_content ( file, ns );
 		this.write_file_footer ( file );
@@ -1746,7 +322,7 @@
 		en.visit_methods ( this );
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), en.name );
 		this.write_navi_enum ( file, en, en );
 		this.write_enum_content ( file, en );
 		this.write_file_footer ( file );
@@ -1766,7 +342,7 @@
 		errdom.visit_methods ( this );
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), errdom.name );
 		this.write_navi_error_domain ( file, errdom, errdom );
 		this.write_error_domain_content ( file, errdom );
 		this.write_file_footer ( file );
@@ -1789,7 +365,7 @@
 		stru.visit_constants ( this );
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), stru.name );
 		this.write_navi_struct ( file, stru, stru );
 		this.write_struct_content ( file, stru );
 		this.write_file_footer ( file );
@@ -1818,7 +394,7 @@
 		cl.visit_constants ( this );
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), cl.name );
 		this.write_navi_class ( file, cl, cl );
 		this.write_class_content ( file, cl );
 		this.write_file_footer ( file );
@@ -1844,7 +420,7 @@
 		iface.visit_fields ( this );
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
-		this.write_file_header ( file );
+		this.write_file_header ( file, this.get_css_link ( ), iface.name );
 		this.write_navi_interface ( file, iface, iface );
 		this.write_interface_content ( file, iface );
 		this.write_file_footer ( file );

Modified: trunk/src/doclets/html/linkhelper/Makefile.am
==============================================================================
--- trunk/src/doclets/html/linkhelper/Makefile.am	(original)
+++ trunk/src/doclets/html/linkhelper/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
-	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
 	touch $@
 
 
@@ -29,6 +29,7 @@
 
 AM_CFLAGS =             \
 	-I ../../../libvaladoc/   \
+	-I ../../htmlhelpers/  \
 	$(LIBVALA_CFLAGS)   \
 	$(GLIB_CFLAGS)      \
 	$(NULL)
@@ -36,6 +37,7 @@
 
 libhtmlhelper_la_LIBADD = \
 	../../../libvaladoc/libvaladoc.la \
+	../../htmlhelpers/libhtmlhelpers.la \
 	$(LIBVALA_LIBS)                \
 	$(GLIB_LIBS)                   \
 	$(NULL)

Modified: trunk/src/doclets/html/linkhelper/helper.vala
==============================================================================
--- trunk/src/doclets/html/linkhelper/helper.vala	(original)
+++ trunk/src/doclets/html/linkhelper/helper.vala	Tue Nov  4 22:35:00 2008
@@ -20,116 +20,8 @@
 using GLib;
 
 
-
-/* css-class-names: */
-public const string css_inline_navigation = "main_inline_navigation";
-public const string css_inline_navigation_namespace = "main_inline_navigation_namespace";
-public const string css_inline_navigation_property = "main_inline_navigation_property";
-public const string css_inline_navigation_method = "main_inline_navigation_method";
-public const string css_inline_navigation_signal = "main_inline_navigation_signal";
-public const string css_inline_navigation_fields = "main_inline_navigation_fields";
-public const string css_inline_navigation_class = "main_inline_navigation_class";
-public const string css_inline_navigation_enum = "main_inline_navigation_enum";
-public const string css_inline_navigation_struct = "main_inline_navigation_struct";
-public const string css_inline_navigation_delegate = "main_inline_navigation_delegate";
-public const string css_inline_navigation_constant = "main_inline_navigation_constant";
-public const string css_inline_navigation_package = "main_inline_navigation_package";
-
-public const string css_navi_package_index = "navi_package_index";
-public const string css_navi_package = "navi_package";
-public const string css_navi_construction_method = "navi_construction_method";
-public const string css_navi_error_domain = "navi_error_domain";
-public const string css_navi_namespace = "navi_namespace";
-public const string css_navi_method = "navi_method";
-public const string css_navi_struct = "navi_struct";
-public const string css_navi_iface = "navi_iface";
-public const string css_navi_field = "navi_field";
-public const string css_navi_class = "navi_class";
-public const string css_navi_enum = "navi_enum";
-public const string css_navi_link = "navi_link";
-public const string css_navi_constant = "navi_constant";
-public const string css_navi_prop = "navi_prop";
-public const string css_navi_del = "navi_del";
-public const string css_navi_sig = "navi_sig";
-public const string css_navi = "navi_main";
-public const string css_navi_enval = "main_navi_enval";
-public const string css_navi_errdomcode = "main_navi_errdomcode";
-public const string css_navi_hr = "navi_hr";
-
-public const string css_errordomain_table_name = "main_errordomain_table_name";
-public const string css_errordomain_table_text = "main_errordomain_table_text";
-public const string css_errordomain_table = "main_errordomain_table";
-
-
-public const string css_enum_table_name = "main_enum_table_name";
-public const string css_enum_table_text = "main_enum_table_text";
-public const string css_enum_table = "main_enum_table";
-
-public const string css_diagram = "main_diagram";
-public const string css_see_list = "main_see_list";
-public const string css_exception_table = "main_parameter_table";
-public const string css_parameter_table_text = "main_parameter_table_text";
-public const string css_parameter_table_name = "main_parameter_table_name";
-public const string css_parameter_table = "main_parameter_table";
-public const string css_title = "main_title";
-public const string css_other_type = "main_other_type";
-public const string css_basic_type  = "main_basic_type";
-public const string css_keyword  = "main_keyword";
-public const string css_optional_parameter  = "main_optional_parameter";
-public const string css_code_definition = "main_code_definition";
-public const string css_headline_hr = "main_hr";
-public const string css_hr = "main_hr";
-public const string css_list_errdom = "main_list_errdom";
-public const string css_list_en = "main_list_en";
-public const string css_list_ns = "main_list_ns";
-public const string css_list_cl = "main_list_cl";
-public const string css_list_iface = "main_list_iface";
-public const string css_list_stru = "main_list_stru";
-public const string css_list_field = "main_list_field";
-public const string css_list_prop = "main_list_prop";
-public const string css_list_del = "main_list_del";
-public const string css_list_sig = "main_list_sig";
-public const string css_list_m = "main_list_m";
-
-
-
-public interface Valadoc.LinkHelper : Object {
-	private static string package_name = null;
-
-	public abstract Settings settings {
-		construct set;
-		get;
-	}
-
-	private string get_dirname ( string file_name ) {
-		if ( file_name[file_name.len()-1] == '/' )
-			return GLib.Path.get_dirname ( file_name );
-		else
-			return GLib.Path.get_basename ( file_name );
-	}
-
-	protected string get_package_name ( string file_path ) {
-		if ( file_path.has_suffix (".vapi") ) {
-			string file_name = GLib.Path.get_basename (file_path);
-			return file_name.ndup ( file_name.size() - ".vapi".size() );
-		}
-
-		return this.settings.pkg_name;
-	}
-
-	public string get_file_name ( Valadoc.Basic tag ) {
-		Valadoc.Basic pos = tag;
-
-		while ( pos != null ) {
-			if ( pos is Valadoc.Package )
-				return pos.name;
-
-			pos = pos.parent;
-		}
-		return null;
-	}
-
-	protected string get_top_link ( Valadoc.Basic? postag ) {
+public interface Valadoc.LinkHelper {
+	protected string get_html_top_link ( Valadoc.Basic? postag ) {
 		if ( postag == null )
 			return "";
 
@@ -143,18 +35,14 @@
 		return str.str;
 	}
 
-	protected string? get_link ( Valadoc.Basic tag, Valadoc.Basic? postag ) {
-		if ( !this.settings.to_doc( tag.file_name ) )
-			return null;
-
+	protected string? get_html_link ( Valadoc.Settings settings, Valadoc.Basic element, Valadoc.Basic pos2 ) {
 		GLib.StringBuilder str = new GLib.StringBuilder ( "" );
-		Valadoc.Basic pos = tag;
-
+		Valadoc.Basic pos = element;
 		string? link_id = null;
 
-		if ( tag is Valadoc.Package == false ) {
-			if ( tag is Valadoc.EnumValue || tag is Valadoc.ErrorCode ) {
-				link_id = "#"+tag.name;
+		if ( element is Valadoc.Package == false ) {
+			if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
+				link_id = "#" + element.name;
 				pos = pos.parent;
 			}
 
@@ -172,10 +60,9 @@
 				pos = pos.parent;
 			}
 		}
-		string filename = this.get_file_name ( tag );
-		string package_name = this.get_package_name ( filename );
-		str.prepend ( package_name );
-		str.prepend ( this.get_top_link ( postag ) );
+
+		str.prepend ( pos.file.name );
+		str.prepend ( this.get_html_top_link ( pos2 ) );
 		str.append ( "/index.html" );
 
 		if ( link_id != null )
@@ -185,4 +72,3 @@
 	}
 }
 
-

Modified: trunk/src/doclets/html/taglets/author/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/author/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/author/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletversion_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/taglets/link/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/link/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/link/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletlink.vala.stamp: $(libtagletlink_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletlink_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/html/taglets/link/taglet.vala	(original)
+++ trunk/src/doclets/html/taglets/link/taglet.vala	Tue Nov  4 22:35:00 2008
@@ -46,8 +46,8 @@
 		}
 
 		this.settings = settings;
-		this.path = this.get_link ( element, me );
-		this.content = str;
+		this.path = this.get_html_link ( settings, element, me );
+		this.content = element.full_name ();
 		return true;
 	}
 

Modified: trunk/src/doclets/html/taglets/parameter/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/parameter/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/parameter/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletparameter_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/taglets/return/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/return/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/return/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletXXXX_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/taglets/see/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/see/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/see/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,11 +11,11 @@
 
 
 libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
-	
+
 
 tagletseedir = $(libdir)/valadoc/plugins/template/taglets/
 
@@ -30,12 +30,13 @@
 
 
 
-AM_CFLAGS =  -g               \
+AM_CFLAGS =  -g                  \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
-	$(GLIB_CFLAGS)            \
-	$(LIBVALA_CFLAGS)         \
+	$(GLIB_CFLAGS)               \
+	$(LIBVALA_CFLAGS)            \
 	$(NULL)
 
 
@@ -44,6 +45,7 @@
 
 libtagletsee_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/html/taglets/see/taglet.vala	(original)
+++ trunk/src/doclets/html/taglets/see/taglet.vala	Tue Nov  4 22:35:00 2008
@@ -23,7 +23,7 @@
 using Gee;
 
 
-public class SeeHtmlTaglet : MainTaglet, LinkHelper {
+public class SeeHtmlTaglet : MainTaglet, Valadoc.LinkHelper {
 	private string name;
 	private string path;
 
@@ -76,8 +76,8 @@
 		}
 
 		this.settings = settings;
-		this.path = this.get_link ( element, me );
-		this.name = str;
+		this.path = this.get_html_link ( settings, element, me );
+		this.name = element.full_name ();
 		return true;
 	}
 

Modified: trunk/src/doclets/html/taglets/throws/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/throws/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/throws/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libexceptionparameter_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Modified: trunk/src/doclets/html/taglets/version/Makefile.am
==============================================================================
--- trunk/src/doclets/html/taglets/version/Makefile.am	(original)
+++ trunk/src/doclets/html/taglets/version/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \
@@ -44,6 +45,7 @@
 
 libtagletversion_la_LIBADD =                 \
 	../../../../libvaladoc/libvaladoc.la \
+	../../../htmlhelpers/libhtmlhelpers.la \
 	../../linkhelper/libhtmlhelper.la    \
 	$(GLIB_LIBS)                      \
 	$(LIBVALA_LIBS)                   \

Added: trunk/src/doclets/htmlhelpers/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/src/doclets/htmlhelpers/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -0,0 +1,44 @@
+# src/Makefile.am
+
+
+
+libhtmlhelpers_VALASOURCES = \
+	htmlhelpers.vala        \
+	$(NULL)
+
+
+BUILT_SOURCES = libhtmlhelpers.vala.stamp
+
+
+libhtmlhelpers.vala.stamp: $(libhtmlhelpers_VALASOURCES)
+	$(VALAC) -C --library libhtmlhelpers-1.0 --basedir . --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	touch $@
+
+
+
+htmlhelpersdir = $(libdir)/valadoc/plugins/
+htmlhelpers_LTLIBRARIES = libhtmlhelpers.la
+
+
+libhtmlhelpers_la_SOURCES =                \
+	libhtmlhelpers.vala.stamp              \
+	$(libhtmlhelpers_VALASOURCES:.vala=.c) \
+	$(libhtmlhelpers_VALASOURCES:.vala=.h) \
+	$(NULL)
+
+
+AM_CFLAGS =             \
+	-I ../../libvaladoc/   \
+	$(LIBVALA_CFLAGS)   \
+	$(GLIB_CFLAGS)      \
+	$(NULL)
+
+
+libhtmlhelper_la_LIBADD = \
+	../../libvaladoc/libvaladoc.la \
+	$(LIBVALA_LIBS)                \
+	$(GLIB_LIBS)                   \
+	$(NULL)
+
+
+EXTRA_DIST = $(libhtmlhelpers_VALASOURCES)  libhtmlhelpers.vala.stamp 

Added: trunk/src/doclets/htmlhelpers/htmlhelpers.vala
==============================================================================
--- (empty file)
+++ trunk/src/doclets/htmlhelpers/htmlhelpers.vala	Tue Nov  4 22:35:00 2008
@@ -0,0 +1,1567 @@
+
+
+
+using GLib;
+
+
+public const string css_inline_navigation = "main_inline_navigation";
+public const string css_inline_navigation_property = "main_inline_navigation_property";
+public const string css_inline_navigation_method = "main_inline_navigation_method";
+public const string css_inline_navigation_signal = "main_inline_navigation_signal";
+public const string css_inline_navigation_fields = "main_inline_navigation_fields";
+public const string css_inline_navigation_class = "main_inline_navigation_class";
+public const string css_inline_navigation_enum = "main_inline_navigation_enum";
+public const string css_inline_navigation_struct = "main_inline_navigation_struct";
+public const string css_inline_navigation_delegate = "main_inline_navigation_delegate";
+public const string css_inline_navigation_constant = "main_inline_navigation_constant";
+public const string css_inline_navigation_namespace = "main_inline_navigation_namespace";
+public const string css_inline_navigation_package = "main_inline_navigation_package";
+
+
+public const string css_site_header = "site_header";
+
+public const string css_navi_package_index = "navi_package_index";
+public const string css_navi_package = "navi_package";
+public const string css_navi_construction_method = "navi_construction_method";
+public const string css_navi_error_domain = "navi_error_domain";
+public const string css_navi_namespace = "navi_namespace";
+public const string css_navi_method = "navi_method";
+public const string css_navi_struct = "navi_struct";
+public const string css_navi_iface = "navi_iface";
+public const string css_navi_field = "navi_field";
+public const string css_navi_class = "navi_class";
+public const string css_navi_enum = "navi_enum";
+public const string css_navi_link = "navi_link";
+public const string css_navi_constant = "navi_constant";
+public const string css_navi_prop = "navi_prop";
+public const string css_navi_del = "navi_del";
+public const string css_navi_sig = "navi_sig";
+public const string css_navi = "navi_main";
+public const string css_navi_enval = "main_navi_enval";
+public const string css_navi_errdomcode = "main_navi_errdomcode";
+public const string css_navi_hr = "navi_hr";
+
+public const string css_errordomain_table_name = "main_errordomain_table_name";
+public const string css_errordomain_table_text = "main_errordomain_table_text";
+public const string css_errordomain_table = "main_errordomain_table";
+
+
+public const string css_enum_table_name = "main_enum_table_name";
+public const string css_enum_table_text = "main_enum_table_text";
+public const string css_enum_table = "main_enum_table";
+
+public const string css_diagram = "main_diagram";
+public const string css_see_list = "main_see_list";
+public const string css_exception_table = "main_parameter_table";
+public const string css_parameter_table_text = "main_parameter_table_text";
+public const string css_parameter_table_name = "main_parameter_table_name";
+public const string css_parameter_table = "main_parameter_table";
+public const string css_title = "main_title";
+public const string css_other_type = "main_other_type";
+public const string css_basic_type  = "main_basic_type";
+public const string css_keyword  = "main_keyword";
+public const string css_optional_parameter  = "main_optional_parameter";
+public const string css_code_definition = "main_code_definition";
+public const string css_headline_hr = "main_hr";
+public const string css_hr = "main_hr";
+public const string css_list_errdom = "main_list_errdom";
+public const string css_list_en = "main_list_en";
+public const string css_list_ns = "main_list_ns";
+public const string css_list_cl = "main_list_cl";
+public const string css_list_iface = "main_list_iface";
+public const string css_list_stru = "main_list_stru";
+public const string css_list_field = "main_list_field";
+public const string css_list_prop = "main_list_prop";
+public const string css_list_del = "main_list_del";
+public const string css_list_sig = "main_list_sig";
+public const string css_list_m = "main_list_m";
+
+public const string css_style_navigation = "site_navigation";
+public const string css_style_content = "site_content";
+public const string css_style_body = "site_body";
+
+
+
+
+
+
+
+
+public abstract class Valadoc.BasicHtmlLanglet : Valadoc.Langlet {
+	public Valadoc.Settings settings {
+		construct set;
+		protected get;
+	}
+
+	public BasicHtmlLanglet ( Settings settings ) {
+		this.settings = settings;
+	}
+
+	private Basic position = null;
+
+	protected abstract string get_link ( Basic type, Basic position );
+
+	private inline bool is_basic_type ( string name ) {
+		string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
+				"long", "ulong", "size_t", "ssize_t", "int8", "uint8", "int16", "uint16", "int32",
+				"uint32", "int64", "uint64", "float", "double", "time_t", "unichar", "string"
+			};
+
+		foreach ( string str in basic_types ) {
+			if ( str == name )
+				return true;
+		}
+
+		return false;
+	}
+
+	private void write_type_name ( DataType? datatype, GLib.FileStream file ) {
+		if ( datatype == null ) {
+			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
+			return ;
+		}
+
+		string typename = datatype.full_name ();
+		if ( datatype.parent.name == null && (datatype is Class || datatype is Struct) ) {
+			if ( this.is_basic_type ( typename ) ) {
+				string link = this.get_link(datatype, this.position );
+				if ( link == null )
+					file.printf ( "<span class=\"%s\">%s</span>", css_basic_type, typename );
+				else
+					file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_basic_type, link, typename );
+				return ;
+			}
+		}
+
+		string link = this.get_link(datatype, this.position);
+		if ( link == null )
+		file.printf ( "<span class=\"%s\">%s</span>", css_other_type, typename );
+		else
+			file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_other_type, link, typename );
+	}
+
+	private void write_type_reference_name ( TypeReference type_reference, GLib.FileStream file ) {
+		if ( type_reference.type_name == "void" ) {
+			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
+		}
+		else {
+			if ( type_reference.data_type == null  ) {
+				file.printf ( "<font class=\"%s\">%s</font>", css_other_type, type_reference.type_name );
+			}
+			else {
+				this.write_type_name ( type_reference.data_type, file );
+			}
+		}
+	}
+
+	private void write_type_reference_template_arguments ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
+		Gee.Collection<TypeReference> arglst = type_reference.get_type_arguments ( );
+		int size = arglst.size;
+		if ( size == 0 )
+			return ;
+
+		file.puts ( "<" );
+		int i = 0;
+
+		foreach ( TypeReference arg in arglst ) {
+			i++;
+
+			this.write_nested_type_referene ( arg, file );
+			if ( i != size )
+				file.puts ( ", " );
+		}
+
+		file.puts ( ">" );
+	}
+
+	private void write_nested_type_referene ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
+		if ( type_reference.type_name == null )
+			return ;
+
+		if ( type_reference.is_weak )
+			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
+
+		this.write_type_reference_name ( type_reference, file );
+		this.write_type_reference_template_arguments ( type_reference, file );
+
+		if ( type_reference.is_array ) {
+			string str = string.nfill ( type_reference.array_rank-1, ',');
+			file.printf ( "[%s]", str );
+		}
+
+		if ( type_reference.pass_ownership ) {
+			file.putc ( '#' );
+		}
+
+		if ( type_reference.is_nullable ) {
+			file.putc ( '?' );
+		}
+
+		string str = string.nfill ( type_reference.pointer_rank, '*' );
+		file.puts ( str );
+
+	}
+
+	public override void write_type_reference ( Valadoc.TypeReference type_reference, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+
+		if ( type_reference == null )
+			return ;
+
+		this.write_nested_type_referene ( type_reference, file );
+		file.putc ( ' ' );
+
+		/*
+		if ( type_reference.is_weak ) {
+			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
+		}
+
+		this.write_type_name ( type_reference.data_type, file );
+
+		if ( type_reference.is_array ) {
+			string str = string.nfill ( type_reference.array_rank-1, ',');
+			file.printf ( "[%s]", str );
+		}
+
+		if ( type_reference.pass_ownership ) {
+			file.putc ( '#' );
+		}
+
+		if ( type_reference.is_nullable ) {
+			file.putc ( '?' );
+		}
+
+		string str = string.nfill ( type_reference.pointer_rank, '*' );
+		file.puts ( str );
+		*/
+	}
+
+	private void write_formal_parameter ( FormalParameter param, GLib.FileStream file ) {
+		if ( param.ellipsis ) {
+			file.puts ( " ..." );
+		}
+		else {
+			if ( param.is_out )
+				file.printf ( "<span class=\"%s\">out</span> ", css_keyword );
+			else if ( param.is_ref )
+				file.printf ( "<span class=\"%s\">ref</span> ", css_keyword );
+
+			this.write_type_reference ( param.type_reference, file );
+			file.printf ( " %s", param.name );
+		}
+	}
+
+	public override void write_parameter_list ( ParameterListHandler thandler, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		bool open_bracket = false;
+
+		Gee.ArrayList<FormalParameter> params = thandler.param_list;
+		int size = params.size;
+		int i = 0;
+
+		file.putc ( '(' );
+
+		foreach ( FormalParameter param in params ) {
+			i++;
+
+			if ( param.default_value != null && open_bracket == false ) {
+				file.printf ( "<span class=\"%s\">[", css_optional_parameter );
+				open_bracket = true;
+			}
+
+			this.write_formal_parameter ( param, file );
+			if ( i != size ) {
+				file.puts ( ", " );
+			}
+			else if ( open_bracket == true ) {
+				file.puts ( "]</span>" );
+			}
+		}
+
+		file.putc ( ')' );
+	}
+
+	private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) {
+		Gee.ReadOnlyCollection<TypeReference> error_domains = exception_handler.get_error_domains ();
+		int size = error_domains.size;
+		int i = 1;
+
+		if ( size == 0 )
+			return ;
+
+		file.printf ( " <span class=\"%s\">throws</span> ", css_keyword );
+
+		foreach ( TypeReference type_reference in error_domains ) {
+			if ( type_reference == null ) {
+				file.printf ( "<span class=\"%s\">GLib.Error</span>", css_other_type );
+			}
+			else {
+				this.write_type_reference ( type_reference, file );
+			}
+
+			if ( error_domains.size > i ) {
+				file.puts ( ", " );
+			}
+			i++;
+		}
+	}
+
+	public override void write_method ( void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent ) {
+		this.position = m;
+
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+
+		this.write_accessor ( m, file );
+
+		if ( m.is_abstract )
+			modifiers.append ( " abstract" );
+		if ( m.is_virtual )
+			modifiers.append ( " virtual" );
+		if ( m.is_override )
+			modifiers.append ( " override" );
+		if ( m.is_static )
+			modifiers.append ( " static" );
+		if ( m.is_inline )
+			modifiers.append ( " inline" );
+
+		file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
+		this.write_type_reference ( m.return_type, file );
+		file.puts ( m.name );
+		file.puts ( " " );
+		this.write_parameter_list ( m, file );
+		this.write_exception_list ( m, file );
+	}
+
+	public override void write_type_parameter ( TypeParameter param, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		file.puts ( param.datatype_name );
+	}
+
+	public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		int i = 1;
+
+		var lst = thandler.get_template_param_list( );
+		if ( lst.size == 0 )
+			return ;
+
+		file.puts ( "&lt;" ); // <
+
+		foreach ( TypeParameter param in lst ) {
+			param.write ( this, file );
+			if ( lst.size > i )
+				file.puts ( ", " );
+
+			i++;
+		}
+		file.puts ( "&gt;" ); // >
+	}
+
+	public override void write_field ( Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr ) {
+		this.position = field;
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+
+		this.write_accessor ( field, file );
+
+		if ( field.is_volatile )
+			file.printf ( " <span class=\"%s\">volatile</span>", css_keyword );
+
+		this.write_type_reference ( field.type_reference, file );
+
+		file.printf ( " %s", field.name );
+	}
+
+	public override void write_constant ( Constant constant, ConstantHandler parent, void* ptr ) {
+		this.position = constant;
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+
+		this.write_accessor ( constant, file );
+		file.printf ( " <span class=\"%s\"> const </span>", css_keyword );
+		this.write_type_reference ( constant.type_reference, file );
+		file.printf ( " %s", constant.name );
+	}
+
+	public override void write_property_accessor ( Valadoc.PropertyAccessor propac, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+
+		Property prop = (Property)propac.parent;
+
+		if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
+			// FIXME: PropertyAccessor isn't a SymbolAccessibility. (Valac-Bug.)
+			if ( propac.is_public )
+				file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
+			else if ( propac.is_protected )
+				file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
+			else if ( propac.is_private )
+				file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
+		}
+
+
+		if ( propac.is_get ) {
+			file.printf ( "<span class=\"%s\"> get</span>;", css_keyword );
+		}
+		else if ( propac.is_set ) {
+			if ( propac.is_construct ) {
+				file.printf ( "<span class=\"%s\"> construct</span> ", css_keyword );
+			}
+
+			file.printf ( "<span class=\"%s\"> set</span>;", css_keyword );
+		}
+	}
+
+	public override void write_property ( Valadoc.Property prop, void* ptr ) {
+		this.position = prop;
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+
+		this.write_accessor ( prop, file );
+
+		if ( prop.is_virtual )
+			modifiers.append ( " virtual " );
+		if ( prop.is_abstract )
+			modifiers.append ( " abstract " );
+		if ( prop.is_override )
+			modifiers.append ( " override " );
+
+
+		this.write_type_reference ( prop.return_type, file );
+		file.printf ( " <span class=\"%s\">%s</span>%s { ", css_keyword, modifiers.str, prop.name );
+
+		if ( prop.setter != null )
+			this.write_property_accessor ( prop.setter, file );
+
+
+		file.printf ( " " );
+
+		if ( prop.getter != null )
+			this.write_property_accessor ( prop.getter, file );
+
+		file.printf ( " }" );
+	}
+
+	public override void write_signal ( Valadoc.Signal sig, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		this.position = sig;
+
+		this.write_accessor ( sig, file );
+
+		file.printf ( " <span class=\"%s\">signal</span> ", css_keyword );
+		this.write_type_reference ( sig.return_type, file );
+		file.printf ( " %s ", sig.name );
+		this.write_parameter_list ( sig, file );
+	}
+
+	public override void write_enum_value ( Valadoc.EnumValue enval, void* ptr ) {
+	}
+
+	public override void write_error_code ( Valadoc.ErrorCode errcode, void* ptr ) {
+	}
+
+	public override void write_delegate ( Valadoc.Delegate del, void* ptr ) {
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		this.position = del;
+
+		this.write_accessor ( del, file );
+
+		file.printf ( " <span class=\"%s\">delegate</span> ", css_keyword );
+		this.write_type_reference ( del.return_type, file );
+		file.printf ( " %s ", del.name );
+		this.write_parameter_list ( del, file );
+		this.write_exception_list ( del, file );
+	}
+
+	public override void write_enum ( Valadoc.Enum en, void* ptr ) {
+	}
+
+	public override void write_error_domain ( Valadoc.ErrorDomain errdom, void* ptr ) {
+	}
+
+	private void write_accessor ( Valadoc.SymbolAccessibility element, GLib.FileStream file ) {
+		if ( element.is_public )
+			file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
+		else if ( element.is_protected )
+			file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
+		else if ( element.is_private )
+			file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
+	}
+
+
+	public override void write_struct ( Valadoc.Struct stru, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		this.position = stru;
+
+		this.write_accessor ( stru, file );
+		file.printf ( "<span class=\"%s\">struct</span> %s", css_keyword, stru.name );
+		this.write_template_parameters ( stru, ptr );
+		this.write_inheritance_list ( stru, file );
+	}
+
+	private void write_inheritance_list ( Valadoc.ContainerDataType dtype, GLib.FileStream file ) {
+		Gee.Collection<DataType> lst = dtype.get_parent_types ( );
+		int size = lst.size;
+		int i = 1;
+
+		if ( size == 0 )
+			return ;
+
+		file.puts ( " : " );
+
+		foreach ( DataType cntype in lst ) {
+			this.write_type_name ( cntype, file );
+			if ( size > i )
+				file.puts ( ", " );
+
+			i++;
+		}
+
+		file.putc ( ' ' );
+	}
+
+	public override void write_class ( Valadoc.Class cl, void* ptr ) {
+		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		this.position = cl;
+
+		this.write_accessor ( cl, file );
+
+		if ( cl.is_abstract )
+			modifiers.append ( "abstract " );
+		else if ( cl.is_static )
+			modifiers.append ( "static " );
+
+		file.printf ( "<span class=\"%s\">%s class</span> %s", css_keyword, modifiers.str, cl.name );
+
+		this.write_template_parameters ( cl, file );
+		this.write_inheritance_list ( cl, file );
+	}
+
+	public override void write_interface ( Valadoc.Interface iface, void* ptr ) {
+		weak GLib.FileStream file = (GLib.FileStream)ptr;
+		this.position = iface;
+
+		this.write_accessor ( iface, file );
+
+		if ( iface.is_static  )
+			file.printf ( "<span class=\"%s\">static interface</span> %s", css_keyword, iface.name );
+		else
+			file.printf ( "<span class=\"%s\">interface</span> %s", css_keyword, iface.name );
+
+		this.write_template_parameters ( iface, ptr );
+		this.write_inheritance_list ( iface, file );
+	}
+
+	public override void write_namespace ( Valadoc.Namespace ns, void* ptr ) {
+	}
+
+	public override void write_file ( Valadoc.Package file, void* ptr ) {
+	}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+public abstract class Valadoc.BasicHtmlDoclet : Valadoc.Doclet {
+	protected Valadoc.Langlet langlet;
+
+	protected abstract string get_link ( Valadoc.Basic p1, Valadoc.Basic p2 );
+
+
+	// Navi:
+	protected void write_navi_entry_html_template ( GLib.FileStream file, string style, string content ) {
+		file.printf ( "\t<li class=\"%s\">%s</li>\n", style, content );
+	}
+
+	protected void write_navi_entry_html_template_with_link ( GLib.FileStream file, string style, string link, string content ) {
+		file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", style, css_navi_link, link, content );
+	}
+
+	protected void write_navi_entry ( GLib.FileStream file, Basic element, Basic pos, string style, bool link, bool full_name = false ) {
+		string name;
+
+		if ( element is Class ) {
+			if ( ((Class)element).is_abstract )
+				name = "<i>" + element.name + "</i>";
+			else
+				name = element.name;
+		}
+		else if ( element is Package ) {
+			name = element.file.name;
+		}
+		else if ( full_name == true && element is Namespace ) {
+			string tmp = element.full_name();
+			name = (tmp == null)? "Global Namespace" : tmp;
+		}
+		else {
+			string tmp = element.name;
+			name = (tmp == null)? "Global Namespace" : tmp;
+		}
+
+		if ( link == true )
+			this.write_navi_entry_html_template_with_link ( file, style, this.get_link (element, pos), name );
+		else
+			this.write_navi_entry_html_template ( file, style, name );
+	}
+
+	protected void write_navi_top_entry ( GLib.FileStream file, Basic element, Basic mself ) {
+		string name = (element.name == null)? "Global Namespace" : element.name;
+		string style = null;
+
+		if ( element is Namespace )
+			style = css_navi_namespace;
+		else if ( element is Enum )
+			style = css_navi_enum;
+		else if ( element is ErrorDomain )
+			style = css_navi_error_domain;
+		else if ( element is Struct )
+			style = css_navi_struct;
+		else if ( element is Class )
+			style = css_navi_class;
+		else if ( element is Interface )
+			style = css_navi_iface;
+		else if ( element is Package ) {
+			name = element.file.name;
+			style = css_navi_package;
+		}
+
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+
+		if ( element == mself )
+			this.write_navi_entry ( file, element, mself, style, false );
+		else
+			this.write_navi_entry ( file, element, mself, style, true );
+
+		file.puts ( "</ul>\n" );
+		file.printf ( "\n<hr class=\"%s\">\n", css_navi_hr );
+	}
+
+	protected void write_top_element_template ( GLib.FileStream file, string link ) {
+		file.printf ( "<ul class=\"%s\">\n\t\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">Packages</a></li>\n</ul>\n<hr class=\"%s\">\n", css_navi, css_navi_package_index, css_navi_link, link, css_navi_hr );
+	}
+
+	protected abstract void write_top_element ( GLib.FileStream file, Basic pos );
+
+	protected void write_top_elements ( GLib.FileStream file, Basic element, Basic? mself ) {
+		Gee.ArrayList<Basic> lst = new Gee.ArrayList<Basic> ();
+		Basic pos = element;
+
+		if ( mself == null )
+			mself = element;
+
+		string package_name = element.file.name;
+
+		this.write_top_element ( file, mself );
+
+		while ( pos != null ) {
+			lst.add ( pos );
+			pos = pos.parent;
+		}
+
+		for ( int i = lst.size-1; i >= 0  ; i-- ) {
+			Basic el = lst.get ( i );
+			this.write_navi_top_entry ( file, el, mself );
+		}
+	}
+
+	protected void fetch_subnamespace_names ( NamespaceHandler pos, Gee.ArrayList<Namespace> lst ) {
+		Gee.ReadOnlyCollection<Namespace> nspaces = pos.get_namespace_list ();
+
+		foreach ( Namespace ns in nspaces ) {
+			lst.add ( ns );
+			this.fetch_subnamespace_names ( ns, lst );
+		}
+	}
+
+	protected void write_navi_file ( GLib.FileStream file, Package efile ) {
+		Gee.ArrayList<Namespace> ns_list = new Gee.ArrayList<Namespace> ();
+		this.fetch_subnamespace_names (efile, ns_list );
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_element_template ( file, "../index.html" );
+		file.printf ( "\t\t\t\t<ul class=\"%s\">\n", css_navi );
+
+		foreach ( Namespace ns in ns_list ) {
+			this.write_navi_entry ( file, ns, efile, css_navi_namespace, true, true );
+		}
+
+		file.puts ( "\t\t\t\t</ul>\n" );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_child_namespaces_inline ( GLib.FileStream file, Namespace ns, Basic mself ) {
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+		this.write_navi_child_namespaces_without_childs ( file, ns, mself );
+		this.write_navi_child_classes_without_childs ( file, ns, mself );
+		this.write_navi_child_interfaces_without_childs ( file, ns, mself );
+		this.write_navi_child_structs_without_childs ( file, ns, mself );
+		this.write_navi_child_enums_without_childs ( file, ns, mself );
+		this.write_navi_child_error_domains_without_childs ( file, ns, mself );
+		this.write_navi_child_delegates ( file, ns, mself );
+		this.write_navi_child_methods ( file, ns, mself );
+		this.write_navi_child_fields ( file, ns, mself );
+		this.write_navi_child_constants ( file, ns, mself );
+		file.puts ( "</ul>\n" );
+	}
+
+	protected void write_navi_child_namespaces ( GLib.FileStream file, Namespace ns, Basic mself ) {
+		this.write_top_elements ( file, ns, mself );
+		this.write_navi_child_namespaces_inline ( file, ns, mself );
+	}
+
+	protected void write_navi_struct_inline ( GLib.FileStream file, Struct stru, Basic mself ) {
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+		this.write_navi_child_construction_methods ( file, stru, mself );
+		this.write_navi_child_methods ( file, stru, mself );
+		this.write_navi_child_fields ( file, stru, mself );
+		this.write_navi_child_constants ( file, stru, mself );
+		file.puts ( "</ul>\n" );
+	}
+
+	protected void write_navi_struct ( GLib.FileStream file, Struct stru, Basic mself ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, stru, mself );
+		this.write_navi_struct_inline ( file, stru, mself );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_interface_inline ( GLib.FileStream file, Interface iface, Basic mself ) {
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+		this.write_navi_child_delegates ( file, iface, mself );
+		this.write_navi_child_methods ( file, iface, mself );
+		this.write_navi_child_signals ( file, iface, mself );
+		this.write_navi_child_properties ( file, iface, mself );
+		this.write_navi_child_fields ( file, iface, mself );
+		file.puts ( "</ul>\n" );
+	}
+
+	protected void write_navi_interface ( GLib.FileStream file, Interface iface, Basic mself ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, iface, mself );
+		this.write_navi_interface_inline ( file, iface, mself );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_enum_inline ( GLib.FileStream file, Enum en, Basic mself ) {
+		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ( );
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+
+		foreach ( EnumValue env in enum_values ) {
+			this.write_navi_entry ( file, env, en, css_navi_enval, true ); // en => mself
+		}
+
+		this.write_navi_child_methods ( file, en, mself );
+		file.puts ( "</ul>\n" );
+	}
+
+	protected void write_navi_enum ( GLib.FileStream file, Enum en, Basic mself ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, en, mself );
+		this.write_navi_enum_inline ( file, en, mself );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_error_domain_inline ( GLib.FileStream file, ErrorDomain errdom, Basic mself = null ) {
+		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ( );
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+
+		foreach ( ErrorCode ec in error_codes ) {
+			this.write_navi_entry ( file, ec, errdom, css_navi_errdomcode, true ); // errdom => mself
+		}
+
+		this.write_navi_child_methods ( file, errdom, mself );
+		file.puts ( "</ul>\n" );
+	}
+
+	protected void write_navi_namespace ( GLib.FileStream file, Namespace ns ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, ns, ns );
+		this.write_navi_child_namespaces_inline ( file, ns, ns );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_error_domain ( GLib.FileStream file, ErrorDomain errdom, Basic mself ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, errdom, mself );
+		this.write_navi_error_domain_inline ( file, errdom, mself );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_class_inline ( GLib.FileStream file, Class cl, Basic mself ) {
+		file.printf ( "<ul class=\"%s\">\n", css_navi );
+		this.write_navi_child_construction_methods ( file, cl, mself );
+		this.write_navi_child_classes_without_childs ( file, cl, mself );
+		this.write_navi_child_structs_without_childs ( file, cl, mself );
+		this.write_navi_child_enums_without_childs ( file, cl, mself );
+		this.write_navi_child_delegates ( file, cl, mself );
+		this.write_navi_child_methods ( file, cl, mself );
+		this.write_navi_child_signals ( file, cl, mself );
+		this.write_navi_child_properties ( file, cl, mself );
+		this.write_navi_child_fields ( file, cl, mself );
+		this.write_navi_child_constants ( file, cl, mself );
+		file.puts ( "</ul>\n" );
+	}
+
+	protected void write_navi_class ( GLib.FileStream file, Class cl, Basic mself ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, cl, mself );
+		this.write_navi_class_inline ( file, cl, mself );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_method ( GLib.FileStream file, Method m ) {
+		Basic parent = m.parent;
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+
+		this.write_top_elements ( file, parent, m );
+
+		if ( parent is Class )
+			this.write_navi_class_inline ( file, (Class)parent, m );
+		else if ( m.parent is Interface )
+			this.write_navi_interface_inline ( file, (Interface)parent, m );
+		else if ( m.parent is Struct )
+			this.write_navi_struct_inline ( file, (Struct)parent, m );
+		else if ( m.parent is Enum )
+			this.write_navi_enum_inline ( file, (Enum)parent, m );
+		else if ( m.parent is ErrorDomain )
+			this.write_navi_error_domain_inline ( file, (ErrorDomain)parent, m );
+		else if ( m.parent is Namespace )
+			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, m );
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_property ( GLib.FileStream file, Property prop ) {
+		Basic parent = prop.parent;
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, prop.parent, prop );
+
+		if ( parent is Class )
+			this.write_navi_class_inline ( file, (Class)parent, prop );
+		else if ( parent is Interface )
+			this.write_navi_interface_inline ( file, (Interface)parent, prop );
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_signal ( GLib.FileStream file, Signal sig ) {
+		Basic parent = sig.parent;
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+
+		this.write_top_elements ( file, sig.parent, sig );
+
+		if ( parent is Class )
+			this.write_navi_class_inline ( file, (Class)parent, sig );
+		else if ( parent is Interface )
+			this.write_navi_interface_inline ( file, (Interface)parent, sig );
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_constant ( GLib.FileStream file, Constant c ) {
+		Basic parent = c.parent;
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, parent, c );
+
+		if ( parent is Class )
+			this.write_navi_class_inline ( file, (Class)parent, c );
+		else  if ( parent is Struct )
+			this.write_navi_struct_inline ( file, (Struct)parent, c );
+		else  if ( parent is Namespace )
+			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, c );
+		//else if ( parent is Interface )
+		//	this.write_navi_interface_inline ( file, (Interface)parent, c );
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_field ( GLib.FileStream file, Field f ) {
+		Basic parent = f.parent;
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, parent, f );
+
+		if ( parent is Class )
+			this.write_navi_class_inline ( file, (Class)parent, f );
+		else if ( parent is Struct )
+			this.write_navi_struct_inline ( file, (Struct)parent, f );
+		else if ( parent is Namespace )
+			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, f );
+		else if ( parent is Interface )
+			this.write_navi_interface_inline ( file, (Interface)parent, f );
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_delegate ( GLib.FileStream file, Delegate del ) {
+		Basic parent = del.parent;
+
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_navigation );
+		this.write_top_elements ( file, parent, del );
+
+		if ( parent is Namespace )
+			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, del );
+		else if ( parent is Class )
+			this.write_navi_class_inline ( file, (Class)parent, del );
+		else if ( parent is Interface )
+			this.write_navi_interface_inline ( file, (Interface)parent, del );
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_navi_child_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, Basic mself ) {
+		foreach ( Method m in methods ) {
+			if ( m == mself )
+				this.write_navi_entry ( file, m, mself, css_navi_construction_method, false );
+			else
+				this.write_navi_entry ( file, m, mself, css_navi_construction_method, true );
+		}
+	}
+
+	protected void write_navi_child_methods ( GLib.FileStream file, MethodHandler mh, Basic mself ) {
+		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ( );
+		this.write_navi_child_methods_collection ( file, methods, mself );
+	}
+
+	protected void write_navi_child_classes_without_childs_collection ( GLib.FileStream file, Gee.Collection<Class> classes, Basic mself ) {
+		foreach ( Class cl in classes ) {
+			if ( cl == mself )
+				this.write_navi_entry ( file, cl, mself, css_navi_class, false );
+			else
+				this.write_navi_entry ( file, cl, mself, css_navi_class, true );
+		}
+	}
+
+	protected void write_navi_child_classes_without_childs ( GLib.FileStream file, ClassHandler clh, Basic mself ) {
+		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ( );
+		this.write_navi_child_classes_without_childs_collection ( file, classes, mself );
+	}
+
+	protected void write_navi_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, Basic mself ) {
+		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ( );
+		this.write_navi_child_methods_collection ( file, methods, mself );
+	}
+
+	protected void write_navi_child_signals ( GLib.FileStream file, SignalHandler sh, Basic mself ) {
+		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ( );
+
+		foreach ( Signal sig in signals ) {
+			if ( sig == mself )
+				this.write_navi_entry ( file, sig, mself, css_navi_sig, false );
+			else
+				this.write_navi_entry ( file, sig, mself, css_navi_sig, true );
+		}
+	}
+
+	protected void write_navi_child_properties ( GLib.FileStream file, PropertyHandler ph, Basic mself ) {
+		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ( );
+
+		foreach ( Property p in properties ) {
+			if ( p == mself )
+				this.write_navi_entry ( file, p, mself, css_navi_prop, false );
+			else
+				this.write_navi_entry ( file, p, mself, css_navi_prop, true );
+		}
+	}
+
+	protected void write_navi_child_fields_collection ( GLib.FileStream file, Gee.Collection<Field> fields, Basic mself ) {
+		foreach ( Field f in fields ) {
+			if ( f == mself )
+				this.write_navi_entry ( file, f, mself, css_navi_field, false );
+			else
+				this.write_navi_entry ( file, f, mself, css_navi_field, true );
+		}
+	}
+
+	protected void write_navi_child_fields ( GLib.FileStream file, FieldHandler fh, Basic mself ) {
+		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ( );
+		this.write_navi_child_fields_collection ( file, fields, mself );
+	}
+
+	protected void write_navi_child_constants_collection ( GLib.FileStream file, Gee.Collection<Constant> constants, Basic mself ) {
+		foreach ( Constant c in constants ) {
+			if ( c == mself )
+				this.write_navi_entry ( file, c, mself, css_navi_constant, false );
+			else
+				this.write_navi_entry ( file, c, mself, css_navi_constant, true );
+		}
+	}
+
+	protected void write_navi_child_constants ( GLib.FileStream file, ConstantHandler ch, Basic mself ) {
+		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ( );
+		this.write_navi_child_constants_collection ( file, constants, mself );
+	}
+
+	protected void write_navi_child_structs_without_childs_collection ( GLib.FileStream file, Gee.Collection<Struct> structs, Basic mself ) {
+		foreach ( Struct stru in structs ) {
+			if ( stru == mself )
+				this.write_navi_entry ( file, stru, mself, css_navi_struct, false );
+			else
+				this.write_navi_entry ( file, stru, mself, css_navi_struct, true );
+		}
+	}
+
+	protected void write_navi_child_structs_without_childs ( GLib.FileStream file, StructHandler strh, Basic mself ) {
+		Gee.Collection<Struct> structs = strh.get_struct_list ( );
+		this.write_navi_child_structs_without_childs_collection ( file, structs, mself );
+	}
+
+	protected void write_navi_child_delegates_collection ( GLib.FileStream file, Gee.Collection<Delegate> delegates, Basic mself ) {
+		foreach ( Delegate del in delegates ) {
+			if ( del == mself )
+				this.write_navi_entry ( file, del, mself, css_navi_del, false );
+			else
+				this.write_navi_entry ( file, del, mself, css_navi_del, true );
+		}
+	}
+
+	protected void write_navi_child_delegates ( GLib.FileStream file, DelegateHandler delh, Basic mself ) {
+		Gee.Collection<Delegate> delegates = delh.get_delegate_list ( );
+		this.write_navi_child_delegates_collection ( file, delegates, mself );
+	}
+
+	protected void write_navi_child_interfaces_without_childs_collection ( GLib.FileStream file, Gee.Collection<Interface> interfaces, Basic mself ) {
+		foreach ( Interface iface in interfaces ) {
+			if ( iface == mself )
+				this.write_navi_entry ( file, iface, mself, css_navi_iface, false );
+			else
+				this.write_navi_entry ( file, iface, mself, css_navi_iface, true );
+		}
+	}
+
+	protected void write_navi_child_interfaces_without_childs ( GLib.FileStream file, Namespace ifh, Basic mself ) {
+		Gee.Collection<Interface> interfaces = ifh.get_interface_list ( );
+		this.write_navi_child_interfaces_without_childs_collection ( file, interfaces, mself );
+	}
+
+	protected void write_navi_child_enums_without_childs_collection ( GLib.FileStream file, Gee.Collection<Enum> enums, Basic mself ) {
+		foreach ( Enum en in enums ) {
+			if ( en == mself )
+				this.write_navi_entry ( file, en, mself, css_navi_enum, false );
+			else
+				this.write_navi_entry ( file, en, mself, css_navi_enum, true );
+		}
+	}
+
+	protected void write_navi_child_enums_without_childs ( GLib.FileStream file, EnumHandler eh, Basic mself ) {
+		Gee.Collection<Enum> enums = eh.get_enum_list ( );
+		this.write_navi_child_enums_without_childs_collection ( file, enums, mself );
+	}
+
+	protected void write_navi_child_error_domains_without_childs_collection ( GLib.FileStream file, Gee.Collection<ErrorDomain> errordomains, Basic mself ) {
+		foreach ( ErrorDomain errdom in errordomains ) {
+			if ( errdom == mself )
+				this.write_navi_entry ( file, errdom, mself, css_navi_error_domain, false );
+			else
+				this.write_navi_entry ( file, errdom, mself, css_navi_error_domain, true );
+		}
+	}
+
+	protected void write_navi_child_error_domains_without_childs ( GLib.FileStream file, Namespace errdomh, Basic mself ) {
+		Gee.Collection<ErrorDomain> errordomains = errdomh.get_error_domain_list ( );
+		this.write_navi_child_error_domains_without_childs_collection ( file, errordomains, mself );
+	}
+
+	protected void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, Basic mself ) {
+		Gee.ReadOnlyCollection<Namespace> namespaces = nsh.get_namespace_list ( );
+		foreach ( Namespace ns in namespaces ) {
+			if ( ns == mself )
+				this.write_navi_entry ( file, ns, mself, css_navi_namespace, false );
+			else
+				this.write_navi_entry ( file, ns, mself, css_navi_namespace, true );
+		}
+	}
+
+
+////////////////
+
+
+	protected void write_package_note ( GLib.FileStream file, Basic element ) {
+		string package = element.package;
+		if ( package == null )
+			return ;
+
+		file.printf ( "\n\n<br />\n<b>Package:</b> %s\n\n", package );
+	}
+
+	protected void write_namespace_note ( GLib.FileStream file, Basic element ) {
+		for ( ; element is Namespace == false; element = element.parent )
+			;
+
+		if ( element.parent == null )
+			return ;
+
+		if ( element.name == null )
+			return ;
+
+		file.printf ( "\n\n<br />\n<b>Namespace:</b> %s\n\n", element.full_name() );
+	}
+
+
+	public void write_method_content ( GLib.FileStream file, Method m , Valadoc.MethodHandler parent ) {
+		string full_name = m.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+
+		this.langlet.write_method ( file, m, parent );
+
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		m.write_comment ( file );
+
+		if ( m.parent is Namespace ) {
+			this.write_namespace_note ( file, m );
+			this.write_package_note ( file, m );
+		}
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_child_error_values ( GLib.FileStream file, ErrorDomain errdom ) {
+		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ();
+		if ( error_codes.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Error Codes:</h3>\n", css_title );
+			file.printf ( "<table class=\"%s\">\n", css_errordomain_table );
+			foreach ( ErrorCode errcode in error_codes ) {
+				file.puts ( "<tr>\n" );
+				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_errordomain_table_name, errcode.name, errcode.name );
+				file.printf ( "\t<td class=\"%s\">\n", css_errordomain_table_text );
+
+				errcode.write_comment ( file );
+
+				file.puts ( "\t</td>\n" );
+				file.puts ( "</tr>\n" );
+			}
+			file.puts ( "</table>\n" );
+		}
+	}
+
+	public void write_signal_content ( GLib.FileStream file, Signal sig ) {
+		string full_name = sig.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_signal ( sig, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		sig.write_comment ( file );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_delegate_content ( GLib.FileStream file, Delegate del ) {
+		string full_name = del.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_delegate ( del, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		del.write_comment ( file );
+
+		if ( del.parent is Namespace ) {
+			this.write_namespace_note ( file, del );
+			this.write_package_note ( file, del );
+		}
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_field_content ( GLib.FileStream file, Field field, FieldHandler parent ) {
+		string full_name = field.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_field ( field, parent, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		field.write_comment ( file );
+
+		if ( field.parent is Namespace ) {
+			this.write_namespace_note ( file, field );
+			this.write_package_note ( file, field );
+		}
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_constant_content ( GLib.FileStream file, Constant constant, ConstantHandler parent ) {
+		string full_name = constant.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_constant ( constant, parent, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		constant.write_comment ( file );
+
+		if ( constant.parent is Namespace ) {
+			this.write_namespace_note ( file, constant );
+			this.write_package_note ( file, constant );
+		}
+
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_property_content ( GLib.FileStream file, Property prop ) {
+		string full_name = prop.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_property ( prop, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		prop.write_comment ( file );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_enum_content ( GLib.FileStream file, Enum en ) {
+		string full_name = en.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		en.write_comment ( file );
+
+		if ( en.parent is Namespace ) {
+			this.write_namespace_note ( file, en );
+			this.write_package_note ( file, en );
+		}
+
+		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
+		this.write_child_enum_values ( file, en );
+		this.write_child_methods ( file, en );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	private void write_child_enum_values ( GLib.FileStream file, Enum en ) {
+		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ();
+		if ( enum_values.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Enum Values:</h3>\n", css_title );
+			file.printf ( "<table class=\"%s\">\n", css_enum_table );
+			foreach ( EnumValue enval in enum_values ) {
+				file.puts ( "<tr>\n" );
+				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_enum_table_name, enval.name, enval.name );
+				file.printf ( "\t<td class=\"%s\">\n", css_enum_table_text );
+
+				enval.write_comment ( file );
+
+				file.puts ( "\t</td>\n" );
+				file.puts ( "</tr>\n" );
+			}
+			file.puts ( "</table>\n" );
+		}
+	}
+
+	protected void write_child_methods ( GLib.FileStream file, MethodHandler mh ) {
+		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ();
+		if ( methods.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Methods:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Method m in methods ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m, mh), m.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	public void write_class_content ( GLib.FileStream file, Class cl ) {
+		string full_name = cl.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		this.write_image_block ( file, cl );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_class ( cl, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		cl.write_comment ( file );
+		if ( cl.parent is Namespace ) {
+			this.write_namespace_note ( file, cl );
+			this.write_package_note ( file, cl );
+		}
+		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
+		this.write_child_construction_methods ( file, cl );
+		this.write_child_classes ( file, cl );
+		this.write_child_structs ( file, cl );
+		this.write_child_enums ( file, cl );
+		this.write_child_delegates ( file, cl );
+		this.write_child_methods ( file, cl );
+		this.write_child_signals ( file, cl );
+		this.write_child_properties ( file, cl );
+		this.write_child_fields ( file, cl );
+		this.write_child_constants ( file, cl );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_interface_content ( GLib.FileStream file, Interface iface ) {
+		string full_name = iface.full_name ();
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		this.write_image_block ( file, iface );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_interface ( iface, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		iface.write_comment ( file );
+		if ( iface.parent is Namespace ) {
+			this.write_namespace_note ( file, iface );
+			this.write_package_note ( file, iface );
+		}
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
+		this.write_child_classes ( file, iface );
+		this.write_child_structs ( file, iface );
+		this.write_child_delegates ( file, iface );
+		this.write_child_methods ( file, iface );
+		this.write_child_signals ( file, iface );
+		this.write_child_properties ( file, iface );
+		this.write_child_fields ( file, iface );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_error_domain_content ( GLib.FileStream file, ErrorDomain errdom ) {
+		string full_name = errdom.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		errdom.write_comment ( file );
+		if ( errdom.parent is Namespace ) {
+			this.write_namespace_note ( file, errdom );
+			this.write_package_note ( file, errdom );
+		}
+		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
+		this.write_child_error_values ( file, errdom );
+		this.write_child_methods ( file, errdom );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	public void write_struct_content ( GLib.FileStream file, Struct stru ) {
+		string full_name = stru.full_name ( );
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		this.write_image_block ( file, stru );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		stru.write_comment ( file );
+		if ( stru.parent is Namespace ) {
+			this.write_namespace_note ( file, stru );
+			this.write_package_note ( file, stru );
+		}
+		file.printf ( "\n\t\t\t\t<h2 class=\"%s\">Content:</h2>\n", css_title );
+		file.printf ( "\t\t\t\t<div class=\"%s\">\n\t", css_code_definition );
+		this.langlet.write_struct ( stru, file );
+		file.printf ( "\n\t\t\t\t</div>\n" );
+		this.write_child_construction_methods ( file, stru );
+		this.write_child_methods ( file, stru );
+		this.write_child_fields ( file, stru );
+		this.write_child_constants ( file, stru );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+
+	protected abstract string get_img_real_path ( Basic element );
+
+	protected abstract string get_img_path ( Basic element );
+
+
+	protected void write_child_constants ( GLib.FileStream file, ConstantHandler ch ) {
+		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ();
+		if ( constants.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Constants:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Constant c in constants ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_constant, css_navi_link, this.get_link(c, ch), c.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_enums ( GLib.FileStream file, EnumHandler eh ) {
+		Gee.Collection<Enum> enums = eh.get_enum_list ();
+		if ( enums.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Enum en in enums ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_enum, css_navi_link, this.get_link(en, eh), en.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh ) {
+		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ();
+		if ( methods.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Construction Methods:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Method m in methods ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m, cmh), m.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_image_block ( GLib.FileStream file, DataType element ) {
+		string realimgpath = this.get_img_real_path ( element );
+		string imgpath = this.get_img_path ( element );
+
+		if ( element is Class ) {
+			Diagrams.write_class_diagram ( (Class)element, realimgpath );
+		}
+		else if ( element is Interface ) {
+			Diagrams.write_interface_diagram ( (Interface)element, realimgpath );
+		}
+		else if ( element is Struct ) {
+			Diagrams.write_struct_diagram ( (Struct)element, realimgpath );
+		}
+
+		file.printf ( "<h2 cass=\"%s\">Object Hierarchy:</h2>\n", css_title );
+		file.printf ( "<img cass=\"%s\" src=\"%s\"/>\n", css_diagram, imgpath );
+	}
+
+	protected void write_child_fields ( GLib.FileStream file, FieldHandler fh ) {
+		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ();
+		if ( fields.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Fields:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Field f in fields ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_fields, css_navi_link, this.get_link(f, fh), f.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_properties ( GLib.FileStream file, PropertyHandler ph ) {
+		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ();
+		if ( properties.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Properties:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Property prop in properties ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_property, css_navi_link, this.get_link(prop, ph), prop.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_signals ( GLib.FileStream file, SignalHandler sh ) {
+		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ();
+		if ( signals.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Signals:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Signal sig in signals ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_signal, css_navi_link, this.get_link(sig, sh), sig.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_classes ( GLib.FileStream file, ClassHandler clh ) {
+		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ();
+		if ( classes.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Classes:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Class subcl in classes ) {
+				string name;
+				if ( subcl.is_abstract ) {
+					name = "<i>" + subcl.name + "</i>";
+				}
+				else {
+					name = subcl.name;
+				}
+
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_class, css_navi_link, this.get_link(subcl, clh), name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_delegates ( GLib.FileStream file, DelegateHandler dh ) {
+		Gee.Collection<Delegate> delegates = dh.get_delegate_list ();
+		if ( delegates.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Delegates:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Delegate d in delegates ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_delegate, css_navi_link, this.get_link(d, dh), d.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	protected void write_child_structs ( GLib.FileStream file, StructHandler struh ) {
+		Gee.Collection<Struct> structs = struh.get_struct_list ();
+		if ( structs.size > 0 ) {
+			file.printf ( "<h3 class=\"%s\">Structs:</h3>\n", css_title );
+			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
+			foreach ( Struct stru in structs ) {
+				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_struct, css_navi_link, this.get_link(stru, struh), stru.name );
+			}
+			file.puts ( "</ul>\n" );
+		}
+	}
+
+	public void write_namespace_content ( GLib.FileStream file, Namespace ns ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, (ns.name == null)? "Global Namespace" : ns.full_name () );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		ns.write_comment ( file );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+	protected void write_file_content ( GLib.FileStream file, Package f ) {
+		file.printf ( "\t\t\t<div class=\"%s\">\n", css_style_content );
+		file.printf ( "\t\t\t\t<h1 class=\"%s\">%s:</h1>\n", css_title, f.name );
+		file.printf ( "\t\t\t\t<hr class=\"%s\" />\n", css_headline_hr );
+		file.printf ( "\t\t\t\t<h2 class=\"%s\">Description:</h2>\n", css_title );
+		file.puts ( "\t\t\t</div>\n" );
+	}
+
+
+	protected void write_file_header ( GLib.FileStream file, string css, string title ) {
+		file.puts ( "<html>\n" );
+		file.puts ( "\t<head>\n" );
+		file.puts ( "\t\t<title>Vala Binding Reference</title>\n" );
+		file.printf ( "\t\t<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\" />\n", css );
+		file.puts ( "\t</head>\n" );
+		file.puts ( "\t<body>\n\n" );
+
+		file.printf ( "\t<div class=\"%s\">\n", css_site_header );
+		file.printf ( "\t\t%s Reference Manual\n", title );
+		file.puts ( "\t</div>\n\n" );
+
+		file.printf ( "\t\t<div class=\"%s\">\n", css_style_body );
+	}
+
+	protected void write_file_footer ( GLib.FileStream file ) {
+		file.puts ( "\t</div>\n" );
+
+		file.puts ( "\t<div style= \"clear: left\">\n" );
+		file.puts ( "\t\t<br />\n" );
+		file.puts ( "\t\t<div class=\"site_foother\">\n" );
+		file.puts ( "\t\t\tcreated by <a href=\"http://www.valadoc.org\";>valadoc</a>\n" );
+		file.puts ( "\t\t</div>\n" );
+		file.puts ( "\t</div>\n" );
+		file.puts ( "\t</body>\n" );
+		file.puts ( "</html>" );
+	}
+}
+

Modified: trunk/src/doclets/valadoc.org/doclet/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/doclet/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/doclet/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -12,7 +12,7 @@
 
 
 libdoclet.vala.stamp: $(libdoclet_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --vapidir ../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -33,6 +33,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../libvaladoc/   \
+	-I ../../htmlhelpers/     \
 	-I ../linkhelper/         \
 	-I ../                    \
 	$(GLIB_CFLAGS)            \
@@ -43,11 +44,12 @@
 libdoclet_la_LDFLAGS = -module -avoid-version
 
 
-libdoclet_la_LIBADD =                 \
-	../../../libvaladoc/libvaladoc.la \
-	../linkhelper/libhtmlhelper.la    \
-	$(GLIB_LIBS)                      \
-	$(LIBVALA_LIBS)                   \
+libdoclet_la_LIBADD =                   \
+	../../htmlhelpers/libhtmlhelpers.la \
+	../../../libvaladoc/libvaladoc.la   \
+	../linkhelper/libhtmlhelper.la      \
+	$(GLIB_LIBS)                        \
+	$(LIBVALA_LIBS)                     \
 	$(NULL)
 
 

Modified: trunk/src/doclets/valadoc.org/doclet/template.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/doclet/template.vala	(original)
+++ trunk/src/doclets/valadoc.org/doclet/template.vala	Tue Nov  4 22:35:00 2008
@@ -24,469 +24,13 @@
 
 
 
-
-
-public class Valadoc.LangletIndex : Valadoc.Langlet, Valadoc.LinkHelper {
-	public Valadoc.Settings settings {
-		construct set;
-		protected get;
+public class Valadoc.LangletIndex : Valadoc.BasicHtmlLanglet, Valadoc.LinkHelper {
+	protected override string get_link ( Basic element, Basic pos ) {
+		return this.get_html_link ( this.settings, element );
 	}
 
 	public LangletIndex ( Settings settings ) {
-		this.settings = settings;
-	}
-
-	private Basic position = null;
-
-	private inline bool is_basic_type ( string name ) {
-		string[] basic_types = new string[] { "bool", "char", "uchar", "int", "uint", "short", "ushort",
-				"long", "ulong", "size_t", "ssize_t", "int8", "uint8", "int16", "uint16", "int32",
-				"uint32", "int64", "uint64", "float", "double", "time_t", "unichar", "string"
-			};
-
-		foreach ( string str in basic_types ) {
-			if ( str == name )
-				return true;
-		}
-
-		return false;
-	}
-
-	private void write_type_name ( DataType? datatype, GLib.FileStream file ) {
-		if ( datatype == null ) {
-			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
-			return ;
-		}
-
-		string typename = datatype.full_name ();
-		if ( datatype.parent.name == null && (datatype is Class || datatype is Struct) ) {
-			if ( this.is_basic_type ( typename ) ) {
-				string link = this.get_link( datatype );
-				if ( link == null )
-					file.printf ( "<span class=\"%s\">%s</span>", css_basic_type, typename );
-				else
-					file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_basic_type, link, typename );
-				return ;
-			}
-		}
-
-		string link = this.get_link( datatype );
-		if ( link == null )
-		file.printf ( "<span class=\"%s\">%s</span>", css_other_type, typename );
-		else
-			file.printf ( "<a class=\"%s\" href=\"%s\">%s</a>", css_other_type, link, typename );
-	}
-
-	private void write_type_reference_name ( TypeReference type_reference, GLib.FileStream file ) {
-		if ( type_reference.type_name == "void" ) {
-			file.printf ( "<font class=\"%s\">void</font>", css_keyword );
-		}
-		else {
-			if ( type_reference.data_type == null  ) {
-				file.printf ( "<font class=\"%s\">%s</font>", css_other_type, type_reference.type_name );
-			}
-			else {
-				this.write_type_name ( type_reference.data_type, file );
-			}
-		}
-	}
-
-	private void write_type_reference_template_arguments ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
-		Gee.Collection<TypeReference> arglst = type_reference.get_type_arguments ( );
-		int size = arglst.size;
-		if ( size == 0 )
-			return ;
-
-		file.puts ( "<" );
-		int i = 0;
-
-		foreach ( TypeReference arg in arglst ) {
-			i++;
-
-			this.write_nested_type_referene ( arg, file );
-			if ( i != size )
-				file.puts ( ", " );
-		}
-
-		file.puts ( ">" );
-	}
-
-	private void write_nested_type_referene ( Valadoc.TypeReference type_reference, GLib.FileStream file ) {
-		if ( type_reference.type_name == null )
-			return ;
-
-		if ( type_reference.is_weak )
-			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
-
-		this.write_type_reference_name ( type_reference, file );
-		this.write_type_reference_template_arguments ( type_reference, file );
-
-		if ( type_reference.is_array ) {
-			string str = string.nfill ( type_reference.array_rank-1, ',');
-			file.printf ( "[%s]", str );
-		}
-
-		if ( type_reference.pass_ownership ) {
-			file.putc ( '#' );
-		}
-
-		if ( type_reference.is_nullable ) {
-			file.putc ( '?' );
-		}
-
-		string str = string.nfill ( type_reference.pointer_rank, '*' );
-		file.puts ( str );
-
-	}
-
-	public override void write_type_reference ( Valadoc.TypeReference type_reference, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		if ( type_reference == null )
-			return ;
-
-		this.write_nested_type_referene ( type_reference, file );
-		file.putc ( ' ' );
-
-		/*
-		if ( type_reference.is_weak ) {
-			file.printf ( "<font class=\"%s\">weak</font> ", css_keyword );
-		}
-
-		this.write_type_name ( type_reference.data_type, file );
-
-		if ( type_reference.is_array ) {
-			string str = string.nfill ( type_reference.array_rank-1, ',');
-			file.printf ( "[%s]", str );
-		}
-
-		if ( type_reference.pass_ownership ) {
-			file.putc ( '#' );
-		}
-
-		if ( type_reference.is_nullable ) {
-			file.putc ( '?' );
-		}
-
-		string str = string.nfill ( type_reference.pointer_rank, '*' );
-		file.puts ( str );
-		*/
-	}
-
-	private void write_formal_parameter ( FormalParameter param, GLib.FileStream file ) {
-		if ( param.ellipsis ) {
-			file.puts ( " ..." );
-		}
-		else {
-			if ( param.is_out )
-				file.printf ( "<span class=\"%s\">out</span> ", css_keyword );
-			else if ( param.is_ref )
-				file.printf ( "<span class=\"%s\">ref</span> ", css_keyword );
-
-			this.write_type_reference ( param.type_reference, file );
-			file.printf ( " %s", param.name );
-		}
-	}
-
-	public override void write_parameter_list ( ParameterListHandler thandler, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		bool open_bracket = false;
-
-		Gee.ArrayList<FormalParameter> params = thandler.param_list;
-		int size = params.size;
-		int i = 0;
-
-		file.putc ( '(' );
-
-		foreach ( FormalParameter param in params ) {
-			i++;
-
-			if ( param.default_value != null && open_bracket == false ) {
-				file.printf ( "<span class=\"%s\">[", css_optional_parameter );
-				open_bracket = true;
-			}
-
-			this.write_formal_parameter ( param, file );
-			if ( i != size ) {
-				file.puts ( ", " );
-			}
-			else if ( open_bracket == true ) {
-				file.puts ( "]</span>" );
-			}
-		}
-
-		file.putc ( ')' );
-	}
-
-	private void write_exception_list ( ExceptionHandler exception_handler, GLib.FileStream file ) {
-		Gee.ReadOnlyCollection<TypeReference> error_domains = exception_handler.get_error_domains ();
-		int size = error_domains.size;
-		int i = 1;
-
-		if ( size == 0 )
-			return ;
-
-		file.printf ( " <span class=\"%s\">throws</span> ", css_keyword );
-
-		foreach ( TypeReference type_reference in error_domains ) {
-			this.write_type_reference ( type_reference, file );
-			if ( error_domains.size > i ) {
-				file.puts ( ", " );
-			}
-			i++;
-		}
-	}
-
-	public override void write_method ( void* ptr, Valadoc.Method m, Valadoc.MethodHandler parent ) {
-		this.position = m;
-
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( m, file );
-
-		if ( m.is_abstract )
-			modifiers.append ( " abstract" );
-		if ( m.is_virtual )
-			modifiers.append ( " virtual" );
-		if ( m.is_override )
-			modifiers.append ( " override" );
-		if ( m.is_static )
-			modifiers.append ( " static" );
-		if ( m.is_inline )
-			modifiers.append ( " inline" );
-
-		file.printf ( " <span class=\"%s\">%s</span> ", css_keyword, modifiers.str );
-		this.write_type_reference ( m.return_type, file );
-		file.puts ( m.name );
-		this.write_parameter_list ( m, file );
-		this.write_exception_list ( m, file );
-	}
-
-	public override void write_type_parameter ( TypeParameter param, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		file.puts ( param.datatype_name );
-	}
-
-	public override void write_template_parameters ( TemplateParameterListHandler thandler, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		int i = 1;
-
-		var lst = thandler.get_template_param_list( );
-		if ( lst.size == 0 )
-			return ;
-
-		file.puts ( "&lt;" ); // <
-
-
-		foreach ( TypeParameter param in lst ) {
-			param.write ( this, file );
-			if ( lst.size > i )
-				file.puts ( ", " );
-
-			i++;
-		}
-		file.puts ( "&gt;" ); // >
-	}
-
-	public override void write_field ( Valadoc.Field field, Valadoc.FieldHandler parent, void* ptr ) {
-		this.position = field;
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( field, file );
-
-		if ( field.is_volatile )
-			file.printf ( " <span class=\"%s\">volatile</span>", css_keyword );
-
-		this.write_type_reference ( field.type_reference, file );
-
-		file.printf ( " %s", field.name );
-	}
-
-	public override void write_constant ( Constant constant, ConstantHandler parent, void* ptr ) {
-		this.position = constant;
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( constant, file );
-		file.printf ( " <span class=\"%s\"> const </span>", css_keyword );
-		this.write_type_reference ( constant.type_reference, file );
-		file.printf ( " %s", constant.name );
-	}
-
-	public override void write_property_accessor ( Valadoc.PropertyAccessor propac, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		Property prop = (Property)propac.parent;
-
-		if ( !(prop.is_public == propac.is_public && prop.is_private == propac.is_private && prop.is_protected == propac.is_protected) ) {
-			// FIXME: PropertyAccessor isn't a SymbolAccessibility. (Valac-Bug.)
-			if ( propac.is_public )
-				file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
-			else if ( propac.is_protected )
-				file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
-			else if ( propac.is_private )
-				file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
-		}
-
-
-		if ( propac.is_get ) {
-			file.printf ( "<span class=\"%s\"> get</span>;", css_keyword );
-		}
-		else if ( propac.is_set ) {
-			if ( propac.is_construct ) {
-				file.printf ( "<span class=\"%s\"> construct</span> ", css_keyword );
-			}
-
-			file.printf ( "<span class=\"%s\"> set</span>;", css_keyword );
-		}
-	}
-
-	public override void write_property ( Valadoc.Property prop, void* ptr ) {
-		this.position = prop;
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-
-		this.write_accessor ( prop, file );
-
-		if ( prop.is_virtual )
-			modifiers.append ( " virtual " );
-		if ( prop.is_abstract )
-			modifiers.append ( " abstract " );
-		if ( prop.is_override )
-			modifiers.append ( " override " );
-
-
-		this.write_type_reference ( prop.return_type, file );
-		file.printf ( " <span class=\"%s\">%s</span>%s { ", css_keyword, modifiers.str, prop.name );
-
-		if ( prop.setter != null )
-			this.write_property_accessor ( prop.setter, file );
-
-
-		file.printf ( " " );
-
-		if ( prop.getter != null )
-			this.write_property_accessor ( prop.getter, file );
-
-		file.printf ( " }" );
-	}
-
-	public override void write_signal ( Valadoc.Signal sig, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = sig;
-
-		this.write_accessor ( sig, file );
-
-		file.printf ( " <span class=\"%s\">signal</span> ", css_keyword );
-		this.write_type_reference ( sig.return_type, file );
-		file.printf ( " %s ", sig.name );
-		this.write_parameter_list ( sig, file );
-	}
-
-	public override void write_enum_value ( Valadoc.EnumValue enval, void* ptr ) {
-	}
-
-	public override void write_error_code ( Valadoc.ErrorCode errcode, void* ptr ) {
-	}
-
-	public override void write_delegate ( Valadoc.Delegate del, void* ptr ) {
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = del;
-
-		this.write_accessor ( del, file );
-
-		file.printf ( " <span class=\"%s\">delegate</span> ", css_keyword );
-		this.write_type_reference ( del.return_type, file );
-		file.printf ( " %s ", del.name );
-		this.write_parameter_list ( del, file );
-		this.write_exception_list ( del, file );
-	}
-
-	public override void write_enum ( Valadoc.Enum en, void* ptr ) {
-	}
-
-	public override void write_error_domain ( Valadoc.ErrorDomain errdom, void* ptr ) {
-	}
-
-	private void write_accessor ( Valadoc.SymbolAccessibility element, GLib.FileStream file ) {
-		if ( element.is_public )
-			file.printf ( "<span class=\"%s\">public</span> ", css_keyword );
-		else if ( element.is_protected )
-			file.printf ( "<span class=\"%s\">protected</span> ", css_keyword );
-		else if ( element.is_private )
-			file.printf ( "<span class=\"%s\">private</span> ", css_keyword );
-	}
-
-
-	public override void write_struct ( Valadoc.Struct stru, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = stru;
-
-		this.write_accessor ( stru, file );
-		file.printf ( "<span class=\"%s\">struct</span> %s", css_keyword, stru.name );
-		this.write_template_parameters ( stru, ptr );
-		this.write_inheritance_list ( stru, file );
-	}
-
-	private void write_inheritance_list ( Valadoc.ContainerDataType dtype, GLib.FileStream file ) {
-		Gee.Collection<DataType> lst = dtype.get_parent_types ( );
-		int size = lst.size;
-		int i = 1;
-
-		if ( size == 0 )
-			return ;
-
-		file.puts ( " : " );
-
-		foreach ( DataType cntype in lst ) {
-			this.write_type_name ( cntype, file );
-			if ( size > i )
-				file.puts ( ", " );
-
-			i++;
-		}
-
-		file.putc ( ' ' );
-	}
-
-	public override void write_class ( Valadoc.Class cl, void* ptr ) {
-		GLib.StringBuilder modifiers = new GLib.StringBuilder ( "" );
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = cl;
-
-		this.write_accessor ( cl, file );
-
-		if ( cl.is_abstract )
-			modifiers.append ( "abstract " );
-		else if ( cl.is_static )
-			modifiers.append ( "static " );
-
-		file.printf ( "<span class=\"%s\">%s class</span> %s", css_keyword, modifiers.str, cl.name );
-
-		this.write_template_parameters ( cl, file );
-		this.write_inheritance_list ( cl, file );
-	}
-
-	public override void write_interface ( Valadoc.Interface iface, void* ptr ) {
-		weak GLib.FileStream file = (GLib.FileStream)ptr;
-		this.position = iface;
-
-		this.write_accessor ( iface, file );
-
-		if ( iface.is_static  )
-			file.printf ( "<span class=\"%s\">static interface</span> %s", css_keyword, iface.name );
-		else
-			file.printf ( "<span class=\"%s\">interface</span> %s", css_keyword, iface.name );
-
-		this.write_template_parameters ( iface, ptr );
-		this.write_inheritance_list ( iface, file );
-	}
-
-	public override void write_namespace ( Valadoc.Namespace ns, void* ptr ) {
-	}
-
-	public override void write_file ( Valadoc.Package file, void* ptr ) {
+		base ( settings );
 	}
 }
 
@@ -498,482 +42,21 @@
 
 
 
-public class Valadoc.HtmlDoclet : Valadoc.Doclet, Valadoc.LinkHelper {
-	private Valadoc.LangletIndex langlet;
-
+public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 	private string current_path = null;
 	private bool is_vapi = false;
 
-
-	private void write_navi_entry_html_template ( GLib.FileStream file, string style, string content ) {
-		file.printf ( "\t<li class=\"%s\">%s</li>\n", style, content );
-	}
-
-	private void write_navi_entry_html_template_with_link ( GLib.FileStream file, string style, string link, string content ) {
-		file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", style, css_navi_link, link, content );
-	}
-
-	private void write_navi_entry ( GLib.FileStream file, Basic element, string style, bool link, bool full_name = false ) {
-		string name;
-
-		if ( element is Class ) {
-			if ( ((Class)element).is_abstract )
-				name = "<i>" + element.name + "</i>";
-			else
-				name = element.name;
-		}
-		else if ( element is Package ) {
-			string path = this.get_file_name ( element );
-			name = this.get_package_name ( path );
-		}
-		else if ( full_name == true && element is Namespace ) {
-			string tmp = element.full_name();
-			name = (tmp == null)? "Global Namespace" : tmp;
-		}
-		else {
-			string tmp = element.name;
-			name = (tmp == null)? "Global Namespace" : tmp;
-		}
-
-		if ( link == true )
-			this.write_navi_entry_html_template_with_link ( file, style, this.get_link (element), name );
-		else
-			this.write_navi_entry_html_template ( file, style, name );
-	}
-
-	private void write_navi_top_entry ( GLib.FileStream file, Basic element, Basic mself ) {
-		string name = (element.name == null)? "Global Namespace" : element.name;
-		string style = null;
-
-		if ( element is Namespace )
-			style = css_navi_namespace;
-		else if ( element is Enum )
-			style = css_navi_enum;
-		else if ( element is ErrorDomain )
-			style = css_navi_error_domain;
-		else if ( element is Struct )
-			style = css_navi_struct;
-		else if ( element is Class )
-			style = css_navi_class;
-		else if ( element is Interface )
-			style = css_navi_iface;
-		else if ( element is Package ) {
-			name = this.get_package_name ( element.name );
-			style = css_navi_package;
-		}
-
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		if ( element == mself )
-			this.write_navi_entry ( file, element, style, false );
-		else
-			this.write_navi_entry ( file, element, style, true );
-
-		file.puts ( "</ul>\n" );
-		file.printf ( "\n<hr class=\"%s\">\n", css_navi_hr );
-	}
-
-	private void write_top_element ( GLib.FileStream file ) {
-		file.printf ( "<ul class=\"%s\">\n\t\t<li class=\"%s\"><a class=\"%s\" href=\"?\">Packages</a></li>\n</ul>\n<hr class=\"%s\">\n", css_navi, css_navi_package_index, css_navi_link, css_navi_hr );
-	}
-
-	private void write_top_elements ( GLib.FileStream file, Basic element, Basic? mself = null ) {
-		Gee.ArrayList<Basic> lst = new Gee.ArrayList<Basic> ();
-		Basic pos = element;
-
-		if ( mself == null )
-			mself = element;
-
-		string file_name = this.get_file_name ( element );
-		string package_name = this.get_package_name ( file_name );
-
-		this.write_top_element ( file );
-
-		while ( pos != null ) {
-			lst.add ( pos );
-			pos = pos.parent;
-		}
-
-		for ( int i = lst.size-1; i >= 0  ; i-- ) {
-			Basic el = lst.get ( i );
-			this.write_navi_top_entry ( file, el, mself );
-		}
-	}
-
-
-	private void fetch_subnamespace_names ( NamespaceHandler pos, Gee.ArrayList<Namespace> lst ) {
-		Gee.ReadOnlyCollection<Namespace> nspaces = pos.get_namespace_list ();
-
-		foreach ( Namespace ns in nspaces ) {
-			lst.add ( ns );
-			this.fetch_subnamespace_names ( ns, lst );
-		}
-	}
-
-	private void write_navi_file ( GLib.FileStream file, Package efile ) {
-		Gee.ArrayList<Namespace> ns_list = new Gee.ArrayList<Namespace> ();
-		this.fetch_subnamespace_names (efile, ns_list );
-
-		this.write_top_elements ( file, efile );
-
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		foreach ( Namespace ns in ns_list ) {
-			this.write_navi_entry ( file, ns, css_navi_namespace, true, true );
-		}
-
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_child_namespaces_inline ( GLib.FileStream file, Namespace ns, Basic mself = null ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_namespaces_without_childs ( file, ns, mself );
-		this.write_navi_child_classes_without_childs ( file, ns, mself );
-		this.write_navi_child_interfaces_without_childs ( file, ns, mself );
-		this.write_navi_child_structs_without_childs ( file, ns, mself );
-		this.write_navi_child_enums_without_childs ( file, ns, mself );
-		this.write_navi_child_error_domains_without_childs ( file, ns, mself );
-		this.write_navi_child_delegates ( file, ns, mself );
-		this.write_navi_child_methods ( file, ns, mself );
-		this.write_navi_child_fields ( file, ns, mself );
-		this.write_navi_child_constants ( file, ns, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_child_namespaces ( GLib.FileStream file, Namespace ns, Basic mself = null ) {
-		this.write_top_elements ( file, ns );
-		this.write_navi_child_namespaces_inline ( file, ns, mself );
-	}
-
-	private void write_navi_struct_inline ( GLib.FileStream file, Struct stru, Basic mself = null ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_construction_methods ( file, stru, mself );
-		this.write_navi_child_methods ( file, stru, mself );
-		this.write_navi_child_fields ( file, stru, mself );
-		this.write_navi_child_constants ( file, stru, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_struct ( GLib.FileStream file, Struct stru, Basic mself = null ) {
-		this.write_top_elements ( file, stru );
-		this.write_navi_struct_inline ( file, stru, mself );
-	}
-
-	private void write_navi_interface_inline ( GLib.FileStream file, Interface iface, Basic mself = null ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_delegates ( file, iface, mself );
-		this.write_navi_child_methods ( file, iface, mself );
-		this.write_navi_child_signals ( file, iface, mself );
-		this.write_navi_child_properties ( file, iface, mself );
-		this.write_navi_child_fields ( file, iface, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_interface ( GLib.FileStream file, Interface iface, Basic mself = null ) {
-		this.write_top_elements ( file, iface );
-		this.write_navi_interface_inline ( file, iface, mself );
-	}
-
-	private void write_navi_enum_inline ( GLib.FileStream file, Enum en, Basic mself = null ) {
-		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ( );
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		foreach ( EnumValue env in enum_values ) {
-			this.write_navi_entry ( file, env, css_navi_enval, true );
-		}
-
-		this.write_navi_child_methods ( file, en, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_enum ( GLib.FileStream file, Enum en, Basic mself = null ) {
-		this.write_top_elements ( file, en );
-		this.write_navi_enum_inline ( file, en, mself );
-	}
-
-	private void write_navi_error_domain_inline ( GLib.FileStream file, ErrorDomain errdom, Basic mself = null ) {
-		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ( );
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-
-		foreach ( ErrorCode ec in error_codes ) {
-			this.write_navi_entry ( file, ec, css_navi_errdomcode, true );
-		}
-
-		this.write_navi_child_methods ( file, errdom, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_error_domain ( GLib.FileStream file, ErrorDomain errdom, Basic mself = null ) {
-		this.write_top_elements ( file, errdom );
-		this.write_navi_error_domain_inline ( file, errdom, mself );
-	}
-
-	private void write_navi_class_inline ( GLib.FileStream file, Class cl, Basic mself = null ) {
-		file.printf ( "<ul class=\"%s\">\n", css_navi );
-		this.write_navi_child_construction_methods ( file, cl, mself );
-		this.write_navi_child_classes_without_childs ( file, cl, mself );
-		this.write_navi_child_structs_without_childs ( file, cl, mself );
-		this.write_navi_child_enums_without_childs ( file, cl, mself );
-		this.write_navi_child_delegates ( file, cl, mself );
-		this.write_navi_child_methods ( file, cl, mself );
-		this.write_navi_child_signals ( file, cl, mself );
-		this.write_navi_child_properties ( file, cl, mself );
-		this.write_navi_child_fields ( file, cl, mself );
-		this.write_navi_child_constants ( file, cl, mself );
-		file.puts ( "</ul>\n" );
-	}
-
-	private void write_navi_class ( GLib.FileStream file, Class cl, Basic mself = null ) {
-		this.write_top_elements ( file, cl );
-		this.write_navi_class_inline ( file, cl, mself );
-	}
-
-	private void write_navi_method ( GLib.FileStream file, Method m ) {
-		Basic parent = m.parent;
-
-		this.write_top_elements ( file, parent, m );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, m );
-		else if ( m.parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, m );
-		else if ( m.parent is Struct )
-			this.write_navi_struct_inline ( file, (Struct)parent, m );
-		else if ( m.parent is Enum )
-			this.write_navi_enum_inline ( file, (Enum)parent, m );
-		else if ( m.parent is ErrorDomain )
-			this.write_navi_error_domain_inline ( file, (ErrorDomain)parent, m );
-		else if ( m.parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, m );
-	}
-
-	private void write_navi_property ( GLib.FileStream file, Property prop ) {
-		Basic parent = prop.parent;
-
-		this.write_top_elements ( file, prop.parent, prop );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, prop );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, prop );
-	}
-
-	private void write_navi_signal ( GLib.FileStream file, Signal sig ) {
-		Basic parent = sig.parent;
-
-		this.write_top_elements ( file, sig.parent, sig );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, sig );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, sig );
-	}
-
-	private void write_navi_constant ( GLib.FileStream file, Constant c ) {
-		Basic parent = c.parent;
-
-		this.write_top_elements ( file, parent, c );
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, c );
-		else  if ( parent is Struct )
-			this.write_navi_struct_inline ( file, (Struct)parent, c );
-		else  if ( parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, c );
-		//else if ( parent is Interface )
-		//	this.write_navi_interface_inline ( file, (Interface)parent, c );
-	}
-
-	private void write_navi_field ( GLib.FileStream file, Field f ) {
-		Basic parent = f.parent;
-
-		this.write_top_elements ( file, parent, f );
-
-		if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, f );
-		else if ( parent is Struct )
-			this.write_navi_struct_inline ( file, (Struct)parent, f );
-		else if ( parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, f );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, f );
-	}
-
-	private void write_navi_delegate ( GLib.FileStream file, Delegate del ) {
-		Basic parent = del.parent;
-
-		this.write_top_elements ( file, parent, del );
-
-		if ( parent is Namespace )
-			this.write_navi_child_namespaces_inline ( file, (Namespace)parent, del );
-		else if ( parent is Class )
-			this.write_navi_class_inline ( file, (Class)parent, del );
-		else if ( parent is Interface )
-			this.write_navi_interface_inline ( file, (Interface)parent, del );
-	}
-
-
-	private void write_navi_child_methods_collection ( GLib.FileStream file, Gee.Collection<Method> methods, Basic mself = null ) {
-		foreach ( Method m in methods ) {
-			if ( m == mself )
-				this.write_navi_entry ( file, m, css_navi_construction_method, false );
-			else
-				this.write_navi_entry ( file, m, css_navi_construction_method, true );
-		}
-	}
-
-	private void write_navi_child_methods ( GLib.FileStream file, MethodHandler mh, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ( );
-		this.write_navi_child_methods_collection ( file, methods, mself );
-	}
-
-	private void write_navi_child_classes_without_childs_collection ( GLib.FileStream file, Gee.Collection<Class> classes, Basic mself = null ) {
-		foreach ( Class cl in classes ) {
-			if ( cl == mself )
-				this.write_navi_entry ( file, cl, css_navi_class, false );
-			else
-				this.write_navi_entry ( file, cl, css_navi_class, true );
-		}
-	}
-
-	private void write_navi_child_classes_without_childs ( GLib.FileStream file, ClassHandler clh, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ( );
-		this.write_navi_child_classes_without_childs_collection ( file, classes, mself );
-	}
-
-	private void write_navi_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ( );
-		this.write_navi_child_methods_collection ( file, methods, mself );
-	}
-
-	private void write_navi_child_signals ( GLib.FileStream file, SignalHandler sh, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ( );
-
-		foreach ( Signal sig in signals ) {
-			if ( sig == mself )
-				this.write_navi_entry ( file, sig, css_navi_sig, false );
-			else
-				this.write_navi_entry ( file, sig, css_navi_sig, true );
-		}
-	}
-
-	private void write_navi_child_properties ( GLib.FileStream file, PropertyHandler ph, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ( );
-
-		foreach ( Property p in properties ) {
-			if ( p == mself )
-				this.write_navi_entry ( file, p, css_navi_prop, false );
-			else
-				this.write_navi_entry ( file, p, css_navi_prop, true );
-		}
-	}
-
-	private void write_navi_child_fields_collection ( GLib.FileStream file, Gee.Collection<Field> fields, Basic mself = null ) {
-		foreach ( Field f in fields ) {
-			if ( f == mself )
-				this.write_navi_entry ( file, f, css_navi_field, false );
-			else
-				this.write_navi_entry ( file, f, css_navi_field, true );
-		}
-	}
-
-	private void write_navi_child_fields ( GLib.FileStream file, FieldHandler fh, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ( );
-		this.write_navi_child_fields_collection ( file, fields, mself );
-	}
-
-	private void write_navi_child_constants_collection ( GLib.FileStream file, Gee.Collection<Constant> constants, Basic mself = null ) {
-		foreach ( Constant c in constants ) {
-			if ( c == mself )
-				this.write_navi_entry ( file, c, css_navi_constant, false );
-			else
-				this.write_navi_entry ( file, c, css_navi_constant, true );
-		}
-	}
-
-	private void write_navi_child_constants ( GLib.FileStream file, ConstantHandler ch, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ( );
-		this.write_navi_child_constants_collection ( file, constants, mself );
-	}
-
-	private void write_navi_child_structs_without_childs_collection ( GLib.FileStream file, Gee.Collection<Struct> structs, Basic mself = null ) {
-		foreach ( Struct stru in structs ) {
-			if ( stru == mself )
-				this.write_navi_entry ( file, stru, css_navi_struct, false );
-			else
-				this.write_navi_entry ( file, stru, css_navi_struct, true );
-		}
+	protected override string get_link ( Valadoc.Basic p1, Valadoc.Basic p2 ) {
+		return this.get_html_link ( this.settings, p1 );
 	}
 
-	private void write_navi_child_structs_without_childs ( GLib.FileStream file, StructHandler strh, Basic mself = null ) {
-		Gee.Collection<Struct> structs = strh.get_struct_list ( );
-		this.write_navi_child_structs_without_childs_collection ( file, structs, mself );
+	private override void write_top_element ( GLib.FileStream file, Basic pos ) {
+		this.write_top_element_template ( file, "?" );
 	}
 
-	private void write_navi_child_delegates_collection ( GLib.FileStream file, Gee.Collection<Delegate> delegates, Basic mself = null ) {
-		foreach ( Delegate del in delegates ) {
-			if ( del == mself )
-				this.write_navi_entry ( file, del, css_navi_del, false );
-			else
-				this.write_navi_entry ( file, del, css_navi_del, true );
-		}
-	}
 
-	private void write_navi_child_delegates ( GLib.FileStream file, DelegateHandler delh, Basic mself = null ) {
-		Gee.Collection<Delegate> delegates = delh.get_delegate_list ( );
-		this.write_navi_child_delegates_collection ( file, delegates, mself );
-	}
 
-	private void write_navi_child_interfaces_without_childs_collection ( GLib.FileStream file, Gee.Collection<Interface> interfaces, Basic mself = null ) {
-		foreach ( Interface iface in interfaces ) {
-			if ( iface == mself )
-				this.write_navi_entry ( file, iface, css_navi_iface, false );
-			else
-				this.write_navi_entry ( file, iface, css_navi_iface, true );
-		}
-	}
 
-	private void write_navi_child_interfaces_without_childs ( GLib.FileStream file, Namespace ifh, Basic mself = null ) {
-		Gee.Collection<Interface> interfaces = ifh.get_interface_list ( );
-		this.write_navi_child_interfaces_without_childs_collection ( file, interfaces, mself );
-	}
-
-	private void write_navi_child_enums_without_childs_collection ( GLib.FileStream file, Gee.Collection<Enum> enums, Basic mself = null ) {
-		foreach ( Enum en in enums ) {
-			if ( en == mself )
-				this.write_navi_entry ( file, en, css_navi_enum, false );
-			else
-				this.write_navi_entry ( file, en, css_navi_enum, true );
-		}
-	}
-
-	private void write_navi_child_enums_without_childs ( GLib.FileStream file, EnumHandler eh, Basic mself = null ) {
-		Gee.Collection<Enum> enums = eh.get_enum_list ( );
-		this.write_navi_child_enums_without_childs_collection ( file, enums, mself );
-	}
-
-	private void write_navi_child_error_domains_without_childs_collection ( GLib.FileStream file, Gee.Collection<ErrorDomain> errordomains, Basic mself = null ) {
-		foreach ( ErrorDomain errdom in errordomains ) {
-			if ( errdom == mself )
-				this.write_navi_entry ( file, errdom, css_navi_error_domain, false );
-			else
-				this.write_navi_entry ( file, errdom, css_navi_error_domain, true );
-		}
-	}
-
-	private void write_navi_child_error_domains_without_childs ( GLib.FileStream file, Namespace errdomh, Basic mself = null ) {
-		Gee.Collection<ErrorDomain> errordomains = errdomh.get_error_domain_list ( );
-		this.write_navi_child_error_domains_without_childs_collection ( file, errordomains, mself );
-	}
-
-	private void write_navi_child_namespaces_without_childs ( GLib.FileStream file, NamespaceHandler nsh, Basic mself = null ) {
-		Gee.ReadOnlyCollection<Namespace> namespaces = nsh.get_namespace_list ( );
-		foreach ( Namespace ns in namespaces ) {
-			if ( ns == mself )
-				this.write_navi_entry ( file, ns, css_navi_namespace, false );
-			else
-				this.write_navi_entry ( file, ns, css_navi_namespace, true );
-		}
-	}
 
 	private string get_full_path ( Basic element ) {
 		if ( element.name == null )
@@ -993,8 +76,7 @@
 				str.prepend ( pos.name );
 		}
 
-		string file_path = get_file_name ( element );
-		string package_name = get_package_name ( file_path )  + "/";
+		string package_name = element.file.name  + "/";
 
 		str.prepend ( package_name );
 		str.append_unichar ( '/' );
@@ -1013,26 +95,16 @@
 		this.langlet = new Valadoc.LangletIndex ( settings );
 	}
 
-	private void write_image_block ( GLib.FileStream file, DataType element ) {
-		string realimgpath = this.current_path + "tree.png";
-		string imgpath = "docs/" + get_full_path ( element ) + "tree.png";
-
-		if ( element is Class ) {
-			Diagrams.write_class_diagram ( (Class)element, realimgpath );
-		}
-		else if ( element is Interface ) {
-			Diagrams.write_interface_diagram ( (Interface)element, realimgpath );
-		}
-		else if ( element is Struct ) {
-			Diagrams.write_struct_diagram ( (Struct)element, realimgpath );
-		}
+	protected override string get_img_real_path ( Basic element ) {
+		return this.current_path + "tree.png";
+	}
 
-		file.printf ( "<h2 cass=\"%s\">Object Hierarchy:</h2>\n", css_title );
-		file.printf ( "<img cass=\"%s\" src=\"%s\"/>\n", css_diagram, imgpath );
+	protected override string get_img_path ( Basic element ) {
+		return "docs/" + get_full_path ( element ) + "tree.png";
 	}
 
 	public override void visit_package ( Package file ) {
-		string package_name = this.get_package_name ( file.name );
+		string package_name = file.name;
 		this.is_vapi = file.is_external_package;
 
 		string new_path = this.settings.path + package_name + "/";
@@ -1047,13 +119,6 @@
 		this.current_path = null;
 	}
 
-	public void write_namespace_content ( GLib.FileStream file, Namespace ns ) {
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, (ns.name == null)? "Global Namespace" : ns.full_name() );
-		file.printf ( "<hr class=\"%s\" />\n", css_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		ns.write_comment ( file );
-	}
-
 	public override void visit_namespace ( Namespace ns ) {
 		string old_path = this.current_path;
 
@@ -1069,7 +134,7 @@
 		var rt = DirUtils.create ( this.current_path, 0777 );
 
 		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_child_namespaces ( navi, ns );
+		this.write_navi_child_namespaces ( navi, ns, ns );
 		navi = null;
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
@@ -1091,197 +156,6 @@
 		this.current_path = old_path;
 	}
 
-	private void write_child_classes ( GLib.FileStream file, ClassHandler clh ) {
-		Gee.ReadOnlyCollection<Class> classes = clh.get_class_list ();
-		if ( classes.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Classes:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Class subcl in classes ) {
-				string name;
-				if ( subcl.is_abstract )
-					name = "<i>" + subcl.name + "</i>";
-				else
-					name = subcl.name;
-
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_class, css_navi_link, this.get_link(subcl), name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_enums ( GLib.FileStream file, EnumHandler eh ) {
-		Gee.Collection<Enum> enums = eh.get_enum_list ();
-		if ( enums.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Enum en in enums ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_enum, css_navi_link, this.get_link(en), en.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_structs ( GLib.FileStream file, StructHandler struh ) {
-		Gee.Collection<Struct> structs = struh.get_struct_list ();
-		if ( structs.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Structs:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Struct stru in structs ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_struct, css_navi_link, this.get_link(stru), stru.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_methods ( GLib.FileStream file, MethodHandler mh ) {
-		Gee.ReadOnlyCollection<Method> methods = mh.get_method_list ();
-		if ( methods.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Methods:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Method m in methods ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m), m.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_delegates ( GLib.FileStream file, DelegateHandler dh ) {
-		Gee.Collection<Delegate> delegates = dh.get_delegate_list ();
-		if ( delegates.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Delegates:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Delegate d in delegates ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_delegate, css_navi_link, this.get_link(d), d.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_construction_methods ( GLib.FileStream file, ConstructionMethodHandler cmh ) {
-		Gee.ReadOnlyCollection<Method> methods = cmh.get_construction_method_list ();
-		if ( methods.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Construction Methods:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Method m in methods ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_method, css_navi_link, this.get_link(m), m.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_signals ( GLib.FileStream file, SignalHandler sh ) {
-		Gee.ReadOnlyCollection<Signal> signals = sh.get_signal_list ();
-		if ( signals.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Signals:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Signal sig in signals ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_signal, css_navi_link, this.get_link(sig), sig.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_properties ( GLib.FileStream file, PropertyHandler ph ) {
-		Gee.ReadOnlyCollection<Property> properties = ph.get_property_list ();
-		if ( properties.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Properties:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Property prop in properties ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_property, css_navi_link, this.get_link(prop), prop.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_fields ( GLib.FileStream file, FieldHandler fh ) {
-		Gee.ReadOnlyCollection<Field> fields = fh.get_field_list ();
-		if ( fields.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Fields:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Field f in fields ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_fields, css_navi_link, this.get_link(f), f.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_constants ( GLib.FileStream file, ConstantHandler ch ) {
-		Gee.ReadOnlyCollection<Constant> constants = ch.get_constant_list ();
-		if ( constants.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Constants:</h3>\n", css_title );
-			file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
-			foreach ( Constant c in constants ) {
-				file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_constant, css_navi_link, this.get_link(c), c.name );
-			}
-			file.puts ( "</ul>\n" );
-		}
-	}
-
-	private void write_child_error_values ( GLib.FileStream file, ErrorDomain errdom ) {
-		Gee.ReadOnlyCollection<ErrorCode> error_codes = errdom.get_error_code_list ();
-		if ( error_codes.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Error Codes:</h3>\n", css_title );
-			file.printf ( "<table class=\"%s\">\n", css_errordomain_table );
-			foreach ( ErrorCode errcode in error_codes ) {
-				file.puts ( "<tr>\n" );
-				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_errordomain_table_name, errcode.name, errcode.name );
-				file.printf ( "\t<td class=\"%s\">\n", css_errordomain_table_text );
-
-				errcode.write_comment ( file );
-
-				file.puts ( "\t</td>\n" );
-				file.puts ( "</tr>\n" );
-			}
-			file.puts ( "</table>\n" );
-		}
-	}
-
-	private void write_child_enum_values ( GLib.FileStream file, Enum en ) {
-		Gee.ReadOnlyCollection<EnumValue> enum_values = en.get_enum_values ();
-		if ( enum_values.size > 0 ) {
-			file.printf ( "<h3 class=\"%s\">Enum Values:</h3>\n", css_title );
-			file.printf ( "<table class=\"%s\">\n", css_enum_table );
-			foreach ( EnumValue enval in enum_values ) {
-				file.puts ( "<tr>\n" );
-				file.printf ( "\t<td class=\"%s\" id=\"%s\">%s</td>\n", css_enum_table_name, enval.name, enval.name );
-				file.printf ( "\t<td class=\"%s\">\n", css_enum_table_text );
-
-				enval.write_comment ( file );
-
-				file.puts ( "\t</td>\n" );
-				file.puts ( "</tr>\n" );
-			}
-			file.puts ( "</table>\n" );
-		}
-	}
-
-	public void write_interface_content ( GLib.FileStream file, Interface iface ) {
-		string full_name = iface.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-
-		this.write_image_block ( file, iface );
-
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_interface ( iface, file );
-		file.printf ( "\n</div>\n" );
-
-		iface.write_comment ( file );
-		this.write_namespace_note ( file, iface );
-		this.write_package_note ( file, iface );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-
-		this.write_child_classes ( file, iface );
-		this.write_child_structs ( file, iface );
-		this.write_child_delegates ( file, iface );
-		this.write_child_methods ( file, iface );
-		this.write_child_signals ( file, iface );
-		this.write_child_properties ( file, iface );
-		this.write_child_fields ( file, iface );
-	}
-
 	public override void visit_interface ( Interface iface ) {
 		string old_path = this.current_path;
 		this.current_path += iface.name + "/";
@@ -1300,7 +174,7 @@
 		cname = null;
 
 		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_interface ( navi, iface );
+		this.write_navi_interface ( navi, iface, iface );
 		navi = null;
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
@@ -1310,35 +184,6 @@
 		this.current_path = old_path;
 	}
 
-	public void write_class_content ( GLib.FileStream file, Class cl ) {
-		string full_name = cl.full_name ( );
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-
-		this.write_image_block ( file, cl );
-
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_class ( cl, file );
-		file.printf ( "\n</div>\n" );
-		cl.write_comment ( file );
-		this.write_namespace_note ( file, cl );
-		this.write_package_note ( file, cl );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-
-		this.write_child_construction_methods ( file, cl );
-		this.write_child_classes ( file, cl );
-		this.write_child_structs ( file, cl );
-		this.write_child_enums ( file, cl );
-		this.write_child_delegates ( file, cl );
-		this.write_child_methods ( file, cl );
-		this.write_child_signals ( file, cl );
-		this.write_child_properties ( file, cl );
-		this.write_child_fields ( file, cl );
-		this.write_child_constants ( file, cl );
-	}
-
 	public override void visit_class ( Class cl ) {
 		string old_path = this.current_path;
 		this.current_path += cl.name + "/";
@@ -1356,7 +201,7 @@
 		cl.visit_constants ( this );
 
 		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_class ( navi, cl );
+		this.write_navi_class ( navi, cl, cl );
 		navi = null;
 
 		GLib.FileStream cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
@@ -1370,28 +215,6 @@
 		this.current_path = old_path;
 	}
 
-	public void write_struct_content ( GLib.FileStream file, Struct stru ) {
-		string full_name = stru.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-
-		this.write_image_block ( file, stru );
-
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		stru.write_comment ( file );
-		this.write_namespace_note ( file, stru );
-		this.write_package_note ( file, stru );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_struct ( stru, file );
-		file.printf ( "\n</div>\n" );
-
-		this.write_child_construction_methods ( file, stru );
-		this.write_child_methods ( file, stru );
-		this.write_child_fields ( file, stru );
-		this.write_child_constants ( file, stru );
-	}
-
 	public override void visit_struct ( Struct stru ) {
 		string old_path = this.current_path;
 		this.current_path += stru.name + "/";
@@ -1403,7 +226,7 @@
 		stru.visit_constants ( this );
 
 		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_struct ( navi, stru );
+		this.write_navi_struct ( navi, stru, stru );
 		navi = null;
 
 		GLib.FileStream cname = GLib.FileStream.open ( this.current_path + "cname", "w" );
@@ -1417,19 +240,6 @@
 		this.current_path = old_path;
 	}
 
-	public void write_error_domain_content ( GLib.FileStream file, ErrorDomain errdom ) {
-		string full_name = errdom.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		errdom.write_comment ( file );
-		this.write_namespace_note ( file, errdom );
-		this.write_package_note ( file, errdom );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_error_values ( file, errdom );
-		this.write_child_methods ( file, errdom );
-	}
-
 	public override void visit_error_domain ( ErrorDomain errdom ) {
 		string old_path = this.current_path;
 		this.current_path += errdom.name + "/";
@@ -1442,7 +252,7 @@
 		cname = null;
 
 		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_error_domain ( navi, errdom );
+		this.write_navi_error_domain ( navi, errdom, errdom );
 		navi = null;
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
@@ -1452,19 +262,6 @@
 		this.current_path = old_path;
 	}
 
-	public void write_enum_content ( GLib.FileStream file, Enum en ) {
-		string full_name = en.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		en.write_comment ( file );
-		this.write_namespace_note ( file, en );
-		this.write_package_note ( file, en );
-		file.printf ( "\n<h2 class=\"%s\">Content:</h2>\n", css_title );
-		this.write_child_enum_values ( file, en );
-		this.write_child_methods ( file, en );
-	}
-
 	public override void visit_enum ( Enum en ) {
 		string old_path = this.current_path;
 		this.current_path += en.name + "/";
@@ -1478,7 +275,7 @@
 		cname = null;
 
 		GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
-		this.write_navi_enum ( navi, en );
+		this.write_navi_enum ( navi, en, en );
 		navi = null;
 
 		GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w");
@@ -1488,38 +285,6 @@
 		this.current_path = old_path;
 	}
 
-	public void write_property_content ( GLib.FileStream file, Property prop ) {
-		string full_name = prop.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_property ( prop, file );
-		file.printf ( "\n</div>\n" );
-		prop.write_comment ( file );
-	}
-
-	private void write_package_note ( GLib.FileStream file, Basic element ) {
-		string package = element.package;
-		if ( package == null )
-			return ;
-
-		file.printf ( "\n\n<br />\n<b>Package:</b> %s\n\n", package );
-	}
-
-	private void write_namespace_note ( GLib.FileStream file, Basic element ) {
-		for ( ; element is Namespace == false; element = element.parent )
-			;
-
-		if ( element.parent == null )
-			return ;
-
-		if ( element.name == null )
-			return ;
-
-		file.printf ( "\n\n<br />\n<b>Namespace:</b> %s\n\n", element.full_name() );
-	}
-
 	public override void visit_property ( Property prop ) {
 		string path = this.current_path + prop.name + "/";
 		var rt = DirUtils.create ( path, 0777 );
@@ -1542,21 +307,6 @@
 		file = null;
 	}
 
-	public void write_constant_content ( GLib.FileStream file, Constant constant, ConstantHandler parent ) {
-		string full_name = constant.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_constant ( constant, parent, file );
-		file.printf ( "\n</div>\n" );
-		constant.write_comment ( file );
-		if ( constant.parent is Namespace ) {
-			this.write_namespace_note ( file, constant );
-			this.write_package_note ( file, constant );
-		}
-	}
-
 	public override void visit_constant ( Constant constant, ConstantHandler parent ) {
 		string path = this.current_path + constant.name + "/";
 		var rt = DirUtils.create ( path, 0777 );
@@ -1570,21 +320,6 @@
 		file = null;
 	}
 
-	public void write_field_content ( GLib.FileStream file, Field field, FieldHandler parent ) {
-		string full_name = field.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_field ( field, parent, file );
-		file.printf ( "\n</div>\n" );
-		field.write_comment ( file );
-		if ( field.parent is Namespace ) {
-			this.write_namespace_note ( file, field );
-			this.write_package_note ( file, field );
-		}
-	}
-
 	public override void visit_field ( Field field, FieldHandler parent ) {
 		string path = this.current_path + field.name + "/";
 		var rt = DirUtils.create ( path, 0777 );
@@ -1619,21 +354,6 @@
 	public override void visit_enum_value ( EnumValue enval ) {
 	}
 
-	public void write_delegate_content ( GLib.FileStream file, Delegate del ) {
-		string full_name = del.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_delegate ( del, file );
-		file.printf ( "\n</div>\n" );
-		del.write_comment ( file );
-		if ( del.parent is Namespace ) {
-			this.write_namespace_note ( file, del );
-			this.write_package_note ( file, del );
-		}
-	}
-
 	public override void visit_delegate ( Delegate del ) {
 		string path = this.current_path + del.name + "/";
 		var rt = DirUtils.create ( path, 0777 );
@@ -1651,17 +371,6 @@
 		file = null;
 	}
 
-	public void write_signal_content ( GLib.FileStream file, Signal sig ) {
-		string full_name = sig.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_signal ( sig, file );
-		file.printf ( "\n</div>\n" );
-		sig.write_comment ( file );
-	}
-
 	public override void visit_signal ( Signal sig ) {
 		string path = this.current_path + sig.name + "/";
 		var rt = DirUtils.create ( path, 0777 );
@@ -1684,21 +393,6 @@
 		file = null;
 	}
 
-	public void write_method_content ( GLib.FileStream file, Method m , Valadoc.MethodHandler parent ) {
-		string full_name = m.full_name ();
-		file.printf ( "<h1 class=\"%s\">%s:</h1>\n", css_title, full_name );
-		file.printf ( "<hr class=\"%s\" />\n", css_headline_hr );
-		file.printf ( "<h2 class=\"%s\">Description:</h2>\n", css_title );
-		file.printf ( "<div class=\"%s\">\n\t", css_code_definition );
-		this.langlet.write_method ( file, m, parent );
-		file.printf ( "\n</div>\n" );
-		m.write_comment ( file );
-		if ( m.parent is Namespace ) {
-			this.write_namespace_note ( file, m );
-			this.write_package_note ( file, m );
-		}
-	}
-
 	public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
 		string path = this.current_path + m.name + "/";
 		string full_name = m.full_name ();

Modified: trunk/src/doclets/valadoc.org/linkhelper/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/linkhelper/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/linkhelper/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libhtmlhelper.vala.stamp: $(libhtmlhelper_VALASOURCES)
-	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
+	$(VALAC) -C --library libhtmlhelper-1.0 --basedir . --vapidir ../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../vapi --pkg valadoc-1.0 --disable-non-null $^
 	touch $@
 
 
@@ -29,6 +29,7 @@
 
 AM_CFLAGS =             \
 	-I ../../../libvaladoc/   \
+	-I ../../htmlhelpers/  \
 	$(LIBVALA_CFLAGS)   \
 	$(GLIB_CFLAGS)      \
 	$(NULL)
@@ -36,6 +37,7 @@
 
 libhtmlhelper_la_LIBADD = \
 	../../../libvaladoc/libvaladoc.la \
+	../../htmlhelpers/libhtmlhelpers.la \
 	$(LIBVALA_LIBS)                \
 	$(GLIB_LIBS)                   \
 	$(NULL)

Modified: trunk/src/doclets/valadoc.org/linkhelper/helper.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/linkhelper/helper.vala	(original)
+++ trunk/src/doclets/valadoc.org/linkhelper/helper.vala	Tue Nov  4 22:35:00 2008
@@ -20,123 +20,16 @@
 using GLib;
 
 
-
-/* css-class-names: */
-public const string css_inline_navigation = "main_inline_navigation";
-public const string css_inline_navigation_property = "main_inline_navigation_property";
-public const string css_inline_navigation_method = "main_inline_navigation_method";
-public const string css_inline_navigation_signal = "main_inline_navigation_signal";
-public const string css_inline_navigation_fields = "main_inline_navigation_fields";
-public const string css_inline_navigation_class = "main_inline_navigation_class";
-public const string css_inline_navigation_enum = "main_inline_navigation_enum";
-public const string css_inline_navigation_struct = "main_inline_navigation_struct";
-public const string css_inline_navigation_delegate = "main_inline_navigation_delegate";
-public const string css_inline_navigation_constant = "main_inline_navigation_constant";
-
-public const string css_navi_package_index = "navi_package_index";
-public const string css_navi_package = "navi_package";
-public const string css_navi_construction_method = "navi_construction_method";
-public const string css_navi_error_domain = "navi_error_domain";
-public const string css_navi_namespace = "navi_namespace";
-public const string css_navi_method = "navi_method";
-public const string css_navi_struct = "navi_struct";
-public const string css_navi_iface = "navi_iface";
-public const string css_navi_field = "navi_field";
-public const string css_navi_class = "navi_class";
-public const string css_navi_enum = "navi_enum";
-public const string css_navi_link = "navi_link";
-public const string css_navi_constant = "navi_constant";
-public const string css_navi_prop = "navi_prop";
-public const string css_navi_del = "navi_del";
-public const string css_navi_sig = "navi_sig";
-public const string css_navi = "navi_main";
-public const string css_navi_enval = "main_navi_enval";
-public const string css_navi_errdomcode = "main_navi_errdomcode";
-public const string css_navi_hr = "navi_hr";
-
-public const string css_errordomain_table_name = "main_errordomain_table_name";
-public const string css_errordomain_table_text = "main_errordomain_table_text";
-public const string css_errordomain_table = "main_errordomain_table";
-
-
-public const string css_enum_table_name = "main_enum_table_name";
-public const string css_enum_table_text = "main_enum_table_text";
-public const string css_enum_table = "main_enum_table";
-
-public const string css_diagram = "main_diagram";
-public const string css_see_list = "main_see_list";
-public const string css_exception_table = "main_parameter_table";
-public const string css_parameter_table_text = "main_parameter_table_text";
-public const string css_parameter_table_name = "main_parameter_table_name";
-public const string css_parameter_table = "main_parameter_table";
-public const string css_title = "main_title";
-public const string css_other_type = "main_other_type";
-public const string css_basic_type  = "main_basic_type";
-public const string css_keyword  = "main_keyword";
-public const string css_optional_parameter  = "main_optional_parameter";
-public const string css_code_definition = "main_code_definition";
-public const string css_headline_hr = "main_hr";
-public const string css_hr = "main_hr";
-public const string css_list_errdom = "main_list_errdom";
-public const string css_list_en = "main_list_en";
-public const string css_list_ns = "main_list_ns";
-public const string css_list_cl = "main_list_cl";
-public const string css_list_iface = "main_list_iface";
-public const string css_list_stru = "main_list_stru";
-public const string css_list_field = "main_list_field";
-public const string css_list_prop = "main_list_prop";
-public const string css_list_del = "main_list_del";
-public const string css_list_sig = "main_list_sig";
-public const string css_list_m = "main_list_m";
-
-public interface Valadoc.LinkHelper : Object {
-	private static string package_name = null;
-
-	public abstract Settings settings {
-		construct set;
-		get;
-	}
-
-	private string get_dirname ( string file_name ) {
-		if ( file_name[file_name.len()-1] == '/' )
-			return GLib.Path.get_dirname ( file_name );
-		else
-			return GLib.Path.get_basename ( file_name );
-	}
-
-	protected string get_package_name ( string file_path ) {
-		if ( file_path.has_suffix (".vapi") ) {
-			string file_name = GLib.Path.get_basename (file_path);
-			return file_name.ndup ( file_name.size() - ".vapi".size() );
-		}
-
-		return this.settings.pkg_name;
-	}
-
-	public string get_file_name ( Valadoc.Basic tag ) {
-		Valadoc.Basic pos = tag;
-
-		while ( pos != null ) {
-			if ( pos is Valadoc.Package )
-				return pos.name;
-
-			pos = pos.parent;
-		}
-		return null;
-	}
-
-	protected string? get_link ( Valadoc.Basic tag ) {
-//		if ( !this.settings.to_doc( tag.file_name ) )
-//			return null;
-
+public interface Valadoc.LinkHelper {
+	public string? get_html_link ( Valadoc.Settings? settings, Valadoc.Basic element ) {
 		GLib.StringBuilder str = new GLib.StringBuilder ( "" );
-		Valadoc.Basic pos = tag;
+		Valadoc.Basic pos = element;
 
-		if ( tag is Valadoc.Package == false ) {
-			if ( tag is Valadoc.EnumValue || tag is Valadoc.ErrorCode ) {
+		if ( element is Valadoc.Package == false ) {
+			if ( element is Valadoc.EnumValue || element is Valadoc.ErrorCode ) {
 				str.append_unichar ( '#' );
-				str.append ( tag.name );
-				pos = pos.parent;
+				str.append ( element.name );
+				pos = element.parent;
 			}
 
 			while ( pos != null ) {
@@ -153,12 +46,9 @@
 				pos = pos.parent;
 			}
 		}
-		string filename = this.get_file_name ( tag );
-		string package_name = this.get_package_name ( filename );
-		str.prepend ( package_name );
+
+		str.prepend ( element.file.name );
 		str.prepend ( "?path=" );
 		return str.str;
 	}
 }
-
-

Modified: trunk/src/doclets/valadoc.org/taglets/author/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/author/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/author/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/link/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/link/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/link/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletlink.vala.stamp: $(libtagletlink_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/link/taglet.vala	(original)
+++ trunk/src/doclets/valadoc.org/taglets/link/taglet.vala	Tue Nov  4 22:35:00 2008
@@ -45,8 +45,8 @@
 		}
 
 		this.settings = settings;
-		this.path = this.get_link ( element );
-		this.content = str;
+		this.path = this.get_html_link ( settings, element );
+		this.content = element.full_name ();
 		return true;
 	}
 

Modified: trunk/src/doclets/valadoc.org/taglets/parameter/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/parameter/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/parameter/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletparameter.vala.stamp: $(libtagletparameter_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/return/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/return/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/return/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletXXXX.vala.stamp: $(libtagletXXXX_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/see/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/see/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/see/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletsee.vala.stamp: $(libtagletsee_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/see/taglet.vala	(original)
+++ trunk/src/doclets/valadoc.org/taglets/see/taglet.vala	Tue Nov  4 22:35:00 2008
@@ -76,8 +76,8 @@
 		}
 
 		this.settings = settings;
-		this.path = this.get_link ( element );
-		this.name = str;
+		this.path = this.get_html_link ( settings, element );
+		this.name = element.full_name ();
 		return true;
 	}
 

Modified: trunk/src/doclets/valadoc.org/taglets/string/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/string/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/string/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletstring.vala.stamp: $(libtagletstring_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/throws/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/throws/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/throws/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libexceptionparameter.vala.stamp: $(libexceptionparameter_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/doclets/valadoc.org/taglets/version/Makefile.am
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/version/Makefile.am	(original)
+++ trunk/src/doclets/valadoc.org/taglets/version/Makefile.am	Tue Nov  4 22:35:00 2008
@@ -11,7 +11,7 @@
 
 
 libtagletversion.vala.stamp: $(libtagletversion_VALASOURCES)
-	$(VALAC) -C --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
+	$(VALAC) -C --vapidir ../../../htmlhelpers --pkg libhtmlhelpers-1.0 --vapidir ../../../../vapi --pkg valadoc-1.0 --vapidir ../../linkhelper --pkg libhtmlhelper-1.0 --basedir . --disable-non-null --save-temps $^
 	touch $@
 
 
@@ -32,6 +32,7 @@
 
 AM_CFLAGS =  -g               \
 	-I ../../../../libvaladoc/   \
+	-I ../../../htmlhelpers/     \
 	-I ../../linkhelper/         \
 	-I ../../                    \
 	$(GLIB_CFLAGS)            \

Modified: trunk/src/libvaladoc/doctree.vala
==============================================================================
--- trunk/src/libvaladoc/doctree.vala	(original)
+++ trunk/src/libvaladoc/doctree.vala	Tue Nov  4 22:35:00 2008
@@ -4199,12 +4199,26 @@
 		 get;
 	}
 
+	private string extract_package_name ( Vala.SourceFile vfile ) {
+		if ( vfile.filename.has_suffix (".vapi") ) {
+			string file_name = GLib.Path.get_basename (vfile.filename);
+			return file_name.ndup ( file_name.size() - ".vapi".size() );
+		}
+		else if ( vfile.filename.has_suffix (".gidl") ) {
+			string file_name = GLib.Path.get_basename (vfile.filename);
+			return file_name.ndup ( file_name.size() - ".gidl".size() );
+		}
+		else {
+			return settings.pkg_name;
+		}
+	}
+
 	public Package ( Valadoc.Settings settings, Vala.SourceFile vfile, Tree head ) {
 		this.settings = settings;
 		this.head = head;
 
-		this.package_name = vfile.filename;
-		this.is_external_package = !( this.package_name.has_suffix ( ".vala" ) || this.package_name.has_suffix ( ".gs" ) );
+		this.is_external_package = !( vfile.filename.has_suffix ( ".vala" ) || vfile.filename.has_suffix ( ".gs" ) );
+		this.package_name = this.extract_package_name ( vfile );
 	}
 
 	private string package_name;
@@ -4244,15 +4258,7 @@
 
 	// internal
 	public bool is_package ( Vala.SourceFile vfile ) {
-		bool vheader = !( vfile.filename.has_suffix ( ".vala" ) || vfile.filename.has_suffix ( ".gs" ) );
-		if ( vheader == false && this.is_external_package == false ) {
-			return true;
-		}
-		else if ( vheader == true && this.is_external_package == true ) {
-			if ( vfile.filename == this.package_name )
-				return true;
-		}
-		return false;
+		return ( this.extract_package_name ( vfile ) == this.package_name );
 	}
 
 	public void visit ( Doclet doclet ) {

Modified: trunk/src/libvaladoc/drawer.vala
==============================================================================
--- trunk/src/libvaladoc/drawer.vala	(original)
+++ trunk/src/libvaladoc/drawer.vala	Tue Nov  4 22:35:00 2008
@@ -41,6 +41,9 @@
 		Gee.Collection<DataType> parentlst = stru.get_parent_types ( );
 
 		foreach ( DataType type in parentlst ) {
+			if ( type is Struct == false )
+				break;
+
 			weak Graphviz.Node stru = draw_struct ( g, (Struct)type, me );
 			draw_struct_parents ( (Struct)type, g, stru );
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]