Fl_Tooltip.H
//
// "$Id: Fl_Tooltip.H 9706 2012-11-06 20:46:14Z matt $"
//
// Tooltip header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2011 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
/* \file
Fl_Tooltip widget . */
#ifndef Fl_Tooltip_H
#define Fl_Tooltip_H
#include <FL/Fl.H>
#include <FL/Fl_Widget.H>
class FL_EXPORT Fl_Tooltip {
public:
static float delay() { return delay_; }
static void delay(float f) { delay_ = f; }
static float hoverdelay() { return hoverdelay_; }
static void hoverdelay(float f) { hoverdelay_ = f; }
static int enabled() { return Fl::option(Fl::OPTION_SHOW_TOOLTIPS); }
static void enable(int b = 1) { Fl::option(Fl::OPTION_SHOW_TOOLTIPS, (b!=0));}
static void disable() { enable(0); }
static void (*enter)(Fl_Widget* w);
static void enter_area(Fl_Widget* w, int X, int Y, int W, int H, const char* tip);
static void (*exit)(Fl_Widget *w);
static Fl_Widget* current() {return widget_;}
static void current(Fl_Widget*);
static Fl_Font font() { return font_; }
static void font(Fl_Font i) { font_ = i; }
static Fl_Fontsize size() { return (size_ == -1 ? FL_NORMAL_SIZE : size_); }
static void size(Fl_Fontsize s) { size_ = s; }
static Fl_Color color() { return color_; }
static void color(Fl_Color c) { color_ = c; }
static Fl_Color textcolor() { return textcolor_; }
static void textcolor(Fl_Color c) { textcolor_ = c; }
#if FLTK_ABI_VERSION >= 10301
static int margin_width() { return margin_width_; }
static void margin_width(int v) { margin_width_ = v; }
static int margin_height() { return margin_height_; }
static void margin_height(int v) { margin_height_ = v; }
static int wrap_width() { return wrap_width_; }
static void wrap_width(int v) { wrap_width_ = v; }
#else
static int margin_width() { return 3; }
static int margin_height() { return 3; }
static int wrap_width() { return 400; }
#endif
#ifdef __APPLE__
// the unique tooltip window
static Fl_Window* current_window(void);
#endif
// These should not be public, but Fl_Widget::tooltip() needs them...
// fabien: made it private with only a friend function access
private:
friend void Fl_Widget::tooltip(const char *);
friend void Fl_Widget::copy_tooltip(const char *);
static void enter_(Fl_Widget* w);
static void exit_(Fl_Widget *w);
static void set_enter_exit_once_();
private:
static float delay_;
static float hoverdelay_;
static Fl_Color color_;
static Fl_Color textcolor_;
static Fl_Font font_;
static Fl_Fontsize size_;
static Fl_Widget* widget_;
#if FLTK_ABI_VERSION >= 10301
static int margin_width_;
static int margin_height_;
static int wrap_width_;
#endif
};
#endif
//
// End of "$Id: Fl_Tooltip.H 9706 2012-11-06 20:46:14Z matt $".
//
- © 1998-2012 by Bill Spitzak and others.