mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-16 16:08:08 +08:00
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:

committed by
GitHub

parent
34d955e9ac
commit
49e8cc57d3
@@ -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.
|
||||
|
Reference in New Issue
Block a user