Property definitions

nitc $ PageMEntity :: defaultinit
# A DocPage documenting a MEntity
abstract class PageMEntity
	super DocPage
	autoinit mentity

	new(mentity: MEntity) do
		if mentity isa MPackage then
			return new PageMPackage(mentity)
		else if mentity isa MGroup then
			return new PageMGroup(mentity)
		else if mentity isa MModule then
			return new PageMModule(mentity)
		else if mentity isa MClass then
			return new PageMClass(mentity)
		else if mentity isa MProperty then
			return new PageMProperty(mentity)
		else
			print "Not yet implemented: Page for {mentity.full_name} ({mentity.class_name})"
			abort
		end
	end

	# Type of MEntity documented by this page
	type MENTITY: MEntity

	# MEntity documented by this page
	var mentity: MENTITY

	# For mentities the main tab is the doc tab
	redef var main_tab = new DocTab("doc", "Doc", true, "book")

	# API tab
	#
	# Where the MEntity API (groups, modules, classes, props) is displayed
	var api_tab = new DocTab("api", "API", false, "list")

	# Dependencies tab
	#
	# Where the MEntity importation or inheritance is displayed
	var dep_tab = new DocTab("inh", "Dependencies", false, "object-align-vertical")

	# Code tab
	#
	# Since all mentities does not have code, this tab in not in the `tabs` list
	# by default.
	var code_tab = new DocTab("code", "Code", false, "console")

	# Lienarization tab
	#
	# Since all mentities does not have a linearization, this tab in not in the
	# `tabs` list by default.
	var lin_tab = new DocTab("lin", "Linearization", false, "arrow-down")

	redef var tabs = [main_tab, api_tab, dep_tab] is lazy
	redef var title is lazy do return mentity.name
end
src/doc/static/static_base.nit:119,1--174,3