diff --git a/doc/cpp-modules.md b/doc/cpp20-modules.md similarity index 63% rename from doc/cpp-modules.md rename to doc/cpp20-modules.md index cde6059e..3fed5b5b 100644 --- a/doc/cpp-modules.md +++ b/doc/cpp20-modules.md @@ -1,5 +1,7 @@ @page cpp20-modules C++20 Modules +coucou + > [!WARNING] > This feature is still in development, and the API may change in future releases. > Your contribution is needed to help us improve the compatibility and usability @@ -57,36 +59,27 @@ are available: - `ftxui.component.Receiver` - `ftxui.component.ScreenInteractive` - `ftxui.component.Task` - - `ftxui.dom` - - `ftxui.dom.Canvas` - - `ftxui.dom.Deprecated` - - `ftxui.dom.Direction` - - `ftxui.dom.Elements` - - `ftxui.dom.FlexboxConfig` - - `ftxui.dom.LinearGradient` - - `ftxui.dom.Node` - - `ftxui.dom.Requirement` - - `ftxui.dom.Selection` - - `ftxui.dom.Table` - - `ftxui.screen` - - `ftxui.screen.Box` - - `ftxui.screen.Color` - - `ftxui.screen.ColorInfo` - - `ftxui.screen.Deprecated` - - `ftxui.screen.Image` - - `ftxui.screen.Pixel` - - `ftxui.screen.Screen` - - `ftxui.screen.String` - - `ftxui.screen.Terminal` - - `ftxui.util` - - `ftxui.util.AutoReset` - - `ftxui.util.Ref` - -> ![NOTE] -> The module `ftxui` transitively imports all `ftxui.*` modules and thus -> has a dependency on those modules. - -> ![NOTE] The list can be generated with the following command: -> ```sh -> git grep "export module" | cut -d: -f2 | cut -d\ -f3 -> ``` +- `ftxui.dom` + - `ftxui.dom.Canvas` + - `ftxui.dom.Deprecated` + - `ftxui.dom.Direction` + - `ftxui.dom.Elements` + - `ftxui.dom.FlexboxConfig` + - `ftxui.dom.LinearGradient` + - `ftxui.dom.Node` + - `ftxui.dom.Requirement` + - `ftxui.dom.Selection` + - `ftxui.dom.Table` +- `ftxui.screen` + - `ftxui.screen.Box` + - `ftxui.screen.Color` + - `ftxui.screen.ColorInfo` + - `ftxui.screen.Deprecated` + - `ftxui.screen.Image` + - `ftxui.screen.Pixel` + - `ftxui.screen.Screen` + - `ftxui.screen.String` + - `ftxui.screen.Terminal` +- `ftxui.util` + - `ftxui.util.AutoReset` + - `ftxui.util.Ref` diff --git a/doc/header.html b/doc/header.html index 23e998e6..649783b3 100644 --- a/doc/header.html +++ b/doc/header.html @@ -108,7 +108,6 @@ console.log("navtree.textContent", navtree.textContent); if (!navtree.textContent.includes("Getting Started") && !navtree.textContent.includes("Installation") && - !navtree.textContent.includes("Modules") && !navtree.textContent.includes("ftxui / screen") && !navtree.textContent.includes("ftxui / dom") && !navtree.textContent.includes("ftxui / component") && diff --git a/doc/module.md b/doc/module.md index 91be215f..3ef928bf 100644 --- a/doc/module.md +++ b/doc/module.md @@ -1,4 +1,4 @@ -# Modules {#modules} +# ftxui {#ftxui} ![title-img](https://nsm09.casimages.com/img/2025/05/30//2505300816063242518595251.jpg) diff --git a/src/ftxui/component/animation.cppm b/src/ftxui/component/animation.cppm index 5bbb09a1..0ddf8dea 100644 --- a/src/ftxui/component/animation.cppm +++ b/src/ftxui/component/animation.cppm @@ -1,7 +1,7 @@ -/** - * @file animation.cppm - * @brief Module file for the Animation namespace of the Component module - */ +/// @module ftxui.component.animation +/// @brief Module file for the Animation namespace of the Component module. +/// +/// @file animation.cppm module; diff --git a/src/ftxui/component/component_base.cppm b/src/ftxui/component/component_base.cppm new file mode 100644 index 00000000..d470d329 --- /dev/null +++ b/src/ftxui/component/component_base.cppm @@ -0,0 +1,28 @@ +/** + * @file component_base.cppm + * @brief Module file for the ComponentBase class of the Component module + */ + +module; + +#include + +export module ftxui.component.component_base; + +/** + * @namespace ftxui + * @brief The FTXUI ftxui:: namespace + */ +export namespace ftxui { + using ftxui::Delegate; + using ftxui::Focus; + using ftxui::Event; + + namespace animation { + using ftxui::animation::Params; + } + + using ftxui::ComponentBase; + using ftxui::Component; + using ftxui::Components; +}