summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-04-05 09:04:44 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-04-05 09:04:44 +0000
commitc2601505bbb1c68d01c730c8ddd53ae4afa80f94 (patch)
tree9397aa6cfcb4fd14c2b58d995e256aa9402e550c /src
parent65fcab9d7f8e83ebc09fc236af84dc7c7c3f62e7 (diff)
Documentation updates on callbacks and Fl::readqueue().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10677 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Widget.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx
index 924cc3688..3982055b9 100644
--- a/src/Fl_Widget.cxx
+++ b/src/Fl_Widget.cxx
@@ -54,9 +54,24 @@ void Fl_Widget::default_callback(Fl_Widget *o, void * /*v*/) {
}
}
/**
- All Fl_Widgets that don't have a callback defined use a
- default callback that puts a pointer to the widget in this queue,
- and this method reads the oldest widget out of this queue.
+ Reads the default callback queue and returns the first widget.
+
+ All Fl_Widgets that don't have a callback defined use the default
+ callback \p static Fl_Widget::default_callback() that puts a pointer
+ to the widget in a queue. This method reads the oldest widget out
+ of this queue.
+
+ The queue (FIFO) is limited (currently 20 items). If the queue
+ overflows, the oldest entry (Fl_Widget *) is discarded.
+
+ Relying on the default callback and reading the callback queue with
+ Fl::readqueue() is not recommended. If you need a callback, you should
+ set one with Fl_Widget::callback(Fl_Callback *cb, void *data)
+ or one of its variants.
+
+ \see Fl_Widget::callback()
+ \see Fl_Widget::callback(Fl_Callback *cb, void *data)
+ \see Fl_Widget::default_callback()
*/
Fl_Widget *Fl::readqueue() {
if (obj_tail==obj_head) return 0;