]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Tooltips.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / Tooltips.h
index 9cfae2c74b03bae8da71202048b9f1dcd9367336..2cc357ffd57b1999d1d28135e0cc1d9c08ea610c 100644 (file)
@@ -4,9 +4,9 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Angus Leeming 
+ * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 /* Tooltips for xforms. xforms 0.89 supports them directly, but 0.88 needs
 #ifndef TOOLTIPS_H
 #define TOOLTIPS_H
 
-#include "LString.h"
-
-#include <boost/utility.hpp>
-#include <boost/signals/signal0.hpp>
+#include <boost/signal.hpp>
 #include <boost/signals/trackable.hpp>
 
 #include "forms_fwd.h" // Can't forward-declare FL_OBJECT
 
 #include <map>
 
-#ifdef __GNUG__
-#pragma interface
-#endif
+namespace lyx {
+namespace frontend {
 
 class Tooltips : boost::noncopyable, public boost::signals::trackable {
 public:
@@ -38,20 +34,11 @@ public:
        Tooltips();
 
        /// Initialise a tooltip for this ob.
-       void init(FL_OBJECT * ob, string const & tip);
+       void init(FL_OBJECT * ob, std::string const & tip);
 
        /// Are the tooltips on or off?
        static bool enabled() { return enabled_; }
 
-#if FL_VERSION < 1 && FL_REVISION < 89
-
-       /** Return the tooltip associated with this object.
-        *  Required by an xforms callback routine.
-        */
-       string const get(FL_OBJECT *) const;
-
-#endif
-
        /** This method is connected to Dialogs::toggleTooltips and toggles
         *  the state of enabled_.
         */
@@ -68,21 +55,15 @@ private:
        /** Once enabled_ is changed, then this signal is emitted to update
         *  all the tooltips.
         */
-       static boost::signal0<void> toggled;
+       static boost::signal<void()> toggled;
 
        /// The tooltips are stored so that they can be turned on and off.
-       typedef std::map<FL_OBJECT *, string> TooltipsMap;
+       typedef std::map<FL_OBJECT *, std::string> TooltipsMap;
 
        TooltipsMap tooltipsMap;
-
-#if FL_VERSION < 1 && FL_REVISION < 89
-
-       /** A timer is started once the mouse enters an object, so that the
-        *  tip appears a short delay afterwards.
-        */
-       FL_OBJECT * tooltip_timer_;
-
-#endif
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // TOOLTIPS_H