mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-21 19:48:16 +08:00
Improve documentation theme.
This commit is contained in:
@@ -28,7 +28,7 @@ namespace ftxui {
|
||||
///
|
||||
/// ▼ Show details
|
||||
/// <details component>
|
||||
/// ```
|
||||
/// ```
|
||||
// NOLINTNEXTLINE
|
||||
Component Collapsible(ConstStringRef label, Component child, Ref<bool> show) {
|
||||
class Impl : public ComponentBase {
|
||||
|
@@ -74,7 +74,7 @@ Event Event::CursorShape(std::string input, int shape) {
|
||||
|
||||
/// @brief An custom event whose meaning is defined by the user of the library.
|
||||
/// @param input An arbitrary sequence of character defined by the developer.
|
||||
/// @ingroup component.
|
||||
/// @ingroup component
|
||||
// static
|
||||
Event Event::Special(std::string input) {
|
||||
Event event;
|
||||
|
@@ -159,7 +159,7 @@ ComponentDecorator Hoverable(bool* hover) {
|
||||
/// button |= Hoverable(
|
||||
/// [&]{ on_enter_cnt++; },
|
||||
/// [&]{ on_leave_cnt++; }
|
||||
// );
|
||||
/// );
|
||||
/// ```
|
||||
// NOLINTNEXTLINE
|
||||
ComponentDecorator Hoverable(std::function<void()> on_enter,
|
||||
@@ -182,7 +182,7 @@ ComponentDecorator Hoverable(std::function<void()> on_enter,
|
||||
/// auto button = Button("exit", screen.ExitLoopClosure());
|
||||
/// bool hovered = false;
|
||||
/// auto button_hoverable = Hoverable(button,
|
||||
// [&](bool hover) { hovered = hover;});
|
||||
/// [&](bool hover) { hovered = hover;});
|
||||
/// ```
|
||||
// NOLINTNEXTLINE
|
||||
Component Hoverable(Component component, std::function<void(bool)> on_change) {
|
||||
|
@@ -603,6 +603,7 @@ Component Input(StringRef content, InputOption option) {
|
||||
|
||||
/// @brief An input box for editing text.
|
||||
/// @param content The editable content.
|
||||
/// @param placeholder The placeholder text.
|
||||
/// @param option Additional optional parameters.
|
||||
/// @ingroup component
|
||||
/// @see InputBase
|
||||
|
@@ -242,11 +242,11 @@ class Flexbox : public Node {
|
||||
/// text("element 2"),
|
||||
/// text("element 3"),
|
||||
/// }, FlexboxConfig()
|
||||
// .Set(FlexboxConfig::Direction::Column)
|
||||
// .Set(FlexboxConfig::Wrap::WrapInversed)
|
||||
// .SetGapMainAxis(1)
|
||||
// .SetGapCrossAxis(1)
|
||||
// )
|
||||
/// .Set(FlexboxConfig::Direction::Column)
|
||||
/// .Set(FlexboxConfig::Wrap::WrapInversed)
|
||||
/// .SetGapMainAxis(1)
|
||||
/// .SetGapCrossAxis(1)
|
||||
/// )
|
||||
/// ```
|
||||
Element flexbox(Elements children, FlexboxConfig config) {
|
||||
return std::make_shared<Flexbox>(std::move(children), config);
|
||||
|
@@ -164,7 +164,7 @@ class Gauge : public Node {
|
||||
/// @brief Draw a high definition progress bar progressing in specified
|
||||
/// direction.
|
||||
/// @param progress The proportion of the area to be filled. Belong to [0,1].
|
||||
// @param direction Direction of progress bars progression.
|
||||
/// @param direction Direction of progress bars progression.
|
||||
/// @ingroup dom
|
||||
Element gaugeDirection(float progress, Direction direction) {
|
||||
return std::make_shared<Gauge>(progress, direction);
|
||||
|
Reference in New Issue
Block a user