24#ifndef HTML_DEROULEUR_HPP
25#define HTML_DEROULEUR_HPP
40#include "body_builder.hpp"
43#include "html_button.hpp"
67 void add_section(
const std::string & name,
const std::string & title);
69 void adopt_in_section(
const std::string & section_name,
body_builder* obj);
71 void adopt_in_section(
signed int num,
body_builder* obj);
73 void clear_section(
const std::string & section_name) { switcher.
clear_section(section_name); };
75 void clear_section(
signed int num) { switcher.
clear_section(num); };
77 void remove_section(
const std::string & section_name);
79 void set_active_section(
const std::string & name) { switcher.
set_active_section(name); };
83 unsigned int size()
const {
return switcher.
size(); };
93 void url_add_css_class(
const std::string & name);
97 virtual void on_event(
const std::string & event_name)
override;
112 static const std::string shrink_event;
127 section() { title =
nullptr; shrinker =
nullptr; visible =
true; };
128 section(
const section & arg) =
delete;
129 section(section && arg) =
default;
130 section & operator = (
const section & arg) =
delete;
131 section & operator = (section && arg) =
default;
132 ~section() {
if(title !=
nullptr)
delete title;
if(shrinker !=
nullptr)
delete shrinker; };
136 std::map<std::string, section> sections;
142 std::string generate_html(
const chemin & path,
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
class body_builder is the root class of object generating HTML body
Definition: body_builder.hpp:99
void adopt(body_builder *obj)
Definition: body_builder.cpp:117
class chemin definition
Definition: chemin.hpp:51
manages a set of css class names
Definition: css_class_group.hpp:46
void clear_css_classes()
remove all classes
Definition: css_class_group.cpp:71
class html_aiguille is a pure virtual class
Definition: html_aiguille.hpp:61
unsigned int size() const
return the total number of section
Definition: html_aiguille.hpp:117
void set_active_section(const std::string &name)
manually set the visible section, based on section name
Definition: html_aiguille.cpp:188
void clear_section(const std::string §ion_name)
foresake all adopted objets in the given section
Definition: html_aiguille.cpp:113
class html_derouleur is a pure virtual class
Definition: html_derouleur.hpp:55
void url_clear_css_classes()
set css of URL titles
Definition: html_derouleur.hpp:92
virtual void on_event(const std::string &event_name) override
implementation in inherited class of the action triggered by the event given in argument
Definition: html_derouleur.cpp:204
virtual void new_css_library_available() override
Definition: html_derouleur.cpp:245
void clear()
clear all adopted data and remove all sections
Definition: html_derouleur.cpp:44
void section_set_visible(const std::string &name, bool visible)
hide/unhide a section (Warning! this is not the same thing as shrinking/expanding a section!...
Definition: html_derouleur.cpp:145
virtual std::string inherited_get_body_part(const chemin &path, const request &req) override
implementation of get_body_part() method for inherited classes
Definition: html_derouleur.cpp:233
virtual void css_classes_have_changed() override
Be informed about css class modification.
Definition: html_derouleur.cpp:214
class holding fields of an HTTP request (method, URI, header, cookies, and so on)
Definition: request.hpp:45