From ed059bf1490f5d5dd28a66a8529af37fe6f9ea9e Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Fri, 24 Apr 2015 12:01:36 -0400 Subject: [PATCH] nitdoc: intro/redef lists use TabbedGroup Signed-off-by: Alexandre Terrasa --- src/doc/doc_phases/doc_intros_redefs.nit | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/doc/doc_phases/doc_intros_redefs.nit b/src/doc/doc_phases/doc_intros_redefs.nit index afd8e55..54f7c18 100644 --- a/src/doc/doc_phases/doc_intros_redefs.nit +++ b/src/doc/doc_phases/doc_intros_redefs.nit @@ -54,28 +54,42 @@ redef class DefinitionArticle # TODO this should move to MEntity? private fun build_mmodule_list(v: IntroRedefListPhase, doc: DocModel, mmodule: MModule) do + var section = new IntrosRedefsSection(mentity) + var group = new PanelGroup("List") var intros = mmodule.intro_mclassdefs(v.ctx.min_visibility).to_a doc.mainmodule.linearize_mclassdefs(intros) - add_child new IntrosRedefsListArticle(mentity, "Introduces", intros) + group.add_child new IntrosRedefsListArticle(mentity, "Introduces", intros) var redefs = mmodule.redef_mclassdefs(v.ctx.min_visibility).to_a doc.mainmodule.linearize_mclassdefs(redefs) - add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs) + group.add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs) + section.add_child group + add_child(section) end # TODO this should move to MEntity? private fun build_mclassdef_list(v: IntroRedefListPhase, doc: DocModel, mclassdef: MClassDef) do + var section = new IntrosRedefsSection(mentity) + var group = new PanelGroup("List") var intros = mclassdef.collect_intro_mpropdefs(v.ctx.min_visibility).to_a # FIXME avoid diff changes # v.ctx.mainmodule.linearize_mpropdefs(intros) - add_child new IntrosRedefsListArticle(mentity, "Introduces", intros) + group.add_child new IntrosRedefsListArticle(mentity, "Introduces", intros) var redefs = mclassdef.collect_redef_mpropdefs(v.ctx.min_visibility).to_a # FIXME avoid diff changes # v.ctx.mainmodule.linearize_mpropdefs(redefs) - add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs) + group.add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs) + section.add_child group + add_child(section) end end +# Section that contains the intros and redefs lists. +class IntrosRedefsSection + super TabbedGroup + super MEntitySection +end + # An article that displays a list of introduced / refined mentities. # # FIXME diff hack -- 1.7.9.5