From 5a4afba66fc90d7840b50d17d10965a728257494 Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Sun, 16 Aug 2020 00:18:20 +0200 Subject: [PATCH] Improve the documentation. --- doc/doxygen_extra.css | 93 ++++++++++++++++++++---------------------- doc/doxygen_layout.xml | 51 ++++++++++++++++++----- doc/mainpage.md | 15 ++----- 3 files changed, 88 insertions(+), 71 deletions(-) diff --git a/doc/doxygen_extra.css b/doc/doxygen_extra.css index e990cfa..44488a7 100755 --- a/doc/doxygen_extra.css +++ b/doc/doxygen_extra.css @@ -85,54 +85,51 @@ a:not([href]) { } a.el { - font-weight: normal; + font-weight: normal; } .image { - text-align: left; + text-align: left; } .tip { - background-image: url(tip.png); - background-position: left center; - background-repeat: no-repeat; - padding-left: 30px; - margin-top: 1em; - margin-bottom: 1em; - min-height: 31px; - display: block; - font-style:italic; + background-image: url(tip.png); + background-position: left center; + background-repeat: no-repeat; + padding-left: 30px; + margin-top: 1em; + margin-bottom: 1em; + min-height: 31px; + display: block; + font-style:italic; } .warn { - background-image: url(warn.png); - background-position: left center; - background-repeat: no-repeat; - padding-left: 48px; - margin-top: 1em; - margin-bottom: 1em; - min-height: 31px; - display: block; - font-style:italic; + background-image: url(warn.png); + background-position: left center; + background-repeat: no-repeat; + padding-left: 48px; + margin-top: 1em; + margin-bottom: 1em; + min-height: 31px; + display: block; + font-style:italic; } -#projectname -{ - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; - font-size: 2em; - font-weight: bold; -} - -#projectbrief -{ - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; - font-size: 0.8em; +#projectname { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; + font-size: 2em; + font-weight: bold; } -#projectnumber -{ - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; - font-size: 1em; +#projectbrief { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; + font-size: 0.8em; +} + +#projectnumber { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; + font-size: 1em; } div.contents { @@ -151,8 +148,7 @@ div.toc { border-radius: 7px; } -div.header -{ +div.header { width: 980px; padding: 10px; margin-top: 10px; @@ -164,17 +160,16 @@ div.header border: 1px solid #d1d5da; } -div.headertitle -{ - padding: 0; +div.headertitle { + padding: 0; } .title ol { - margin: 0; + margin: 0; } .title ol li { - list-style-type: none; + list-style-type: none; } .ui-resizable-e { @@ -250,10 +245,10 @@ span.charliteral { } blockquote { - background-color: #EEEEEE; - border-left: 2px solid #606060; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; + background-color: #EEEEEE; + border-left: 2px solid #606060; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; } /* @end */ @@ -278,12 +273,12 @@ img { } #side-nav { - width: 25%; - max-width: 50%; + width: 25%; + max-width: 50%; } .memtitle { - background-image: none; + background-image: none; } .memproto { diff --git a/doc/doxygen_layout.xml b/doc/doxygen_layout.xml index dcae4cf..00a1032 100644 --- a/doc/doxygen_layout.xml +++ b/doc/doxygen_layout.xml @@ -1,25 +1,36 @@ - - + + + + - + - + + + + + + - - - + + + + + + + + - @@ -87,8 +98,13 @@ + + + + + @@ -98,6 +114,8 @@ + + @@ -113,11 +131,16 @@ + + + - + + + @@ -128,6 +151,8 @@ + + @@ -137,8 +162,7 @@ - - + @@ -148,6 +172,8 @@ + + @@ -161,11 +187,14 @@ + + + diff --git a/doc/mainpage.md b/doc/mainpage.md index 74cba30..e9bb81a 100644 --- a/doc/mainpage.md +++ b/doc/mainpage.md @@ -45,7 +45,7 @@ int main(void) { ``` **cmake** -``` +```c cmake_minimum_required (VERSION 3.11) include(FetchContent) @@ -144,15 +144,12 @@ This provides: # ftxui/dom Every elements of the dom are declared from: - -\include ftxui/dom/elements.hpp +\ref ftxui/dom/elements.hpp ## text The most simple widget. It displays a text. ~~~cpp -using namespace ftxui; - text(L"I am a piece of text"); ~~~ ~~~bash @@ -163,8 +160,6 @@ I am a piece of text. Add a border around an element ~~~cpp -using namespace ftxui; - 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. Add a border around an element ~~~cpp -using namespace ftxui; - window(L"The window", text(L"The element")) ~~~ @@ -378,8 +371,8 @@ Assuming this example example.cpp file. **main.cpp** ~~~cpp -#include "ftxui/screen/screen.hpp" -#include "ftxui/dom/elements.hpp" +#include "ftxui/screen/screen.c +#include "ftxui/dom/elements.c #include int main(int argc, const char *argv[]) {