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)
66 void tab_nav(
int val);
68 void add_key_binding(
int key,
int state, Key_Func f, Key_Binding** list);
72 void remove_key_binding(
int key,
int state, Key_Binding** list);
76 void remove_all_key_bindings(Key_Binding** list);
79 void add_default_key_bindings(Key_Binding** list);
80 Key_Func bound_key_function(
int key,
int state, Key_Binding* list)
const;
121 Key_Binding* key_bindings;
Fl_Callback_Reason
These constants describe why a callback is performed.
Definition Enumerations.H:455
@ FL_REASON_CHANGED
the value of the widget was modified
Definition Enumerations.H:464
Fl_Text_Display(int X, int Y, int W, int H, const char *l=0)
Creates a new text display widget.
Definition Fl_Text_Display.cxx:106
int handle(int e) FL_OVERRIDE
Event handling.
Definition Fl_Text_Display.cxx:4197
This is the FLTK text editor widget.
Definition Fl_Text_Editor.H:38
int(* Key_Func)(int key, Fl_Text_Editor *editor)
Key function binding callback type.
Definition Fl_Text_Editor.H:41
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
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 remove_all_key_bindings(Key_Binding **list)
Removes all of the key bindings associated with the text editor or list.
Definition Fl_Text_Editor.cxx:179
void add_key_binding(int key, int state, Key_Func f, Key_Binding **list)
Adds a key of state state with the function function to an arbitrary key binding list list.
Definition Fl_Text_Editor.cxx:212
Key_Func bound_key_function(int key, int state) const
Returns the function associated with a key binding.
Definition Fl_Text_Editor.H:82
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 remove_all_key_bindings()
Removes all of the key bindings associated with the text editor or list.
Definition Fl_Text_Editor.H:78
static Key_Binding * global_key_bindings
Global key binding list.
Definition Fl_Text_Editor.H:131
void remove_key_binding(int key, int state, Key_Binding **list)
Removes the key binding associated with the key key of state state from the Key_Binding list list.
Definition Fl_Text_Editor.cxx:195
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
Key_Func bound_key_function(int key, int state, Key_Binding *list) const
Returns the function associated with a key binding.
Definition Fl_Text_Editor.cxx:168
Fl_Text_Editor(int X, int Y, int W, int H, const char *l=0)
The constructor creates a new text editor widget.
Definition Fl_Text_Editor.cxx:70
void default_key_function(Key_Func f)
Sets the default key function for unassigned keys.
Definition Fl_Text_Editor.H:85
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
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 function
associated function
Definition Fl_Text_Editor.H:47
int state
the state of key modifiers
Definition Fl_Text_Editor.H:46
Key_Binding * next
next key binding in the list
Definition Fl_Text_Editor.H:48