31 #include "../View/view.h"
32 #include "label_view.h"
37 class TextFieldViewImpl;
86 void set_text(
float number,
int num_decimal_places = 6);
104 std::unique_ptr<TextFieldViewImpl> impl;
void set_cursor_pos(int pos)
float get_preferred_width(Canvas &canvas) override
Calculates the preferred width of this view.
void set_selection(size_t pos, size_t length)
Signal< void()> & sig_enter_pressed()
void set_select_all_on_focus_gain(bool value)
bool is_lowercase() const
void render_content(Canvas &canvas) override
Renders the content of a view.
void set_cursor_drawing_enabled(bool value)
size_t selection_length() const
void set_numeric_mode(bool enable=true, bool decimals=false)
2D Graphics Canvas
Definition: canvas.h:73
void set_text(int number)
TextAlignment
Definition: label_view.h:38
Definition: text_field_view.h:40
bool is_uppercase() const
void set_input_mask(const std::string &mask)
View for an area of the user interface.
Definition: view.h:62
Signal< void(KeyEvent &)> & sig_after_edit_changed()
bool is_read_only() const
void set_uppercase(bool value=true)
void set_read_only(bool value=true)
bool is_password_mode() const
void set_placeholder(const std::string &value)
float get_first_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the first baseline.
void set_text(float number, int num_decimal_places=6)
void set_text_alignment(TextAlignment value)
std::string placeholder() const
void set_password_mode(bool value=true)
float get_last_baseline_offset(Canvas &canvas, float width) override
Calculates the offset to the last baseline.
void set_max_length(int length)
TextAlignment text_alignment() const
size_t selection_start() const
float get_preferred_height(Canvas &canvas, float width) override
Calculates the preferred height of this view.
void set_lowercase(bool value=true)
std::string selection() const
Keyboard key event.
Definition: key_event.h:48
void set_decimal_character(const std::string &decimal_char)
void set_text(const std::string &value)
Signal< void(KeyEvent &)> & sig_before_edit_changed()
Signal< void()> & sig_selection_changed()
void delete_selected_text()