17 std::string title =
"(" + std::to_string(x) +
", " + std::to_string(y) +
")";
24 std::vector<Elements> rows;
25 for (
int i = 0; i < 15; i++) {
26 std::vector<Element> cols;
27 for (
int j = 0; j < 15; j++) {
40 auto slider_x =
Slider(
"x", &focus_x, 0.f, 1.f, 0.01f);
41 auto slider_y =
Slider(
"y", &focus_y, 0.f, 1.f, 0.01f);
49 auto title =
"focusPositionRelative(" +
50 std::to_string(focus_x) +
", " +
51 std::to_string(focus_y) +
")";
65 screen.Loop(renderer);
Element make_box(int x, int y)
static ScreenInteractive Fullscreen()
Component Renderer(Component child, std::function< Element()>)
|child|に似ていますが、|render|をComponentRender()イベントとして使用する新しいコンポーネントを返します。
virtual void Render(Screen &screen)
要素をftxui::Screenに表示します。
Decorator bgcolor(Color)
背景色を使用して装飾します。
Decorator focusPositionRelative(float x, float y)
frame内で使用され、ビューを特定の位置にスクロールさせます。位置は要求されたサイズの割合で表されます。
Element flex(Element)
子要素をコンテナに残されたスペースに比例して拡大させます。
Element text(std::wstring text)
ユニコードテキストを表示します。
Element vbox(Elements)
要素を縦に一つずつ表示するコンテナ。
static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value)
HSV表現から色を構築します。 https://en.wikipedia.org/wiki/HSL_and_HSV.
std::shared_ptr< Node > Element
Component Slider(SliderOption< T > options)
どの方向にも対応するスライダー。
Element gridbox(std::vector< Elements > lines)
要素のグリッドを表示するコンテナ。