mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-16 16:08:08 +08:00
Set clang-format macro indent.
1) Set clang-format macro indent. 2) Run clang-format on every files.
This commit is contained in:
@@ -29,7 +29,8 @@ class Node {
|
||||
// Step 3: Draw this element.
|
||||
virtual void Render(Screen& screen);
|
||||
|
||||
std::vector<std::unique_ptr<Node>> children;
|
||||
std::vector<std::unique_ptr<Node>> children;
|
||||
|
||||
protected:
|
||||
Requirement requirement_;
|
||||
Box box_;
|
||||
|
@@ -7,10 +7,16 @@ namespace ftxui {
|
||||
|
||||
struct Requirement {
|
||||
// The required size to fully draw the element.
|
||||
struct { int x = 0; int y = 0; } min;
|
||||
struct {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
} min;
|
||||
|
||||
// How much flexibility is given to the component.
|
||||
struct { int x = 0; int y = 0; } flex;
|
||||
struct {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
} flex;
|
||||
|
||||
// Frame.
|
||||
enum Selection {
|
||||
@@ -21,6 +27,6 @@ struct Requirement {
|
||||
Box selected_box;
|
||||
};
|
||||
|
||||
} // namespace ftxui
|
||||
} // namespace ftxui
|
||||
|
||||
#endif /* end of include guard: FTXUI_REQUIREMENT_HPP */
|
||||
|
@@ -10,7 +10,7 @@ inline void Merge(Elements& container, Element element) {
|
||||
|
||||
template <>
|
||||
inline void Merge(Elements& container, Elements elements) {
|
||||
for(auto& element : elements)
|
||||
for (auto& element : elements)
|
||||
container.push_back(std::move(element));
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ Elements unpack(Args... args) {
|
||||
}
|
||||
|
||||
// Make |container| able to take any number of argments.
|
||||
#define TAKE_ANY_ARGS(container) \
|
||||
template <class... Args> \
|
||||
Element container(Args... children) { \
|
||||
return container(unpack(std::forward<Args>(children)...)); \
|
||||
}
|
||||
#define TAKE_ANY_ARGS(container) \
|
||||
template <class... Args> \
|
||||
Element container(Args... children) { \
|
||||
return container(unpack(std::forward<Args>(children)...)); \
|
||||
}
|
||||
|
Reference in New Issue
Block a user