diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-11-12 17:20:15 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-11-12 17:20:15 +1100 |
commit | fa22b74c2e6528b4315909377f277ef193e19d11 (patch) | |
tree | 5dfce73c765d54e76fc758c8537a349825ae19ef | |
parent | cb8ade55fb2f85951e53706de277261b726ecad7 (diff) |
Added basic word count feature
-rw-r--r-- | c_fl_text_display.cpp | 10 | ||||
-rw-r--r-- | c_fl_text_display.h | 2 | ||||
-rw-r--r-- | fltk-widgets-groups-text_displays.adb | 26 | ||||
-rw-r--r-- | fltk-widgets-groups-text_displays.ads | 8 |
4 files changed, 46 insertions, 0 deletions
diff --git a/c_fl_text_display.cpp b/c_fl_text_display.cpp index 94eb002..5104869 100644 --- a/c_fl_text_display.cpp +++ b/c_fl_text_display.cpp @@ -73,3 +73,13 @@ void fl_text_display_show_insert_pos(TEXTDISPLAY td) { reinterpret_cast<Fl_Text_Display*>(td)->show_insert_position(); } + +void fl_text_display_next_word(TEXTDISPLAY td) { + reinterpret_cast<Fl_Text_Display*>(td)->next_word(); +} + + +void fl_text_display_previous_word(TEXTDISPLAY td) { + reinterpret_cast<Fl_Text_Display*>(td)->previous_word(); +} + diff --git a/c_fl_text_display.h b/c_fl_text_display.h index 5a91774..f42ada9 100644 --- a/c_fl_text_display.h +++ b/c_fl_text_display.h @@ -23,6 +23,8 @@ extern "C" void fl_text_display_set_text_size(TEXTDISPLAY td, int s); extern "C" int fl_text_display_get_insert_pos(TEXTDISPLAY td); extern "C" void fl_text_display_set_insert_pos(TEXTDISPLAY td, int p); extern "C" void fl_text_display_show_insert_pos(TEXTDISPLAY td); +extern "C" void fl_text_display_next_word(TEXTDISPLAY td); +extern "C" void fl_text_display_previous_word(TEXTDISPLAY td); #endif diff --git a/fltk-widgets-groups-text_displays.adb b/fltk-widgets-groups-text_displays.adb index e2d62d8..f8418d6 100644 --- a/fltk-widgets-groups-text_displays.adb +++ b/fltk-widgets-groups-text_displays.adb @@ -72,6 +72,14 @@ package body FLTK.Widgets.Groups.Text_Displays is (TD : in System.Address); pragma Import (C, fl_text_display_show_insert_pos, "fl_text_display_show_insert_pos"); + procedure fl_text_display_next_word + (TD : in System.Address); + pragma Import (C, fl_text_display_next_word, "fl_text_display_next_word"); + + procedure fl_text_display_previous_word + (TD : in System.Address); + pragma Import (C, fl_text_display_previous_word, "fl_text_display_previous_word"); + @@ -219,5 +227,23 @@ package body FLTK.Widgets.Groups.Text_Displays is end Show_Insert_Position; + + + procedure Next_Word + (This : in out Text_Display) is + begin + fl_text_display_next_word (This.Void_Ptr); + end Next_Word; + + + + + procedure Previous_Word + (This : in out Text_Display) is + begin + fl_text_display_previous_word (This.Void_Ptr); + end Previous_Word; + + end FLTK.Widgets.Groups.Text_Displays; diff --git a/fltk-widgets-groups-text_displays.ads b/fltk-widgets-groups-text_displays.ads index 6c2a9fe..3eea299 100644 --- a/fltk-widgets-groups-text_displays.ads +++ b/fltk-widgets-groups-text_displays.ads @@ -70,6 +70,14 @@ package FLTK.Widgets.Groups.Text_Displays is (This : in out Text_Display); + procedure Next_Word + (This : in out Text_Display); + + + procedure Previous_Word + (This : in out Text_Display); + + private |