summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Tooltip.cxx6
-rw-r--r--src/fl_show_colormap.cxx7
-rw-r--r--src/glut_compatability.cxx6
3 files changed, 13 insertions, 6 deletions
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx
index 8825da797..8df5320f1 100644
--- a/src/Fl_Tooltip.cxx
+++ b/src/Fl_Tooltip.cxx
@@ -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();
}
diff --git a/src/fl_show_colormap.cxx b/src/fl_show_colormap.cxx
index 133f074c3..e3ea7259a 100644
--- a/src/fl_show_colormap.cxx
+++ b/src/fl_show_colormap.cxx
@@ -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;
diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx
index 8fe7ca900..0a46a6f34 100644
--- a/src/glut_compatability.cxx
+++ b/src/glut_compatability.cxx
@@ -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;