4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
7 * \author Angus Leeming, a.leeming@ic.ac.uk
9 * Tooltips for xforms. xforms 0.89 supports them directly, but 0.88 needs
10 * a bit of jiggery pokery. This class wraps it all up in a neat interface.
11 * Based on code originally in Toolbar_pimpl.C that appears to have been
12 * written by Matthias Ettrich and Jean-Marc Lasgouttes.
19 #include <boost/utility.hpp>
20 #include <sigc++/signal_system.h>
21 #include FORMS_H_LOCATION // Can't forward-declare FL_OBJECT
27 class Tooltips : boost::noncopyable {
29 /// Activate tooltips for this ob
30 void activateTooltip(FL_OBJECT * ob);
31 /** Connect this signal to the function returning the tooltip for ob
32 Eg, string FormBase::getTooltip(FL_OBJECT const *)
33 Note that SigC is unable to create a Signal1 returning string const
34 or to connect it to a const method.
36 SigC::Signal1<string, FL_OBJECT const *> getTooltip;
38 // We use the old method because we want to change tooltips on the fly
39 //#if FL_REVISION < 89
41 Tooltips() : tooltip_timer_(0) {}
45 FL_OBJECT * tooltip_timer_;