2023-08-19 13:56:36 +02:00
|
|
|
// Copyright 2021 Arthur Sonzogni. All rights reserved.
|
|
|
|
// Use of this source code is governed by the MIT license that can be found in
|
|
|
|
// the LICENSE file.line.
|
2021-08-10 22:15:24 +02:00
|
|
|
#ifndef FTXUI_DOM_BOX_HELPER_HPP
|
|
|
|
#define FTXUI_DOM_BOX_HELPER_HPP
|
|
|
|
|
|
|
|
#include <vector>
|
2025-03-19 20:03:05 +05:30
|
|
|
#include "ftxui/dom/requirement.hpp"
|
2021-08-10 22:15:24 +02:00
|
|
|
|
2024-05-01 11:40:49 +02:00
|
|
|
namespace ftxui::box_helper {
|
2021-08-10 22:15:24 +02:00
|
|
|
|
|
|
|
struct Element {
|
|
|
|
// Input:
|
|
|
|
int min_size = 0;
|
|
|
|
int flex_grow = 0;
|
|
|
|
int flex_shrink = 0;
|
|
|
|
|
|
|
|
// Output;
|
|
|
|
int size = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
void Compute(std::vector<Element>* elements, int target_size);
|
2024-05-01 11:40:49 +02:00
|
|
|
} // namespace ftxui::box_helper
|
2021-08-10 22:15:24 +02:00
|
|
|
|
|
|
|
#endif /* end of include guard: FTXUI_DOM_BOX_HELPER_HPP */
|