Blender V5.3
interface_textbox.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
12#include "BLI_span.hh"
14#include "BLI_string_ref.hh"
15#include "BLI_vector.hh"
16
17namespace blender {
18struct ARegion;
19struct TextboxState;
20
21namespace ui {
22
23struct ButtonTextBox;
24
26
27void textbox_add_scroll(ButtonTextBox *textbox, int step);
28
31
34 const ARegion *region,
35 const float2 xy);
36
39
46 const bool select);
47
53
55
57
58/* Top/Bottom padding for text in a text-box. */
60
62 StringRefNull idname,
63 const int initial_visible_lines = 3);
64
65} // namespace ui
66} // namespace blender
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
void textbox_add_scroll(ButtonTextBox *textbox, int step)
Vector< StringRef > textbox_wrap_lines(ButtonTextBox *textbox)
Vector< StringRef > textbox_wrap_placeholder(ButtonTextBox *textbox)
void textbox_textedit_set_cursor_pos(ButtonTextBox *textbox, const ARegion *region, const float2 xy)
constexpr int textbox_minimum_visible_lines
int textbox_wrapped_line_index_from_char_offset(Span< StringRef > lines, int offset)
float textbox_grip_height()
TextboxState * textbox_ensure_state(ARegion *region, StringRefNull idname, const int initial_visible_lines)
float textbox_vertical_padding()
void textbox_scroll_to_cursor(ButtonTextBox *textbox)
void textbox_jump_line(ButtonTextBox *textbox, eStrCursorJumpDirection direction, const bool select)
BMesh Iterators.
VecBase< float, 2 > float2