[valadoc] libvaladoc: new chart infrastructure



commit 14bb02963670385d75a47202da4e7812f3dcee5d
Author: Florian Brosch <flo brosch gmail com>
Date:   Fri Feb 26 23:59:29 2010 +0100

    libvaladoc: new chart infrastructure

 icons/devhelpstyle.css                        |    1 +
 icons/style.css                               |    1 +
 icons/wikistyle.css                           |    1 +
 src/doclets/devhelp/doclet.vala               |    6 +-
 src/libvaladoc/Makefile.am                    |    8 +-
 src/libvaladoc/charts/chart.vala              |   59 ++++
 src/libvaladoc/charts/chartfactory.vala       |   49 +++
 src/libvaladoc/charts/hierarchychart.vala     |   82 +++++
 src/libvaladoc/charts/simplechartfactory.vala |   83 +++++
 src/libvaladoc/drawer.vala                    |  195 ------------
 src/libvaladoc/html/basicdoclet.vala          |   58 ++--
 src/libvaladoc/html/htmlchartfactory.vala     |   53 ++++
 src/libvaladoc/html/htmlmarkupwriter.vala     |    6 +
 src/libvaladoc/html/linkhelper.vala           |    1 -
 src/libvaladoc/markupwriter.vala              |    2 +-
 src/vapi/libgvc.vapi                          |  395 -------------------------
 16 files changed, 373 insertions(+), 627 deletions(-)
---
diff --git a/icons/devhelpstyle.css b/icons/devhelpstyle.css
index fe69453..10d940f 100644
--- a/icons/devhelpstyle.css
+++ b/icons/devhelpstyle.css
@@ -10,6 +10,7 @@ ul.external_link {
 }
 
 .main_diagram {
+	border-style: none;
 	display: block;
 	margin: 0px auto;
 }
diff --git a/icons/style.css b/icons/style.css
index f0248a8..c5af325 100644
--- a/icons/style.css
+++ b/icons/style.css
@@ -10,6 +10,7 @@ ul.external_link {
 }
 
 .main_diagram {
+	border-style: none;
 	display: block;
 	margin: 0px auto;
 }
diff --git a/icons/wikistyle.css b/icons/wikistyle.css
index ab128be..a80bd81 100644
--- a/icons/wikistyle.css
+++ b/icons/wikistyle.css
@@ -6,6 +6,7 @@ ul.external_link {
 }
 
 .main_diagram {
+	border-style: none;
 	display: block;
 	margin: 0px auto;
 	width: 100px;
diff --git a/src/doclets/devhelp/doclet.vala b/src/doclets/devhelp/doclet.vala
index da38805..07280c3 100755
--- a/src/doclets/devhelp/doclet.vala
+++ b/src/doclets/devhelp/doclet.vala
@@ -42,7 +42,6 @@ public class Valadoc.Devhelp.Doclet : Valadoc.Html.BasicDoclet {
 
 	construct {
 		_renderer = new HtmlRenderer (this);
-		icon_directory = "";
 	}
 
 	private string get_path (Api.Node element) {
@@ -53,6 +52,11 @@ public class Valadoc.Devhelp.Doclet : Valadoc.Html.BasicDoclet {
 		return GLib.Path.build_filename (this.settings.path, this.package_dir_name, element.full_name () + ".html");
 	}
 
+	protected override string get_icon_directory () {
+		return "";
+	}
+
+
 	public override void process (Settings settings, Api.Tree tree) {
 		base.process (settings, tree);
 		DirUtils.create (this.settings.path, 0777);
diff --git a/src/libvaladoc/Makefile.am b/src/libvaladoc/Makefile.am
index 6e2bd19..63afa96 100644
--- a/src/libvaladoc/Makefile.am
+++ b/src/libvaladoc/Makefile.am
@@ -24,7 +24,6 @@ lib_LTLIBRARIES = \
 
 libvaladoc_la_VALASOURCES = \
 	doclet.vala \
-	drawer.vala \
 	errorreporter.vala \
 	filehelper.vala \
 	moduleloader.vala \
@@ -97,6 +96,10 @@ libvaladoc_la_VALASOURCES = \
 	content/tablerow.vala \
 	content/taglet.vala \
 	content/text.vala \
+	charts/chart.vala \
+	charts/chartfactory.vala \
+	charts/hierarchychart.vala \
+	charts/simplechartfactory.vala \
 	parser/manyrule.vala \
 	parser/oneofrule.vala \
 	parser/optionalrule.vala \
@@ -119,6 +122,7 @@ libvaladoc_la_VALASOURCES = \
 	taglets/tagletsince.vala \
 	taglets/tagletthrows.vala \
 	html/basicdoclet.vala \
+	html/htmlchartfactory.vala \
 	html/linkhelper.vala \
 	html/cssclassresolver.vala \
 	html/htmlmarkupwriter.vala \
@@ -141,7 +145,7 @@ libvaladocincludedir = $(includedir)/
 
 
 libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
-	$(VALAC) $(VALAFLAGS) -C -H valadoc-1.0.h --pkg gee-1.0 --pkg vala-1.0 --pkg libgvc --pkg gmodule-2.0 --vapidir $(top_srcdir)/src/vapi --pkg libgvc --pkg config --library valadoc-1.0 --basedir $(top_srcdir)/src/libvaladoc/ --save-temps $^
+	$(VALAC) $(VALAFLAGS) -C -H valadoc-1.0.h --pkg gee-1.0 --pkg vala-1.0 --pkg libgvc --pkg gmodule-2.0 --pkg libgvc --vapidir $(top_srcdir)/src/vapi --pkg config --library valadoc-1.0 --basedir $(top_srcdir)/src/libvaladoc/ --save-temps $^
 	touch $@
 
 
diff --git a/src/libvaladoc/charts/chart.vala b/src/libvaladoc/charts/chart.vala
new file mode 100644
index 0000000..caedfd3
--- /dev/null
+++ b/src/libvaladoc/charts/chart.vala
@@ -0,0 +1,59 @@
+/* chart.vala
+ *
+ * Copyright (C) 2008  Florian Brosch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Florian Brosch <flo brosch gmail com>
+ */
+
+
+public class Valadoc.Charts.Chart : Api.Visitor {
+	protected Gvc.Context context;
+	protected Gvc.Graph graph;
+	protected Factory factory;
+
+	static construct {
+		Gvc.init ();
+	}
+
+	public Chart (Factory factory, Api.Node node) {
+		graph = factory.create_graph (node);
+		this.factory = factory;
+		node.accept (this);
+	}
+
+	public void save (string file_name, string file_type = "png") {
+		if (context == null) {
+			context = factory.create_context (graph);
+		}
+		context.render_filename (graph, file_type, file_name);
+	}
+
+	public void write (GLib.FileStream file, string file_type) {
+		if (context == null) {
+			context = factory.create_context (graph);
+		}
+		context.render (graph, file_type, file);
+	}
+
+	~Chart () {
+		if (context != null) {
+			context.free_layout (graph);
+		}
+	}
+}
+
diff --git a/src/libvaladoc/charts/chartfactory.vala b/src/libvaladoc/charts/chartfactory.vala
new file mode 100644
index 0000000..66c1cb4
--- /dev/null
+++ b/src/libvaladoc/charts/chartfactory.vala
@@ -0,0 +1,49 @@
+/* chartfactory.vala
+ *
+ * Copyright (C) 2008  Florian Brosch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Florian Brosch <flo brosch gmail com>
+ */
+
+
+public abstract class Valadoc.Charts.Factory : Object {
+	protected Gvc.Node create_type (Gvc.Graph graph, Api.Node item) {
+		return graph.create_node (item.full_name ());
+	}
+
+	public abstract Gvc.Graph create_graph (Api.Node item);
+
+	public abstract Gvc.Context create_context (Gvc.Graph graph);
+
+	public abstract Gvc.Node create_class (Gvc.Graph graph, Api.Class item);
+
+	public abstract Gvc.Node create_struct (Gvc.Graph graph, Api.Struct item);
+
+	public abstract Gvc.Node create_interface (Gvc.Graph graph, Api.Interface item);
+
+	public abstract Gvc.Node create_enum (Gvc.Graph graph, Api.Enum item);
+
+	public abstract Gvc.Node create_delegate (Gvc.Graph graph, Api.Delegate item);
+
+	public abstract Gvc.Node create_errordomain (Gvc.Graph graph, Api.ErrorDomain item);
+
+	public abstract Gvc.Node create_namespace (Gvc.Graph graph, Api.Namespace item);
+
+	public abstract Gvc.Edge add_children (Gvc.Graph graph, Gvc.Node parent, Gvc.Node child);
+}
+
diff --git a/src/libvaladoc/charts/hierarchychart.vala b/src/libvaladoc/charts/hierarchychart.vala
new file mode 100644
index 0000000..ce36134
--- /dev/null
+++ b/src/libvaladoc/charts/hierarchychart.vala
@@ -0,0 +1,82 @@
+/* hierarchychart.vala
+ *
+ * Copyright (C) 2008  Florian Brosch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Florian Brosch <flo brosch gmail com>
+ */
+
+using Gee;
+
+
+public class Valadoc.Charts.Hierarchy : Charts.Chart {
+	public Hierarchy (Factory factory, Api.Node node) {
+		base (factory, node);
+	}
+
+	private void draw_implemented_interfaces (Gvc.Node child, Collection<Api.TypeReference> interfaces) {
+		foreach (Api.TypeReference typeref in interfaces) {
+			var parent = factory.create_interface (graph, (Api.Interface) typeref.data_type);
+			factory.add_children (graph, parent, child);
+		}
+	}
+
+	private void draw_parent_classes (Api.Class item, Gvc.Node? child = null) {
+		var parent = factory.create_class (graph, item);
+
+		if (child != null) {
+			factory.add_children (graph, parent, child);
+		}
+
+		if (item.base_type != null) {
+			draw_parent_classes ((Api.Class) item.base_type.data_type, parent);
+		}
+
+		draw_implemented_interfaces (parent, item.get_implemented_interface_list ());
+	}
+
+	private void draw_parent_structs (Api.Struct item, Gvc.Node? child = null) {
+		var parent = factory.create_struct (graph, item);
+
+		if (child != null) {
+			factory.add_children (graph, parent, child);
+		}
+
+		if (item.base_type != null) {
+			draw_parent_structs ((Api.Struct) item.base_type.data_type, parent);
+		}
+	}
+
+	public override void visit_interface (Api.Interface item) {
+		var iface = factory.create_interface (graph, item);
+
+		if (item.base_type != null) {
+			draw_parent_classes ((Api.Class) item.base_type.data_type, iface);
+		}
+
+		draw_implemented_interfaces (iface, item.get_implemented_interface_list ());
+	}
+
+	public override void visit_class (Api.Class item) {
+		draw_parent_classes (item);
+	}
+
+	public override void visit_struct (Api.Struct item) {
+		draw_parent_structs (item);
+	}
+}
+
diff --git a/src/libvaladoc/charts/simplechartfactory.vala b/src/libvaladoc/charts/simplechartfactory.vala
new file mode 100644
index 0000000..867e454
--- /dev/null
+++ b/src/libvaladoc/charts/simplechartfactory.vala
@@ -0,0 +1,83 @@
+/* simplechartfactory.vala
+ *
+ * Copyright (C) 2008  Florian Brosch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Florian Brosch <flo brosch gmail com>
+ */
+
+
+
+public class Valadoc.Charts.SimpleFactory : Charts.Factory {
+	protected virtual Gvc.Node configure_type (Gvc.Node node, Api.Node item) {
+ 		node.safe_set ("shape", "box", "");
+		node.safe_set ("fontname", "Times", "");
+		node.safe_set ("label", item.full_name (), "");
+		return node;
+	}
+
+	public override Gvc.Graph create_graph (Api.Node item) {
+		var graph = new Gvc.Graph (item.full_name (), Gvc.GraphKind.AGDIGRAPH);
+		return graph;
+	}
+
+	public override Gvc.Context create_context (Gvc.Graph graph) {
+		var context = new Gvc.Context ();
+		context.layout_jobs (graph);
+		context.layout (graph, "dot");
+		return context;
+	}
+
+	public override Gvc.Node create_class (Gvc.Graph graph, Api.Class item) {
+		var node = configure_type (create_type (graph, item), item);
+		node.safe_set ("style", "bold", "");
+		return node;
+	}
+
+	public override Gvc.Node create_struct (Gvc.Graph graph, Api.Struct item) {
+		var node = configure_type (create_type (graph, item), item);
+		node.safe_set ("style", "bold", "");
+		return node;
+	}
+
+	public override Gvc.Node create_interface (Gvc.Graph graph, Api.Interface item) {
+		return configure_type (create_type (graph, item), item);
+	}
+
+	public override Gvc.Node create_enum (Gvc.Graph graph, Api.Enum item) {
+		return configure_type (create_type (graph, item), item);
+	}
+
+	public override Gvc.Node create_delegate (Gvc.Graph graph, Api.Delegate item) {
+		return configure_type (create_type (graph, item), item);
+	}
+
+	public override Gvc.Node create_errordomain (Gvc.Graph graph, Api.ErrorDomain item) {
+		return configure_type (create_type (graph, item), item);
+	}
+
+	public override Gvc.Node create_namespace (Gvc.Graph graph, Api.Namespace item) {
+		return configure_type (create_type (graph, item), item);
+	}
+
+	public override Gvc.Edge add_children (Gvc.Graph graph, Gvc.Node parent, Gvc.Node child) {
+		var edge = graph.create_edge (parent, child);
+		edge.safe_set ("dir", "back", "");
+		return edge;
+	}
+}
+
diff --git a/src/libvaladoc/html/basicdoclet.vala b/src/libvaladoc/html/basicdoclet.vala
index 9479f80..28d6fb2 100755
--- a/src/libvaladoc/html/basicdoclet.vala
+++ b/src/libvaladoc/html/basicdoclet.vala
@@ -32,11 +32,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 	protected Html.MarkupWriter writer;
 	protected Html.LinkHelper linker;
 	protected Html.CssClassResolver cssresolver;
-
-
-	// paths:
-	protected string chart_directory = "img";
-	protected string icon_directory = "..";
+	protected Charts.Factory image_factory;
 
 
 	// CSS:
@@ -105,14 +101,31 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 	}
 
 	public virtual void process (Settings settings, Api.Tree tree) {
+		this.image_factory = new SimpleChartFactory (settings);
 		this.settings = settings;
 		this.tree = tree;
 	}
 
+
+	// paths:
 	protected string? get_link (Api.Node to, Api.Node from) {
 		return linker.get_relative_link (from, to, settings);
 	}
 
+	protected virtual string get_img_path_html (Api.Node element, string type) {
+		return Path.build_filename ("img", element.full_name () + "." + type);
+	}
+
+	protected virtual string get_img_path (Api.Node element, string type) {
+		return Path.build_filename (settings.path, element.package.name, "img", element.full_name () + "." + type);
+	}
+
+	protected virtual string get_icon_directory () {
+		return "..";
+	}
+
+
+
 	protected void write_navi_entry_html_template (string style, string content) {
 		writer.start_tag ("li", {"class", style});
 		writer.text (content);
@@ -138,8 +151,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 
 		if (link == true) {
 			this.write_navi_entry_html_template_with_link (style, this.get_link (element, pos), name);
-		}
-		else {
+		} else {
 			this.write_navi_entry_html_template (style, name);
 		}
 	}
@@ -444,7 +456,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 			writer.start_tag ("div", {"class", css_box_headline});
 			writer.start_tag ("div", {"class", css_box_headline_text}).text (headline).end_tag ("div");
 			writer.start_tag ("div", {"class", css_box_headline_toggle});
-			writer.start_tag ("img", {"onclick", "toggle_box  (this, '" + html_id + "')", "src", Path.build_filename (icon_directory, "coll_open.png")});
+			writer.start_tag ("img", {"onclick", "toggle_box  (this, '" + html_id + "')", "src", Path.build_filename (get_icon_directory (), "coll_open.png")});
 			writer.raw_text ("&nbsp;");
 			writer.end_tag ("div");
 			writer.end_tag ("div");
@@ -606,14 +618,6 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 		writer.end_tag ("ul");
 	}
 
-	protected string get_img_path (Api.Node element) {
-		return Path.build_filename (chart_directory, element.full_name () + ".png");
-	}
-
-	protected string get_img_real_path (Api.Node element) {
-		return Path.build_filename (settings.path, element.package.name, chart_directory, element.full_name () + ".png");
-	}
-
 	protected void write_children (Api.Node node, Api.NodeType type, string type_string, Api.Node? container) {
 		var children = node.get_children_by_type (type);
 		if (children.size > 0) {
@@ -641,25 +645,15 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
 	}
 
 	protected void write_image_block (Api.Node element) {
-		if (!(element is Class || element is Interface || element is Struct)) {
-			return;
-		}
+		if (element is Class || element is Interface || element is Struct) {
+			var chart = new Charts.Hierarchy (image_factory, element);
+			chart.save (this.get_img_path (element, "png"), "png");
 
-		string realimgpath = this.get_img_real_path (element);
-		string imgpath = this.get_img_path (element);
+			writer.start_tag ("h2", {"class", css_title}).text ("Object Hierarchy:").end_tag ("h2");
 
-		if (element is Class) {
-			Diagrams.write_class_diagram ((Class)element, realimgpath);
+			writer.simple_tag ("img", {"class", css_diagram, "usemap", "#"+element.full_name (),"alt", "Object hierarchy for %s".printf (element.name), "src", this.get_img_path_html (element, "png")});
+			writer.add_usemap (chart);
 		}
-		else if (element is Interface) {
-			Diagrams.write_interface_diagram ((Interface)element, realimgpath);
-		}
-		else if (element is Struct) {
-			Diagrams.write_struct_diagram ((Struct)element, realimgpath);
-		}
-
-		writer.start_tag ("h2", {"class", css_title}).text ("Object Hierarchy:").end_tag ("h2");
-		writer.image (imgpath, "Object hierarchy for %s".printf (element.name), css_diagram);
 	}
 
 	public void write_namespace_content (Namespace node, Api.Node? parent) {
diff --git a/src/libvaladoc/html/htmlchartfactory.vala b/src/libvaladoc/html/htmlchartfactory.vala
new file mode 100644
index 0000000..998f516
--- /dev/null
+++ b/src/libvaladoc/html/htmlchartfactory.vala
@@ -0,0 +1,53 @@
+/* simplechartfactory.vala
+ *
+ * Copyright (C) 2008  Florian Brosch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Florian Brosch <flo brosch gmail com>
+ */
+
+
+
+public class Valadoc.Html.SimpleChartFactory : Charts.SimpleFactory {
+	private Settings _settings;
+	private Api.Node _container;
+
+	public SimpleChartFactory (Settings settings) {
+		_settings = settings;
+	}
+
+	public override Gvc.Graph create_graph (Api.Node item) {
+		var graph = base.create_graph (item);
+		_container = item;
+		return graph;
+	}
+
+	protected override Gvc.Node configure_type (Gvc.Node node, Api.Node item) {
+		base.configure_type (node, item);
+
+		if (_container != null) {
+			var linker = LinkHelper.get_instance ();
+			var link = linker.get_relative_link (_container, item, _settings);
+			if (link != null) {
+				node.safe_set ("URL", link, "");
+			}
+		}
+
+		return node;
+	}
+}
+
diff --git a/src/libvaladoc/html/htmlmarkupwriter.vala b/src/libvaladoc/html/htmlmarkupwriter.vala
index cb007e6..7fbf6e1 100755
--- a/src/libvaladoc/html/htmlmarkupwriter.vala
+++ b/src/libvaladoc/html/htmlmarkupwriter.vala
@@ -28,6 +28,12 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
 		base (stream, xml_declaration);
 	}
 
+	public MarkupWriter add_usemap (Charts.Chart chart) {
+		stream.putc ('\n');
+		chart.write (stream, "cmapx");
+		return this;
+	}
+
 	// edit
 	public MarkupWriter link (string url, string label, string? css_class = null) {
 		if (css_class == null) {
diff --git a/src/libvaladoc/html/linkhelper.vala b/src/libvaladoc/html/linkhelper.vala
index 91a03c2..c6c4b4e 100644
--- a/src/libvaladoc/html/linkhelper.vala
+++ b/src/libvaladoc/html/linkhelper.vala
@@ -39,7 +39,6 @@ public class Valadoc.Html.LinkHelper : Object {
 		return _singleton;
 	}
 
-	// done
 	public string? get_package_link (Api.Package package, Settings settings) {
 		if (!package.is_visitor_accessible (settings)) {
 			return null;
diff --git a/src/libvaladoc/markupwriter.vala b/src/libvaladoc/markupwriter.vala
index 43638e0..85db425 100644
--- a/src/libvaladoc/markupwriter.vala
+++ b/src/libvaladoc/markupwriter.vala
@@ -23,7 +23,7 @@
 
 
 public class Valadoc.MarkupWriter {
-	private unowned FileStream stream;
+	protected unowned FileStream stream;
 	protected int indent;
 	private long current_column = 0;
 	private bool last_was_tag;



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