14 #ifndef T3_WIDGET_TEXTFIELD_H
15 #define T3_WIDGET_TEXTFIELD_H
19 #include <t3widget/widgets/widget.h>
20 #include <t3widget/textline.h>
21 #include <t3widget/contentlist.h>
22 #include <t3widget/widgets/smartlabel.h>
23 #include <t3widget/widgets/listpane.h>
30 class T3_WIDGET_LOCAL drop_down_list_t;
31 struct T3_WIDGET_LOCAL implementation_t {
38 selection_mode_t selection_mode;
52 cleanup_ptr<text_line_t>::t line;
53 const key_t *filter_keys;
54 size_t filter_keys_size;
55 bool filter_keys_accept;
59 cleanup_ptr<drop_down_list_t>::t drop_down_list;
61 implementation_t(
void) : pos(0),
65 in_drop_down_list(
false),
66 dont_select_on_focus(
false),
74 pimpl_ptr<implementation_t>::t impl;
77 void reset_selection(
void);
79 void set_selection(
key_t key);
81 void delete_selection(
bool save_to_copy_buffer);
83 void ensure_cursor_on_screen(
void);
86 void set_selection_end(
bool update_primary =
true);
89 bool has_focus(
void)
const;
93 virtual bool process_key(
key_t key);
95 virtual void update_contents(
void);
96 virtual void set_focus(focus_t _focus);
97 virtual void show(
void);
98 virtual void hide(
void);
100 void set_text(
const std::string *text);
102 void set_text(
const char *text);
104 void set_text(
const char *text,
size_t size);
112 void set_key_filter(
key_t *keys,
size_t nr_of_keys,
bool accept);
114 const std::string *get_text(
void)
const;
121 virtual bool is_hotkey(
key_t key);
123 virtual void bad_draw_recheck(
void);
126 T3_WIDGET_SIGNAL(activate,
void);
134 cleanup_ptr<filtered_list_base_t>::t completions;
137 void update_list_pane(
void);
138 void item_activated(
void);
139 void selection_changed(
void);
142 virtual bool process_key(
key_t key);
145 virtual void update_contents(
void);
146 virtual void set_focus(focus_t focus) ;
147 virtual void show(
void);
148 virtual void hide(
void);
152 void update_view(
void);
Definition: textline.h:36
Definition: textfield.h:27
Drop-down list implementation for text_field_t.
Definition: textfield.h:130