An new infobox documenting the entity

Property definitions

nitc $ HInfoBoxable :: infobox
	# An new infobox documenting the entity
	fun infobox(v: HtmlightVisitor): HInfoBox is abstract
src/htmlight.nit:420,2--421,54

nitc :: htmlight $ Variable :: infobox
	redef fun infobox(v)
	do
		var declared_type = self.declared_type
		if declared_type == null then
			var res = new HInfoBox(v, "{name}")
			res.new_field("local var").append("{name}")
			return res
		end
		var res = new HInfoBox(v, "{name}: {declared_type}")
		res.new_field("local var").append("{name}:").add(declared_type.linkto(v))
		return res
	end
src/htmlight.nit:707,2--718,4

nitc :: htmlight $ MClassDef :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, "class {mclass.name}")
		res.href = v.hrefto(self)
		if not v.show_infobox then return res
		if is_intro then
			res.new_field("class").text(mclass.name)
		else
			res.new_field("redef class").text(mclass.name)
			res.new_field("intro").add mclass.intro.linkto_text(v, "in {mclass.intro_mmodule.to_s}")
		end
		add_doc_to_infobox(res)

		var in_hierarchy = self.in_hierarchy
		if in_hierarchy == null then return res

		if in_hierarchy.greaters.length > 1 then
			var c = res.new_dropdown("hier", "super-classes")
			for x in in_hierarchy.greaters do
				if x == self then continue
				if not x.is_intro then continue
				c.open("li").add x.linkto(v)
			end
		end
		if in_hierarchy.smallers.length > 1 then
			var c = res.new_dropdown("hier", "sub-classes")
			for x in in_hierarchy.smallers do
				if x == self then continue
				if not x.is_intro then continue
				c.open("li").add x.linkto(v)
			end
		end
		if mclass.mclassdefs.length > 1 then
			var c = res.new_dropdown("redefs", "refinements")
			for x in mclass.mclassdefs do
				if x == self then continue
				c.open("li").add x.linkto_text(v, "in {x.mmodule}")
			end
		end
		return res
	end
src/htmlight.nit:497,2--537,4

nitc :: htmlight $ MPropDef :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, to_s)
		res.href = v.hrefto(self)
		if not v.show_infobox then return res
		if self isa MMethodDef then
			var msignature = self.msignature
			if msignature != null then res.new_field("fun").append(mproperty.name).add msignature.linkto(v)
		else if self isa MAttributeDef then
			var static_mtype = self.static_mtype
			if static_mtype != null then res.new_field("fun").append(mproperty.name).add static_mtype.linkto(v)
		else if self isa MVirtualTypeDef then
			var bound = self.bound
			if bound != null then res.new_field("add").append(mproperty.name).add bound.linkto(v)
		else
			res.new_field("wat?").append(mproperty.name)
		end

		if is_intro then
		else
			res.new_field("intro").add mproperty.intro.linkto_text(v, "in {mproperty.intro.mclassdef}")
		end
		add_doc_to_infobox(res)
		if mproperty.mpropdefs.length > 1 then
			var c = res.new_dropdown("redef", "redefinitions")
			for x in mproperty.mpropdefs do
				c.open("li").add x.linkto_text(v, "in {x.mclassdef}")
			end
		end

		return res
	end
src/htmlight.nit:541,2--572,4

nitc :: htmlight $ MModule :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, "module {name}")
		res.href = v.hrefto(self)
		if not v.show_infobox then return res
		res.new_field("module").add(linkto(v))
		add_doc_to_infobox(res)
		if in_importation.greaters.length > 1 then
			var c = res.new_dropdown("imports", "{in_importation.greaters.length-1} modules")
			for x in in_importation.greaters do
				if x == self then continue
				c.open("li").add x.linkto(v)
			end
		end
		return res
	end
src/htmlight.nit:476,2--491,4

nitc :: htmlight $ MClassType :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, to_s)
		res.href = v.hrefto(mclass.intro)
		if not v.show_infobox then return res
		res.new_field("class").add mclass.intro.linkto(v)
		add_doc_to_infobox(res)
		return res
	end
src/htmlight.nit:576,2--584,4

nitc :: htmlight $ MNullType :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, to_s)
		return res
	end
src/htmlight.nit:643,2--647,4

nitc :: htmlight $ MVirtualType :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, to_s)
		res.href = v.hrefto(mproperty)
		if not v.show_infobox then return res
		var p = mproperty
		res.new_field("virtual type").add p.intro.linkto(v)
		add_doc_to_infobox(res)
		return res
	end
src/htmlight.nit:591,2--600,4

nitc :: htmlight $ MParameterType :: infobox
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, to_s)
		if not v.show_infobox then return res
		res.new_field("parameter type").append("{name} from class ").add mclass.intro.linkto(v)
		return res
	end
src/htmlight.nit:607,2--613,4

nitc :: htmlight $ MNullableType :: infobox
	redef fun infobox(v)
	do
		return mtype.infobox(v)
	end
src/htmlight.nit:617,2--620,4

nitc :: htmlight $ MNotNullType :: infobox
	redef fun infobox(v)
	do
		return mtype.infobox(v)
	end
src/htmlight.nit:630,2--633,4