From ed5f04ccc047d6e920c9e2dcd79646c2bc71d664 Mon Sep 17 00:00:00 2001 From: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com> Date: Thu, 15 May 2025 14:54:42 -0400 Subject: [PATCH] Update examples for testing modules --- examples/component/button.cpp | 6 ++++++ examples/component/button_animated.cpp | 6 ++++++ examples/component/button_in_frame.cpp | 6 ++++++ examples/component/button_style.cpp | 6 ++++++ examples/component/canvas_animated.cpp | 10 ++++++++++ examples/component/checkbox.cpp | 5 +++++ examples/component/checkbox_in_frame.cpp | 5 +++++ examples/component/collapsible.cpp | 5 +++++ examples/component/composition.cpp | 5 +++++ examples/component/custom_loop.cpp | 9 +++++++++ examples/component/dropdown.cpp | 4 ++++ examples/component/dropdown_custom.cpp | 4 ++++ examples/component/flexbox_gallery.cpp | 6 ++++++ examples/component/focus.cpp | 6 ++++++ examples/component/focus_cursor.cpp | 8 ++++++++ examples/component/gallery.cpp | 5 +++++ examples/component/homescreen.cpp | 7 +++++++ examples/component/input.cpp | 6 ++++++ examples/component/input_in_frame.cpp | 5 +++++ examples/component/input_style.cpp | 9 +++++++++ examples/component/linear_gradient_gallery.cpp | 9 +++++++++ examples/component/maybe.cpp | 6 ++++++ examples/component/menu.cpp | 4 ++++ examples/component/menu2.cpp | 5 +++++ examples/component/menu_entries.cpp | 6 ++++++ examples/component/menu_entries_animated.cpp | 6 ++++++ examples/component/menu_in_frame.cpp | 5 +++++ examples/component/menu_in_frame_horizontal.cpp | 5 +++++ examples/component/menu_multiple.cpp | 5 +++++ examples/component/menu_style.cpp | 6 ++++++ examples/component/menu_underline_animated_gallery.cpp | 6 ++++++ examples/component/modal_dialog.cpp | 8 ++++++++ examples/component/modal_dialog_custom.cpp | 5 +++++ examples/component/nested_screen.cpp | 5 +++++ examples/component/print_key_press.cpp | 5 +++++ examples/component/radiobox.cpp | 4 ++++ examples/component/radiobox_in_frame.cpp | 5 +++++ examples/component/renderer.cpp | 6 ++++++ examples/component/resizable_split.cpp | 6 ++++++ examples/component/scrollbar.cpp | 5 +++++ examples/component/selection.cpp | 6 ++++++ examples/component/slider.cpp | 4 ++++ examples/component/slider_direction.cpp | 8 ++++++++ examples/component/slider_rgb.cpp | 6 ++++++ examples/component/tab_horizontal.cpp | 5 +++++ examples/component/tab_vertical.cpp | 5 +++++ examples/component/textarea.cpp | 5 +++++ examples/component/toggle.cpp | 5 +++++ examples/component/window.cpp | 4 ++++ examples/component/with_restored_io.cpp | 5 +++++ examples/dom/border.cpp | 7 +++++++ examples/dom/border_colored.cpp | 8 ++++++++ examples/dom/border_style.cpp | 8 ++++++++ examples/dom/canvas.cpp | 9 +++++++++ examples/dom/color_gallery.cpp | 8 ++++++++ examples/dom/color_info_palette256.cpp | 8 ++++++++ examples/dom/color_info_sorted_2d.ipp | 2 ++ examples/dom/color_truecolor_HSV.cpp | 8 ++++++++ examples/dom/color_truecolor_RGB.cpp | 8 ++++++++ examples/dom/dbox.cpp | 8 ++++++++ examples/dom/gauge.cpp | 9 +++++++++ examples/dom/gauge_direction.cpp | 9 +++++++++ examples/dom/graph.cpp | 9 +++++++++ examples/dom/gridbox.cpp | 9 +++++++++ examples/dom/hflow.cpp | 9 +++++++++ examples/dom/html_like.cpp | 9 +++++++++ examples/dom/linear_gradient.cpp | 8 ++++++++ examples/dom/package_manager.cpp | 9 +++++++++ examples/dom/paragraph.cpp | 9 +++++++++ examples/dom/separator.cpp | 8 ++++++++ examples/dom/separator_style.cpp | 8 ++++++++ examples/dom/size.cpp | 8 ++++++++ examples/dom/spinner.cpp | 9 +++++++++ examples/dom/style_blink.cpp | 8 ++++++++ examples/dom/style_bold.cpp | 8 ++++++++ examples/dom/style_color.cpp | 8 ++++++++ examples/dom/style_dim.cpp | 8 ++++++++ examples/dom/style_gallery.cpp | 8 ++++++++ examples/dom/style_hyperlink.cpp | 8 ++++++++ examples/dom/style_inverted.cpp | 8 ++++++++ examples/dom/style_italic.cpp | 8 ++++++++ examples/dom/style_strikethrough.cpp | 8 ++++++++ examples/dom/style_underlined.cpp | 8 ++++++++ examples/dom/style_underlined_double.cpp | 8 ++++++++ examples/dom/table.cpp | 8 ++++++++ examples/dom/vbox_hbox.cpp | 9 +++++++++ examples/dom/vflow.cpp | 9 +++++++++ 87 files changed, 589 insertions(+) diff --git a/examples/component/button.cpp b/examples/component/button.cpp index dda9dd3e8..7397c47e8 100644 --- a/examples/component/button.cpp +++ b/examples/component/button.cpp @@ -4,11 +4,17 @@ #include // for shared_ptr, __shared_ptr_access #include // for operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for separator, gauge, text, Element, operator|, vbox, border +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/button_animated.cpp b/examples/component/button_animated.cpp index 10b3f8068..c12488790 100644 --- a/examples/component/button_animated.cpp +++ b/examples/component/button_animated.cpp @@ -4,6 +4,7 @@ #include // for shared_ptr, __shared_ptr_access #include // for operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -11,6 +12,11 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for gauge, separator, text, vbox, operator|, Element, border #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Green, Color::Red +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/button_in_frame.cpp b/examples/component/button_in_frame.cpp index 906804940..0650ead69 100644 --- a/examples/component/button_in_frame.cpp +++ b/examples/component/button_in_frame.cpp @@ -4,6 +4,7 @@ #include // for allocator, __shared_ptr_access, shared_ptr #include // for to_string, operator+ +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -11,6 +12,11 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, text, Element, hbox, separator, size, vbox, border, frame, vscroll_indicator, HEIGHT, LESS_THAN #include "ftxui/screen/color.hpp" // for Color, Color::Default, Color::GrayDark, Color::White +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/button_style.cpp b/examples/component/button_style.cpp index 8183e9743..c5d12ece2 100644 --- a/examples/component/button_style.cpp +++ b/examples/component/button_style.cpp @@ -3,6 +3,7 @@ // the LICENSE file. #include // for operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Vertical, Renderer, Horizontal, operator| #include "ftxui/component/component_base.hpp" // for Component @@ -10,6 +11,11 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for Element, separator, text, border #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Green, Color::Red +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/canvas_animated.cpp b/examples/component/canvas_animated.cpp index 9cc0eaa63..c1f218e44 100644 --- a/examples/component/canvas_animated.cpp +++ b/examples/component/canvas_animated.cpp @@ -2,13 +2,18 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSED file. #include // for sin, cos + +#ifndef FTXUI_BUILD_MODULES #include // for canvas, Element, separator, hbox, operator|, border #include // for Pixel +#endif + #include // for allocator, shared_ptr, __shared_ptr_access #include // for string, basic_string #include // for move #include // for vector, __alloc_traits<>::value_type +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for Renderer, CatchEvent, Horizontal, Menu, Tab #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/event.hpp" // for Event @@ -16,6 +21,11 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/canvas.hpp" // for Canvas #include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/component/checkbox.cpp b/examples/component/checkbox.cpp index 6fcd6d5b0..9a3dcb3ba 100644 --- a/examples/component/checkbox.cpp +++ b/examples/component/checkbox.cpp @@ -6,11 +6,16 @@ #include // for shared_ptr, __shared_ptr_access #include // for operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Checkbox, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/checkbox_in_frame.cpp b/examples/component/checkbox_in_frame.cpp index 3caaf81e0..f60e15b0a 100644 --- a/examples/component/checkbox_in_frame.cpp +++ b/examples/component/checkbox_in_frame.cpp @@ -5,11 +5,16 @@ #include // for shared_ptr, __shared_ptr_access #include // for operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Checkbox, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/collapsible.cpp b/examples/component/collapsible.cpp index 08a018f25..942fe29aa 100644 --- a/examples/component/collapsible.cpp +++ b/examples/component/collapsible.cpp @@ -5,11 +5,16 @@ #include // for move #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Collapsible, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, hbox, Element +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/composition.cpp b/examples/component/composition.cpp index 9fca20569..035fe9164 100644 --- a/examples/component/composition.cpp +++ b/examples/component/composition.cpp @@ -4,11 +4,16 @@ #include // for allocator, shared_ptr, __shared_ptr_access #include // for operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, separator, Element, operator|, vbox, border +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/custom_loop.cpp b/examples/component/custom_loop.cpp index 947c83fc3..80d7d9791 100644 --- a/examples/component/custom_loop.cpp +++ b/examples/component/custom_loop.cpp @@ -3,16 +3,25 @@ // the LICENSE file. #include // for EXIT_SUCCESS #include // for milliseconds + +#ifndef FTXUI_BUILD_MODULES #include // for Event #include // for ftxui #include // for text, separator, Element, operator|, vbox, border +#endif + #include // for allocator, shared_ptr #include // for operator+, to_string #include // for sleep_for +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for CatchEvent, Renderer, operator|= #include "ftxui/component/loop.hpp" // for Loop #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +import ftxui.dom; +#endif int main() { using namespace ftxui; diff --git a/examples/component/dropdown.cpp b/examples/component/dropdown.cpp index 04febeb82..ee6cc9bfa 100644 --- a/examples/component/dropdown.cpp +++ b/examples/component/dropdown.cpp @@ -4,9 +4,13 @@ #include // for basic_string, string, allocator #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +#endif int main() { using namespace ftxui; diff --git a/examples/component/dropdown_custom.cpp b/examples/component/dropdown_custom.cpp index 462d7f7b4..e5a4da8f9 100644 --- a/examples/component/dropdown_custom.cpp +++ b/examples/component/dropdown_custom.cpp @@ -4,9 +4,13 @@ #include // for basic_string, string, allocator #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +#endif int main() { using namespace ftxui; diff --git a/examples/component/flexbox_gallery.cpp b/examples/component/flexbox_gallery.cpp index e6bf432ad..e435ea8c7 100644 --- a/examples/component/flexbox_gallery.cpp +++ b/examples/component/flexbox_gallery.cpp @@ -6,6 +6,7 @@ #include // for string, basic_string, to_string, operator+, char_traits #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox, Vertical, Checkbox, Horizontal, Renderer, ResizableSplitBottom, ResizableSplitRight #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -13,6 +14,11 @@ #include "ftxui/dom/elements.hpp" // for text, window, operator|, vbox, hbox, Element, flexbox, bgcolor, filler, flex, size, border, hcenter, color, EQUAL, bold, dim, notflex, xflex_grow, yflex_grow, HEIGHT, WIDTH #include "ftxui/dom/flexbox_config.hpp" // for FlexboxConfig, FlexboxConfig::AlignContent, FlexboxConfig::JustifyContent, FlexboxConfig::AlignContent::Center, FlexboxConfig::AlignItems, FlexboxConfig::Direction, FlexboxConfig::JustifyContent::Center, FlexboxConfig::Wrap #include "ftxui/screen/color.hpp" // for Color, Color::Black +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/focus.cpp b/examples/component/focus.cpp index 2b44a12ab..460617fe1 100644 --- a/examples/component/focus.cpp +++ b/examples/component/focus.cpp @@ -5,12 +5,18 @@ #include // for operator+, char_traits, to_string, string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for Elements, Element, operator|, separator, text, focusPositionRelative, size, border, flex, frame, bgcolor, gridbox, vbox, EQUAL, center, HEIGHT, WIDTH #include "ftxui/screen/color.hpp" // for Color +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/focus_cursor.cpp b/examples/component/focus_cursor.cpp index b826dd3fc..d5c2bf878 100644 --- a/examples/component/focus_cursor.cpp +++ b/examples/component/focus_cursor.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for ftxui +#endif + #include // for allocator, operator+, char_traits, string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for Renderer, Vertical #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component #include "ftxui/dom/elements.hpp" // for text, Decorator, focus, focusCursorBar, focusCursorBarBlinking, focusCursorBlock, focusCursorBlockBlinking, focusCursorUnderline, focusCursorUnderlineBlinking, hbox, Element +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/gallery.cpp b/examples/component/gallery.cpp index 9c51120ba..671221628 100644 --- a/examples/component/gallery.cpp +++ b/examples/component/gallery.cpp @@ -6,11 +6,16 @@ #include // for string, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Slider, Checkbox, Vertical, Renderer, Button, Input, Menu, Radiobox, Toggle #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for separator, operator|, Element, size, xflex, text, WIDTH, hbox, vbox, EQUAL, border, GREATER_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/homescreen.cpp b/examples/component/homescreen.cpp index 7a5e710c5..cfa070cb4 100644 --- a/examples/component/homescreen.cpp +++ b/examples/component/homescreen.cpp @@ -14,6 +14,8 @@ #include // for vector #include "../dom/color_info_sorted_2d.ipp" // for ColorInfoSorted2D + +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for Checkbox, Renderer, Horizontal, Vertical, Input, Menu, Radiobox, ResizableSplitLeft, Tab #include "ftxui/component/component_base.hpp" // for ComponentBase, Component #include "ftxui/component/component_options.hpp" // for MenuOption, InputOption @@ -24,6 +26,11 @@ #include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::Black, Color::Blue, Color::Cyan, Color::CyanLight, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::White, Color::Yellow, Color::YellowLight, Color::Default, Color::Palette256, ftxui #include "ftxui/screen/color_info.hpp" // for ColorInfo #include "ftxui/screen/terminal.hpp" // for Size, Dimensions +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/input.cpp b/examples/component/input.cpp index 9768359a1..db4ab6adb 100644 --- a/examples/component/input.cpp +++ b/examples/component/input.cpp @@ -4,6 +4,7 @@ #include // for allocator, __shared_ptr_access #include // for char_traits, operator+, string, basic_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Input, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -11,6 +12,11 @@ #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border #include "ftxui/util/ref.hpp" // for Ref +#else +import ftxui.component; +import ftxui.dom; +import ftxui.util; +#endif int main() { using namespace ftxui; diff --git a/examples/component/input_in_frame.cpp b/examples/component/input_in_frame.cpp index 803f110ed..fac52c061 100644 --- a/examples/component/input_in_frame.cpp +++ b/examples/component/input_in_frame.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string, operator+, to_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Input, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif int main() { using namespace ftxui; diff --git a/examples/component/input_style.cpp b/examples/component/input_style.cpp index 338208c4c..1c6bb19ae 100644 --- a/examples/component/input_style.cpp +++ b/examples/component/input_style.cpp @@ -1,17 +1,26 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for LinearGradient #include // for Color, Color::White, Color::Red, Color::Blue, Color::Black, Color::GrayDark, ftxui +#endif + #include // for function #include // for allocator, string #include // for move +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for Input, Horizontal, Vertical, operator| #include "ftxui/component/component_base.hpp" // for Component #include "ftxui/component/component_options.hpp" // for InputState, InputOption #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|=, Element, bgcolor, operator|, separatorEmpty, color, borderEmpty, separator, text, center, dim, hbox, vbox, border, borderDouble, borderRounded +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/component/linear_gradient_gallery.cpp b/examples/component/linear_gradient_gallery.cpp index c8b8e1583..79ad29225 100644 --- a/examples/component/linear_gradient_gallery.cpp +++ b/examples/component/linear_gradient_gallery.cpp @@ -1,16 +1,25 @@ // Copyright 2023 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for ComponentBase, Component #include // for operator|, Element, flex, bgcolor, text, vbox, center #include // for LinearGradient #include // for Color, Color::Blue, Color::Red +#endif + #include // for __shared_ptr_access, shared_ptr #include // for allocator, operator+, char_traits, string, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/component/maybe.cpp b/examples/component/maybe.cpp index d97f8a8fd..edb300b34 100644 --- a/examples/component/maybe.cpp +++ b/examples/component/maybe.cpp @@ -4,12 +4,18 @@ #include // for string, allocator, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for operator|, Maybe, Checkbox, Radiobox, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for Component #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for Element, border, color, operator|, text #include "ftxui/screen/color.hpp" // for Color, Color::Red +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/menu.cpp b/examples/component/menu.cpp index deee98662..1c15c47e4 100644 --- a/examples/component/menu.cpp +++ b/examples/component/menu.cpp @@ -6,10 +6,14 @@ #include // for string, basic_string, allocator #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Menu #include "ftxui/component/component_options.hpp" // for MenuOption #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +#endif int main() { using namespace ftxui; diff --git a/examples/component/menu2.cpp b/examples/component/menu2.cpp index e264df036..81bb99e9b 100644 --- a/examples/component/menu2.cpp +++ b/examples/component/menu2.cpp @@ -6,12 +6,17 @@ #include // for string, basic_string, operator+, to_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/component_options.hpp" // for MenuOption #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, separator, bold, hcenter, vbox, hbox, gauge, Element, operator|, border +#else +import ftxui.component; +import ftxui.dom; +#endif int main() { using namespace ftxui; diff --git a/examples/component/menu_entries.cpp b/examples/component/menu_entries.cpp index 704a3ae2a..aa7fde397 100644 --- a/examples/component/menu_entries.cpp +++ b/examples/component/menu_entries.cpp @@ -6,6 +6,7 @@ #include // for allocator, shared_ptr, __shared_ptr_access #include // for char_traits, to_string, operator+, string, basic_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for MenuEntry, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -13,6 +14,11 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, separator, text, hbox, size, frame, color, vbox, HEIGHT, LESS_THAN, bold, border, inverted #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/menu_entries_animated.cpp b/examples/component/menu_entries_animated.cpp index acf51e93f..3c64017d3 100644 --- a/examples/component/menu_entries_animated.cpp +++ b/examples/component/menu_entries_animated.cpp @@ -5,6 +5,7 @@ #include // for shared_ptr, __shared_ptr_access #include // for to_string, allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for MenuEntryAnimated, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -12,6 +13,11 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, separator, Element, Decorator, color, text, hbox, size, bold, frame, inverted, vbox, HEIGHT, LESS_THAN, border #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/menu_in_frame.cpp b/examples/component/menu_in_frame.cpp index 2571df0a1..049a3b5c1 100644 --- a/examples/component/menu_in_frame.cpp +++ b/examples/component/menu_in_frame.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string, operator+, to_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/menu_in_frame_horizontal.cpp b/examples/component/menu_in_frame_horizontal.cpp index 1ba4a749a..886a6a21b 100644 --- a/examples/component/menu_in_frame_horizontal.cpp +++ b/examples/component/menu_in_frame_horizontal.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string, operator+, to_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/menu_multiple.cpp b/examples/component/menu_multiple.cpp index a4f38d8db..65bfe3111 100644 --- a/examples/component/menu_multiple.cpp +++ b/examples/component/menu_multiple.cpp @@ -6,11 +6,16 @@ #include // for string, operator+, basic_string, to_string, char_traits #include // for vector, __alloc_traits<>::value_type +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Menu, Renderer, Horizontal, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, Element, operator|, window, flex, vbox +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/menu_style.cpp b/examples/component/menu_style.cpp index 39ccdcdd4..540adc95a 100644 --- a/examples/component/menu_style.cpp +++ b/examples/component/menu_style.cpp @@ -8,6 +8,7 @@ #include // for string, char_traits, operator+, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/animation.hpp" // for ElasticOut, Linear #include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -16,6 +17,11 @@ #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for separator, operator|, Element, text, bgcolor, hbox, bold, color, filler, border, vbox, borderDouble, dim, flex, hcenter #include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Black, Color::Yellow, Color::Blue, Color::Default, Color::White +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/menu_underline_animated_gallery.cpp b/examples/component/menu_underline_animated_gallery.cpp index 9d24b94db..8ead95309 100644 --- a/examples/component/menu_underline_animated_gallery.cpp +++ b/examples/component/menu_underline_animated_gallery.cpp @@ -6,6 +6,7 @@ #include // for string, operator+, to_string, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/animation.hpp" // for BackOut, Duration #include "ftxui/component/component.hpp" // for Menu, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase @@ -14,6 +15,11 @@ #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, Element, operator|, borderEmpty, inverted #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Red +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/modal_dialog.cpp b/examples/component/modal_dialog.cpp index 8fc02f4cd..78e72ee7f 100644 --- a/examples/component/modal_dialog.cpp +++ b/examples/component/modal_dialog.cpp @@ -1,14 +1,22 @@ // Copyright 2022 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for ButtonOption #include // for ftxui +#endif + #include // for function #include // for allocator, shared_ptr +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for Button, operator|=, Renderer, Vertical, Modal #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component #include "ftxui/dom/elements.hpp" // for operator|, separator, text, size, Element, vbox, border, GREATER_THAN, WIDTH, center, HEIGHT +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/modal_dialog_custom.cpp b/examples/component/modal_dialog_custom.cpp index eabf39113..ee56c4902 100644 --- a/examples/component/modal_dialog_custom.cpp +++ b/examples/component/modal_dialog_custom.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string, char_traits, operator+ #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Renderer, Horizontal, Tab #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, filler, text, hbox, separator, center, vbox, bold, border, clear_under, dbox, size, GREATER_THAN, HEIGHT +#else +import ftxui.component; +import ftxui.dom; +#endif int main() { using namespace ftxui; diff --git a/examples/component/nested_screen.cpp b/examples/component/nested_screen.cpp index c517ed51e..e3dd48a18 100644 --- a/examples/component/nested_screen.cpp +++ b/examples/component/nested_screen.cpp @@ -4,11 +4,16 @@ #include // for allocator, shared_ptr, __shared_ptr_access #include // for operator+, string, char_traits, basic_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Vertical, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for separator, text, Element, operator|, vbox, border +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/print_key_press.cpp b/examples/component/print_key_press.cpp index 8c2216ae9..8dfb02e3e 100644 --- a/examples/component/print_key_press.cpp +++ b/examples/component/print_key_press.cpp @@ -9,12 +9,17 @@ #include // for move #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for CatchEvent, Renderer #include "ftxui/component/event.hpp" // for Event #include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Middle, Mouse::None, Mouse::Pressed, Mouse::Released, Mouse::Right, Mouse::WheelDown, Mouse::WheelUp #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, vbox, window, Element, Elements +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/radiobox.cpp b/examples/component/radiobox.cpp index 0be24ddf2..a19276e85 100644 --- a/examples/component/radiobox.cpp +++ b/examples/component/radiobox.cpp @@ -4,9 +4,13 @@ #include // for string, allocator, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +#endif using namespace ftxui; diff --git a/examples/component/radiobox_in_frame.cpp b/examples/component/radiobox_in_frame.cpp index bf161e9ec..d7fa8bcca 100644 --- a/examples/component/radiobox_in_frame.cpp +++ b/examples/component/radiobox_in_frame.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string, operator+, to_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/renderer.cpp b/examples/component/renderer.cpp index 6d0bcbefa..b7988fe7d 100644 --- a/examples/component/renderer.cpp +++ b/examples/component/renderer.cpp @@ -3,12 +3,18 @@ // the LICENSE file. #include // for shared_ptr, allocator, __shared_ptr_access +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Renderer, Button, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, text, bold, border, center, color #include "ftxui/screen/color.hpp" // for Color, Color::Red +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/component/resizable_split.cpp b/examples/component/resizable_split.cpp index 05c6385a1..8f18994e0 100644 --- a/examples/component/resizable_split.cpp +++ b/examples/component/resizable_split.cpp @@ -3,11 +3,17 @@ // the LICENSE file. #include // for shared_ptr, allocator, __shared_ptr_access +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Renderer, ResizableSplitBottom, ResizableSplitLeft, ResizableSplitRight, ResizableSplitTop #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for Element, operator|, text, center, border +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/scrollbar.cpp b/examples/component/scrollbar.cpp index 6bdc42896..1b2a5f1db 100644 --- a/examples/component/scrollbar.cpp +++ b/examples/component/scrollbar.cpp @@ -1,8 +1,13 @@ // Copyright 2023 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include #include +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/selection.cpp b/examples/component/selection.cpp index 93e96ea14..ddd2370bb 100644 --- a/examples/component/selection.cpp +++ b/examples/component/selection.cpp @@ -3,12 +3,18 @@ // the LICENSE file. #include // for char_traits, operator+, string, basic_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/component.hpp" // for Input, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/component_options.hpp" // for InputOption #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border #include "ftxui/util/ref.hpp" // for Ref +#else +import ftxui.component; +import ftxui.dom; +import ftxui.util; +#endif using namespace ftxui; diff --git a/examples/component/slider.cpp b/examples/component/slider.cpp index c2e67a155..e270f68b6 100644 --- a/examples/component/slider.cpp +++ b/examples/component/slider.cpp @@ -1,6 +1,10 @@ +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Slider #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +#endif using namespace ftxui; diff --git a/examples/component/slider_direction.cpp b/examples/component/slider_direction.cpp index 77f466c8c..8a4ad50bc 100644 --- a/examples/component/slider_direction.cpp +++ b/examples/component/slider_direction.cpp @@ -3,16 +3,24 @@ // the LICENSE file. #include // for array #include // for sin +#ifndef FTXUI_BUILD_MODULES #include // for ComponentBase #include // for SliderOption #include // for Direction, Direction::Up #include // for size, GREATER_THAN, HEIGHT #include // for ConstRef, Ref +#endif #include // for shared_ptr, __shared_ptr_access +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Horizontal, Slider, operator|= #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive +#else +import ftxui.component; +import ftxui.dom; +import ftxui.util; +#endif using namespace ftxui; diff --git a/examples/component/slider_rgb.cpp b/examples/component/slider_rgb.cpp index 0d0160f02..04fced4fb 100644 --- a/examples/component/slider_rgb.cpp +++ b/examples/component/slider_rgb.cpp @@ -4,12 +4,18 @@ #include // for allocator, shared_ptr, __shared_ptr_access #include // for char_traits, operator+, to_string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for separator, operator|, Element, size, text, vbox, xflex, bgcolor, hbox, GREATER_THAN, WIDTH, border, HEIGHT, LESS_THAN #include "ftxui/screen/color.hpp" // for Color +#else +import ftxui.component; +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; diff --git a/examples/component/tab_horizontal.cpp b/examples/component/tab_horizontal.cpp index 5aeead830..6080f6cec 100644 --- a/examples/component/tab_horizontal.cpp +++ b/examples/component/tab_horizontal.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox, Renderer, Tab, Toggle, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for Element, separator, operator|, vbox, border +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/tab_vertical.cpp b/examples/component/tab_vertical.cpp index 415c73260..0c0ccc97a 100644 --- a/examples/component/tab_vertical.cpp +++ b/examples/component/tab_vertical.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox, Horizontal, Menu, Renderer, Tab #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for Element, separator, hbox, operator|, border +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/textarea.cpp b/examples/component/textarea.cpp index 3a79a9e5e..89fab4d5d 100644 --- a/examples/component/textarea.cpp +++ b/examples/component/textarea.cpp @@ -4,11 +4,16 @@ #include // for allocator, __shared_ptr_access, shared_ptr #include // for string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Input, Renderer, ResizableSplitLeft #include "ftxui/component/component_base.hpp" // for ComponentBase, Component #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, separator, text, Element, flex, vbox, border +#else +import ftxui.component; +import ftxui.dom; +#endif int main() { using namespace ftxui; diff --git a/examples/component/toggle.cpp b/examples/component/toggle.cpp index 1bb204eff..ef494a210 100644 --- a/examples/component/toggle.cpp +++ b/examples/component/toggle.cpp @@ -5,11 +5,16 @@ #include // for string, basic_string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Toggle, Renderer, Vertical #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, hbox, vbox, Element +#else +import ftxui.component; +import ftxui.dom; +#endif using namespace ftxui; diff --git a/examples/component/window.cpp b/examples/component/window.cpp index 121b48a6b..3d7ba9505 100644 --- a/examples/component/window.cpp +++ b/examples/component/window.cpp @@ -1,8 +1,12 @@ // Copyright 2023 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include #include +#else +import ftxui.component; +#endif using namespace ftxui; diff --git a/examples/component/with_restored_io.cpp b/examples/component/with_restored_io.cpp index 38c91bc27..8cb960a81 100644 --- a/examples/component/with_restored_io.cpp +++ b/examples/component/with_restored_io.cpp @@ -6,11 +6,16 @@ #include // for shared_ptr, __shared_ptr_access, allocator #include // for getline, string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, filler, Element, borderEmpty, hbox, size, paragraph, vbox, LESS_THAN, border, center, HEIGHT, WIDTH +#else +import ftxui.component; +import ftxui.dom; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/border.cpp b/examples/dom/border.cpp index 49ba8bb85..f063cc1f0 100644 --- a/examples/dom/border.cpp +++ b/examples/dom/border.cpp @@ -2,12 +2,19 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for EXIT_SUCCESS +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, vbox, border, Element, Fit, hbox #include // for Full, Screen +#endif #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/border_colored.cpp b/examples/dom/border_colored.cpp index 5a04d3e38..02618c411 100644 --- a/examples/dom/border_colored.cpp +++ b/examples/dom/border_colored.cpp @@ -1,13 +1,21 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox #include // for Screen +#endif + #include // for endl, cout, ostream #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/border_style.cpp b/examples/dom/border_style.cpp index f71182c4d..ae32b41a2 100644 --- a/examples/dom/border_style.cpp +++ b/examples/dom/border_style.cpp @@ -1,13 +1,21 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox #include // for Screen +#endif + #include // for endl, cout, ostream #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/canvas.cpp b/examples/dom/canvas.cpp index ece1c5e5b..efaf75e69 100644 --- a/examples/dom/canvas.cpp +++ b/examples/dom/canvas.cpp @@ -3,13 +3,22 @@ // the LICENSE file. #include // for getchar #include // for cos + +#ifndef FTXUI_BUILD_MODULES #include // for Fit, canvas, operator|, border, Element #include // for Pixel, Screen +#endif + #include // for vector, allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/canvas.hpp" // for Canvas #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/color_gallery.cpp b/examples/dom/color_gallery.cpp index f57e387d1..d4c7e1322 100644 --- a/examples/dom/color_gallery.cpp +++ b/examples/dom/color_gallery.cpp @@ -1,16 +1,24 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for ColorInfo #include // for Full, Screen #include // for ColorSupport, Color, Palette16, Palette256, TrueColor +#endif + #include // for allocator, shared_ptr #include // for move #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/elements.hpp" // for text, bgcolor, color, vbox, hbox, separator, operator|, Elements, Element, Fit, border #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::White, Color::Yellow, Color::YellowLight, Color::Palette256, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; #include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D diff --git a/examples/dom/color_info_palette256.cpp b/examples/dom/color_info_palette256.cpp index c8795ec38..647736134 100644 --- a/examples/dom/color_info_palette256.cpp +++ b/examples/dom/color_info_palette256.cpp @@ -1,14 +1,22 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, bgcolor, hbox, operator|, Elements, Fit, vbox, Element #include // for ColorInfo #include // for Full, Screen +#endif + #include // for move #include // for vector, allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Palette256, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif using namespace ftxui; #include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D diff --git a/examples/dom/color_info_sorted_2d.ipp b/examples/dom/color_info_sorted_2d.ipp index 910f165be..e6fa1bb60 100644 --- a/examples/dom/color_info_sorted_2d.ipp +++ b/examples/dom/color_info_sorted_2d.ipp @@ -1,3 +1,5 @@ +#pragma once + #include #include #include // for ftxui::ColorInfo diff --git a/examples/dom/color_truecolor_HSV.cpp b/examples/dom/color_truecolor_HSV.cpp index adaa7ef4b..cc7151114 100644 --- a/examples/dom/color_truecolor_HSV.cpp +++ b/examples/dom/color_truecolor_HSV.cpp @@ -1,13 +1,21 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for operator|, Elements, Fit, bgcolor, color, hbox, text, vbox, Element #include // for Full, Screen +#endif + #include // for allocator #include // for move +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/color_truecolor_RGB.cpp b/examples/dom/color_truecolor_RGB.cpp index 5f0985ba5..73d38924b 100644 --- a/examples/dom/color_truecolor_RGB.cpp +++ b/examples/dom/color_truecolor_RGB.cpp @@ -1,13 +1,21 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for hbox, text, bgcolor, operator|, vbox, Elements, window, Element, Fit #include // for Full, Screen +#endif + #include // for allocator #include // for move +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/dbox.cpp b/examples/dom/dbox.cpp index a1de78c5a..e3deb99dd 100644 --- a/examples/dom/dbox.cpp +++ b/examples/dom/dbox.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, border, Element, vbox, center, Fit, dbox #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/gauge.cpp b/examples/dom/gauge.cpp index e2c53c591..f2e54bd94 100644 --- a/examples/dom/gauge.cpp +++ b/examples/dom/gauge.cpp @@ -2,14 +2,23 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for operator""s, chrono_literals + +#ifndef FTXUI_BUILD_MODULES #include // for text, gauge, operator|, flex, hbox, Element #include // for Screen +#endif + #include // for cout, endl, ostream #include // for allocator, char_traits, operator+, operator<<, string, to_string, basic_string #include // for sleep_for +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/gauge_direction.cpp b/examples/dom/gauge_direction.cpp index c852136c2..b30572dcf 100644 --- a/examples/dom/gauge_direction.cpp +++ b/examples/dom/gauge_direction.cpp @@ -2,14 +2,23 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for operator""s, chrono_literals + +#ifndef FTXUI_BUILD_MODULES #include // for filler, operator|, separator, text, border, Element, vbox, vtext, hbox, center, gaugeDown, gaugeLeft, gaugeRight, gaugeUp #include // for Screen +#endif + #include // for cout, endl, ostream #include // for allocator, operator+, operator<<, string, to_string #include // for sleep_for +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/graph.cpp b/examples/dom/graph.cpp index c63f92961..be9d6ab89 100644 --- a/examples/dom/graph.cpp +++ b/examples/dom/graph.cpp @@ -3,8 +3,12 @@ // the LICENSE file. #include // for operator""s, chrono_literals #include // for sin + +#ifndef FTXUI_BUILD_MODULES #include // for graph, operator|, separator, color, Element, vbox, flex, inverted, operator|=, Fit, hbox, size, border, GREATER_THAN, HEIGHT #include // for Full, Screen +#endif + #include // for ref, reference_wrapper #include // for cout, ostream #include // for shared_ptr @@ -13,8 +17,13 @@ #include // for ignore #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::YellowLight, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif class Graph { public: diff --git a/examples/dom/gridbox.cpp b/examples/dom/gridbox.cpp index c0e2e1cb8..a861d54a9 100644 --- a/examples/dom/gridbox.cpp +++ b/examples/dom/gridbox.cpp @@ -2,12 +2,21 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for getchar + +#ifndef FTXUI_BUILD_MODULES #include // for Elements, gridbox, Fit, operator|, text, border, Element #include // for Screen +#endif + #include // for allocator, shared_ptr +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/hflow.cpp b/examples/dom/hflow.cpp index 7d8bdbe67..da24f13e3 100644 --- a/examples/dom/hflow.cpp +++ b/examples/dom/hflow.cpp @@ -2,12 +2,21 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for getchar + +#ifndef FTXUI_BUILD_MODULES #include // for operator|, size, Element, text, hcenter, Decorator, Fit, WIDTH, hflow, window, EQUAL, GREATER_THAN, HEIGHT, bold, border, dim, LESS_THAN #include // for Full, Screen +#endif + #include // for allocator, char_traits, operator+, to_string, string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/html_like.cpp b/examples/dom/html_like.cpp index 09fdb2b2e..3b8f42a71 100644 --- a/examples/dom/html_like.cpp +++ b/examples/dom/html_like.cpp @@ -2,15 +2,24 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for operator""s, chrono_literals + +#ifndef FTXUI_BUILD_MODULES #include // for Screen +#endif + #include // for cout, ostream #include // for allocator, operator<<, string #include // for sleep_for +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/elements.hpp" // for paragraph, text, operator|, Element, border, Fit, color, hflow, spinner, vbox, bold, dim, underlined #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/box.hpp" // for ftxui #include "ftxui/screen/color.hpp" // for Color, Color::Red +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/linear_gradient.cpp b/examples/dom/linear_gradient.cpp index 14fb9d837..304150dc0 100644 --- a/examples/dom/linear_gradient.cpp +++ b/examples/dom/linear_gradient.cpp @@ -1,13 +1,21 @@ // Copyright 2023 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for bgcolor, operator|, operator|=, text, center, Element #include // for LinearGradient::Stop, LinearGradient #include // for Full, Screen +#endif + #include // for allocator, shared_ptr +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::DeepPink1, Color::DeepSkyBlue1, Color::Yellow, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/package_manager.cpp b/examples/dom/package_manager.cpp index 2829547df..f9cc80300 100644 --- a/examples/dom/package_manager.cpp +++ b/examples/dom/package_manager.cpp @@ -2,8 +2,12 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for operator""s, chrono_literals + +#ifndef FTXUI_BUILD_MODULES #include // for operator|, text, Element, hbox, bold, color, filler, separator, vbox, window, gauge, Fit, size, dim, EQUAL, WIDTH #include // for Full, Screen +#endif + #include // for cout, endl, ostream #include // for list, operator==, _List_iterator, _List_iterator<>::_Self #include // for allocator, shared_ptr, allocator_traits<>::value_type @@ -12,8 +16,13 @@ #include // for move #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Green, Color::Red, Color::RedLight, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/paragraph.cpp b/examples/dom/paragraph.cpp index f39cb53de..80c63d0f7 100644 --- a/examples/dom/paragraph.cpp +++ b/examples/dom/paragraph.cpp @@ -2,15 +2,24 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for operator""s, chrono_literals + +#ifndef FTXUI_BUILD_MODULES #include // for Full, Screen +#endif + #include // for cout, ostream #include // for allocator, shared_ptr #include // for string, operator<< #include // for sleep_for +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/elements.hpp" // for hflow, paragraph, separator, hbox, vbox, filler, operator|, border, Element #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/box.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif using namespace std::chrono_literals; int main() { diff --git a/examples/dom/separator.cpp b/examples/dom/separator.cpp index 60e889853..6968c959d 100644 --- a/examples/dom/separator.cpp +++ b/examples/dom/separator.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, center, separator, operator|, flex, Element, vbox, Fit, hbox, border #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/separator_style.cpp b/examples/dom/separator_style.cpp index acff9d737..b7a44d2f4 100644 --- a/examples/dom/separator_style.cpp +++ b/examples/dom/separator_style.cpp @@ -1,13 +1,21 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for Screen +#endif + #include // for endl, cout, ostream #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/elements.hpp" // for text, hbox, separatorDouble, separatorHeavy, separatorLight, vbox, operator|, Element, Fit, borderDouble, borderHeavy, borderLight #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/box.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/size.cpp b/examples/dom/size.cpp index afe653005..3367b34f1 100644 --- a/examples/dom/size.cpp +++ b/examples/dom/size.cpp @@ -1,14 +1,22 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for operator|, text, Element, hcenter, Fit, hbox, size, window, Elements, bold, dim, EQUAL, WIDTH #include // for Screen +#endif + #include // for allocator, shared_ptr #include // for string, to_string #include // for move +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/spinner.cpp b/examples/dom/spinner.cpp index 70a32e1ce..496237ae4 100644 --- a/examples/dom/spinner.cpp +++ b/examples/dom/spinner.cpp @@ -2,16 +2,25 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for operator""s, chrono_literals + +#ifndef FTXUI_BUILD_MODULES #include // for Element, operator|, separator, filler, hbox, size, spinner, text, vbox, bold, border, Fit, EQUAL, WIDTH #include // for Full, Screen +#endif + #include // for cout, endl, ostream #include // for to_string, operator<<, string #include // for sleep_for #include // for move #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_blink.cpp b/examples/dom/style_blink.cpp index 2a3afd939..551c45736 100644 --- a/examples/dom/style_blink.cpp +++ b/examples/dom/style_blink.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, blink, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_bold.cpp b/examples/dom/style_bold.cpp index 451693553..c8c519479 100644 --- a/examples/dom/style_bold.cpp +++ b/examples/dom/style_bold.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, bold, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_color.cpp b/examples/dom/style_color.cpp index aa7998846..644ee84fc 100644 --- a/examples/dom/style_color.cpp +++ b/examples/dom/style_color.cpp @@ -1,13 +1,21 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for LinearGradient #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/elements.hpp" // for text, bgcolor, color, vbox, filler, Fit, hbox #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, operator""_rgb, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::DeepSkyBlue4, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::SkyBlue1, Color::White, Color::Yellow, Color::YellowLight, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_dim.cpp b/examples/dom/style_dim.cpp index dce5f8d55..0fe366385 100644 --- a/examples/dom/style_dim.cpp +++ b/examples/dom/style_dim.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, dim, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_gallery.cpp b/examples/dom/style_gallery.cpp index 2170d2e53..121901381 100644 --- a/examples/dom/style_gallery.cpp +++ b/examples/dom/style_gallery.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, Element, bgcolor, color, blink, bold, dim, inverted, underlined, Fit, hbox #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Blue, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_hyperlink.cpp b/examples/dom/style_hyperlink.cpp index bd76f4e40..df5d39a39 100644 --- a/examples/dom/style_hyperlink.cpp +++ b/examples/dom/style_hyperlink.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, bold, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_inverted.cpp b/examples/dom/style_inverted.cpp index 2288fbace..cb5931115 100644 --- a/examples/dom/style_inverted.cpp +++ b/examples/dom/style_inverted.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, inverted, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_italic.cpp b/examples/dom/style_italic.cpp index 3604179de..1657c44eb 100644 --- a/examples/dom/style_italic.cpp +++ b/examples/dom/style_italic.cpp @@ -1,12 +1,20 @@ // Copyright 2025 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, inverted, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_strikethrough.cpp b/examples/dom/style_strikethrough.cpp index 00be07bfb..a376edfc9 100644 --- a/examples/dom/style_strikethrough.cpp +++ b/examples/dom/style_strikethrough.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, strikethrough, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_underlined.cpp b/examples/dom/style_underlined.cpp index 3c33ac44f..38ae970bf 100644 --- a/examples/dom/style_underlined.cpp +++ b/examples/dom/style_underlined.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, underlined, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/style_underlined_double.cpp b/examples/dom/style_underlined_double.cpp index 7697e8a21..345c57469 100644 --- a/examples/dom/style_underlined_double.cpp +++ b/examples/dom/style_underlined_double.cpp @@ -1,12 +1,20 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for text, operator|, underlinedDouble, Fit, hbox, Element #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/table.cpp b/examples/dom/table.cpp index 690dae4cc..bf1946e88 100644 --- a/examples/dom/table.cpp +++ b/examples/dom/table.cpp @@ -1,15 +1,23 @@ // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. +#ifndef FTXUI_BUILD_MODULES #include // for color, Fit, LIGHT, align_right, bold, DOUBLE #include // for Table, TableSelection #include // for Screen +#endif + #include // for endl, cout, ostream #include // for basic_string, allocator, string #include // for vector +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::White, ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/vbox_hbox.cpp b/examples/dom/vbox_hbox.cpp index f5a31bef7..774636153 100644 --- a/examples/dom/vbox_hbox.cpp +++ b/examples/dom/vbox_hbox.cpp @@ -2,12 +2,21 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for getchar + +#ifndef FTXUI_BUILD_MODULES #include // for filler, text, hbox, vbox #include // for Full, Screen +#endif + #include // for allocator +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui; diff --git a/examples/dom/vflow.cpp b/examples/dom/vflow.cpp index 94c4a31e0..43797b744 100644 --- a/examples/dom/vflow.cpp +++ b/examples/dom/vflow.cpp @@ -2,12 +2,21 @@ // Use of this source code is governed by the MIT license that can be found in // the LICENSE file. #include // for getchar + +#ifndef FTXUI_BUILD_MODULES #include // for operator|, Element, size, text, hcenter, Fit, vflow, window, EQUAL, bold, border, dim, HEIGHT, WIDTH #include // for Full, Screen +#endif + #include // for allocator, char_traits, operator+, to_string, string +#ifndef FTXUI_BUILD_MODULES #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui +#else +import ftxui.dom; +import ftxui.screen; +#endif int main() { using namespace ftxui;