Webdar 1.0.1
Web user interface to libdar
html_demo.hpp
1/*********************************************************************/
2// webdar - a web server and interface program to libdar
3// Copyright (C) 2013-2026 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_DEMO_HPP
25#define HTML_DEMO_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 // webdar headers
37#include "body_builder.hpp"
38#include "actor.hpp"
39#include "html_text.hpp"
40#include "html_table.hpp"
41#include "html_form_input.hpp"
42#include "html_form_radio.hpp"
43#include "html_form_fieldset.hpp"
44#include "html_form.hpp"
45#include "html_double_button.hpp"
46#include "html_div.hpp"
47#include "html_popup.hpp"
48#include "html_label.hpp"
49
51
72class html_demo : public html_popup, public actor
73{
74public:
75 html_demo();
76 html_demo(const html_demo & ref) = delete;
77 html_demo(html_demo && ref) noexcept = delete;
78 html_demo & operator = (const html_demo & ref) = delete;
79 html_demo & operator = (html_demo && ref) noexcept = delete;
80 ~html_demo() = default;
81
83 virtual void on_event(const std::string & event_name) override;
84
85protected:
86
88 virtual void new_css_library_available() override;
89
90
91private:
92 static constexpr const char* event_calc = "go_compute";
93 static constexpr const char* event_close = "close";
94
95 static constexpr const char* css_cells = "html_demo_cells";
96 static constexpr const char* css_table = "html_demo_table";
97 static constexpr const char* css_btn_close = "html_demo_button_close";
98
99
100 html_div desc_div;
101 html_text description;
102 html_table table;
103 html_form_input left_input;
104 html_form_radio left_radio;
105 html_form_fieldset left_fs;
106 html_form form;
107 html_double_button btn_calc;
108 html_div btn_div;
109 html_form_input right_input;
110 html_form_radio right_radio;
111 html_form_fieldset right_fs;
112 html_form_input counter;
113 html_label label;
114 html_text labelsep;
115 html_label labelplus;
116 html_url tutorial;
117 html_text tutorial_desc;
118 html_button close;
119};
120
121#endif
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
simple html component providing the usual button feature of GUIs, better using html_double_button ins...
Definition: html_button.hpp:48
class html_demo show how webdar interacts with the browser
Definition: html_demo.hpp:73
virtual void on_event(const std::string &event_name) override
inherited from actor
Definition: html_demo.cpp:177
virtual void new_css_library_available() override
inherited from body_builder
Definition: html_demo.cpp:211
class html_div is the implementation of
Definition: html_div.hpp:46
html_button equivalent with changing path to trigger the button event
Definition: html_double_button.hpp:48
class html_form_fieldset implements HTML fieldset feature
Definition: html_form_fieldset.hpp:51
class html_form_input implements HTML input feature
Definition: html_form_input.hpp:57
class html_form_radio implements HTML "input" of type "radio"
Definition: html_form_radio.hpp:53
class html_form implements HTML form feature
Definition: html_form.hpp:51
class html_label implements label and tooltips (helper string showing when mouse hovering)
Definition: html_label.hpp:47
class html_popup is the implementation of
Definition: html_popup.hpp:50
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
html component implementing the usual hyperlink component
Definition: html_url.hpp:43