4#ifndef FTXUI_DOM_SELECTION_HPP
5#define FTXUI_DOM_SELECTION_HPP
23 Selection(
int start_x,
int start_y,
int end_x,
int end_y);
32 std::string
GetParts() {
return parts_.str(); }
37 const int start_x_ = 0;
38 const int start_y_ = 0;
43 const bool empty_ =
true;
44 std::stringstream parts_;
const Box & GetBox() const
获取选择框。
void AddPart(const std::string &part, int y, int left, int right)
Selection SaturateVertical(Box box)
将选择饱和到框内。 这由 vbox 调用,以将选择传播到其子级。
Selection SaturateHorizontal(Box box)
将选择饱和到框内。 这由 hbox 调用,以将选择传播到其子级。
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase