Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Tooltip.h

00001 /*
00002  * $Id: Fl_Tooltip.h,v 1.9 2003/07/03 20:36:35 laza2000 Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_TOOLTIP_H_
00023 #define _FL_TOOLTIP_H_
00024 
00025 #include "Fl.h"
00026 #include "Fl_Widget.h"
00027 
00029 class FL_API Fl_Tooltip {
00030     static Fl_Widget* widget;
00031 public:
00032   static float delay() { return delay_; }
00033   static void delay(float f) { delay_ = f; }
00034 
00035   static bool enabled() { return enabled_; }
00036   static void enable(bool b = true) { enabled_ = b; }
00037   static void disable() { enabled_ = false; }
00038 
00039   static bool effects() { return effects_; }
00040   static void effects(bool v) { effects_ = v; }
00041 
00042   static int effect_type() { return effect_type_; }
00043   static void effect_type(int v) { effect_type_ = v; }
00044 
00045   typedef const char* (*Generator)(Fl_Widget*, void*);
00046   static void enter(Fl_Widget* w, int X, int Y, int W, int H, Generator, void* = 0);
00047   static void enter(Fl_Widget* w, int X, int Y, int W, int H, const char* t) { enter(w, X, Y, W, H, 0, (void*)t); }
00048   static void enter(Fl_Widget* w);
00049   static void exit();
00050   static Fl_Widget* current() {return widget;}
00051   static void current(Fl_Widget*);
00052 
00053   static Fl_Named_Style* default_style;
00054   static Fl_Font font()     { return default_style->label_font; }
00055   static void font(Fl_Font i)   { default_style->label_font = i; }
00056   static unsigned size()    { return default_style->label_size; }
00057   static void size(unsigned s)  { default_style->label_size = s; }
00058   static void color(Fl_Color c) { default_style->color = c; }
00059   static Fl_Color color()   { return default_style->color; }
00060   static void textcolor(Fl_Color c) {default_style->label_color = c; }
00061   static Fl_Color textcolor()   { return default_style->label_color; }
00062   static void boxtype(Fl_Boxtype b) {default_style->box = b; }
00063   static Fl_Boxtype boxtype()   { return default_style->box; }
00064 
00065 private:
00066   static float delay_;
00067   static bool enabled_;
00068   static bool effects_;
00069   static int effect_type_;
00070   static void tooltip_timeout(void*);
00071 };
00072 
00073 #endif

Generated on Thu Jul 31 15:33:45 2003 for eFLTK by doxygen1.2.15