Extract common struct Dimensions from Terminal (#171)

- Convert Dimension to namespace to allow defining Fit method from dom.
- Use Dimensions extracted from Terminal as replacement struct.
- Convert Terminal to namespace as it only defines static members.
- Remove dom references from screen library (circular dependency).
This commit is contained in:
Tushar Maheshwari
2021-08-03 02:49:29 +05:30
committed by GitHub
parent 34d955e9ac
commit 49e8cc57d3
6 changed files with 45 additions and 49 deletions

View File

@@ -8,6 +8,7 @@
#include "ftxui/screen/box.hpp"
#include "ftxui/screen/color.hpp"
#include "ftxui/screen/screen.hpp"
#include "ftxui/screen/terminal.hpp"
namespace ftxui {
class Node;
@@ -102,6 +103,10 @@ Element nothing(Element element);
// combinaison with dbox.
Element clear_under(Element element);
namespace Dimension {
Dimensions Fit(Element&);
} // namespace Dimension
} // namespace ftxui
// Make container able to take any number of children as input.