Improve the documentation.

This commit is contained in:
ArthurSonzogni 2020-08-16 00:18:20 +02:00 committed by Arthur Sonzogni
parent 37ddb1eceb
commit 5a4afba66f
3 changed files with 88 additions and 71 deletions

View File

@ -85,54 +85,51 @@ a:not([href]) {
} }
a.el { a.el {
font-weight: normal; font-weight: normal;
} }
.image { .image {
text-align: left; text-align: left;
} }
.tip { .tip {
background-image: url(tip.png); background-image: url(tip.png);
background-position: left center; background-position: left center;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-left: 30px; padding-left: 30px;
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
min-height: 31px; min-height: 31px;
display: block; display: block;
font-style:italic; font-style:italic;
} }
.warn { .warn {
background-image: url(warn.png); background-image: url(warn.png);
background-position: left center; background-position: left center;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-left: 48px; padding-left: 48px;
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
min-height: 31px; min-height: 31px;
display: block; display: block;
font-style:italic; font-style:italic;
} }
#projectname #projectname {
{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 2em;
font-size: 2em; font-weight: bold;
font-weight: bold;
}
#projectbrief
{
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 0.8em;
} }
#projectnumber #projectbrief {
{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 0.8em;
font-size: 1em; }
#projectnumber {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 1em;
} }
div.contents { div.contents {
@ -151,8 +148,7 @@ div.toc {
border-radius: 7px; border-radius: 7px;
} }
div.header div.header {
{
width: 980px; width: 980px;
padding: 10px; padding: 10px;
margin-top: 10px; margin-top: 10px;
@ -164,17 +160,16 @@ div.header
border: 1px solid #d1d5da; border: 1px solid #d1d5da;
} }
div.headertitle div.headertitle {
{ padding: 0;
padding: 0;
} }
.title ol { .title ol {
margin: 0; margin: 0;
} }
.title ol li { .title ol li {
list-style-type: none; list-style-type: none;
} }
.ui-resizable-e { .ui-resizable-e {
@ -250,10 +245,10 @@ span.charliteral {
} }
blockquote { blockquote {
background-color: #EEEEEE; background-color: #EEEEEE;
border-left: 2px solid #606060; border-left: 2px solid #606060;
margin: 0 24px 0 4px; margin: 0 24px 0 4px;
padding: 0 12px 0 16px; padding: 0 12px 0 16px;
} }
/* @end */ /* @end */
@ -278,12 +273,12 @@ img {
} }
#side-nav { #side-nav {
width: 25%; width: 25%;
max-width: 50%; max-width: 50%;
} }
.memtitle { .memtitle {
background-image: none; background-image: none;
} }
.memproto { .memproto {

View File

@ -1,25 +1,36 @@
<doxygenlayout version="1.0"> <doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.14 -->
<!-- Navigation index tabs for HTML output --> <!-- Navigation index tabs for HTML output -->
<navindex> <navindex>
<tab type="mainpage" visible="yes" title=""/> <tab type="mainpage" visible="yes" title="Tutorial"/>
<tab type="examples" visible="yes" title="" intro=""/>
<tab type="filelist" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/> <tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="C modules" intro=""/> <tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title=""> <tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/> <tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/> <tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab> </tab>
<tab type="classes" visible="yes" title=""> <tab type="interfaces" visible="no" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="no" title="">
<tab type="classlist" visible="yes" title="" intro=""/> <tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/> <tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/> <tab type="classmembers" visible="yes" title="" intro=""/>
</tab> </tab>
<tab type="files" visible="yes" title=""> <tab type="structs" visible="no" title="">
<tab type="filelist" visible="yes" title="" intro=""/> <tab type="structlist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/> <tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="no" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab> </tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex> </navindex>
<!-- Layout definition for a class page --> <!-- Layout definition for a class page -->
@ -87,8 +98,13 @@
<memberdecl> <memberdecl>
<nestednamespaces visible="yes" title=""/> <nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/> <constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/> <classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/> <typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/> <enums title=""/>
<functions title=""/> <functions title=""/>
<variables title=""/> <variables title=""/>
@ -98,6 +114,8 @@
<memberdef> <memberdef>
<inlineclasses title=""/> <inlineclasses title=""/>
<typedefs title=""/> <typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/> <enums title=""/>
<functions title=""/> <functions title=""/>
<variables title=""/> <variables title=""/>
@ -113,11 +131,16 @@
<includedbygraph visible="$INCLUDED_BY_GRAPH"/> <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/> <sourcelink visible="yes"/>
<memberdecl> <memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/> <classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/> <namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/> <constantgroups visible="yes" title=""/>
<defines title=""/> <defines title=""/>
<typedes title=""/> <typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/> <enums title=""/>
<functions title=""/> <functions title=""/>
<variables title=""/> <variables title=""/>
@ -128,6 +151,8 @@
<inlineclasses title=""/> <inlineclasses title=""/>
<defines title=""/> <defines title=""/>
<typedefs title=""/> <typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/> <enums title=""/>
<functions title=""/> <functions title=""/>
<variables title=""/> <variables title=""/>
@ -137,8 +162,7 @@
<!-- Layout definition for a group page --> <!-- Layout definition for a group page -->
<group> <group>
<briefdescription visible="no"/> <briefdescription visible="yes"/>
<detaileddescription title="Description"/>
<groupgraph visible="$GROUP_GRAPHS"/> <groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl> <memberdecl>
<nestedgroups visible="yes" title=""/> <nestedgroups visible="yes" title=""/>
@ -148,6 +172,8 @@
<classes visible="yes" title=""/> <classes visible="yes" title=""/>
<defines title=""/> <defines title=""/>
<typedefs title=""/> <typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/> <enums title=""/>
<enumvalues title=""/> <enumvalues title=""/>
<functions title=""/> <functions title=""/>
@ -161,11 +187,14 @@
<friends title=""/> <friends title=""/>
<membergroups visible="yes"/> <membergroups visible="yes"/>
</memberdecl> </memberdecl>
<detaileddescription title=""/>
<memberdef> <memberdef>
<pagedocs/> <pagedocs/>
<inlineclasses title=""/> <inlineclasses title=""/>
<defines title=""/> <defines title=""/>
<typedefs title=""/> <typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/> <enums title=""/>
<enumvalues title=""/> <enumvalues title=""/>
<functions title=""/> <functions title=""/>

View File

@ -45,7 +45,7 @@ int main(void) {
``` ```
**cmake** **cmake**
``` ```c
cmake_minimum_required (VERSION 3.11) cmake_minimum_required (VERSION 3.11)
include(FetchContent) include(FetchContent)
@ -144,15 +144,12 @@ This provides:
# ftxui/dom # ftxui/dom
Every elements of the dom are declared from: Every elements of the dom are declared from:
\ref ftxui/dom/elements.hpp
\include ftxui/dom/elements.hpp
## text ## text
The most simple widget. It displays a text. The most simple widget. It displays a text.
~~~cpp ~~~cpp
using namespace ftxui;
text(L"I am a piece of text"); text(L"I am a piece of text");
~~~ ~~~
~~~bash ~~~bash
@ -163,8 +160,6 @@ I am a piece of text.
Add a border around an element Add a border around an element
~~~cpp ~~~cpp
using namespace ftxui;
border(text(L"The element")) border(text(L"The element"))
~~~ ~~~
@ -179,8 +174,6 @@ border(text(L"The element"))
A ftxui::window is a ftxui::border, but with some text on top of the border. A ftxui::window is a ftxui::border, but with some text on top of the border.
Add a border around an element Add a border around an element
~~~cpp ~~~cpp
using namespace ftxui;
window(L"The window", text(L"The element")) window(L"The window", text(L"The element"))
~~~ ~~~
@ -378,8 +371,8 @@ Assuming this example example.cpp file.
**main.cpp** **main.cpp**
~~~cpp ~~~cpp
#include "ftxui/screen/screen.hpp" #include "ftxui/screen/screen.c
#include "ftxui/dom/elements.hpp" #include "ftxui/dom/elements.c
#include <iostream> #include <iostream>
int main(int argc, const char *argv[]) { int main(int argc, const char *argv[]) {