#include"ftxui/dom/elements.hpp" // for hflow, paragraph, separator, hbox, vbox, filler, operator|, border, Element
#include<ftxui/dom/elements.hpp> // for hflow, paragraph, separator, hbox, vbox, filler, operator|, border, Element
#include"ftxui/dom/node.hpp" // for Render
#include<ftxui/dom/node.hpp> // for Render
#include"ftxui/screen/box.hpp" // for ftxui
#include<ftxui/screen/box.hpp> // for ftxui
#include<ftxui/component/component.hpp>
usingnamespacestd::chrono_literals;
usingnamespacestd::chrono_literals;
std::array<std::string,6>tiles={
"##########",
"# #",
"# #",
"# |",
"# #",
"##########",
};
intmain(){
intmain(){
usingnamespaceftxui;
usingnamespaceftxui;
std::stringp=
R"(In probability theory and statistics, Bayes' theorem (alternatively Bayes' law or Bayes' rule) describes the probability of an event, based on prior knowledge of conditions that might be related to the event. For example, if cancer is related to age, then, using Bayes' theorem, a person's age can be used to more accurately assess the probability that they have cancer, compared to the assessment of the probability of cancer made without knowledge of the person's age. One of the many applications of Bayes' theorem is Bayesian inference, a particular approach to statistical inference. When applied, the probabilities involved in Bayes' theorem may have different probability interpretations. With the Bayesian probability interpretation the theorem expresses how a subjective degree of belief should rationally change to account for availability of related evidence. Bayesian inference is fundamental to Bayesian statistics.)";
std::stringreset_position;
std::stringreset_position;
while(true){
autodocument=vbox({
hflow(paragraph(p)),
separator(),
hflow(paragraph(p)),
separator(),
hbox({
hflow(paragraph(p)),
separator(),
hflow(paragraph(p)),
}),
})|
border;
document=vbox(filler(),document);
autoc=Canvas(100,100);
// auto screen = Screen::Create(Dimension::Fit(document));
// A triangle following the mouse, using braille characters.