mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Add more documentation.
This commit is contained in:

committed by
Arthur Sonzogni

parent
f2dc080a35
commit
114ab4ae2a
@@ -64,10 +64,51 @@ class VText : public Node {
|
||||
int width_ = 1;
|
||||
};
|
||||
|
||||
/// @brief Display a pieve of unicode text.
|
||||
/// @ingroup dom
|
||||
/// @see ftxui::to_wstring
|
||||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```cpp
|
||||
/// Element document = text(L"Hello world!");
|
||||
/// ```
|
||||
///
|
||||
/// ### Output
|
||||
///
|
||||
/// ```bash
|
||||
/// Hello world!
|
||||
/// ```
|
||||
Element text(std::wstring text) {
|
||||
return std::make_shared<Text>(text);
|
||||
}
|
||||
|
||||
/// @brief Display a pieve of unicode text vertically.
|
||||
/// @ingroup dom
|
||||
/// @see ftxui::to_wstring
|
||||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```cpp
|
||||
/// Element document = vtext(L"Hello world!");
|
||||
/// ```
|
||||
///
|
||||
/// ### Output
|
||||
///
|
||||
/// ```bash
|
||||
/// H
|
||||
/// e
|
||||
/// l
|
||||
/// l
|
||||
/// o
|
||||
///
|
||||
/// w
|
||||
/// o
|
||||
/// r
|
||||
/// l
|
||||
/// d
|
||||
/// !
|
||||
/// ```
|
||||
Element vtext(std::wstring text) {
|
||||
return std::make_shared<VText>(text);
|
||||
}
|
||||
|
Reference in New Issue
Block a user