summaryrefslogtreecommitdiff
path: root/src/Fl_Tabs.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-07-27 16:02:21 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-07-27 16:02:21 +0000
commit62c19c63d6d915b153a09be98f7da8e049f9b4e3 (patch)
treedb80481c3b09b7129033d15a7673ecf59cb902cb /src/Fl_Tabs.cxx
parenta529510e5b8f84b15aacd103936df89bb767bb29 (diff)
More doco updates.
All of the core widgets now consistently set changed() before calling the callback function for a change in value; this allows programs to check the changed() state in a callback to see why they are being called (STR #475) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tabs.cxx')
-rw-r--r--src/Fl_Tabs.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index bc8a143cd..9448f6686 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.19 2004/04/11 04:38:58 easysw Exp $"
+// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.20 2004/07/27 16:02:21 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -133,8 +133,13 @@ int Fl_Tabs::handle(int event) {
case FL_DRAG:
case FL_RELEASE:
o = which(Fl::event_x(), Fl::event_y());
- if (event == FL_RELEASE) {push(0); if (o && value(o)) do_callback();}
- else push(o);
+ if (event == FL_RELEASE) {
+ push(0);
+ if (o && value(o)) {
+ set_changed();
+ do_callback();
+ }
+ } else push(o);
if (Fl::visible_focus() && event == FL_RELEASE) Fl::focus(this);
return 1;
case FL_FOCUS:
@@ -160,6 +165,7 @@ int Fl_Tabs::handle(int event) {
for (i = 1; i < children(); i ++)
if (child(i)->visible()) break;
value(child(i - 1));
+ set_changed();
do_callback();
return 1;
case FL_Right:
@@ -167,6 +173,7 @@ int Fl_Tabs::handle(int event) {
for (i = 0; i < children(); i ++)
if (child(i)->visible()) break;
value(child(i + 1));
+ set_changed();
do_callback();
return 1;
case FL_Down:
@@ -302,5 +309,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
-// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.19 2004/04/11 04:38:58 easysw Exp $".
+// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.20 2004/07/27 16:02:21 easysw Exp $".
//