Improve documentation theme.

This commit is contained in:
ArthurSonzogni
2025-05-20 14:35:17 +02:00
parent 08b8a3b28f
commit 22576bae6b
29 changed files with 2338 additions and 1885 deletions

View File

@@ -28,7 +28,7 @@ namespace ftxui {
///
/// ▼ Show details
/// <details component>
///  ```
/// ```
// NOLINTNEXTLINE
Component Collapsible(ConstStringRef label, Component child, Ref<bool> show) {
class Impl : public ComponentBase {

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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

View File

@@ -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);

View File

@@ -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);