Update document WIP.

This commit is contained in:
ArthurSonzogni
2020-05-25 01:34:13 +02:00
committed by Arthur Sonzogni
parent 177df31d41
commit 75c424cea9
55 changed files with 3244 additions and 152 deletions

View File

@@ -9,6 +9,8 @@
namespace ftxui {
/// @brief The set of supported terminal colors.
/// @ingroup screen
enum class Color : uint8_t {
// --- Transparent -----
Default = 39,

View File

@@ -17,7 +17,10 @@ class Node;
}
namespace ftxui {
using Element = std::shared_ptr<Node>;
/// @brief A unicode character and its associated style.
/// @ingroup screen
struct Pixel {
wchar_t character = U' ';
bool blink = false;
@@ -29,18 +32,24 @@ struct Pixel {
Color foreground_color = Color::Default;
};
/// @brief Define how the Screen's dimensions should look like.
/// @ingroup screen
struct Dimension {
/// coucou
static Dimension Fixed(int);
static Dimension Fit(std::shared_ptr<Node>&);
/// @brief coucou
static Dimension Fit(Element&);
static Dimension Full();
int dimx;
int dimy;
};
/// @brief A rectangular grid of Pixel.
/// @ingroup screen
class Screen {
public:
// Constructor.
// Constructors:
Screen(int dimx, int dimy);
static Screen Create(Dimension dimension);
static Screen Create(Dimension width, Dimension height);