Removed ABI guards that snuck in with r11819.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2016-07-19 23:19:16 +00:00
parent b6e4668352
commit ec4120795d
3 changed files with 9 additions and 25 deletions

View File

@ -65,12 +65,8 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
text replaces text at the current cursor position.
*/
int insert_mode() { return insert_mode_; }
#if FLTK_ABI_VERSION >= 10304
void tab_nav(int val);
int tab_nav() const;
#endif
void add_key_binding(int key, int state, Key_Func f, Key_Binding** list);
/** Adds a \p key of state \p state with the function \p f. */
void add_key_binding(int key, int state, Key_Func f)
@ -83,19 +79,10 @@ 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; }

View File

@ -163,14 +163,7 @@ void Fl_Text_Editor::add_default_key_bindings(Key_Binding** list) {
}
/** Returns the function associated with a key binding.*/
#if FLTK_ABI_VERSION < 10304
// OLD - non-const
Fl_Text_Editor::Key_Func Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list)
#else
// NEW - const (STR#3306)
Fl_Text_Editor::Key_Func Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list) const
#endif
{
Fl_Text_Editor::Key_Func Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list) const {
Key_Binding* cur;
for (cur = list; cur; cur = cur->next)
if (cur->key == key)
@ -660,7 +653,6 @@ int Fl_Text_Editor::handle(int event) {
return Fl_Text_Display::handle(event);
}
#if FLTK_ABI_VERSION >= 10304
/**
Enables or disables Tab key focus navigation.
@ -709,7 +701,6 @@ and Shift-Tab navigates focus to the previous widget.
int Fl_Text_Editor::tab_nav() const {
return (bound_key_function(FL_Tab,0)==kf_ignore) ? 1 : 0;
}
#endif
//
// End of "$Id$".

View File

@ -176,15 +176,21 @@ public:
o->box(FL_DOWN_BOX);
o->tooltip("Fl_Output with down box");
} // Fl_Output* o
{ Fl_Text_Editor* o = new Fl_Text_Editor(220, 160, 90, 55);
{ Fl_Text_Editor* o = new Fl_Text_Editor(180, 160, 125, 55);
o->box(FL_DOWN_FRAME);
o->color((Fl_Color)80);
o->tooltip("Fl_Text_Editor with down frame");
o->textsize(8);
o->buffer(new Fl_Text_Buffer());
o->buffer()->text("Text editor");
} // Fl_Text_Editor* o
{ Fl_Text_Display* o = new Fl_Text_Display(220, 230, 90, 55);
{ Fl_Text_Display* o = new Fl_Text_Display(180, 230, 125, 55);
o->box(FL_DOWN_FRAME);
o->color((Fl_Color)12);
o->tooltip("Fl_Text_Display with down frame");
o->textsize(8);
o->buffer(new Fl_Text_Buffer());
o->buffer()->text("Text display");
} // Fl_Text_Display* o
{ Fl_File_Input* o = new Fl_File_Input(40, 290, 265, 30);
o->box(FL_DOWN_BOX);