Improve the documentation.

This commit is contained in:
ArthurSonzogni
2021-07-10 14:23:46 +02:00
committed by Arthur Sonzogni
parent 5c4cd1add1
commit 9820832fea
23 changed files with 79 additions and 133 deletions

View File

@@ -6,7 +6,7 @@
namespace ftxui {
/// @brief Center an element horizontally.
/// @param The input element.
/// @param child The decorated element.
/// @return The centered element.
/// @ingroup dom
Element hcenter(Element child) {
@@ -14,7 +14,7 @@ Element hcenter(Element child) {
}
/// @brief Center an element vertically.
/// @param The input element.
/// @param child The decorated element.
/// @return The centered element.
/// @ingroup dom
Element vcenter(Element child) {
@@ -22,7 +22,7 @@ Element vcenter(Element child) {
}
/// @brief Center an element horizontally and vertically.
/// @param The input element.
/// @param child The decorated element.
/// @return The centered element.
/// @ingroup dom
Element center(Element child) {
@@ -30,7 +30,7 @@ Element center(Element child) {
}
/// @brief Align an element on the right side.
/// @param The input element.
/// @param child The decorated element.
/// @return The right aligned element.
/// @ingroup dom
Element align_right(Element child) {

View File

@@ -82,8 +82,8 @@ class Size : public Node {
/// @brief Apply a constraint on the size of an element.
/// @param direction Whether the WIDTH of the HEIGHT of the element must be
/// constrained.
/// @param constrain The type of constaint.
/// @param value the value.
/// @param constraint The type of constaint.
/// @param value The value.
/// @ingroup dom
Decorator size(Direction direction, Constraint constraint, int value) {
return [=](Element e) {

View File

@@ -6,11 +6,13 @@
namespace ftxui {
namespace {
Decorator compose(Decorator a, Decorator b) {
return [a = std::move(a), b = std::move(b)](Element element) {
return b(a(std::move(element)));
};
}
} // namespace
/// @brief A decoration doing absolutely nothing.
/// @ingroup dom