diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fd4e6c..23bfced 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ endif() set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE) FetchContent_Declare(ftxui GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui - GIT_TAG v4.0.0 + GIT_TAG v5.0.0 ) FetchContent_GetProperties(ftxui) diff --git a/examples/Button.qf b/examples/Button.qf index 7a680f8..0246c80 100644 --- a/examples/Button.qf +++ b/examples/Button.qf @@ -10,6 +10,7 @@ Vertical{ Animated, z } + separator BlueLight Button{ "chrome", System("/usr/bin/google-chrome-stable"), @@ -17,6 +18,8 @@ Vertical{ z } } + Heavy separator + text("This button exits the TUI") Button { "Exit", "Exit" diff --git a/examples/separator.qf b/examples/separator.qf new file mode 100644 index 0000000..6d23d85 --- /dev/null +++ b/examples/separator.qf @@ -0,0 +1,21 @@ +Vertical{ + text("Normal") + Normal separator + text("Light") + Light separator + text("Heavy") + Heavy separator + Horizontal { + text("Double") + Double separator + text("lorem ipsum") + } + separator + text("Dashed") + Dashed separator + Button { + "Exit", + "Exit", + Animated + } +} \ No newline at end of file diff --git a/examples/text.qf b/examples/text.qf new file mode 100644 index 0000000..77fda20 --- /dev/null +++ b/examples/text.qf @@ -0,0 +1,15 @@ +Vertical { + Blue text("The given button opens chrome in Linux") + str a + Red Button { + "chrome", + System("/usr/bin/google-chrome-stable"), + Animated, + a + } + Green text("This text is Green") + Button { + "Exit", + "Exit" + } +} \ No newline at end of file diff --git a/include/quick-ftxui.hpp b/include/quick-ftxui.hpp index 9073a5f..5a104f3 100644 --- a/include/quick-ftxui.hpp +++ b/include/quick-ftxui.hpp @@ -34,6 +34,8 @@ std::map strings; // The AST /////////////////////////////////////////////////////////////////////////// struct nil {}; +struct dom_text; +struct separator; struct button; struct expression; struct input; @@ -47,6 +49,7 @@ struct str_variable_decl; enum block_alignment { VERTICAL, HORIZONTAL }; enum button_option { Ascii, Animated, Simple, NoOpt }; enum input_option { None, Password }; +enum sep_style { Normal, Light, Dashed, Double, Heavy }; enum menu_option { NoMenuOption, Horizontal, @@ -106,7 +109,8 @@ typedef boost::variant< nil, boost::recursive_wrapper