Doxygen documentation increment 2: adding more classes, comments not referenced in original doc. hide public enter_(), exit_() functions, made friend Fl_Widget::tooltip(), these should not appear in the public member dox. documentation. added static variables initialisation to 0 in glut for msvc platform compilers."
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6261 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
a99524ef2d
commit
e6652d845a
@ -33,21 +33,21 @@
|
||||
|
||||
/**
|
||||
The Fl_Tooltip class provides tooltip support for
|
||||
all FLTK widgets.
|
||||
all FLTK widgets. It contains only static methods.
|
||||
*/
|
||||
class FL_EXPORT Fl_Tooltip {
|
||||
public:
|
||||
/** Gets the tooltip delay. The default delay is 1.0 seconds. */
|
||||
static float delay() { return delay_; }
|
||||
static float delay() { return delay_; }
|
||||
/** Sets the tooltip delay. The default delay is 1.0 seconds. */
|
||||
static void delay(float f) { delay_ = f; }
|
||||
/**
|
||||
Gets or sets the tooltip hover delay, the delay between tooltips.
|
||||
Gets the tooltip hover delay, the delay between tooltips.
|
||||
The default delay is 0.2 seconds.
|
||||
*/
|
||||
static float hoverdelay() { return hoverdelay_; }
|
||||
/**
|
||||
Gets or sets the tooltip hover delay, the delay between tooltips.
|
||||
Sets the tooltip hover delay, the delay between tooltips.
|
||||
The default delay is 0.2 seconds.
|
||||
*/
|
||||
static void hoverdelay(float f) { hoverdelay_ = f; }
|
||||
@ -82,18 +82,21 @@ public:
|
||||
static void textcolor(unsigned c) { textcolor_ = c; }
|
||||
|
||||
// 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 *);
|
||||
static void enter_(Fl_Widget* w);
|
||||
static void exit_(Fl_Widget *w);
|
||||
|
||||
private:
|
||||
static float delay_;
|
||||
static float hoverdelay_;
|
||||
static float delay_; //!< delay before a tooltip is shown
|
||||
static float hoverdelay_; //!< delay between tooltips
|
||||
static int enabled_;
|
||||
static unsigned color_;
|
||||
static unsigned textcolor_;
|
||||
static Fl_Font font_;
|
||||
static Fl_Fontsize size_;
|
||||
static Fl_Widget* widget_;
|
||||
static Fl_Widget* widget_; //!< Keeps track of the current target widget
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -42,13 +42,14 @@
|
||||
|
||||
# include "gl.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// GLUT is emulated using this window class and these static variables
|
||||
// (plus several more static variables hidden in glut_compatability.cxx):
|
||||
|
||||
# include "Fl.H"
|
||||
# include "Fl_Gl_Window.H"
|
||||
|
||||
/**
|
||||
GLUT is emulated using this window class and these static variables
|
||||
(plus several more static variables hidden in glut_compatability.cxx):
|
||||
*/
|
||||
class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window {
|
||||
void _init();
|
||||
int mouse_down;
|
||||
|
@ -44,15 +44,19 @@ Fl_Fontsize Fl_Tooltip::size_ = FL_NORMAL_SIZE;
|
||||
#define MAX_WIDTH 400
|
||||
|
||||
static const char* tip;
|
||||
|
||||
/**
|
||||
This widget creates a tooltip box window, with no caption.
|
||||
*/
|
||||
class Fl_TooltipBox : public Fl_Menu_Window {
|
||||
public:
|
||||
/** Creates the box window */
|
||||
Fl_TooltipBox() : Fl_Menu_Window(0, 0) {
|
||||
set_override();
|
||||
end();
|
||||
}
|
||||
void draw();
|
||||
void layout();
|
||||
/** Shows the tooltip windows only if a tooltip text is available. */
|
||||
void show() {
|
||||
if (tip) Fl_Menu_Window::show();
|
||||
}
|
||||
|
@ -25,9 +25,6 @@
|
||||
// http://www.fltk.org/str.php
|
||||
//
|
||||
|
||||
// Select a color from the colormap.
|
||||
// Pretty much unchanged from Forms.
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Single_Window.H>
|
||||
#include <FL/fl_draw.H>
|
||||
@ -37,6 +34,10 @@
|
||||
#define BOXSIZE 14
|
||||
#define BORDER 4
|
||||
|
||||
/**
|
||||
This widget creates a modal window for selecting a color from the colormap.
|
||||
Pretty much unchanged from Forms.
|
||||
*/
|
||||
class ColorMenu : public Fl_Window {
|
||||
Fl_Color initial;
|
||||
Fl_Color which, previous;
|
||||
|
@ -185,9 +185,11 @@ void Fl_Glut_Window::_init() {
|
||||
mode(glut_mode);
|
||||
}
|
||||
|
||||
/** Creates a glut windows, registers to the glut windows list.*/
|
||||
Fl_Glut_Window::Fl_Glut_Window(int W, int H, const char *t) :
|
||||
Fl_Gl_Window(W,H,t) {_init();}
|
||||
|
||||
/** Creates a glut windows, registers to the glut windows list.*/
|
||||
Fl_Glut_Window::Fl_Glut_Window(int X,int Y,int W,int H, const char *t) :
|
||||
Fl_Gl_Window(X,Y,W,H,t) {_init();}
|
||||
|
||||
@ -215,7 +217,7 @@ void glutMainLoop() {Fl::run();}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
static int initx, inity, initw=300, inith=300, initpos;
|
||||
static int initx=0, inity=0, initw=300, inith=300, initpos=0;
|
||||
|
||||
void glutInitWindowPosition(int x, int y) {
|
||||
initx = x; inity = y; initpos = 1;
|
||||
@ -257,7 +259,7 @@ int glutCreateSubWindow(int win, int x, int y, int w, int h) {
|
||||
W->make_current();
|
||||
return W->number;
|
||||
}
|
||||
|
||||
/** Destroys the glut window, first unregister it from the glut windows list */
|
||||
Fl_Glut_Window::~Fl_Glut_Window() {
|
||||
if (glut_window == this) glut_window = 0;
|
||||
windows[number] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user