diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-01-05 13:51:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-05 13:51:30 +0100 |
| commit | 8826dca1066361b474139bcc5aeed2e3a5246ed0 (patch) | |
| tree | 6819629ff3f9f014269c7cee090ab20a824af6ad /src/Fl_Input_.cxx | |
| parent | 4d1a508c7e4d28fd53129da79f068a275d7160bd (diff) | |
Add close buttons for individual tabs in Fl_Tabs (#628)
Add close buttons for Fl_Tabs
Introducing callback reasons
FLUID shows all FL_WHEN_... options
Adding Fl_Tabs overflow types
Improved test/tabs to show new features
Diffstat (limited to 'src/Fl_Input_.cxx')
| -rw-r--r-- | src/Fl_Input_.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index a8ad63ce0..88093bffe 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -942,7 +942,7 @@ int Fl_Input_::replace(int b, int e, const char* text, int ilen) { mark_ = position_ = undo_->undoat; set_changed(); - if (when()&FL_WHEN_CHANGED) do_callback(); + if (when()&FL_WHEN_CHANGED) do_callback(FL_REASON_CHANGED); return 1; } @@ -989,7 +989,7 @@ int Fl_Input_::undo() { while (b1 > 0 && index(b1)!='\n') b1--; minimal_update(b1); set_changed(); - if (when()&FL_WHEN_CHANGED) do_callback(); + if (when()&FL_WHEN_CHANGED) do_callback(FL_REASON_CHANGED); return 1; } @@ -1013,9 +1013,9 @@ int Fl_Input_::copy_cuts() { /** \internal Checks the when() field and does a callback if indicated. */ -void Fl_Input_::maybe_do_callback() { +void Fl_Input_::maybe_do_callback(Fl_Callback_Reason reason) { if (changed() || (when()&FL_WHEN_NOT_CHANGED)) { - do_callback(); + do_callback(reason); } } @@ -1055,7 +1055,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { case FL_HIDE: fl_reset_spot(); if (!readonly() && (when() & FL_WHEN_RELEASE)) - maybe_do_callback(); + maybe_do_callback(FL_REASON_LOST_FOCUS); return 1; case FL_PUSH: |
