Factorize box layout functions. (#185)

|hbox| and |vbox| are similar. They are just the same component, but
drawing in a different direction.

This patchs factorize the layout logic. Goal is to reduce code size and
reuse it for the |gridbox| dom element.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/114
This commit is contained in:
Arthur Sonzogni
2021-08-10 14:20:03 +02:00
committed by GitHub
parent 4450cca31a
commit 71299daea4
5 changed files with 142 additions and 167 deletions

View File

@@ -46,6 +46,8 @@ add_library(dom STATIC
src/ftxui/dom/blink.cpp
src/ftxui/dom/bold.cpp
src/ftxui/dom/border.cpp
src/ftxui/dom/box_helper.cpp
src/ftxui/dom/box_helper.hpp
src/ftxui/dom/clear_under.cpp
src/ftxui/dom/color.cpp
src/ftxui/dom/composite_decorator.cpp