summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2009-02-15 13:49:34 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2009-02-15 13:49:34 +0000
commite94b388899d16498f44afd1bb965a137345fcf6f (patch)
tree40ab590cc767b05e5077e6e549bda117ad660f62 /FL
parent39c0a8a320a4d9799009f66ccd16288f361bc8f8 (diff)
renamed class Fl_Watch to Fl_Widget_Tracker, as discussed in fltk.development.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl.H32
1 files changed, 16 insertions, 16 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 2e5815687..476e775fb 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -856,7 +856,7 @@ public:
callbacks.
The other functions are intended for internal use. The preferred
- way to use them is by using the helper class Fl_Watch.
+ way to use them is by using the helper class Fl_Widget_Tracker.
The following is to show how it works ...
@@ -869,11 +869,11 @@ public:
- Fl::watch_widget_pointer() adds a widget pointer to the watch list
- Fl::release_widget_pointer() removes a widget pointer from the watch list
- Fl::clear_widget_pointer() clears a widget pointer \e in the watch list
- -# the class Fl_Watch:
+ -# the class Fl_Widget_Tracker:
- the constructor calls Fl::watch_widget_pointer()
- the destructor calls Fl::release_widget_pointer()
- the access methods can be used to test, if a widget has been deleted
- \see Fl_Watch.
+ \see Fl_Widget_Tracker.
@{ */
// Widget deletion:
@@ -936,7 +936,7 @@ public:
/**
This class should be used to control safe widget deletion.
- You can use an Fl_Watch object to watch another widget, if you
+ You can use an Fl_Widget_Tracker object to watch another widget, if you
need to know, if this widget has been deleted during a callback.
This simplifies the use of the "safe widget deletion" methods
@@ -949,7 +949,7 @@ public:
scope is left. This ensures that no stale widget pointers are
left in the widget watch list (see example below).
- You can also create Fl_Watch objects with \e \b new, but then it
+ You can also create Fl_Widget_Tracker objects with \e \b new, but then it
is your responsibility to delete the object (and thus remove the
widget pointer from the watch list) when it is not needed any more.
@@ -959,28 +959,28 @@ public:
int MyClass::handle (int event) {
if (...) {
- Fl_Watch wp(this); // watch myself
- do_callback(); // call the callback
+ Fl_Widget_Tracker wp(this); // watch myself
+ do_callback(); // call the callback
- if (wp.deleted()) return 1; // exit, if deleted
+ if (wp.deleted()) return 1; // exit, if deleted
// Now we are sure that the widget has not been deleted.
// It is safe to access the widget
- clear_changed(); // access the widget
+ clear_changed(); // access the widget
}
}
\endcode
*/
-class FL_EXPORT Fl_Watch {
+class FL_EXPORT Fl_Widget_Tracker {
Fl_Widget* wp_;
public:
- Fl_Watch(Fl_Widget *wi);
- ~Fl_Watch();
+ Fl_Widget_Tracker(Fl_Widget *wi);
+ ~Fl_Widget_Tracker();
/**
returns a pointer to the watched widget.
@@ -994,9 +994,9 @@ public:
This is a convenience method. You can also use something like
- if (watch.widget() == 0) // ...
+ if (wp.widget() == 0) // ...
- where watch is an Fl_Watch object.
+ where \e \b wp is an Fl_Widget_Tracker object.
*/
int deleted() {return wp_ == 0;}
@@ -1005,9 +1005,9 @@ public:
This is a convenience method. You can also use something like
- if (watch.widget() != 0) // ...
+ if (wp.widget() != 0) // ...
- where watch is an Fl_Watch object.
+ where \e \b wp is an Fl_Widget_Tracker object.
*/
int exists() {return wp_ != 0;}