PhoenixLecture  2.0.0
Set of tools to make lectures
updateMenu.cpp
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 
8 #include "updateMenu.h"
9 
11 
14 void updateMenu(POutoutMode & outputMode, PLatexObj & obj){
15  if(!isSection(obj) && obj.getType() != PLatexType::FILE){return;}
16  PVecLatexObj & vecObj = obj.getVecContent();
17  for(PVecLatexObj::iterator it(vecObj.begin()); it != vecObj.end(); ++it){
18  if(!isSection(*it)){continue;}
19  PLatexMenu menu;
20  menu.setLink(it->getLink());
21 // menu.setText(it->getName());
22  menu.setText(getSectionTitle(outputMode, *it));
23  obj.getVecMenu().push_back(menu);
24  updateMenu(outputMode, *it);
25  }
26 }
27 
28 
Describe a menu entry.
Definition: PLatexObj.h:17
void setText(const PString &text)
Sets the text of the PLatexMenu.
Definition: PLatexObj.cpp:48
void setLink(const PString &link)
Sets the link of the PLatexMenu.
Definition: PLatexObj.cpp:41
Describe a latex object.
Definition: PLatexObj.h:40
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
const std::vector< PLatexMenu > & getVecMenu() const
Gets the vecMenu of the PLatexObj.
Definition: PLatexObj.cpp:452
const PLatexType::PLatexType & getType() const
Gets the type of the PLatexObj.
Definition: PLatexObj.cpp:298
bool isSection(const PLatexObj &obj)
Say if the PLatexObj is a part, charpter, section, subsection or subsubsection.
PString getSectionTitle(POutoutMode &outputMode, const PLatexObj &obj)
Get the title of a part/chapter/section etc.
std::vector< PLatexObj > PVecLatexObj
Vector of obj.
Output mode of the html backend.
void updateMenu(POutoutMode &outputMode, PLatexObj &obj)
Update the menu of the latex obj.
Definition: updateMenu.cpp:14