PhoenixLecture  2.0.0
Set of tools to make lectures
updateMenu.cpp File Reference
#include "updateMenu.h"
+ Include dependency graph for updateMenu.cpp:

Go to the source code of this file.

Functions

void updateMenu (POutoutMode &outputMode, PLatexObj &obj)
 Update the menu of the latex obj. More...
 

Function Documentation

◆ updateMenu()

void updateMenu ( POutoutMode outputMode,
PLatexObj obj 
)

Update the menu of the latex obj.

Parameters
[out]outputMode: output mode of the html backend
[out]obj: PLatexObj to be updated

Definition at line 14 of file updateMenu.cpp.

14  {
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 }
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
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.
void updateMenu(POutoutMode &outputMode, PLatexObj &obj)
Update the menu of the latex obj.
Definition: updateMenu.cpp:14

References PLatexType::FILE, getSectionTitle(), PLatexObj::getType(), PLatexObj::getVecContent(), PLatexObj::getVecMenu(), isSection(), PLatexMenu::setLink(), and PLatexMenu::setText().

Referenced by processAllFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: