31 #include "../View/view.h"
32 #include "label_view.h"
37 class TextFieldBaseViewImpl;
89 void set_text(
float number,
int num_decimal_places = 6);
108 std::unique_ptr<TextFieldBaseViewImpl> impl;
size_t selection_length() const
void set_select_all_on_focus_gain(bool value)
float calculate_preferred_height(const CanvasPtr &canvas, float width) override
Calculates the preferred height of this view.
void set_input_mask(const std::string &mask)
float calculate_first_baseline_offset(const CanvasPtr &canvas, float width) override
Calculates the offset to the first baseline.
float calculate_preferred_width(const CanvasPtr &canvas) override
Calculates the preferred width of this view.
void delete_selected_text()
void set_text_alignment(TextAlignment value)
void render_content(const CanvasPtr &canvas) override
Renders the content of a view.
bool is_password_mode() const
void set_cursor_pos(int pos)
void set_selection(size_t pos, size_t length)
std::string selection() const
Signal< void(KeyEvent *)> & sig_before_edit_changed()
void set_lowercase(bool value=true)
TextAlignment
Definition: label_view.h:37
Signal< void(KeyEvent *)> & sig_after_edit_changed()
void set_decimal_character(const std::string &decimal_char)
void set_numeric_mode(bool enable=true, bool decimals=false)
bool is_uppercase() const
size_t selection_start() const
Definition: text_field_view.h:39
float calculate_last_baseline_offset(const CanvasPtr &canvas, float width) override
Calculates the offset to the last baseline.
bool is_lowercase() const
void set_read_only(bool value=true)
bool is_read_only() const
void set_uppercase(bool value=true)
View for an area of the user interface.
Definition: view.h:68
void set_preferred_size(int num_characters)
Signal< void()> & sig_selection_changed()
void set_max_length(int length)
TextAlignment text_alignment() const
void set_cursor_drawing_enabled(bool value)
std::shared_ptr< Canvas > CanvasPtr
Definition: canvas.h:126
void set_text(const std::string &value)
void set_placeholder(const std::string &value)
int preferred_size() const
std::string placeholder() const
void set_password_mode(bool value=true)
Definition: Application/application.h:35
Signal< void(KeyEvent *)> & sig_enter_pressed()