19 #ifndef _MFORMS_TEXTBOX_H_
20 #define _MFORMS_TEXTBOX_H_
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 struct TextBoxImplPtrs
56 bool (*create)(TextBox *
self,
ScrollBars scroll_bars);
57 void (*set_bordered)(TextBox *
self,
bool flag);
58 void (*set_read_only)(TextBox *
self,
bool flag);
59 void (*set_text)(TextBox *
self,
const std::string &text);
60 std::string (*get_text)(TextBox *
self);
61 void (*append_text)(TextBox *
self,
const std::string &text,
bool scroll_to_end);
63 void (*set_padding)(TextBox *
self,
int pad);
64 void (*set_monospaced)(TextBox *
self,
bool flag);
65 void (*get_selected_range)(TextBox *
self,
int &start,
int &end);
66 void (*clear)(TextBox *
self);
76 %rename(append_text_and_scroll) append_text(
const std::string &text,
bool scroll_to_end);
77 %rename(append_text) append_text(
const std::string &text);
79 %rename(append_text_with_encoding_and_scroll) append_text_with_encoding(
const std::string &text,
const std::string &encoding,
bool scroll_to_end);
80 %rename(append_text_with_encoding) append_text_with_encoding(
const std::string &text,
const std::string &encoding);
86 void set_bordered(
bool flag);
88 void set_monospaced(
bool flag);
91 void set_read_only(
bool flag);
93 void set_value(
const std::string &text);
95 virtual std::string get_string_value();
98 void get_selected_range(
int &start,
int &end);
103 void append_text(
const std::string &text,
bool scroll_to_end=
false);
108 void append_text_with_encoding(
const std::string &text,
const std::string &encoding,
bool scroll_to_end=
false);
111 void set_padding(
int pad);
124 boost::signals2::signal<bool (KeyCode, ModifierKey, const std::string&)>*
key_event_signal() {
return &_key_event_signal; };
125 #ifndef DOXYGEN_SHOULD_SKIP_THIS
132 TextBoxImplPtrs *_textbox_impl;
boost::signals2::signal< bool(KeyCode, ModifierKey, const std::string &)> * key_event_signal()
Signal emitted when a key was pressed.
boost::signals2::signal< void()> * signal_changed()
Signal emitted when control's text changes (e.g.
boost::signals2::signal< void()> _signal_changed
boost::signals2::signal< bool(KeyCode, ModifierKey, const std::string &)> _key_event_signal
Multiline text editing control.