Interactive text input for a single line. More...
#include <le2d/text/line_input.hpp>
Public Member Functions | |
| LineInput (gsl::not_null< IFont * > font, TextHeight height=TextHeight::Default) | |
| auto | get_string () const -> std::string_view |
| auto | get_height () const -> TextHeight |
| auto | get_cursor () const -> int |
| auto | get_cursor_x () const -> float |
| auto | get_size () const -> glm::vec2 |
| auto | get_glyph_layouts () const -> std::span< kvf::ttf::GlyphLayout const > |
| auto | get_atlas () const -> IFontAtlas & |
| auto | get_texture () const -> ITexture const & |
| auto | to_primitive () const -> Primitive |
| void | set_string (std::string line) |
| void | append (std::string_view str) |
| void | write (char ch) |
| void | backspace () |
| void | delete_front () |
| void | set_cursor (int cursor) |
| void | move_cursor (int delta) |
Protected Member Functions | |
| void | update () |
Interactive text input for a single line.
|
explicit |
| void le::LineInput::append | ( | std::string_view | str | ) |
| void le::LineInput::backspace | ( | ) |
| void le::LineInput::delete_front | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void le::LineInput::move_cursor | ( | int | delta | ) |
| void le::LineInput::set_cursor | ( | int | cursor | ) |
| void le::LineInput::set_string | ( | std::string | line | ) |
| auto le::LineInput::to_primitive | ( | ) | const -> Primitive |
|
protected |
| void le::LineInput::write | ( | char | ch | ) |