From 50ebd224ee7dbed4494d43fd63cdc794380a9a36 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 10 Jun 2017 22:53:19 +1000 Subject: The rest of the static keybinding procedures added to Text_Editor package --- src/c_fl_text_editor.cpp | 135 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 131 insertions(+), 4 deletions(-) (limited to 'src/c_fl_text_editor.cpp') diff --git a/src/c_fl_text_editor.cpp b/src/c_fl_text_editor.cpp index 282da77..b023981 100644 --- a/src/c_fl_text_editor.cpp +++ b/src/c_fl_text_editor.cpp @@ -70,6 +70,13 @@ void free_fl_text_editor(TEXTEDITOR te) { +void fl_text_editor_default(TEXTEDITOR te, int k) { + Fl_Text_Editor::kf_default(k, reinterpret_cast(te)); +} + + + + void fl_text_editor_undo(TEXTEDITOR te) { Fl_Text_Editor::kf_undo(0, reinterpret_cast(te)); } @@ -90,6 +97,10 @@ void fl_text_editor_delete(TEXTEDITOR te) { Fl_Text_Editor::kf_delete(0, reinterpret_cast(te)); } +void fl_text_editor_select_all(TEXTEDITOR te) { + Fl_Text_Editor::kf_select_all(0, reinterpret_cast(te)); +} + @@ -97,6 +108,21 @@ void fl_text_editor_backspace(TEXTEDITOR te) { Fl_Text_Editor::kf_backspace(0, reinterpret_cast(te)); } +void fl_text_editor_insert(TEXTEDITOR te) { + Fl_Text_Editor::kf_insert(0, reinterpret_cast(te)); +} + +void fl_text_editor_enter(TEXTEDITOR te) { + Fl_Text_Editor::kf_enter(0, reinterpret_cast(te)); +} + +void fl_text_editor_ignore(TEXTEDITOR te) { + Fl_Text_Editor::kf_ignore(0, reinterpret_cast(te)); +} + + + + void fl_text_editor_home(TEXTEDITOR te) { Fl_Text_Editor::kf_home(0, reinterpret_cast(te)); } @@ -105,10 +131,6 @@ void fl_text_editor_end(TEXTEDITOR te) { Fl_Text_Editor::kf_end(0, reinterpret_cast(te)); } -void fl_text_editor_insert(TEXTEDITOR te) { - Fl_Text_Editor::kf_insert(0, reinterpret_cast(te)); -} - void fl_text_editor_page_down(TEXTEDITOR te) { Fl_Text_Editor::kf_page_down(0, reinterpret_cast(te)); } @@ -136,6 +158,111 @@ void fl_text_editor_up(TEXTEDITOR te) { +void fl_text_editor_shift_home(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Home, reinterpret_cast(te)); +} + +void fl_text_editor_shift_end(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_End, reinterpret_cast(te)); +} + +void fl_text_editor_shift_page_down(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Page_Down, reinterpret_cast(te)); +} + +void fl_text_editor_shift_page_up(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Page_Up, reinterpret_cast(te)); +} + +void fl_text_editor_shift_down(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Down, reinterpret_cast(te)); +} + +void fl_text_editor_shift_left(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Left, reinterpret_cast(te)); +} + +void fl_text_editor_shift_right(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Right, reinterpret_cast(te)); +} + +void fl_text_editor_shift_up(TEXTEDITOR te) { + Fl_Text_Editor::kf_shift_move(FL_Up, reinterpret_cast(te)); +} + + + + +void fl_text_editor_ctrl_home(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Home, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_end(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_End, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_page_down(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Page_Down, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_page_up(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Page_Up, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_down(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Down, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_left(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Left, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_right(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Right, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_up(TEXTEDITOR te) { + Fl_Text_Editor::kf_ctrl_move(FL_Up, reinterpret_cast(te)); +} + + + + +void fl_text_editor_ctrl_shift_home(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Home, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_end(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_End, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_page_down(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Page_Down, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_page_up(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Page_Up, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_down(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Down, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_left(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Left, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_right(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Right, reinterpret_cast(te)); +} + +void fl_text_editor_ctrl_shift_up(TEXTEDITOR te) { + Fl_Text_Editor::kf_c_s_move(FL_Up, reinterpret_cast(te)); +} + + + + void fl_text_editor_remove_key_binding(TEXTEDITOR te, unsigned int k, unsigned long m) { reinterpret_cast(te)->remove_key_binding(k, m); } -- cgit