Webdar 1.0.0
Web user interface to libdar
html_summary_page.hpp
1/*********************************************************************/
2// webdar - a web server and interface program to libdar
3// Copyright (C) 2013-2025 Denis Corbin
4//
5// This file is part of Webdar
6//
7// Webdar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// Webdar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Webdar. If not, see <http://www.gnu.org/licenses/>
19//
20//----
21// to contact the author: dar.linux@free.fr
22/*********************************************************************/
23
24#ifndef HTML_SUMMARY_PAGE_HPP
25#define HTML_SUMMARY_PAGE_HPP
26
27 // C system header files
28#include "my_config.h"
29extern "C"
30{
31
32}
33
34 // C++ system header files
35
36
37 // webdar headers
38#include "html_page.hpp"
39#include "html_dir_tree.hpp"
40#include "html_button.hpp"
41#include "html_div.hpp"
42#include "archive_init_list.hpp"
43#include "html_focus.hpp"
44
46
52
53class html_summary_page : public html_page, public actor, public events
54{
55public:
56 static const std::string event_close;
57
59 html_summary_page(const html_summary_page & ref) = delete;
60 html_summary_page(html_summary_page && ref) noexcept = delete;
61 html_summary_page & operator = (const html_summary_page & ref) = delete;
62 html_summary_page & operator = (html_summary_page && ref) noexcept = delete;
63 ~html_summary_page() = default;
64
65
67 void set_session_name(const std::string & session_name);
68
70 void set_source(const archive_init_list *ref);
71
73 void clear();
74
75 // inherited from actor
76 virtual void on_event(const std::string & event_name) override;
77
78protected:
80 virtual void new_css_library_available() override;
81
82
83private:
84 static constexpr const char* css_close = "html_sum_page_close";
85 static constexpr const char* css_table_top = "html_sum_page_table_top";
86 static constexpr const char* css_table_left = "html_sum_page_table_left";
87 static constexpr const char* css_table_rest = "html_sum_page_table_rest";
88 static constexpr const char* css_about_box = "html_sum_page_about";
89 static constexpr const char* css_about_text = "html_sum_page_about_text";
90
91 html_div about;
92 html_text about_text;
93
94 html_div format_float;
95 html_text format_title;
96 html_table format_table;
97
98 html_div slice_float;
99 html_text slice_title;
100 html_table slice_table;
101
102 html_div overall_float;
103 html_text overall_title;
104 html_table overall_table;
105
106 html_div content_float;
107 html_text content_title;
108 html_table content_table;
109
110 html_div saved_float;
111 html_text saved_title;
112 html_table saved_table;
113
114 html_button close;
115};
116
117
118#endif
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
this objects is a thread object that provide access to the content of an existing archive
Definition: archive_init_list.hpp:55
class events
Definition: events.hpp:52
simple html component providing the usual button feature of GUIs, better using html_double_button ins...
Definition: html_button.hpp:48
class html_div is the implementation of
Definition: html_div.hpp:46
html page root component
Definition: html_page.hpp:45
html_summary_page is the page that shows the summary of an existing archive
Definition: html_summary_page.hpp:54
void set_session_name(const std::string &session_name)
set title of the summary page given the session name
Definition: html_summary_page.cpp:143
void set_source(const archive_init_list *ref)
mandatory call before calling get_body_part !!!
Definition: html_summary_page.cpp:154
void clear()
clear informations about previously read archive
Definition: html_summary_page.cpp:322
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_summary_page.cpp:133
virtual void new_css_library_available() override
inherited from html_div/body_builder
Definition: html_summary_page.cpp:337
html component implementing the html table structure
Definition: html_table.hpp:52
class html_text manage text and header in html document
Definition: html_text.hpp:52