summaryrefslogtreecommitdiff
path: root/src/fltk_binding
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2016-11-12 17:20:15 +1100
committerJed Barber <jjbarber@y7mail.com>2016-11-12 17:20:15 +1100
commit8908535c7dc9fc7adf3c56b96aecc49b319c5a9e (patch)
treec7dc949471370aa28924cfb8ca227d933e9e8702 /src/fltk_binding
parent7aa86670f5d76284ae193ed1e1ed936b20a5c5fb (diff)
Added basic word count feature
Diffstat (limited to 'src/fltk_binding')
-rw-r--r--src/fltk_binding/c_fl_text_display.cpp10
-rw-r--r--src/fltk_binding/c_fl_text_display.h2
-rw-r--r--src/fltk_binding/fltk-widgets-groups-text_displays.adb26
-rw-r--r--src/fltk_binding/fltk-widgets-groups-text_displays.ads8
4 files changed, 46 insertions, 0 deletions
diff --git a/src/fltk_binding/c_fl_text_display.cpp b/src/fltk_binding/c_fl_text_display.cpp
index 94eb002..5104869 100644
--- a/src/fltk_binding/c_fl_text_display.cpp
+++ b/src/fltk_binding/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/src/fltk_binding/c_fl_text_display.h b/src/fltk_binding/c_fl_text_display.h
index 5a91774..f42ada9 100644
--- a/src/fltk_binding/c_fl_text_display.h
+++ b/src/fltk_binding/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/src/fltk_binding/fltk-widgets-groups-text_displays.adb b/src/fltk_binding/fltk-widgets-groups-text_displays.adb
index e2d62d8..f8418d6 100644
--- a/src/fltk_binding/fltk-widgets-groups-text_displays.adb
+++ b/src/fltk_binding/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/src/fltk_binding/fltk-widgets-groups-text_displays.ads b/src/fltk_binding/fltk-widgets-groups-text_displays.ads
index 6c2a9fe..3eea299 100644
--- a/src/fltk_binding/fltk-widgets-groups-text_displays.ads
+++ b/src/fltk_binding/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