notes = new Fl_Text_Editor(x, y, w, h);
notes->box(...);
notes->textsize(...);
notes->color(...);
notes->textcolor(...);
notes->cursor_color(...);
notes->wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0);
Fl_Text_Editor::kf_ignore(notes, FL_Tab); // compiles but does nothing as far as i can see. I am using 1.3.5 ABI 10300)
On 5/5/21 2:08 AM, Dave Jordan wrote:
notes = new Fl_Text_Editor(x, y, w, h);
[..]
notes->wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0);
Fl_Text_Editor::kf_ignore(notes, FL_Tab); // compiles but does nothing as far as i can see. I am using 1.3.5 ABI 10300)
kf_ignore()
is a nop destination for keys to be ignored, it does not do
anything or create mappings.
Its use is to map keys to be ignored to it, so that it
acts as a nop (no operation), such as in the default key
mapping table:
// These are the default key bindings every
widget should start with
[..]
{ FL_Escape, FL_TEXT_EDITOR_ANY_STATE,
Fl_Text_Editor::kf_ignore }, // <<-- NOTE ITS USE
HERE TO IGNORE Fl_Escape
{ FL_Enter, FL_TEXT_EDITOR_ANY_STATE,
Fl_Text_Editor::kf_enter },
{ FL_KP_Enter, FL_TEXT_EDITOR_ANY_STATE,
Fl_Text_Editor::kf_enter },
To use it you'd use add_key_binding(), e.g.
notes->add_key_binding(FL_Tab, 0, Fl_Text_Editor::kf_ignore);
void Fl_Text_Editor::tab_nav(int val) {See Fl_Text_Editor's docs for add_key_binding() to see how to bind/remap keys to different functions.
if ( val )
add_key_binding(FL_Tab, 0, kf_ignore);
else
remove_key_binding(FL_Tab, 0);
}
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/c677d7ef-9d10-3624-f397-c85c12e7ea6e%40online.de.
On 5/5/21 12:50 PM, Dave Jordan wrote:
but i'd just as soon wait for 1.3.6 stable.
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/f7c5fef8-adcb-eed5-4b1c-a8366ff6dbd4%40seriss.com.