23 #ifndef FL_TEXT_EDITOR_H 24 #define FL_TEXT_EDITOR_H 26 #include "Fl_Text_Display.H" 29 #define FL_TEXT_EDITOR_ANY_STATE (-1L) 53 virtual int handle(
int e);
66 void tab_nav(
int val);
68 void add_key_binding(
int key,
int state, Key_Func f,
Key_Binding** list);
71 { add_key_binding(key, state, f, &key_bindings); }
72 void remove_key_binding(
int key,
int state,
Key_Binding** list);
75 { remove_key_binding(key, state, &key_bindings); }
80 Key_Func bound_key_function(
int key,
int state,
Key_Binding* list)
const;
83 {
return bound_key_function(key, state, key_bindings); }
116 void maybe_do_callback();
133 Key_Func default_key_function_;
void remove_all_key_bindings()
Removes all of the key bindings associated with the text editor or list.
Definition: Fl_Text_Editor.H:78
int state
the state of key modifiers
Definition: Fl_Text_Editor.H:46
void add_key_binding(int key, int state, Key_Func f)
Adds a key of state state with the function f.
Definition: Fl_Text_Editor.H:70
void default_key_function(Key_Func f)
Sets the default key function for unassigned keys.
Definition: Fl_Text_Editor.H:85
This is the FLTK text editor widget.
Definition: Fl_Text_Editor.H:38
static Key_Binding * global_key_bindings
Global key binding list.
Definition: Fl_Text_Editor.H:130
void remove_key_binding(int key, int state)
Removes the key binding associated with the key "key" of state "state".
Definition: Fl_Text_Editor.H:74
Simple linked list item associating a key/state to a function.
Definition: Fl_Text_Editor.H:44
int key
the key pressed
Definition: Fl_Text_Editor.H:45
Key_Func bound_key_function(int key, int state) const
Returns the function associated with a key binding.
Definition: Fl_Text_Editor.H:82
Key_Binding * next
next key binding in the list
Definition: Fl_Text_Editor.H:48
int insert_mode()
Gets the current insert mode; if non-zero, new text is inserted before the current cursor position...
Definition: Fl_Text_Editor.H:65
void insert_mode(int b)
Sets the current insert mode; if non-zero, new text is inserted before the current cursor position...
Definition: Fl_Text_Editor.H:59
Rich text display widget.
Definition: Fl_Text_Display.H:78