44> [ !WARNING]
55> This feature is still in development, and the API may change in future releases.
66> Your contribution is needed to help us improve the compatibility and usability
7- > of C++20 modules in FTXUI. If you encounter any issues or have suggestions,
7+ > of C++ modules in FTXUI. If you encounter any issues or have suggestions,
88> please open an issue.
99
1010FTXUI experimentally supports
1111[ C++20 modules] ( https://en.cppreference.com/w/cpp/language/modules ) to reduce
12- compilation times and improve code organization. Each header has a
13- corresponding module.
12+ compilation times and improve code organization. Each part of the library has a
13+ corresponding module, split into partitions per each header .
1414
15- Use the FTXUI_BUILD_MODULES option to build the FTXUI project itself to provide C++ 20 modules,
15+ Use the FTXUI_BUILD_MODULES option to build the FTXUI project itself to provide C++20 modules,
1616for example with CMake and Ninja:
1717
1818``` sh
2525```
2626
2727> [ !NOTE]
28- > To use modules, you need a C++20 compatible compiler, CMake version 3.20 or
28+ > To use modules, you need a C++≥ 20 compatible compiler, CMake version 3.20 or
2929> higher, and use a compatible generator like Ninja. Note that Makefile
3030> generators ** do not support modules** .
3131
@@ -34,9 +34,12 @@ Then, in your own code you can consume the modules and code as normal:
3434``` cpp
3535import ftxui;
3636
37+ using ftxui::Button;
38+ using ftxui::ScreenInteractive;
39+
3740int main () {
38- auto screen = ftxui:: ScreenInteractive::TerminalOutput();
39- auto button = ftxui:: Button("Click me", screen.QuitClosure());
41+ auto screen = ScreenInteractive::TerminalOutput();
42+ auto button = Button("Click me", screen.QuitClosure());
4043 screen.Loop(button);
4144 return 0;
4245}
@@ -70,38 +73,6 @@ are available:
7073
7174- ` ftxui `
7275 - ` ftxui.component `
73- - ` ftxui.component.Animation `
74- - ` ftxui.component.CapturedMouse `
75- - ` ftxui.component.Component `
76- - ` ftxui.component.ComponentBase `
77- - ` ftxui.component.ComponentOptions `
78- - ` ftxui.component.Event `
79- - ` ftxui.component.Loop `
80- - ` ftxui.component.Mouse `
81- - ` ftxui.component.Receiver `
82- - ` ftxui.component.ScreenInteractive `
83- - ` ftxui.component.Task `
84- - ` ftxui.dom `
85- - ` ftxui.dom.Canvas `
86- - ` ftxui.dom.Deprecated `
87- - ` ftxui.dom.Direction `
88- - ` ftxui.dom.Elements `
89- - ` ftxui.dom.FlexboxConfig `
90- - ` ftxui.dom.LinearGradient `
91- - ` ftxui.dom.Node `
92- - ` ftxui.dom.Requirement `
93- - ` ftxui.dom.Selection `
94- - ` ftxui.dom.Table `
95- - ` ftxui.screen `
96- - ` ftxui.screen.Box `
97- - ` ftxui.screen.Color `
98- - ` ftxui.screen.ColorInfo `
99- - ` ftxui.screen.Deprecated `
100- - ` ftxui.screen.Image `
101- - ` ftxui.screen.Pixel `
102- - ` ftxui.screen.Screen `
103- - ` ftxui.screen.String `
104- - ` ftxui.screen.Terminal `
105- - ` ftxui.util `
106- - ` ftxui.util.AutoReset `
107- - ` ftxui.util.Ref `
76+ - ` ftxui.dom `
77+ - ` ftxui.screen `
78+ - ` ftxui.util `
0 commit comments