*
* \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
#include <config.h>
-
#include "Tooltips.h"
+
#include "xforms_helpers.h" // formatted
-#include "gettext.h"
+
#include "support/lstrings.h"
-#include "support/LAssert.h"
+
#include "lyx_forms.h"
#include <boost/bind.hpp>
+using std::string;
+
+
+namespace lyx {
+
+using support::trim;
+
+namespace frontend {
+
+
bool Tooltips::enabled_ = true;
-boost::signal0<void> Tooltips::toggled;
+boost::signal<void()> Tooltips::toggled;
Tooltips::Tooltips()
void Tooltips::init(FL_OBJECT * ob, string const & tip)
{
- lyx::Assert(ob && ob->form);
+ BOOST_ASSERT(ob && ob->form);
// Store the tooltip string
string const str = formatted(trim(tip), 400);
char const * const c_str = enabled_ ? str.c_str() : 0;
fl_set_object_helper(ob, c_str);
}
+
+} // namespace frontend
+} // namespace lyx