mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-18 17:18:08 +08:00
Improve the documentation.
This commit is contained in:

committed by
Arthur Sonzogni

parent
5c4cd1add1
commit
9820832fea
@@ -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) {
|
||||
|
@@ -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) {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user