31 #include "../View/view.h" 32 #include "../../Core/Math/size.h" 33 #include "../../Core/Math/vec2.h" 34 #include "label_view.h" 86 std::unique_ptr<TextViewImpl> impl;
Signal< void(KeyEvent &)> & sig_enter_pressed()
float calculate_preferred_height(Canvas &canvas, float width) override
Calculates the preferred height of this view.
View for an area of the user interface.
Definition: view.h:65
void render_content(Canvas &canvas) override
Renders the content of a view.
void set_cursor_drawing_enabled(bool value)
float calculate_first_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the first baseline.
2D Graphics Canvas
Definition: canvas.h:71
std::string selection() const
void set_text_alignment(TextAlignment value)
void set_preferred_size(Size num_characters)
TextAlignment text_alignment() const
bool is_read_only() const
void set_read_only(bool value=true)
float calculate_last_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the last baseline.
Vec2i selection_end() const
Signal< void(KeyEvent &)> & sig_before_edit_changed()
TextAlignment
Definition: label_view.h:38
std::string placeholder() const
Vec2i selection_start() const
void set_selection(Vec2i head, Vec2i tail)
2D (width,height) size structure - Integer
Definition: size.h:170
void set_text(const std::string &value)
void set_cursor_pos(Vec2i pos)
float calculate_preferred_width(Canvas &canvas) override
Calculates the preferred width of this view.
Definition: text_view.h:40
Size preferred_size() const
Signal< void()> & sig_selection_changed()
void delete_selected_text()
Signal< void(KeyEvent &)> & sig_after_edit_changed()
void set_placeholder(const std::string &value)