From dc8a00fbba213c9ea8632c046230ecc677b996f9 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Tue, 19 Jul 2016 20:12:21 +0000 Subject: Bringing over this fix from 1.3 current to the porting branch. Fixes STR #3306; const version of bound_key_function(). Also affects patches in STR #3305, which will be applied in next commit. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Text_Editor.H | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'FL/Fl_Text_Editor.H') diff --git a/FL/Fl_Text_Editor.H b/FL/Fl_Text_Editor.H index c688f6260..1a01dfc8d 100644 --- a/FL/Fl_Text_Editor.H +++ b/FL/Fl_Text_Editor.H @@ -78,10 +78,19 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { /** Removes all of the key bindings associated with the text editor or list. */ void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } void add_default_key_bindings(Key_Binding** list); +#if FLTK_ABI_VERSION < 10304 + // OLD: non-const Key_Func bound_key_function(int key, int state, Key_Binding* list); /** Returns the function associated with a key binding. */ Key_Func bound_key_function(int key, int state) { return bound_key_function(key, state, key_bindings); } +#else + // NEW: const (STR#3306) + Key_Func bound_key_function(int key, int state, Key_Binding* list) const; + /** Returns the function associated with a key binding. */ + Key_Func bound_key_function(int key, int state) const + { return bound_key_function(key, state, key_bindings); } +#endif /** Sets the default key function for unassigned keys. */ void default_key_function(Key_Func f) { default_key_function_ = f; } -- cgit v1.2.3