From f09e17c3c564e8310125a10c03397cbf473ff643 Mon Sep 17 00:00:00 2001
From: Albrecht Schlosser
Date: Wed, 1 Jul 2020 18:03:10 +0200
Subject: Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files
The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
---
test/CMakeLists.txt | 8 +-
test/CubeMain.cxx | 19 +-
test/CubeView.cxx | 18 +-
test/CubeView.h | 18 +-
test/Makefile | 8 +-
test/README.txt | 18 +-
test/adjuster.cxx | 12 +-
test/animated.cxx | 12 +-
test/arc.cxx | 13 +-
test/ask.cxx | 24 +-
test/bitmap.cxx | 12 +-
test/blocks.cxx | 367 +++++----
test/boxtype.cxx | 38 +-
test/browser.cxx | 58 +-
test/button.cxx | 12 +-
test/buttons.cxx | 12 +-
test/cairo_test.cxx | 14 +-
test/checkers.cxx | 306 ++++----
test/checkers_pieces.fl | 12 +-
test/clock.cxx | 12 +-
test/colbrowser.cxx | 92 ++-
test/color_chooser.cxx | 16 +-
test/connect.cxx | 14 +-
test/cube.cxx | 20 +-
test/cursor.cxx | 12 +-
test/curve.cxx | 12 +-
test/demo.cxx | 86 +--
test/device.cxx | 177 +++--
test/doublebuffer.cxx | 12 +-
test/editor.cxx | 364 +++++----
test/file_chooser.cxx | 125 ++-
test/fonts.cxx | 14 +-
test/forms.cxx | 12 +-
test/fractals.cxx | 72 +-
test/fracviewer.cxx | 62 +-
test/fracviewer.h | 12 +-
test/fromdos.c | 8 +-
test/fullscreen.cxx | 36 +-
test/gl_overlay.cxx | 14 +-
test/glpuzzle.cxx | 36 +-
test/hello.cxx | 12 +-
test/help_dialog.cxx | 24 +-
test/help_dialog.html | 32 +-
test/icon.cxx | 6 +-
test/iconize.cxx | 12 +-
test/image.cxx | 20 +-
test/input.cxx | 14 +-
test/input_choice.cxx | 13 +-
test/keyboard.cxx | 26 +-
test/keyboard.h | 15 +-
test/label.cxx | 12 +-
test/line_style.cxx | 40 +-
test/list_visuals.cxx | 42 +-
test/mandelbrot.cxx | 76 +-
test/mandelbrot.h | 12 +-
test/menubar.cxx | 152 ++--
test/message.cxx | 18 +-
test/minimum.cxx | 12 +-
test/native-filechooser.cxx | 68 +-
test/navigation.cxx | 16 +-
test/offscreen.cxx | 68 +-
test/output.cxx | 12 +-
test/overlay.cxx | 12 +-
test/pack.cxx | 12 +-
test/pixmap.cxx | 12 +-
test/pixmap_browser.cxx | 16 +-
test/resizebox.cxx | 12 +-
test/rgb.txt | 1504 ++++++++++++++++++-------------------
test/rotated_text.cxx | 14 +-
test/scroll.cxx | 14 +-
test/shape.cxx | 16 +-
test/subwindow.cxx | 28 +-
test/sudoku.cxx | 511 +++++++------
test/sudokurc.h | 2 +-
test/symbols.cxx | 12 +-
test/table.cxx | 130 ++--
test/threads.cxx | 25 +-
test/threads.h | 12 +-
test/tile.cxx | 12 +-
test/tiled_image.cxx | 14 +-
test/tree.fl | 142 ++--
test/twowin.cxx | 12 +-
test/unittest_about.cxx | 12 +-
test/unittest_circles.cxx | 16 +-
test/unittest_images.cxx | 40 +-
test/unittest_lines.cxx | 22 +-
test/unittest_points.cxx | 18 +-
test/unittest_rects.cxx | 22 +-
test/unittest_schemes.cxx | 412 +++++-----
test/unittest_scrollbarsize.cxx | 136 ++--
test/unittest_simple_terminal.cxx | 16 +-
test/unittest_symbol.cxx | 32 +-
test/unittest_text.cxx | 26 +-
test/unittest_viewport.cxx | 16 +-
test/unittests.cxx | 34 +-
test/utf8.cxx | 190 +++--
test/windowfocus.cxx | 16 +-
97 files changed, 2942 insertions(+), 3469 deletions(-)
(limited to 'test')
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 6e996a5a3..f47f33b93 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,6 +1,4 @@
#
-# "$Id$"
-#
# CMakeLists.txt used to build test and demo apps by the CMake build system
#
# Copyright 2004-2019 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
# 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
+# https://www.fltk.org/COPYING.php
#
-# Please report all bugs and problems on the following page:
+# Please see the following page on how to report bugs and issues:
#
-# http://www.fltk.org/str.php
+# https://www.fltk.org/bugs.php
#
#######################################################################
diff --git a/test/CubeMain.cxx b/test/CubeMain.cxx
index bcf3f8756..c2c0c6cfa 100644
--- a/test/CubeMain.cxx
+++ b/test/CubeMain.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// CubeView class .
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -24,17 +22,12 @@ int
main(int argc, char **argv) {
CubeViewUI *cvui=new CubeViewUI;
-
+
//Initial global objects.
-
+
Fl::visual(FL_DOUBLE|FL_INDEX);
cvui->show(argc, argv);
-
+
return Fl::run();
}
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/CubeView.cxx b/test/CubeView.cxx
index 39afa80c1..fda542aa0 100644
--- a/test/CubeView.cxx
+++ b/test/CubeView.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// CubeView class implementation for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include "CubeView.h"
@@ -34,10 +32,10 @@ CubeView::CubeView(int x,int y,int w,int h,const char *l)
size=10.0;
xshift=0.0;
yshift=0.0;
-
+
/* The cube definition. These are the vertices of a unit cube
* centered on the origin.*/
-
+
boxv0[0] = -0.5; boxv0[1] = -0.5; boxv0[2] = -0.5;
boxv1[0] = 0.5; boxv1[1] = -0.5; boxv1[2] = -0.5;
boxv2[0] = 0.5; boxv2[1] = 0.5; boxv2[2] = -0.5;
@@ -155,11 +153,7 @@ void CubeView::draw() {
glScalef(float(size),float(size),float(size));
drawCube();
-
+
glPopMatrix();
}
#endif /* HAVE_GL */
-
-//
-// End of "$Id$".
-//
diff --git a/test/CubeView.h b/test/CubeView.h
index 95d17ae48..5770538ac 100644
--- a/test/CubeView.h
+++ b/test/CubeView.h
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// CubeView class definitions for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#ifndef CUBEVIEW_H
@@ -47,7 +45,7 @@ public:
* initialize button in CubeViewUI.
*/
void v_angle(double angle){vAng=angle;}
-
+
// Return the rotation about the vertical (y ) axis.
double v_angle() const {return vAng;}
@@ -83,7 +81,7 @@ public:
* entities displayed in the cube view.
*
*/
- void draw();
+ void draw();
#endif /* HAVE_GL */
private:
@@ -97,7 +95,7 @@ private:
#else
void drawCube() { }
#endif /* HAVE_GL */
-
+
double vAng,hAng;
double xshift,yshift;
@@ -109,7 +107,3 @@ private:
};
#endif
-
-//
-// End of "$Id$".
-//
diff --git a/test/Makefile b/test/Makefile
index 66a25825c..d65895d64 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -9,9 +9,9 @@
#
# https://www.fltk.org/COPYING.php
#
-# Please report all bugs and problems on the following page:
+# Please see the following page on how to report bugs and issues:
#
-# https://www.fltk.org/str.php
+# https://www.fltk.org/bugs.php
#
include ../makeinclude
@@ -578,7 +578,3 @@ cairo_test$(EXEEXT): cairo_test.o
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(CAIROFLAGS) $(LDFLAGS) -o $@ cairo_test.o $(LINKFLTK) $(LINKFLTKCAIRO) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
-
-#
-# End of "$Id$".
-#
diff --git a/test/README.txt b/test/README.txt
index f979f1458..d57c46a16 100644
--- a/test/README.txt
+++ b/test/README.txt
@@ -11,23 +11,23 @@ may recognize this as a rewrite of an XForms program).
Some of the more interesting programs:
-fractals: A GLUT program with FL controls added to it
+fractals: A GLUT program with FL controls added to it
-glpuzzle: A GLUT program with no modifications
+glpuzzle: A GLUT program with no modifications
-fullscreen: Demo of how to make your window toggle to fill screen
+fullscreen: Demo of how to make your window toggle to fill screen
-list_visuals: necessary to debug X visual stuff
+list_visuals: necessary to debug X visual stuff
-mandelbrot: A true application, using panels built in Fluid
+mandelbrot: A true application, using panels built in Fluid
-menubar: Demo of how FL's menus work
+menubar: Demo of how FL's menus work
-shiny: Demo of drawing FL's controls using OpenGL
+shiny: Demo of drawing FL's controls using OpenGL
-forms: An XForms program to demonstrate emulation
+forms: An XForms program to demonstrate emulation
-colbrowser: Another XForms program that is actually useful
+colbrowser: Another XForms program that is actually useful
-----------------------------------------------------
diff --git a/test/adjuster.cxx b/test/adjuster.cxx
index 61abcdc0f..ba50c6112 100644
--- a/test/adjuster.cxx
+++ b/test/adjuster.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Adjuster test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -51,7 +49,3 @@ int main(int argc, char ** argv) {
window.show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/animated.cxx b/test/animated.cxx
index 442aa4495..1d7680c92 100644
--- a/test/animated.cxx
+++ b/test/animated.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Alpha rendering benchmark program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -149,7 +147,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/arc.cxx b/test/arc.cxx
index c6352ca48..3931c53fe 100644
--- a/test/arc.cxx
+++ b/test/arc.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Arc drawing test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -82,8 +80,3 @@ int main(int argc, char** argv) {
window.show(argc,argv);
return Fl::run();
}
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/ask.cxx b/test/ask.cxx
index 72d88ed2a..a3caea0ab 100644
--- a/test/ask.cxx
+++ b/test/ask.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Standard dialog test program for the Fast Light Tool Kit (FLTK).
//
// This also demonstrates how to trap attempts by the user to
@@ -12,11 +10,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -54,7 +52,7 @@ void window_callback(Fl_Widget *win, void*) {
fl_message_hotspot(0);
fl_message_title("note: no hotspot set for this dialog");
int rep = fl_choice("Are you sure you want to quit?",
- "Cancel", "Quit", "Dunno");
+ "Cancel", "Quit", "Dunno");
fl_message_hotspot(hotspot);
if (rep==1)
exit(0);
@@ -101,11 +99,11 @@ void timer_cb(void *) {
// pop up a message:
stop = fl_choice("Timeout. Click the 'Close' button.\n"
- "Note: this message was blocked in FLTK 1.3\n"
- "if another message window is open.\n"
- "This *should* be fixed in FLTK 1.4.0!\n"
- "This message should pop up every 5 seconds.",
- "Close", "Stop these funny popups", NULL);
+ "Note: this message was blocked in FLTK 1.3\n"
+ "if another message window is open.\n"
+ "This *should* be fixed in FLTK 1.4.0!\n"
+ "This message should pop up every 5 seconds.",
+ "Close", "Stop these funny popups", NULL);
}
int main(int argc, char **argv) {
@@ -135,7 +133,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/bitmap.cxx b/test/bitmap.cxx
index 71aff20c9..a798b4795 100644
--- a/test/bitmap.cxx
+++ b/test/bitmap.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Bitmap label test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -132,7 +130,3 @@ int main(int argc, char **argv) {
w->show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/blocks.cxx b/test/blocks.cxx
index 6135313ba..7faa4c903 100644
--- a/test/blocks.cxx
+++ b/test/blocks.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// "Block Attack!" scrolling blocks game using the Fast Light Tool Kit (FLTK).
//
// Copyright 2006-2018 by Michael Sweet.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -50,10 +48,10 @@
# include
#endif // _WIN32
-#define BLOCK_COLS 20
-#define BLOCK_ROWS 10
-#define BLOCK_SIZE 32
-#define BLOCK_BLAST 100
+#define BLOCK_COLS 20
+#define BLOCK_ROWS 10
+#define BLOCK_SIZE 32
+#define BLOCK_BLAST 100
// These factors are used to fine-tune the game when these events
// occur by multiplying the timer interval with the given factor:
@@ -62,12 +60,12 @@
// (b) click on a "normal block", destroy this one and adjacent blocks
// (c) click on a "bomb", destroy all blocks of the same color
-#define LEVEL_FACTOR 0.90 // was: 0.95
-#define NORMAL_FACTOR 0.999
-#define BOMB_FACTOR 0.995
+#define LEVEL_FACTOR 0.90 // was: 0.95
+#define NORMAL_FACTOR 0.999
+#define BOMB_FACTOR 0.995
// Set this to 1 to debug the timer callback (should be 0)
-#define DEBUG_TIMER 0
+#define DEBUG_TIMER 0
#include "pixmaps/blast.xpm"
Fl_Pixmap blast_pixmap(blast_xpm);
@@ -163,18 +161,18 @@ class BlockSound {
int remaining;
static OSStatus audio_cb(AudioDeviceID device,
- const AudioTimeStamp *current_time,
- const AudioBufferList *data_in,
- const AudioTimeStamp *time_in,
- AudioBufferList *data_out,
- const AudioTimeStamp *time_out,
- void *client_data);
+ const AudioTimeStamp *current_time,
+ const AudioBufferList *data_in,
+ const AudioTimeStamp *time_in,
+ AudioBufferList *data_out,
+ const AudioTimeStamp *time_out,
+ void *client_data);
#elif defined(_WIN32)
- HWAVEOUT device;
- HGLOBAL header_handle;
- LPWAVEHDR header_ptr;
- HGLOBAL data_handle;
- LPSTR data_ptr;
+ HWAVEOUT device;
+ HGLOBAL header_handle;
+ LPWAVEHDR header_ptr;
+ HGLOBAL data_handle;
+ LPSTR data_ptr;
#else
# ifdef HAVE_ALSA_ASOUNDLIB_H
@@ -191,7 +189,7 @@ class BlockSound {
BlockSound();
~BlockSound();
- void play_explosion(float duration);
+ void play_explosion(float duration);
};
// Sound class globals...
@@ -209,19 +207,19 @@ BlockSound::BlockSound() {
UInt32 size = sizeof(device);
if (AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
- &size, (void *)&device) != noErr) return;
+ &size, (void *)&device) != noErr) return;
size = sizeof(format);
if (AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyStreamFormat,
- &size, &format) != noErr) return;
+ &size, &format) != noErr) return;
// Set up a format we like...
- format.mSampleRate = 44100.0; // 44.1kHz
- format.mChannelsPerFrame = 2; // stereo
+ format.mSampleRate = 44100.0; // 44.1kHz
+ format.mChannelsPerFrame = 2; // stereo
if (AudioDeviceSetProperty(device, NULL, 0, false,
kAudioDevicePropertyStreamFormat,
- sizeof(format), &format) != noErr) return;
+ sizeof(format), &format) != noErr) return;
// Check we got linear pcm - what to do if we did not ???
if (format.mFormatID != kAudioFormatLinearPCM) return;
@@ -238,7 +236,7 @@ BlockSound::BlockSound() {
sample_size = (int)format.mSampleRate;
#elif defined(_WIN32)
- WAVEFORMATEX format;
+ WAVEFORMATEX format;
memset(&format, 0, sizeof(format));
format.cbSize = sizeof(format);
@@ -363,12 +361,12 @@ BlockSound::~BlockSound() {
#ifdef __APPLE__
// Callback function for writing audio data...
OSStatus BlockSound::audio_cb(AudioDeviceID device,
- const AudioTimeStamp *current_time,
- const AudioBufferList *data_in,
- const AudioTimeStamp *time_in,
- AudioBufferList *data_out,
- const AudioTimeStamp *time_out,
- void *client_data) {
+ const AudioTimeStamp *current_time,
+ const AudioBufferList *data_in,
+ const AudioTimeStamp *time_in,
+ AudioBufferList *data_out,
+ const AudioTimeStamp *time_out,
+ void *client_data) {
BlockSound *ss = (BlockSound *)client_data;
int count;
float *buffer;
@@ -440,45 +438,45 @@ class BlockWindow : public Fl_Double_Window {
public:
struct Block {
- int color;
- bool bomb;
- int y;
+ int color;
+ bool bomb;
+ int y;
};
struct Column {
- int num_blocks;
- Block blocks[BLOCK_ROWS];
- int x;
+ int num_blocks;
+ Block blocks[BLOCK_ROWS];
+ int x;
};
private:
- Fl_Button *help_button_,
- *play_button_;
-
- int num_columns_;
- Column columns_[BLOCK_COLS];
- int count_;
- bool help_;
- int high_score_;
- float interval_;
- int level_;
- int num_colors_;
- int opened_columns_;
- bool paused_;
- static Fl_Preferences prefs_;
- int score_;
- BlockSound *sound_;
- char title_[255];
- int title_y_;
-
- void _BlockWindow();
- int bomb(int color);
- int click(int col, int row);
- static void help_cb(Fl_Widget *wi, BlockWindow *bw);
- void init();
- static void play_cb(Fl_Widget *wi, BlockWindow *bw);
- static void timeout_cb(BlockWindow *bw);
+ Fl_Button *help_button_,
+ *play_button_;
+
+ int num_columns_;
+ Column columns_[BLOCK_COLS];
+ int count_;
+ bool help_;
+ int high_score_;
+ float interval_;
+ int level_;
+ int num_colors_;
+ int opened_columns_;
+ bool paused_;
+ static Fl_Preferences prefs_;
+ int score_;
+ BlockSound *sound_;
+ char title_[255];
+ int title_y_;
+
+ void _BlockWindow();
+ int bomb(int color);
+ int click(int col, int row);
+ static void help_cb(Fl_Widget *wi, BlockWindow *bw);
+ void init();
+ static void play_cb(Fl_Widget *wi, BlockWindow *bw);
+ static void timeout_cb(BlockWindow *bw);
public:
@@ -486,24 +484,24 @@ class BlockWindow : public Fl_Double_Window {
BlockWindow(int W, int H, const char *L = 0);
~BlockWindow();
- void draw();
- int handle(int event);
- void new_game();
- int score() { return (score_); }
+ void draw();
+ int handle(int event);
+ void new_game();
+ int score() { return (score_); }
void up_level();
};
-Fl_Preferences BlockWindow::prefs_(Fl_Preferences::USER, "fltk.org", "blocks");
+Fl_Preferences BlockWindow::prefs_(Fl_Preferences::USER, "fltk.org", "blocks");
int main(int argc, char *argv[]) {
Fl::scheme("plastic");
Fl::visible_focus(0);
- BlockWindow *bw = new BlockWindow(BLOCK_COLS * BLOCK_SIZE,
+ BlockWindow *bw = new BlockWindow(BLOCK_COLS * BLOCK_SIZE,
BLOCK_ROWS * BLOCK_SIZE + 20,
- "Block Attack!");
+ "Block Attack!");
bw->show(argc, argv);
@@ -554,10 +552,10 @@ void BlockWindow::_BlockWindow() {
// Bomb all blocks of a given color and return the number of affected blocks
int BlockWindow::bomb(int color) {
- int j, k;
- int count;
- Block *b;
- Column *c;
+ int j, k;
+ int count;
+ Block *b;
+ Column *c;
if (color >= BLOCK_BLAST) return (0);
@@ -566,7 +564,7 @@ int BlockWindow::bomb(int color) {
for (k = c->num_blocks, b = c->blocks; k > 0; k --, b ++)
if (b->color == color) {
b->color = -color;
- count ++;
+ count ++;
}
return (count);
@@ -576,9 +574,9 @@ int BlockWindow::bomb(int color) {
// Tag all blocks connected to the clicked block and return the number
// of affected blocks
int BlockWindow::click(int col, int row) {
- Block *b;
- Column *c;
- int count, color;
+ Block *b;
+ Column *c;
+ int count, color;
c = columns_ + col;
@@ -619,9 +617,9 @@ int BlockWindow::click(int col, int row) {
// Draw the block window...
void BlockWindow::draw() {
- int j, k, xx, yy;
- Block *b;
- Column *c;
+ int j, k, xx, yy;
+ Block *b;
+ Column *c;
// Draw the blocks...
@@ -635,14 +633,14 @@ void BlockWindow::draw() {
yy = h() - BLOCK_SIZE - b->y;
if (b->color >= BLOCK_BLAST) {
- b->color ++;
+ b->color ++;
blast_pixmap.draw(xx, yy);
} else if (b->color < 0) {
if (b->bomb) bomb_pixmaps[-b->color - 1]->draw(xx, yy);
- else normal_pixmaps[-b->color - 1]->draw(xx, yy);
+ else normal_pixmaps[-b->color - 1]->draw(xx, yy);
} else {
if (b->bomb) bomb_pixmaps[b->color - 1]->draw(xx, yy);
- else normal_pixmaps[b->color - 1]->draw(xx, yy);
+ else normal_pixmaps[b->color - 1]->draw(xx, yy);
}
}
@@ -675,27 +673,27 @@ void BlockWindow::draw() {
} else {
if (interval_ < 0.0) {
#ifdef DEBUG
- // Show sample waveform...
- short *sample_ptr;
+ // Show sample waveform...
+ short *sample_ptr;
- for (i = 0; i < 2; i++) {
- fl_color(FL_RED + i);
- fl_begin_line();
- for (j = 0, sample_ptr = sound_->sample_data + i;
+ for (i = 0; i < 2; i++) {
+ fl_color(FL_RED + i);
+ fl_begin_line();
+ for (j = 0, sample_ptr = sound_->sample_data + i;
j < sound_->sample_size;
- j ++, sample_ptr += 2)
- fl_vertex(j * w() / sound_->sample_size,
- *sample_ptr * h() / 4 / 65534 + h() / 2);
- fl_end_line();
- }
+ j ++, sample_ptr += 2)
+ fl_vertex(j * w() / sound_->sample_size,
+ *sample_ptr * h() / 4 / 65534 + h() / 2);
+ fl_end_line();
+ }
#endif // DEBUG
- if (num_columns_ && (time(NULL) & 7) < 4)
- s = "Game Over";
- else
- s = "Block Attack!\nby Michael R Sweet";
+ if (num_columns_ && (time(NULL) & 7) < 4)
+ s = "Game Over";
+ else
+ s = "Block Attack!\nby Michael R Sweet";
} else
- s = "Paused";
+ s = "Paused";
fl_font(FL_HELVETICA_BOLD, 32);
fl_color(FL_BLACK);
@@ -734,9 +732,9 @@ void BlockWindow::draw() {
// Handle mouse clicks, etc.
int BlockWindow::handle(int event) {
- int j, k, mx, my, count;
- Block *b;
- Column *c;
+ int j, k, mx, my, count;
+ Block *b;
+ Column *c;
if (Fl_Double_Window::handle(event)) return (1);
@@ -748,19 +746,19 @@ int BlockWindow::handle(int event) {
// '+': raise level
if (Fl::event_text() &&
- !Fl::event_state(FL_CTRL | FL_ALT | FL_META) &&
- !strcmp(Fl::event_text(), "+")) {
- up_level();
- return (1);
+ !Fl::event_state(FL_CTRL | FL_ALT | FL_META) &&
+ !strcmp(Fl::event_text(), "+")) {
+ up_level();
+ return (1);
}
// ALT + SHIFT + 'H': clear highscore
if (Fl::event_text() &&
- (Fl::event_state() & (FL_ALT | FL_SHIFT)) == (FL_ALT | FL_SHIFT) &&
- !strcmp(Fl::event_text(), "H")) {
- high_score_ = score_;
- prefs_.set("high_score", high_score_);
- return (1);
+ (Fl::event_state() & (FL_ALT | FL_SHIFT)) == (FL_ALT | FL_SHIFT) &&
+ !strcmp(Fl::event_text(), "H")) {
+ high_score_ = score_;
+ prefs_.set("high_score", high_score_);
+ return (1);
}
break;
@@ -771,41 +769,41 @@ int BlockWindow::handle(int event) {
b = 0;
for (j = 0, c = columns_; !count && j < num_columns_; j ++, c ++)
- for (k = 0, b = c->blocks; k < c->num_blocks; k ++, b ++)
- if (mx >= c->x && mx < (c->x + BLOCK_SIZE) &&
- my >= b->y && my < (b->y + BLOCK_SIZE)) {
- if (b->bomb) count = bomb(b->color);
- else count = click(j, k);
- break;
- }
+ for (k = 0, b = c->blocks; k < c->num_blocks; k ++, b ++)
+ if (mx >= c->x && mx < (c->x + BLOCK_SIZE) &&
+ my >= b->y && my < (b->y + BLOCK_SIZE)) {
+ if (b->bomb) count = bomb(b->color);
+ else count = click(j, k);
+ break;
+ }
if (count < 2) {
- for (j = 0, c = columns_; j < num_columns_; j ++, c ++)
- for (k = 0, b = c->blocks; k < c->num_blocks; k ++, b ++)
- if (b->color < 0) b->color = -b->color;
+ for (j = 0, c = columns_; j < num_columns_; j ++, c ++)
+ for (k = 0, b = c->blocks; k < c->num_blocks; k ++, b ++)
+ if (b->color < 0) b->color = -b->color;
} else {
- count --;
+ count --;
- if (b->bomb) {
- sound_->play_explosion(0.19 + 0.005 * count);
+ if (b->bomb) {
+ sound_->play_explosion(0.19 + 0.005 * count);
- interval_ *= BOMB_FACTOR;
- score_ += count;
- } else {
- sound_->play_explosion(0.09 + 0.005 * count);
+ interval_ *= BOMB_FACTOR;
+ score_ += count;
+ } else {
+ sound_->play_explosion(0.09 + 0.005 * count);
- interval_ *= NORMAL_FACTOR;
- score_ += count * count;
- }
+ interval_ *= NORMAL_FACTOR;
+ score_ += count * count;
+ }
- if (score_ > high_score_) {
- high_score_ = score_;
- prefs_.set("high_score", high_score_);
- }
+ if (score_ > high_score_) {
+ high_score_ = score_;
+ prefs_.set("high_score", high_score_);
+ }
- for (j = 0, c = columns_; j < num_columns_; j ++, c ++)
- for (k = 0, b = c->blocks; k < c->num_blocks; k ++, b ++)
- if (b->color < 0) b->color = BLOCK_BLAST;
+ for (j = 0, c = columns_; j < num_columns_; j ++, c ++)
+ for (k = 0, b = c->blocks; k < c->num_blocks; k ++, b ++)
+ if (b->color < 0) b->color = BLOCK_BLAST;
}
return (1);
@@ -880,10 +878,10 @@ void BlockWindow::up_level() {
// Animate the game...
void BlockWindow::timeout_cb(BlockWindow *bw) {
- int i, j;
- Block *b;
- Column *c;
- int lastx, lasty;
+ int i, j;
+ Block *b;
+ Column *c;
+ int lastx, lasty;
#if DEBUG_TIMER
static double lasttime;
@@ -911,9 +909,9 @@ void BlockWindow::timeout_cb(BlockWindow *bw) {
if (bw->interval_ > 0) { // game is active
if (bw->level_ != level) {
if (ntime > 0) {
- printf("*** average delta time = %9.6f, n =%4d, level %d, interval %f\n",
- delta_sum / ntime, ntime, level, interval);
- fflush(stdout);
+ printf("*** average delta time = %9.6f, n =%4d, level %d, interval %f\n",
+ delta_sum / ntime, ntime, level, interval);
+ fflush(stdout);
}
delta_sum = 0; // reset average
ntime = 0;
@@ -925,7 +923,7 @@ void BlockWindow::timeout_cb(BlockWindow *bw) {
delta += 60;
printf("%9.6f (%+f - %f = %9.6f), level: %d\n",
- curtime, delta, interval, delta - interval, level);
+ curtime, delta, interval, delta - interval, level);
fflush(stdout);
interval = bw->interval_;
@@ -946,26 +944,26 @@ void BlockWindow::timeout_cb(BlockWindow *bw) {
if (b->color > (BLOCK_BLAST + 1)) {
bw->redraw();
- c->num_blocks --;
+ c->num_blocks --;
- if (j < c->num_blocks) {
- memmove(b, b + 1, (c->num_blocks - j) * sizeof(Block));
- }
+ if (j < c->num_blocks) {
+ memmove(b, b + 1, (c->num_blocks - j) * sizeof(Block));
+ }
- j --;
- b --;
+ j --;
+ b --;
- if (!c->num_blocks) {
- bw->num_columns_ --;
+ if (!c->num_blocks) {
+ bw->num_columns_ --;
- if (i < bw->num_columns_) {
- memmove(c, c + 1, (bw->num_columns_ - i) * sizeof(Column));
+ if (i < bw->num_columns_) {
+ memmove(c, c + 1, (bw->num_columns_ - i) * sizeof(Column));
}
- i --;
- c --;
- j = c->num_blocks;
- }
+ i --;
+ c --;
+ j = c->num_blocks;
+ }
}
// Let the rest of the blocks fall and/or move...
@@ -1007,31 +1005,31 @@ void BlockWindow::timeout_cb(BlockWindow *bw) {
bw->count_ = BLOCK_SIZE;
if (bw->num_columns_ == BLOCK_COLS) {
- bw->interval_ = -1.0;
- bw->sound_->play_explosion(0.8);
- bw->play_button_->label("@>");
+ bw->interval_ = -1.0;
+ bw->sound_->play_explosion(0.8);
+ bw->play_button_->label("@>");
} else {
- bw->opened_columns_ ++;
+ bw->opened_columns_ ++;
- if (bw->opened_columns_ > (2 * BLOCK_COLS)) {
+ if (bw->opened_columns_ > (2 * BLOCK_COLS)) {
bw->up_level();
- }
+ }
- c = bw->columns_;
+ c = bw->columns_;
- if (bw->num_columns_) {
+ if (bw->num_columns_) {
memmove(c + 1, c, bw->num_columns_ * sizeof(Column));
- }
+ }
- bw->num_columns_ ++;
- c->x = 0;
- c->num_blocks = BLOCK_ROWS;
+ bw->num_columns_ ++;
+ c->x = 0;
+ c->num_blocks = BLOCK_ROWS;
- for (j = 0, b = c->blocks; j < BLOCK_ROWS; j ++, b ++) {
+ for (j = 0, b = c->blocks; j < BLOCK_ROWS; j ++, b ++) {
b->bomb = bw->num_colors_ > 3 && (rand() & 127) < bw->num_colors_;
b->color = 1 + (rand() % bw->num_colors_);
- b->y = j * (BLOCK_SIZE + 8) + 24;
- }
+ b->y = j * (BLOCK_SIZE + 8) + 24;
+ }
}
}
} else {
@@ -1066,8 +1064,3 @@ void BlockWindow::timeout_cb(BlockWindow *bw) {
Fl::repeat_timeout(0.1, (Fl_Timeout_Handler)timeout_cb, (void *)bw);
}
}
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/boxtype.cxx b/test/boxtype.cxx
index d344db7a5..8bcd1b0ed 100644
--- a/test/boxtype.cxx
+++ b/test/boxtype.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Boxtype test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -57,19 +55,19 @@ class BoxGroup : public Fl_Group {
void draw() {
draw_box();
if (outline + box_bg) { // outline or box_bg or both
- Fl_Widget*const* a = array();
- for (int i=children(); i--;) {
- Fl_Widget& o = **a++;
- if (outline) {
- fl_color(FL_RED);
- fl_rect(o.x()-1,o.y()-1,o.w()+2,o.h()+2);
- }
- if (box_bg) {
- fl_color(FL_WHITE);
- fl_rectf(o.x(),o.y(),o.w(),o.h());
- }
- fl_color(FL_BLACK);
- }
+ Fl_Widget*const* a = array();
+ for (int i=children(); i--;) {
+ Fl_Widget& o = **a++;
+ if (outline) {
+ fl_color(FL_RED);
+ fl_rect(o.x()-1,o.y()-1,o.w()+2,o.h()+2);
+ }
+ if (box_bg) {
+ fl_color(FL_WHITE);
+ fl_rectf(o.x(),o.y(),o.w(),o.h());
+ }
+ fl_color(FL_BLACK);
+ }
} // outline or box_bg or both
Fl_Group::draw_children();
} // draw()
@@ -178,7 +176,3 @@ int main(int argc, char ** argv) {
window->show();
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/browser.cxx b/test/browser.cxx
index 749a7ed83..23d84e7d8 100644
--- a/test/browser.cxx
+++ b/test/browser.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Browser test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
/*
@@ -53,11 +51,11 @@ That was a blank line above this.
#s## start line with '#'
#s#.# alternative start line with '#'
- You should try different browser types:
- Fl_Browser
- Fl_Select_Browser
- Fl_Hold_Browser
- Fl_Multi_Browser
+ You should try different browser types:
+ Fl_Browser
+ Fl_Select_Browser
+ Fl_Hold_Browser
+ Fl_Multi_Browser
*/
#include
@@ -74,15 +72,15 @@ That was a blank line above this.
#include
Fl_Select_Browser *browser;
-Fl_Button *top,
- *bottom,
- *middle,
- *visible,
- *swap,
- *sort;
+Fl_Button *top,
+ *bottom,
+ *middle,
+ *visible,
+ *swap,
+ *sort;
Fl_Choice *btype;
Fl_Choice *wtype;
-Fl_Int_Input *field;
+Fl_Int_Input *field;
Fl_Simple_Terminal *tty = 0;
typedef struct {
@@ -106,7 +104,7 @@ WhenItem when_items[] = {
void b_cb(Fl_Widget* o, void*) {
tty->printf("callback, selection = \033[31m%d\033[0m, event_clicks = \033[32m%d\033[0m\n",
- ((Fl_Browser*)o)->value(), Fl::event_clicks());
+ ((Fl_Browser*)o)->value(), Fl::event_clicks());
}
void show_cb(Fl_Widget *o, void *) {
@@ -130,15 +128,15 @@ void show_cb(Fl_Widget *o, void *) {
void swap_cb(Fl_Widget *, void *) {
int a = -1, b = -1;
- for ( int t=0; tsize(); t++ ) { // find two selected items
+ for ( int t=0; tsize(); t++ ) { // find two selected items
if ( browser->selected(t) ) {
if ( a < 0 )
- { a = t; }
- else
- { b = t; break; }
+ { a = t; }
+ else
+ { b = t; break; }
}
}
- browser->swap(a, b); // swap them
+ browser->swap(a, b); // swap them
}
void sort_cb(Fl_Widget *, void *) {
@@ -147,7 +145,7 @@ void sort_cb(Fl_Widget *, void *) {
void btype_cb(Fl_Widget *, void *) {
for ( int t=1; t<=browser->size(); t++ ) browser->select(t,0);
- browser->select(1,0); // leave focus box on first line
+ browser->select(1,0); // leave focus box on first line
if ( strcmp(btype->text(),"Normal")==0) browser->type(FL_NORMAL_BROWSER);
else if ( strcmp(btype->text(),"Select")==0) browser->type(FL_SELECT_BROWSER);
else if ( strcmp(btype->text(),"Hold" )==0) browser->type(FL_HOLD_BROWSER);
@@ -157,7 +155,7 @@ void btype_cb(Fl_Widget *, void *) {
void wtype_cb(Fl_Widget *, void *) {
if ( wtype->value() < 0 ) return;
- browser->when( when_items[wtype->value()].wvalue ); // when value based on array
+ browser->when( when_items[wtype->value()].wvalue ); // when value based on array
}
int main(int argc, char **argv) {
@@ -176,10 +174,10 @@ int main(int argc, char **argv) {
if (!browser->load(fname)) {
int done = 0;
#ifdef _MSC_VER
- // if 'browser' was started from the VisualC environment in Win32,
- // the current directory is set to the environment itself,
+ // if 'browser' was started from the VisualC environment in Win32,
+ // the current directory is set to the environment itself,
// so we need to correct the browser file path
- if ( i == argc )
+ if ( i == argc )
{
fname = "../test/browser.cxx";
done = browser->load(fname);
@@ -253,7 +251,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-//
-// End of "$Id$".
-//
-
diff --git a/test/button.cxx b/test/button.cxx
index f9ade8754..4787dc177 100644
--- a/test/button.cxx
+++ b/test/button.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Button/callback test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -55,7 +53,3 @@ int main(int argc, char ** argv) {
#endif
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/buttons.cxx b/test/buttons.cxx
index a2a6cb6bd..107c4a42c 100644
--- a/test/buttons.cxx
+++ b/test/buttons.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Another button test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -41,7 +39,3 @@ int main(int argc, char ** argv) {
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/cairo_test.cxx b/test/cairo_test.cxx
index 30cde3498..d2808e8d8 100644
--- a/test/cairo_test.cxx
+++ b/test/cairo_test.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Cairo drawing test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2019 by Bill Spitzak and others.
@@ -11,9 +9,9 @@
//
// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// https://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -51,8 +49,8 @@ static void centered_text(cairo_t *cr, double x0, double y0, double w0, double h
// draw a button object with rounded corners and a label
static void round_button(cairo_t *cr, double x0, double y0,
- double rect_width, double rect_height, double radius,
- double r, double g, double b) {
+ double rect_width, double rect_height, double radius,
+ double r, double g, double b) {
double x1, y1;
x1 = x0 + rect_width;
y1 = y0 + rect_height;
@@ -158,7 +156,3 @@ int main(int argc, char **argv) {
return 0;
}
#endif
-
-//
-// End of "$Id$".
-//
diff --git a/test/checkers.cxx b/test/checkers.cxx
index dcc67c6a9..95e670cf0 100644
--- a/test/checkers.cxx
+++ b/test/checkers.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Checkers game for the Fast Light Tool Kit (FLTK).
//
// Hours of fun: the FLTK checkers game!
@@ -12,14 +10,14 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
-const char* copyright =
+const char* copyright =
"Checkers game\n"
"Copyright (C) 1997-2010 Bill Spitzak spitzak@d2.com\n"
"Original Pascal code:\n"
@@ -58,58 +56,58 @@ const char* copyright =
#include
#ifdef VT100
-#include // toupper
+#include // toupper
#endif
////////////////////////////////////////////////////////////////
// The algorithim:
-int maxevaluate=2500; // max number of moves to examine on a turn
-int maxnodes = 2500; // maximum number of nodes in search tree
-int maxply = 20; // maximum depth to look ahead
-char forcejumps = 1; // is forced jumps rule in effect?
+int maxevaluate=2500; // max number of moves to examine on a turn
+int maxnodes = 2500; // maximum number of nodes in search tree
+int maxply = 20; // maximum depth to look ahead
+char forcejumps = 1; // is forced jumps rule in effect?
// scoring parameters: (all divided by 5 from original code)
// some signs seem to be backwards, marked them with (-) in comment
-const int spiece = 800; // value of a piece
-const int sking = 1200; // value of a king
-const int sadvan = 160; // value of mypieces/theirpieces-1
-// const int smobil = ? // moves *enemy* can make w/o being jumped
-const int sallpin = 80; // mobil == 0
-const int sdeny = 10; // moves enemy can make that will be jumped
-const int spin = 32; // enemy pieces that have no move except jumped
-const int sthreat = -10; // enemy pieces we can jump if not moved (-)
-const int sgrad = 1; // score of piece positions
-const int sback = 10; // back row occupied so enemy can't make king
-const int smoc2 = 200; // more mobility, more center
-const int smoc3 = -8; // less mobility, less center
-const int smoc4 = -80; // more mobility, less center
-const int smode2 = -14; // less mobility, less denied
-const int smode3 = -40; // more mobility, more denied (-)
-const int sdemmo = -20; // more denied, more moves (-)
-const int scent = 10; // pieces in center
-const int skcent = 100; // kings in center
-
-const int depthpenalty=4; // guess
-const int noise=2; // values less or eq to this apart are eq
-
-// const int sattackking = 4; // not used
+const int spiece = 800; // value of a piece
+const int sking = 1200; // value of a king
+const int sadvan = 160; // value of mypieces/theirpieces-1
+// const int smobil = ? // moves *enemy* can make w/o being jumped
+const int sallpin = 80; // mobil == 0
+const int sdeny = 10; // moves enemy can make that will be jumped
+const int spin = 32; // enemy pieces that have no move except jumped
+const int sthreat = -10; // enemy pieces we can jump if not moved (-)
+const int sgrad = 1; // score of piece positions
+const int sback = 10; // back row occupied so enemy can't make king
+const int smoc2 = 200; // more mobility, more center
+const int smoc3 = -8; // less mobility, less center
+const int smoc4 = -80; // more mobility, less center
+const int smode2 = -14; // less mobility, less denied
+const int smode3 = -40; // more mobility, more denied (-)
+const int sdemmo = -20; // more denied, more moves (-)
+const int scent = 10; // pieces in center
+const int skcent = 100; // kings in center
+
+const int depthpenalty=4; // guess
+const int noise=2; // values less or eq to this apart are eq
+
+// const int sattackking = 4; // not used
// const int sattackpiece = 3;
struct node {
node *father;
- node *son; // best son
- node *brother; // next brother
- short int value; // value of this board position to player making move
+ node *son; // best son
+ node *brother; // next brother
+ short int value; // value of this board position to player making move
unsigned char from,to; // the move to reach this board
- long int jump; // bit map of locations jumped
+ long int jump; // bit map of locations jumped
unsigned char mobil;
unsigned char deny;
unsigned char pin;
unsigned char threat;
short int gradient;
- unsigned who:1; // 0 = black's move, 1 = white's move
- unsigned king:1; // 1 = move causes piece to be kinged
+ unsigned who:1; // 0 = black's move, 1 = white's move
+ unsigned king:1; // 1 = move causes piece to be kinged
unsigned back:1;
unsigned moc2:1;
unsigned moc3:1;
@@ -119,20 +117,20 @@ struct node {
unsigned demmo:1;
};
-int nodes; // count of nodes
+int nodes; // count of nodes
-/* Board positions: Border positions:
+/* Board positions: Border positions:
- WHITE 00 01 02 03 04
- 05 06 07 08 04 XX XX XX XX
- 09 10 11 12 XX XX XX XX 13
- 14 15 16 17 13 XX XX XX XX
- 18 19 20 21 XX XX XX XX 22
- 23 24 25 26 22 XX XX XX XX
- 27 28 29 30 XX XX XX XX 31
- 32 33 34 36 31 XX XX XX XX
- 36 37 38 39 XX XX XX XX 40
- BLACK 40 41 42 43 44
+ WHITE 00 01 02 03 04
+ 05 06 07 08 04 XX XX XX XX
+ 09 10 11 12 XX XX XX XX 13
+ 14 15 16 17 13 XX XX XX XX
+ 18 19 20 21 XX XX XX XX 22
+ 23 24 25 26 22 XX XX XX XX
+ 27 28 29 30 XX XX XX XX 31
+ 32 33 34 36 31 XX XX XX XX
+ 36 37 38 39 XX XX XX XX 40
+ BLACK 40 41 42 43 44
*/
@@ -150,7 +148,7 @@ typedef char piece;
const piece flip[9] = {
EMPTY, WHITE, BLACK, 0, 0, WHITEKING, BLACKKING, 0, BLUE};
-const int offset[9][4] = { // legal move directions
+const int offset[9][4] = { // legal move directions
{0,0,0,0},
{-5,-4,0,0},
{4,5,0,0},
@@ -162,15 +160,15 @@ const int offset[9][4] = { // legal move directions
{0,0,0,0}
};
-piece b[45]; // current board position being considered
+piece b[45]; // current board position being considered
-int evaluated; // number of moves evaluated this turn
+int evaluated; // number of moves evaluated this turn
char centralsquares[45];
char is_protected[45];
-piece flipboard[45]; // swapped if enemy is black
-piece *tb; // pointer to real or swapped board
+piece flipboard[45]; // swapped if enemy is black
+piece *tb; // pointer to real or swapped board
#define FRIEND BLACK
#define FRIENDKING BLACKKING
#define ENEMY WHITE
@@ -205,11 +203,11 @@ void analyzemove(int direction,int src) {
if (!tb[target+direction]) is_protected[target] = 1;
piece a = tb[src]; tb[src] = EMPTY;
if (check(target,4) || check(target,5) ||
- check(target,-4) || check(target,-5) ||
- (tb[src+4]&ENEMY && check(src+4,4)) ||
- (tb[src+5]&ENEMY && check(src+5,5)) ||
- (tb[src-4]&ENEMY && check(src-4,-4)) ||
- (tb[src-5]&ENEMY && check(src-5,-5)))
+ check(target,-4) || check(target,-5) ||
+ (tb[src+4]&ENEMY && check(src+4,4)) ||
+ (tb[src+5]&ENEMY && check(src+5,5)) ||
+ (tb[src-4]&ENEMY && check(src-4,-4)) ||
+ (tb[src-5]&ENEMY && check(src-5,-5)))
deniedmoves++;
else undeniedmoves++;
tb[src] = a;
@@ -218,7 +216,7 @@ void analyzemove(int direction,int src) {
void evaluateboard(node *n,int print) {
- if (!n->who) tb = b; // move was black's
+ if (!n->who) tb = b; // move was black's
else {
for (int i=0; i<45; i++) flipboard[44-i] = flip[(int)b[i]];
tb = flipboard;
@@ -250,7 +248,7 @@ void evaluateboard(node *n,int print) {
case ENEMY:
deniedmoves = 0;
undeniedmoves = 0;
- J1: enemypieces++;
+ J1: enemypieces++;
enemycent += centralsquares[i];
if (i<36) {
analyzemove(4,i);
@@ -297,22 +295,22 @@ void evaluateboard(node *n,int print) {
n->demmo = n->deny>f->deny && f->deny+f->mobil>n->deny+n->mobil;
total =
- spiece * (friendpieces - enemypieces) +
- (sking-spiece) * (friendkings - enemykings) +
- // mobil?
- sdeny * (n->deny - f->deny) +
- spin * (n->pin - f->pin) +
- sthreat * (n->threat - f->threat) +
- sgrad * (n->gradient - f->gradient) +
- sback * (n->back - f->back) +
- smoc2 * (n->moc2 - f->moc2) +
- smoc3 * (n->moc3 - f->moc3) +
- smoc4 * (n->moc4 - f->moc4) +
- smode2 * (n->mode2 - f->mode2) +
- smode3 * (n->mode3 - f->mode3) +
- sdemmo * (n->demmo - f->demmo) +
- scent * (friendcent - enemycent) +
- (skcent-scent) * (friendkcent - enemykcent);
+ spiece * (friendpieces - enemypieces) +
+ (sking-spiece) * (friendkings - enemykings) +
+ // mobil?
+ sdeny * (n->deny - f->deny) +
+ spin * (n->pin - f->pin) +
+ sthreat * (n->threat - f->threat) +
+ sgrad * (n->gradient - f->gradient) +
+ sback * (n->back - f->back) +
+ smoc2 * (n->moc2 - f->moc2) +
+ smoc3 * (n->moc3 - f->moc3) +
+ smoc4 * (n->moc4 - f->moc4) +
+ smode2 * (n->mode2 - f->mode2) +
+ smode3 * (n->mode3 - f->mode3) +
+ sdemmo * (n->demmo - f->demmo) +
+ scent * (friendcent - enemycent) +
+ (skcent-scent) * (friendkcent - enemykcent);
if (!n->mobil) total += sallpin;
if (!enemypieces) total = 30000;
@@ -323,9 +321,9 @@ void evaluateboard(node *n,int print) {
if (print) {
printf("\tParent\tNew\tScore\n");
printf("pieces\t%d\t%d\t%d\n",enemypieces,friendpieces,
- spiece*(friendpieces-enemypieces));
+ spiece*(friendpieces-enemypieces));
printf("kings\t%d\t%d\t%d\n",enemykings,friendkings,
- (sking-spiece)*(friendkings-enemykings));
+ (sking-spiece)*(friendkings-enemykings));
printf("mobil\t%d\t%d\n",f->mobil,n->mobil);
printf("deny\t%d\t%d\t%d\n",f->deny,n->deny,sdeny*(n->deny-f->deny));
printf("pin\t%d\t%d\t%d\n",f->pin,n->pin,spin*(n->pin-f->pin));
@@ -346,7 +344,7 @@ void evaluateboard(node *n,int print) {
n->value = total;
evaluated++;
}
-} // end of evaluateboard
+} // end of evaluateboard
// --------------------- Tree management -----------------
@@ -389,7 +387,7 @@ void killnode(node *x) {
freelist = x;
}
-int seed; // current random number
+int seed; // current random number
void insert(node *n) {
int val = n->value;
@@ -417,25 +415,25 @@ void movepiece(node* f, int i, node* jnode) {
int j = i+direction;
if (b[j] == EMPTY) {
if (!jnode && (!forcejumps || !f->son || !f->son->jump)) {
- node* n = newnode();
- n->father = f;
- n->who = !f->who;
- n->from = i;
- n->to = j;
- piece oldpiece = b[i]; b[i] = EMPTY;
- if (!(oldpiece&KING) && n->who ? (j>=36) : (j<=8)) {
- n->king = 1;
- b[j] = oldpiece|KING;
- }
- else b[j] = oldpiece;
- evaluateboard(n,0);
- insert(n);
- b[i] = oldpiece; b[j] = EMPTY;
+ node* n = newnode();
+ n->father = f;
+ n->who = !f->who;
+ n->from = i;
+ n->to = j;
+ piece oldpiece = b[i]; b[i] = EMPTY;
+ if (!(oldpiece&KING) && n->who ? (j>=36) : (j<=8)) {
+ n->king = 1;
+ b[j] = oldpiece|KING;
+ }
+ else b[j] = oldpiece;
+ evaluateboard(n,0);
+ insert(n);
+ b[i] = oldpiece; b[j] = EMPTY;
}
} else if (((b[j]^b[i])&(WHITE|BLACK))==(WHITE|BLACK) && !b[j+direction]) {
if (forcejumps && f->son && !f->son->jump) {
- killnode(f->son);
- f->son = 0;
+ killnode(f->son);
+ f->son = 0;
}
int jumploc = j;
j += direction;
@@ -447,14 +445,14 @@ void movepiece(node* f, int i, node* jnode) {
n->jump = (1<<(jumploc-10));
piece oldpiece = b[i]; b[i] = EMPTY;
if (!(oldpiece&KING) && n->who ? (j>=36) : (j<=8)) {
- n->king = 1;
- b[j] = oldpiece|KING;
+ n->king = 1;
+ b[j] = oldpiece|KING;
}
else b[j] = oldpiece;
if (jnode) {
- n->from = jnode->from;
- n->jump |= jnode->jump;
- n->king |= jnode->king;
+ n->from = jnode->from;
+ n->jump |= jnode->jump;
+ n->king |= jnode->king;
}
piece jumpedpiece = b[jumploc];
b[jumploc] = EMPTY;
@@ -470,7 +468,7 @@ void movepiece(node* f, int i, node* jnode) {
}
void expandnode(node *f) {
- if (f->son || f->value > 28000) return; // already done
+ if (f->son || f->value > 28000) return; // already done
piece turn = f->who ? BLACK : WHITE;
for (int i=5; i<40; i++) if (b[i]&turn) movepiece(f,i,0);
if (f->son) {
@@ -532,9 +530,9 @@ int descend(node *f) {
char debug;
-node *calcmove(node *root) { // return best move after root
+node *calcmove(node *root) { // return best move after root
expandnode(root);
- if (!root->son) return(0); // no move due to loss
+ if (!root->son) return(0); // no move due to loss
if (debug) printf("calcmove() initial nodes = %d\n",nodes);
evaluated = 0;
if (root->son->brother) {
@@ -555,10 +553,10 @@ node *calcmove(node *root) { // return best move after root
node *root,*undoroot;
-piece jumpboards[24][45]; // saved boards for undoing jumps
+piece jumpboards[24][45]; // saved boards for undoing jumps
int nextjump;
-char user; // 0 = black, 1 = white
+char user; // 0 = black, 1 = white
char playing;
char autoplay;
@@ -610,7 +608,7 @@ node* undomove() {
root = n->father;
killnode(n);
root->son = 0;
- root->value = 0; // prevent it from thinking game is over
+ root->value = 0; // prevent it from thinking game is over
playing = 1;
if (root == undoroot) user = 0;
return n;
@@ -624,13 +622,13 @@ void dumpnode(node *n, int help) {
int x = n->from;
int y = n->to;
if (help) printf("%c%c %c%c\t- ",
- usermoves(x,1),usermoves(x,2),
- usermoves(y,1),usermoves(y,2));
+ usermoves(x,1),usermoves(x,2),
+ usermoves(y,1),usermoves(y,2));
printf("%s %ss from %c%c to %c%c",
- n->who ? "White" : "Black",
- n->jump ? "jump" : "move",
- usermoves(x,1),usermoves(x,2),
- usermoves(y,1),usermoves(y,2));
+ n->who ? "White" : "Black",
+ n->jump ? "jump" : "move",
+ usermoves(x,1),usermoves(x,2),
+ usermoves(y,1),usermoves(y,2));
if (n->jump) {
for (int i=0; i<32; i++) if (n->jump & (1<son; t; t = t->brother) dumpnode(t,1);
}
@@ -825,17 +823,17 @@ int VT100main() {
if (playing) {
expandnode(root);
if (!root->son) {
- printf("%s has no move. Game over.",root->who ? "Black" : "White");
- playing = autoplay = 0;
+ printf("%s has no move. Game over.",root->who ? "Black" : "White");
+ playing = autoplay = 0;
}
}
node* move;
if (playing && (autoplay || root->who == user)) {
move = calcmove(root);
if (move->value <= -30000) {
- printf("%s resigns.", move->who ? "White" : "Black");
- move = 0;
- playing = autoplay = 0;
+ printf("%s resigns.", move->who ? "White" : "Black");
+ move = 0;
+ playing = autoplay = 0;
}
} else {
move = getusermove();
@@ -879,7 +877,7 @@ void make_pieces() {
png[i]->scale(png[i]->data_w()/2, png[i]->data_h()/2);
}
-#define ISIZE 62 // old: 56
+#define ISIZE 62 // old: 56
void draw_piece(int which, int x, int y) {
if (!fl_not_clipped(x,y,ISIZE,ISIZE)) return;
@@ -912,10 +910,10 @@ public:
#define BMOFFSET 5
static int erase_this; // real location of dragging piece, don't draw it
-static int dragging; // piece being dragged
-static int dragx; // where it is
+static int dragging; // piece being dragged
+static int dragx; // where it is
static int dragy;
-static int showlegal; // show legal moves
+static int showlegal; // show legal moves
int squarex(int i) {return (usermoves(i,1)-'A')*BOXSIZE+BMOFFSET;}
int squarey(int i) {return (usermoves(i,2)-'1')*BOXSIZE+BMOFFSET;}
@@ -928,7 +926,7 @@ void Board::draw() {
fl_color((Fl_Color)10 /*107*/);
int x; for (x=0; x<8; x++) for (int y=0; y<8; y++) {
if (!((x^y)&1)) fl_rectf(BORDER+x*BOXSIZE, BORDER+y*BOXSIZE,
- BOXSIZE-BORDER, BOXSIZE-BORDER);
+ BOXSIZE-BORDER, BOXSIZE-BORDER);
}
// -- draw outlines around the fileds
fl_color(FL_DARK3);
@@ -1085,14 +1083,14 @@ int Board::handle(int e) {
if (playing) {
expandnode(root);
for (t = root->son; t; t = t->brother) {
- int x = squarex(t->from);
- int y = squarey(t->from);
- if (Fl::event_inside(x,y,BOXSIZE,BOXSIZE)) {
- deltax = Fl::event_x()-x;
- deltay = Fl::event_y()-y;
- drag_piece(t->from,x,y);
- return 1;
- }
+ int x = squarex(t->from);
+ int y = squarey(t->from);
+ if (Fl::event_inside(x,y,BOXSIZE,BOXSIZE)) {
+ deltax = Fl::event_x()-x;
+ deltay = Fl::event_y()-y;
+ drag_piece(t->from,x,y);
+ return 1;
+ }
}
}
return 0;
@@ -1134,7 +1132,7 @@ int FLTKmain(int argc, char** argv) {
b.callback(quit_cb);
b.show(argc,argv);
return Fl::run();
-}
+}
void autoplay_cb(Fl_Widget*bp, void*) {
if (autoplay) {autoplay = 0; return;}
@@ -1326,7 +1324,3 @@ int main(int argc, char **argv) {
return VT100main();
#endif
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/checkers_pieces.fl b/test/checkers_pieces.fl
index 2d8aef590..11e90f505 100644
--- a/test/checkers_pieces.fl
+++ b/test/checkers_pieces.fl
@@ -3,8 +3,6 @@ version 1.0400
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id$"
-//
// Checkers images for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2020 by Bill Spitzak and others.
@@ -15,9 +13,9 @@ comment {//
//
// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// https://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
} {in_source in_header
}
@@ -33,9 +31,3 @@ data pixmaps_black_checker_king_png {selected public local filename {pixmaps/bla
data pixmaps_white_checker_king_png {public local filename {pixmaps/white_checker_king.png}
}
-
-comment {
-//
-// End of "$Id$".
-//} {in_source in_header
-}
diff --git a/test/clock.cxx b/test/clock.cxx
index b6c1832fb..957054f1f 100644
--- a/test/clock.cxx
+++ b/test/clock.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Clock test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -57,7 +55,3 @@ int main(int argc, char **argv) {
window2.show();
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/colbrowser.cxx b/test/colbrowser.cxx
index ccec8d60c..bcd1506d7 100644
--- a/test/colbrowser.cxx
+++ b/test/colbrowser.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// X Color Browser demo program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2019 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
@@ -37,7 +35,7 @@
#define MAX_RGB 3000
#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3))
-#define FL_INDIANRED ((Fl_Color)(164))
+#define FL_INDIANRED ((Fl_Color)(164))
static Fl_Double_Window *cl;
@@ -59,9 +57,9 @@ static RGBdb rgbdb[MAX_RGB];
int main(int argc, char *argv[])
{
Fl::args(argc, argv);
-
+
create_form_cl();
-
+
#ifdef __APPLE__
// Bundled apps do not set the current directory
strcpy(dbname, argv[0]);
@@ -71,19 +69,19 @@ int main(int argc, char *argv[])
#else
strcpy(dbname, "rgb.txt");
#endif
-
+
if (load_browser(dbname))
dbobj->label(dbname);
else
dbobj->label("None");
dbobj->redraw();
-
+
cl->size_range(cl->w(),cl->h(),2*cl->w(),2*cl->h());
-
+
cl->label("RGB Browser");
cl->free_position();
cl->show(argc,argv);
-
+
return Fl::run();
}
@@ -102,7 +100,7 @@ static void set_entry(int i)
static void br_cb(Fl_Widget *ob, long)
{
int r = ((Fl_Browser *)ob)->value();
-
+
if (r <= 0)
return;
set_entry(r - 1);
@@ -113,21 +111,21 @@ static int read_entry(FILE * fp, int *r, int *g, int *b, char *name)
{
int n;
char buf[512], *p;
-
+
if (!fgets(buf, sizeof(buf) - 1, fp))
return 0;
-
+
if(buf[0] == '!') {
if (fgets(buf,sizeof(buf)-1,fp)==0) {
/* ignore */
}
}
-
+
if(sscanf(buf, " %d %d %d %n", r, g, b, &n) < 3)
return 0;
-
+
p = buf + n;
-
+
/* squeeze out all spaces */
while (*p)
{
@@ -136,7 +134,7 @@ static int read_entry(FILE * fp, int *r, int *g, int *b, char *name)
p++;
}
*name = 0;
-
+
return (feof(fp) || ferror(fp)) ? 0 : 1;
}
@@ -152,15 +150,15 @@ static int load_browser(char *fname)
fl_alert("%s\n%s\n%s","Load", fname, "Can't open");
return 0;
}
-
+
/* read the items */
-
+
for (; db < dbs && read_entry(fp, &r, &g, &b, name);)
{
db->r = r;
db->g = g;
db->b = b;
-
+
/* unique the entries on the fly */
if (lr != r || lg != g || lb != b)
{
@@ -173,19 +171,19 @@ static int load_browser(char *fname)
}
}
fclose(fp);
-
+
if (db < dbs)
- db->r = 1000; /* sentinel */
+ db->r = 1000; /* sentinel */
else
{
db--;
db->r = 1000;
}
-
+
colbr->topline(1);
colbr->select(1,1);
set_entry(0);
-
+
return 1;
}
@@ -195,14 +193,14 @@ static int search_entry(int r, int g, int b)
RGBdb *db = rgbdb;
int i, j, diffr, diffg, diffb;
unsigned int diff, mindiff;
-
+
mindiff = (unsigned int)~0;
for (i = j = 0; db->r < 256; db++, i++)
{
diffr = r - db->r;
diffg = g - db->g;
diffb = b - db->b;
-
+
#ifdef FL_LINEAR
diff = unsigned(3.0 * (FL_abs(r - db->r)) +
(5.9 * FL_abs(g - db->g)) +
@@ -212,14 +210,14 @@ static int search_entry(int r, int g, int b)
5.9 * (diffg *diffg) +
1.1 * (diffb *diffb));
#endif
-
+
if (mindiff > diff)
{
mindiff = diff;
j = i;
}
}
-
+
return j;
}
@@ -228,11 +226,11 @@ static void search_rgb(Fl_Widget *, long)
{
int r, g, b, i;
int top = colbr->topline();
-
+
r = int(rs->value());
g = int(gs->value());
b = int(bs->value());
-
+
// fl_freeze_form(cl);
Fl::set_color(FL_FREE_COL4, r, g, b);
rescol->redraw();
@@ -250,10 +248,10 @@ static void db_cb(Fl_Widget * ob, long)
{
const char *p = fl_input("Enter New Database Name", dbname);
char buf[512];
-
+
if (!p || strcmp(p, dbname) == 0)
return;
-
+
strcpy(buf, p);
if (load_browser(buf))
strcpy(dbname, buf);
@@ -272,33 +270,33 @@ static void create_form_cl(void)
{
if (cl)
return;
-
+
cl = new Fl_Double_Window(400,385);
cl->box(FL_UP_BOX);
cl->color(FL_INDIANRED, FL_GRAY);
-
+
Fl_Box *title = new Fl_Box(40, 10, 300, 30, "Color Browser");
title->box(FL_NO_BOX);
title->labelcolor(FL_RED);
title->labelsize(32);
title->labelfont(FL_HELVETICA_BOLD);
title->labeltype(FL_SHADOW_LABEL);
-
+
dbobj = new Fl_Button(40, 50, 300, 25, "");
dbobj->type(FL_NORMAL_BUTTON);
dbobj->box(FL_BORDER_BOX);
dbobj->color(FL_INDIANRED,FL_INDIANRED);
dbobj->callback(db_cb, 0);
-
+
colbr = new Fl_Hold_Browser(10, 90, 280, 240, "");
- colbr->textfont(FL_COURIER);
+ colbr->textfont(FL_COURIER);
colbr->callback(br_cb, 0);
colbr->box(FL_DOWN_BOX);
-
+
rescol = new Fl_Box(300, 90, 90, 35, "");
rescol->color(FL_FREE_COL4, FL_FREE_COL4);
rescol->box(FL_BORDER_BOX);
-
+
rs = new Fl_Value_Slider(300, 130, 30, 200, "");
rs->type(FL_VERT_FILL_SLIDER);
rs->color(FL_INDIANRED, FL_RED);
@@ -306,7 +304,7 @@ static void create_form_cl(void)
rs->precision(0);
rs->callback(search_rgb, 0);
rs->when(FL_WHEN_RELEASE);
-
+
gs = new Fl_Value_Slider(330, 130, 30, 200, "");
gs->type(FL_VERT_FILL_SLIDER);
gs->color(FL_INDIANRED, FL_GREEN);
@@ -314,7 +312,7 @@ static void create_form_cl(void)
gs->precision(0);
gs->callback(search_rgb, 1);
gs->when(FL_WHEN_RELEASE);
-
+
bs = new Fl_Value_Slider(360, 130, 30, 200, "");
bs->type(FL_VERT_FILL_SLIDER);
bs->color(FL_INDIANRED, FL_BLUE);
@@ -322,15 +320,11 @@ static void create_form_cl(void)
bs->precision(0);
bs->callback(search_rgb, 2);
bs->when(FL_WHEN_RELEASE);
-
+
Fl_Button *done = new Fl_Button(160, 345, 80, 30, "Done");
done->type(FL_NORMAL_BUTTON);
done->callback(done_cb, 0);
-
+
cl->end();
cl->resizable(cl);
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/color_chooser.cxx b/test/color_chooser.cxx
index 0c998034d..ffa89b1e5 100644
--- a/test/color_chooser.cxx
+++ b/test/color_chooser.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Color chooser test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -45,8 +43,8 @@ void make_image() {
for (int x = 0; x < width; x++) {
double X = double(x)/(width-1);
*p++ = uchar(255*((1-X)*(1-Y))); // red in upper-left
- *p++ = uchar(255*((1-X)*Y)); // green in lower-left
- *p++ = uchar(255*(X*Y)); // blue in lower-right
+ *p++ = uchar(255*((1-X)*Y)); // green in lower-left
+ *p++ = uchar(255*(X*Y)); // blue in lower-right
}
}
}
@@ -145,7 +143,3 @@ int main(int argc, char ** argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/connect.cxx b/test/connect.cxx
index 4fbabfc65..d8b84b9e7 100644
--- a/test/connect.cxx
+++ b/test/connect.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// PPP example program for the Fast Light Tool Kit (FLTK).
//
// Program to make a button to turn a ppp connection on/off.
@@ -13,11 +11,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -30,7 +28,7 @@
#include
#include
-int running; // actually the pid
+int running; // actually the pid
Fl_Toggle_Button *Button;
void sigchld(int) {
@@ -62,7 +60,3 @@ int main(int argc, char ** argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/cube.cxx b/test/cube.cxx
index 63b6fdb8d..7add96490 100644
--- a/test/cube.cxx
+++ b/test/cube.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// OpenGL test program for the Fast Light Tool Kit (FLTK).
//
// Modified to have 2 cubes to test multiple OpenGL contexts
@@ -11,11 +9,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -165,7 +163,7 @@ void makeform(const char *name) {
cube2 = new cube_box(513,23,344,344, 0);
Fl_Box *b = new Fl_Box(FL_NO_BOX,cube->x(),size->y(),
- cube->w(),size->h(),0);
+ cube->w(),size->h(),0);
form->resizable(b);
b->hide();
form->end();
@@ -194,7 +192,7 @@ int main(int argc, char **argv) {
makeform(argv[0]);
// added to demo printing
form->begin();
- static Fl_Menu_Item items[] = {
+ static Fl_Menu_Item items[] = {
{ "Print", 0, 0, 0, FL_SUBMENU },
{ "Print window", 0, print_cb, 0, 0 },
{ 0 },
@@ -231,9 +229,9 @@ int main(int argc, char **argv) {
#endif
for (;;) {
if (form->visible() && speed->value())
- {if (!Fl::check()) break;} // returns immediately
+ {if (!Fl::check()) break;} // returns immediately
else
- {if (!Fl::wait()) break;} // waits until something happens
+ {if (!Fl::wait()) break;} // waits until something happens
cube->wire = wire->value();
cube2->wire = !wire->value();
cube->size = cube2->size = size->value();
@@ -244,7 +242,3 @@ int main(int argc, char **argv) {
}
return 0;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/cursor.cxx b/test/cursor.cxx
index 0b27d71e3..4f80f4180 100644
--- a/test/cursor.cxx
+++ b/test/cursor.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Cursor test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -116,7 +114,3 @@ int main(int argc, char **argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/curve.cxx b/test/curve.cxx
index 6ee1450fc..3b92be159 100644
--- a/test/curve.cxx
+++ b/test/curve.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Curve test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -100,7 +98,3 @@ int main(int argc, char** argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/demo.cxx b/test/demo.cxx
index b68a66756..e7f9445e1 100644
--- a/test/demo.cxx
+++ b/test/demo.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Main demo program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2020 by Bill Spitzak and others.
@@ -11,9 +9,9 @@
//
// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// https://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -111,7 +109,7 @@ typedef struct {
char icommand[9][64];
} MENU;
-#define MAXMENU 32
+#define MAXMENU 32
MENU menus[MAXMENU];
int mennumb = 0;
@@ -144,27 +142,27 @@ void addto_menu(const char* men, const char* item, const char* comm) {
/* Button to Item conversion and back. */
-int b2n[][9] = {
- { -1, -1, -1, -1, 0, -1, -1, -1, -1},
- { -1, -1, -1, 0, -1, 1, -1, -1, -1},
- { 0, -1, -1, -1, 1, -1, -1, -1, 2},
- { 0, -1, 1, -1, -1, -1, 2, -1, 3},
- { 0, -1, 1, -1, 2, -1, 3, -1, 4},
- { 0, -1, 1, 2, -1, 3, 4, -1, 5},
- { 0, -1, 1, 2, 3, 4, 5, -1, 6},
- { 0, 1, 2, 3, -1, 4, 5, 6, 7},
- { 0, 1, 2, 3, 4, 5, 6, 7, 8}
+int b2n[][9] = {
+ { -1, -1, -1, -1, 0, -1, -1, -1, -1},
+ { -1, -1, -1, 0, -1, 1, -1, -1, -1},
+ { 0, -1, -1, -1, 1, -1, -1, -1, 2},
+ { 0, -1, 1, -1, -1, -1, 2, -1, 3},
+ { 0, -1, 1, -1, 2, -1, 3, -1, 4},
+ { 0, -1, 1, 2, -1, 3, 4, -1, 5},
+ { 0, -1, 1, 2, 3, 4, 5, -1, 6},
+ { 0, 1, 2, 3, -1, 4, 5, 6, 7},
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8}
};
-int n2b[][9] = {
- { 4, -1, -1, -1, -1, -1, -1, -1, -1},
- { 3, 5, -1, -1, -1, -1, -1, -1, -1},
- { 0, 4, 8, -1, -1, -1, -1, -1, -1},
- { 0, 2, 6, 8, -1, -1, -1, -1, -1},
- { 0, 2, 4, 6, 8, -1, -1, -1, -1},
- { 0, 2, 3, 5, 6, 8, -1, -1, -1},
- { 0, 2, 3, 4, 5, 6, 8, -1, -1},
- { 0, 1, 2, 3, 5, 6, 7, 8, -1},
- { 0, 1, 2, 3, 4, 5, 6, 7, 8}
+int n2b[][9] = {
+ { 4, -1, -1, -1, -1, -1, -1, -1, -1},
+ { 3, 5, -1, -1, -1, -1, -1, -1, -1},
+ { 0, 4, 8, -1, -1, -1, -1, -1, -1},
+ { 0, 2, 6, 8, -1, -1, -1, -1, -1},
+ { 0, 2, 4, 6, 8, -1, -1, -1, -1},
+ { 0, 2, 3, 5, 6, 8, -1, -1, -1},
+ { 0, 2, 3, 4, 5, 6, 8, -1, -1},
+ { 0, 1, 2, 3, 5, 6, 7, 8, -1},
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8}
};
/* Transform a button number to an item number when there are
@@ -222,26 +220,26 @@ void dobut(Fl_Widget *, long arg) {
#ifdef _WIN32
- STARTUPINFO suInfo; // Process startup information
- PROCESS_INFORMATION prInfo; // Process information
+ STARTUPINFO suInfo; // Process startup information
+ PROCESS_INFORMATION prInfo; // Process information
# if DEBUG_EXE_WITH_D
- const char *exe = "d.exe"; // exe name with trailing 'd'
+ const char *exe = "d.exe"; // exe name with trailing 'd'
# else
- const char *exe = ".exe"; // exe name w/o trailing 'd'
+ const char *exe = ".exe"; // exe name w/o trailing 'd'
# endif
memset(&suInfo, 0, sizeof(suInfo));
suInfo.cb = sizeof(suInfo);
-
+
int icommand_length = strlen(menus[men].icommand[bn]);
-
+
char* copy_of_icommand = new char[icommand_length+1];
strcpy(copy_of_icommand,menus[men].icommand[bn]);
-
+
// On Windows the .exe suffix needs to be appended to the command
// whilst leaving any additional parameters unchanged - this
- // is required to handle the correct conversion of cases such as :
+ // is required to handle the correct conversion of cases such as :
// `../fluid/fluid valuators.fl' to '../fluid/fluid.exe valuators.fl'.
// skip leading spaces.
@@ -261,16 +259,16 @@ void dobut(Fl_Widget *, long arg) {
*start_parameters = 0;
// move start_paremeters to skip over the intermediate space.
++start_parameters;
-
+
sprintf(command, "%s%s %s", start_command, exe, start_parameters);
}
-
+
CreateProcess(NULL, command, NULL, NULL, FALSE,
NORMAL_PRIORITY_CLASS, NULL, NULL, &suInfo, &prInfo);
-
+
delete[] command;
delete[] copy_of_icommand;
-
+
#elif defined __APPLE__
/*
Starting with version 1.4.0, FLTK uses CMake as the only supported build
@@ -364,7 +362,7 @@ void dobut(Fl_Widget *, long arg) {
#else // Non Windows systems.
int icommand_length = strlen(menus[men].icommand[bn]);
- char* command = new char[icommand_length+5]; // 5 for extra './' and ' &\0'
+ char* command = new char[icommand_length+5]; // 5 for extra './' and ' &\0'
sprintf(command, "./%s &", menus[men].icommand[bn]);
if (system(command)==-1) { /* ignore */ }
@@ -417,7 +415,7 @@ int load_the_menu(char* fname) {
while (line[i] != ':' && line[i] != '\n') mname[j++] = line[i++];
mname[j] = '\0';
if (line[i] == ':') i++;
- j = 0;
+ j = 0;
while (line[i] != ':' && line[i] != '\n') {
if (line[i] == '\\') {
i++;
@@ -453,15 +451,15 @@ int main(int argc, char **argv) {
if (!Fl::args(argc,argv,i) || i < argc-1)
Fl::fatal("Usage: %s \n%s",argv[0],Fl::help);
if (i < argc) fname = argv[i];
-
+
create_the_forms();
-
+
if (!load_the_menu(fname)) Fl::fatal("Can't open %s",fname);
if (buf != fname)
strcpy(buf,fname);
const char *c = fl_filename_name(buf);
if (c > buf) {
- buf[c-buf] = 0;
+ buf[c-buf] = 0;
if (fl_chdir(buf) == -1) { /* ignore */ }
}
push_menu("@main");
@@ -469,7 +467,3 @@ int main(int argc, char **argv) {
Fl::run();
return 0;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/device.cxx b/test/device.cxx
index e242f6ae6..e922a77cd 100644
--- a/test/device.cxx
+++ b/test/device.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Device test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2020 by Roman Kantor and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -118,7 +116,7 @@ protected:
fl_color(FL_YELLOW);
fl_rectf(x()+7,y()+7,w()-14,h()-14);
fl_color(FL_BLUE);
-
+
fl_rect(x()+8,y()+8,w()-16,h()-16);
fl_push_clip(x()+25,y()+25,w()-50, h()-50);
fl_color(FL_BLACK);
@@ -127,7 +125,7 @@ protected:
fl_line(x()+27,y()+h()-27,x()+w()-27,y()+27);
//fl_rect(x()+30,y()+30,w()-60,h()-60);
fl_pop_clip();
-
+
}
public:
MyWidget(int x, int y):Fl_Box(x,y,100,100, "Clipping and rect(f):\nYellow rect.framed\nby B-Y-G-R rect. 1 p.\nthick. Your printer may \nrender very thin lines\nsurrounding \"X\""){
@@ -146,13 +144,13 @@ protected:
for(d=y()+5;d<48+y();d+=2){
fl_xyline(x()+5,d,x()+48);
}
-
+
fl_push_clip(x()+52,y()+5,45,43);
for(d=y()+5;d<150+y();d+=3){
fl_line(x()+52,d,x()+92,d-40);
}
fl_pop_clip();
-
+
fl_line_style(FL_DASH);
fl_xyline(x()+5,y()+55,x()+48);
fl_line_style(FL_DOT);
@@ -163,39 +161,39 @@ protected:
fl_xyline(x()+5,y()+64,x()+48);
fl_line_style(0,0,(char*)"\7\3\7\2");
fl_xyline(x()+5,y()+67,x()+48);
-
+
fl_line_style(0);
-
+
fl_line(x()+5,y()+72,x()+25,y()+95);
fl_line(x()+8,y()+72,x()+28,y()+95,x()+31,y()+72);
-
+
fl_color(FL_YELLOW);
fl_polygon(x()+11, y()+72,x()+27,y()+91,x()+29,y()+72);
fl_color(FL_RED);
fl_loop(x()+11, y()+72,x()+27,y()+91,x()+29,y()+72);
-
+
fl_color(FL_BLUE); ////
fl_line_style(FL_SOLID, 6);
fl_loop(x()+31, y()+12,x()+47,y()+31,x()+49,y()+12);
fl_line_style(0);
-
+
fl_color(200,0,200);
fl_polygon(x()+35,y()+72,x()+33,y()+95,x()+48,y()+95,x()+43,y()+72);
fl_color(FL_GREEN);
fl_loop(x()+35,y()+72,x()+33,y()+95,x()+48,y()+95,x()+43,y()+72);
-
- fl_color(FL_BLUE);
+
+ fl_color(FL_BLUE);
fl_yxline(x()+65,y()+63,y()+66);
- fl_color(FL_GREEN);
+ fl_color(FL_GREEN);
fl_yxline(x()+66,y()+66,y()+63);
-
+
fl_color(FL_BLUE);
fl_rect(x()+80,y()+55,5,5);
fl_color(FL_YELLOW);
fl_rectf(x()+81,y()+56,3,3);
fl_color(FL_BLACK);
fl_point(x()+82,y()+57);
-
+
fl_color(FL_BLUE);
fl_rect(x()+56, y()+79, 24, 17);
fl_color(FL_CYAN);
@@ -204,9 +202,9 @@ protected:
fl_arc(x()+57, y()+80, 22 ,15 ,40, 270);
fl_color(FL_YELLOW);
fl_pie(x()+58, y()+81, 20 ,13 ,40, 270);
-
+
fl_line_style(0);
-
+
fl_color(FL_BLACK);
fl_point(x()+58,y()+58);
fl_color(FL_RED);
@@ -217,7 +215,7 @@ protected:
fl_xyline(x()+61,y()+58,x()+62);
fl_color(FL_RED);
fl_xyline(x()+62,y()+59,x()+61);
-
+
fl_color(FL_GREEN);
fl_yxline(x()+57,y()+58,y()+59,x()+58);
fl_color(FL_BLUE);
@@ -226,15 +224,15 @@ protected:
fl_xyline(x()+58,y()+61,x()+56,y()+63);
fl_color(FL_GREEN);
fl_yxline(x()+57,y()+63,y()+62,x()+58);
-
+
fl_color(FL_BLUE);
fl_line(x()+58,y()+63, x()+60, y()+65);
fl_color(FL_BLACK);
fl_line(x()+61,y()+65, x()+59, y()+63);
-
+
fl_color(FL_BLACK);
};
-
+
public:
MyWidget2(int x, int y):Fl_Box(x,y,100,100, "Integer primitives"){
labelsize(10);
@@ -257,7 +255,7 @@ protected:
fl_end_line();
}
fl_pop_clip();
-
+
fl_push_clip(x()+52,y()+5,45,43);
for(d=y()+5;d<150+y();d+=2.3052){
fl_begin_line();
@@ -266,7 +264,7 @@ protected:
fl_end_line();
}
fl_pop_clip();
-
+
};
public:
MyWidget3(int x, int y):Fl_Box(x,y,100,100, "Sub-pixel drawing of\nlines 1.63 points apart\nOn the screen you\ncan see aliasing, the\nprinter should render\nthem properly"){
@@ -284,7 +282,7 @@ protected:
fl_push_matrix();
fl_translate(x(),y());
fl_scale(.75,.75);
-
+
fl_line_style(FL_SOLID , 5);
fl_begin_line();
fl_vertex(10, 160);
@@ -301,8 +299,8 @@ protected:
fl_vertex(50, 190);
fl_end_line();
fl_line_style(0);
-
- fl_color(FL_GREEN);
+
+ fl_color(FL_GREEN);
fl_line_style(FL_SOLID | FL_CAP_ROUND |FL_JOIN_ROUND , 5);
fl_begin_line();
fl_vertex(10, 140);
@@ -310,7 +308,7 @@ protected:
fl_vertex(60, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_BLUE);
fl_line_style(FL_SOLID | FL_CAP_SQUARE |FL_JOIN_BEVEL , 5);
fl_begin_line();
@@ -319,7 +317,7 @@ protected:
fl_vertex(70, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_BLACK);
fl_line_style(FL_DASH , 5);
fl_begin_line();
@@ -328,7 +326,7 @@ protected:
fl_vertex(80, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_RED);
fl_line_style(FL_DASH |FL_CAP_FLAT , 5);
fl_begin_line();
@@ -337,7 +335,7 @@ protected:
fl_vertex(90, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_GREEN);
fl_line_style(FL_DASH |FL_CAP_ROUND , 5);
fl_begin_line();
@@ -346,8 +344,8 @@ protected:
fl_vertex(100, 190);
fl_end_line();
fl_line_style(0);
-
-
+
+
fl_color(FL_BLUE);
fl_line_style(FL_DASH |FL_CAP_SQUARE , 5);
fl_begin_line();
@@ -356,7 +354,7 @@ protected:
fl_vertex(110, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_BLACK);
fl_line_style(FL_DOT, 5);
fl_begin_line();
@@ -365,7 +363,7 @@ protected:
fl_vertex(120, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_RED);
fl_line_style(FL_DOT | FL_CAP_FLAT, 5);
fl_begin_line();
@@ -374,7 +372,7 @@ protected:
fl_vertex(130, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_GREEN);
fl_line_style(FL_DOT | FL_CAP_ROUND, 5);
fl_begin_line();
@@ -383,7 +381,7 @@ protected:
fl_vertex(140, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_BLUE);
fl_line_style(FL_DOT | FL_CAP_SQUARE, 5);
fl_begin_line();
@@ -392,7 +390,7 @@ protected:
fl_vertex(150, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_BLACK);
fl_line_style(FL_DASHDOT |FL_CAP_ROUND |FL_JOIN_ROUND , 5);
fl_begin_line();
@@ -401,7 +399,7 @@ protected:
fl_vertex(160, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_RED);
fl_line_style(FL_DASHDOTDOT |FL_CAP_SQUARE |FL_JOIN_BEVEL , 5);
fl_begin_line();
@@ -410,8 +408,8 @@ protected:
fl_vertex(170, 190);
fl_end_line();
fl_line_style(0);
-
-
+
+
fl_color(FL_GREEN);
fl_line_style(FL_DASHDOTDOT |FL_CAP_ROUND |FL_JOIN_ROUND , 5);
fl_begin_line();
@@ -420,18 +418,18 @@ protected:
fl_vertex(180, 190);
fl_end_line();
fl_line_style(0);
-
+
fl_color(FL_BLUE);
fl_line_style(0, 5, (char*)"\12\3\4\2\2\1");
fl_begin_line();
fl_vertex(10, 10);
fl_vertex(190, 10);
fl_vertex(190, 190);
-
+
fl_end_line();
fl_line_style(0);
- fl_pop_matrix();
-
+ fl_pop_matrix();
+
fl_color(FL_BLACK);
};
public:
@@ -447,7 +445,7 @@ protected:
void draw(){
Fl_Box::draw();
fl_push_matrix();
-
+
fl_translate(x(),y());
fl_push_matrix();
fl_mult_matrix(1,3,0,1,0,-20);
@@ -457,39 +455,39 @@ protected:
fl_vertex(100,-80);
fl_vertex(100,-190);
fl_end_polygon();
-
+
fl_color(FL_RED);
fl_line_style(FL_DASHDOT, 7);
fl_begin_loop();
-
+
fl_vertex(10,10);
fl_vertex(100,-80);
fl_vertex(100,-190);
fl_end_loop();
fl_line_style(0);
-
+
fl_color(FL_BLUE);
fl_line_style(FL_SOLID, 3);
fl_begin_loop();
fl_circle(60,-50,30);
fl_end_loop();
fl_line_style(0);
-
+
fl_pop_matrix();
fl_scale(1.8,1);
-
+
fl_color(FL_YELLOW);
fl_begin_polygon();
fl_arc(30,90,20,-45,200);
fl_end_polygon();
-
+
fl_color(FL_BLACK);
fl_line_style(FL_DASH, 3);
fl_begin_line();
fl_arc(30,90,20,-45,200);
fl_end_line();
fl_line_style(0);
-
+
fl_translate(15,0);
fl_scale(1.5,3);
fl_begin_complex_polygon();
@@ -507,7 +505,7 @@ protected:
fl_vertex(40,10);
fl_vertex(35,20);
fl_end_complex_polygon();
-
+
fl_pop_matrix();
};
public:
@@ -530,12 +528,12 @@ void make_image() {
for (int x = 0; x < width; x++) {
double X = double(x)/(width-1);
*p++ = uchar(255*((1-X)*(1-Y))); // red in upper-left
- *p++ = uchar(255*((1-X)*Y)); // green in lower-left
- *p++ = uchar(255*(X*Y)); // blue in lower-right
+ *p++ = uchar(255*((1-X)*Y)); // green in lower-left
+ *p++ = uchar(255*(X*Y)); // blue in lower-right
X -= 0.5;
Y -= 0.5;
int alpha = (int)(350 * sqrt(X * X + Y * Y));
- if (alpha < 255) *p++ = uchar(alpha); // alpha transparency
+ if (alpha < 255) *p++ = uchar(alpha); // alpha transparency
else *p++ = 255;
Y += 0.5;
}
@@ -559,7 +557,7 @@ void copy(Fl_Widget *, void *data) {
W = target->as_window()->decorated_w();
H = target->as_window()->decorated_h();
decorated = 1;
- }
+ }
else {
W = target->w();
H = target->h();
@@ -586,8 +584,8 @@ void copy(Fl_Widget *, void *data) {
}
return;
}
-
-
+
+
if (strcmp(operation, "Fl_Copy_Surface") == 0) {
Fl_Copy_Surface *copy_surf;
if (target->as_window() && !target->parent()) {
@@ -604,7 +602,7 @@ void copy(Fl_Widget *, void *data) {
delete copy_surf;
Fl_Surface_Device::pop_current();
}
-
+
if (strcmp(operation, "Fl_Printer") == 0 || strcmp(operation, "Fl_PostScript_File_Device") == 0) {
Fl_Paged_Device *p;
int err;
@@ -626,7 +624,7 @@ void copy(Fl_Widget *, void *data) {
} else if (err > 1 && err_message) {fl_alert("%s", err_message); delete[] err_message;}
delete p;
}
-
+
if (strcmp(operation, "Fl_EPS_File_Surface") == 0) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Save a .eps file");
@@ -694,7 +692,7 @@ protected:
fl_line(x()+w()-15,y()+10,x()+15,y()+h()-23);
fl_line_style(0);
draw_label();
-
+
};
public:
My_Button(int x, int y, int w, int h, const char * label = 0):Fl_Button(x,y,w,h,label){}
@@ -712,32 +710,32 @@ void operation_cb(Fl_Widget* wid, void *data)
}
int main(int argc, char ** argv) {
-
- Fl::scheme("plastic");
-
+
+ Fl::scheme("plastic");
+
Fl_Window * w2 = new Fl_Window(500,568,"Graphics test");
-
+
Fl_Group *c2 =new Fl_Group(3, 56, 494, 514 );
-
+
new MyWidget(10,140+16);
new MyWidget2(110,80+16);
new MyWidget3(220,140+16);
new MyWidget4(330,70+16);
new MyWidget5(140,270+16);
-
+
make_image();
Fl_RGB_Image *rgb = new Fl_RGB_Image(image, width, height, 4);
My_Button b_rgb(10,245+16,100,100,"RGB with alpha");
b_rgb.image(rgb);
-
+
My_Button b_pixmap(10,345+16,100,100,"Pixmap");
Fl_Pixmap *pixmap = new Fl_Pixmap(porsche_xpm);
b_pixmap.image(pixmap);
-
+
My_Button b_bitmap(10,445+16,100,100,"Bitmap");
b_bitmap.labelcolor(FL_GREEN);
b_bitmap.image(new Fl_Bitmap(sorceress_bits,sorceress_width,sorceress_height));
-
+
new Fl_Clock(360,230+16,120,120);
Fl_Return_Button * ret = new Fl_Return_Button (360, 360, 120,30, "Return");
ret->deactivate();
@@ -753,10 +751,10 @@ int main(int argc, char ** argv) {
but5.labelfont(FL_BOLD|FL_ITALIC);
but5.labeltype(FL_SHADOW_LABEL);
but5.box(FL_ROUND_UP_BOX);
-
+
Fl_Button but6(360, 460+16, 120, 30, "Plastic");
but6.box(FL_PLASTIC_UP_BOX);
-
+
Fl_Group *group;
{ Fl_Group* o = new Fl_Group(360, 495+16, 120, 40); group=o;
o->box(FL_UP_BOX);
@@ -767,7 +765,6 @@ int main(int argc, char ** argv) {
}
{ Fl_Check_Button* o = new Fl_Check_Button(410, 500+16, 60, 30, "check");
o->value(1);
-
}
o->end();
}
@@ -777,16 +774,16 @@ int main(int argc, char ** argv) {
Fl_Box tx(120,492+16,230,50,"Background is not printed because\nencapsulating group, which we are\n printing, has not set the box type");
tx.box(FL_SHADOW_BOX);
tx.labelsize(12);
-
+
tx.hide();
-
+
c2->end();
-
+
Fl_Radio_Round_Button *rb;
Fl_Window *w3 = new Fl_Window(2,5,w2->w()-10,73);
w3->box(FL_DOWN_BOX);
Fl_Group *g1 = new Fl_Group(w3->x(),w3->y(),w3->w(),w3->h());
- rb = new Fl_Radio_Round_Button(5,5,150,12, "Fl_Image_Surface");
+ rb = new Fl_Radio_Round_Button(5,5,150,12, "Fl_Image_Surface");
rb->set(); rb->callback(operation_cb, NULL); operation = rb->label(); rb->labelsize(12);
rb = new Fl_Radio_Round_Button(5,18,150,12, "Fl_Copy_Surface"); rb->callback(operation_cb, NULL); rb->labelsize(12);
rb = new Fl_Radio_Round_Button(5,31,150,12, "Fl_Printer"); rb->callback(operation_cb, NULL); rb->labelsize(12);
@@ -794,9 +791,9 @@ int main(int argc, char ** argv) {
rb = new Fl_Radio_Round_Button(5,57,150,12, "Fl_EPS_File_Surface"); rb->callback(operation_cb, NULL); rb->labelsize(12);
rb = new Fl_Radio_Round_Button(170,57,150,12, "Fl_SVG_File_Surface"); rb->callback(operation_cb, NULL); rb->labelsize(12);
g1->end();
-
+
Fl_Group *g2 = new Fl_Group(w3->x(),w3->y(),w3->w(),w3->h());
- rb = new Fl_Radio_Round_Button(170,5,150,12, "Decorated Window");
+ rb = new Fl_Radio_Round_Button(170,5,150,12, "Decorated Window");
rb->set(); rb->callback(target_cb, w2); target = w2;
rb = new Fl_Radio_Round_Button(170,22,150,12, "Sub-window"); rb->callback(target_cb, w3);
rb = new Fl_Radio_Round_Button(170,39,150,12, "Group"); rb->callback(target_cb, group);
@@ -804,22 +801,18 @@ int main(int argc, char ** argv) {
Fl_Button *b4 = new Fl_Button(330, (w3->h() - 25)/2, 150, 25, "GO");
b4->callback((Fl_Callback*)copy,NULL);
w3->end();
-
+
w2->end();
Fl_RGB_Image *rgba_icon = new Fl_RGB_Image(pixmap);
Fl_Window::default_icon(rgba_icon);
- //w2->icon(rgba_icon);
+ // w2->icon(rgba_icon);
delete rgba_icon;
w2->show(argc, argv);
-
+
Fl::run();
delete pixmap;
delete b_bitmap.image();
delete rgb;
-
+
return 0;
}
-
-//
-// End of "$Id$"
-//
diff --git a/test/doublebuffer.cxx b/test/doublebuffer.cxx
index d36910eca..805a6e4b6 100644
--- a/test/doublebuffer.cxx
+++ b/test/doublebuffer.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Double-buffering test program for the Fast Light Tool Kit (FLTK).
//
// This demo shows how double buffering helps, by drawing the
@@ -19,11 +17,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -113,7 +111,3 @@ int main(int argc, char **argv) {
w2.show();
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/editor.cxx b/test/editor.cxx
index 176a8d79b..3170362b3 100644
--- a/test/editor.cxx
+++ b/test/editor.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// A simple text editor program for the Fast Light Tool Kit (FLTK).
//
// This program is described in Chapter 4 of the FLTK Programmer's Guide.
@@ -13,9 +11,9 @@
//
// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// https://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
//
@@ -50,7 +48,7 @@ Fl_Text_Buffer *textbuf = 0;
// width of line number display, if enabled
const int line_num_width = 75;
-// #define DEV_TEST // uncomment this line ...
+// #define DEV_TEST // uncomment this line ...
// ... to enable additional test features for developers,
// particularly to test Fl_Text_Display and/or Fl_Text_Editor.
@@ -58,89 +56,89 @@ const int line_num_width = 75;
#define TS 14 // default editor textsize
Fl_Text_Buffer *stylebuf = 0;
Fl_Text_Display::Style_Table_Entry
- styletable[] = { // Style table
- { FL_BLACK, FL_COURIER, TS }, // A - Plain
- { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS }, // B - Line comments
- { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS }, // C - Block comments
- { FL_BLUE, FL_COURIER, TS }, // D - Strings
- { FL_DARK_RED, FL_COURIER, TS }, // E - Directives
- { FL_DARK_RED, FL_COURIER_BOLD, TS }, // F - Types
- { FL_BLUE, FL_COURIER_BOLD, TS }, // G - Keywords
- };
-const char *code_keywords[] = { // List of known C/C++ keywords...
- "and",
- "and_eq",
- "asm",
- "bitand",
- "bitor",
- "break",
- "case",
- "catch",
- "compl",
- "continue",
- "default",
- "delete",
- "do",
- "else",
- "false",
- "for",
- "goto",
- "if",
- "new",
- "not",
- "not_eq",
- "operator",
- "or",
- "or_eq",
- "return",
- "switch",
- "template",
- "this",
- "throw",
- "true",
- "try",
- "while",
- "xor",
- "xor_eq"
- };
-const char *code_types[] = { // List of known C/C++ types...
- "auto",
- "bool",
- "char",
- "class",
- "const",
- "const_cast",
- "double",
- "dynamic_cast",
- "enum",
- "explicit",
- "extern",
- "float",
- "friend",
- "inline",
- "int",
- "long",
- "mutable",
- "namespace",
- "private",
- "protected",
- "public",
- "register",
- "short",
- "signed",
- "sizeof",
- "static",
- "static_cast",
- "struct",
- "template",
- "typedef",
- "typename",
- "union",
- "unsigned",
- "virtual",
- "void",
- "volatile"
- };
+ styletable[] = { // Style table
+ { FL_BLACK, FL_COURIER, TS }, // A - Plain
+ { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS }, // B - Line comments
+ { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS }, // C - Block comments
+ { FL_BLUE, FL_COURIER, TS }, // D - Strings
+ { FL_DARK_RED, FL_COURIER, TS }, // E - Directives
+ { FL_DARK_RED, FL_COURIER_BOLD, TS }, // F - Types
+ { FL_BLUE, FL_COURIER_BOLD, TS }, // G - Keywords
+ };
+const char *code_keywords[] = { // List of known C/C++ keywords...
+ "and",
+ "and_eq",
+ "asm",
+ "bitand",
+ "bitor",
+ "break",
+ "case",
+ "catch",
+ "compl",
+ "continue",
+ "default",
+ "delete",
+ "do",
+ "else",
+ "false",
+ "for",
+ "goto",
+ "if",
+ "new",
+ "not",
+ "not_eq",
+ "operator",
+ "or",
+ "or_eq",
+ "return",
+ "switch",
+ "template",
+ "this",
+ "throw",
+ "true",
+ "try",
+ "while",
+ "xor",
+ "xor_eq"
+ };
+const char *code_types[] = { // List of known C/C++ types...
+ "auto",
+ "bool",
+ "char",
+ "class",
+ "const",
+ "const_cast",
+ "double",
+ "dynamic_cast",
+ "enum",
+ "explicit",
+ "extern",
+ "float",
+ "friend",
+ "inline",
+ "int",
+ "long",
+ "mutable",
+ "namespace",
+ "private",
+ "protected",
+ "public",
+ "register",
+ "short",
+ "signed",
+ "sizeof",
+ "static",
+ "static_cast",
+ "struct",
+ "template",
+ "typedef",
+ "typename",
+ "union",
+ "unsigned",
+ "virtual",
+ "void",
+ "volatile"
+ };
//
@@ -162,11 +160,11 @@ extern "C" {
void
style_parse(const char *text,
char *style,
- int length) {
- char current;
- int col;
- int last;
- char buf[255],
+ int length) {
+ char current;
+ int col;
+ int last;
+ char buf[255],
*bufptr;
const char *temp;
@@ -189,64 +187,64 @@ style_parse(const char *text,
current = 'E';
} else if (strncmp(text, "//", 2) == 0) {
current = 'B';
- for (; length > 0 && *text != '\n'; length --, text ++) *style++ = 'B';
+ for (; length > 0 && *text != '\n'; length --, text ++) *style++ = 'B';
if (length == 0) break;
} else if (strncmp(text, "/*", 2) == 0) {
current = 'C';
} else if (strncmp(text, "\\\"", 2) == 0) {
// Quoted quote...
- *style++ = current;
- *style++ = current;
- text ++;
- length --;
- col += 2;
- continue;
+ *style++ = current;
+ *style++ = current;
+ text ++;
+ length --;
+ col += 2;
+ continue;
} else if (*text == '\"') {
current = 'D';
} else if (!last && (islower((*text)&255) || *text == '_')) {
// Might be a keyword...
- for (temp = text, bufptr = buf;
- (islower((*temp)&255) || *temp == '_') && bufptr < (buf + sizeof(buf) - 1);
- *bufptr++ = *temp++) {
- // nothing
+ for (temp = text, bufptr = buf;
+ (islower((*temp)&255) || *temp == '_') && bufptr < (buf + sizeof(buf) - 1);
+ *bufptr++ = *temp++) {
+ // nothing
}
if (!islower((*temp)&255) && *temp != '_') {
- *bufptr = '\0';
+ *bufptr = '\0';
bufptr = buf;
- if (bsearch(&bufptr, code_types,
- sizeof(code_types) / sizeof(code_types[0]),
- sizeof(code_types[0]), compare_keywords)) {
- while (text < temp) {
- *style++ = 'F';
- text ++;
- length --;
- col ++;
- }
-
- text --;
- length ++;
- last = 1;
- continue;
- } else if (bsearch(&bufptr, code_keywords,
- sizeof(code_keywords) / sizeof(code_keywords[0]),
- sizeof(code_keywords[0]), compare_keywords)) {
- while (text < temp) {
- *style++ = 'G';
- text ++;
- length --;
- col ++;
- }
-
- text --;
- length ++;
- last = 1;
- continue;
- }
- }
+ if (bsearch(&bufptr, code_types,
+ sizeof(code_types) / sizeof(code_types[0]),
+ sizeof(code_types[0]), compare_keywords)) {
+ while (text < temp) {
+ *style++ = 'F';
+ text ++;
+ length --;
+ col ++;
+ }
+
+ text --;
+ length ++;
+ last = 1;
+ continue;
+ } else if (bsearch(&bufptr, code_keywords,
+ sizeof(code_keywords) / sizeof(code_keywords[0]),
+ sizeof(code_keywords[0]), compare_keywords)) {
+ while (text < temp) {
+ *style++ = 'G';
+ text ++;
+ length --;
+ col ++;
+ }
+
+ text --;
+ length ++;
+ last = 1;
+ continue;
+ }
+ }
}
} else if (current == 'C' && strncmp(text, "*/", 2) == 0) {
// Close a C comment...
@@ -261,18 +259,18 @@ style_parse(const char *text,
// Continuing in string...
if (strncmp(text, "\\\"", 2) == 0) {
// Quoted end quote...
- *style++ = current;
- *style++ = current;
- text ++;
- length --;
- col += 2;
- continue;
+ *style++ = current;
+ *style++ = current;
+ text ++;
+ length --;
+ col += 2;
+ continue;
} else if (*text == '\"') {
// End quote...
- *style++ = current;
- col ++;
- current = 'A';
- continue;
+ *style++ = current;
+ col ++;
+ current = 'A';
+ continue;
}
}
@@ -328,17 +326,17 @@ style_unfinished_cb(int, void*) {
//
void
-style_update(int pos, // I - Position of update
- int nInserted, // I - Number of inserted chars
- int nDeleted, // I - Number of deleted chars
- int /*nRestyled*/, // I - Number of restyled chars
- const char * /*deletedText*/,// I - Text that was deleted
- void *cbArg) { // I - Callback data
- int start, // Start of text
- end; // End of text
- char last, // Last style on line
- *style, // Style data
- *text; // Text data
+style_update(int pos, // I - Position of update
+ int nInserted, // I - Number of inserted chars
+ int nDeleted, // I - Number of deleted chars
+ int /*nRestyled*/, // I - Number of restyled chars
+ const char * /*deletedText*/,// I - Text that was deleted
+ void *cbArg) { // I - Callback data
+ int start, // Start of text
+ end; // End of text
+ char last, // Last style on line
+ *style, // Style data
+ *text; // Text data
// If this is just a selection change, just unselect the style buffer...
@@ -435,17 +433,17 @@ class EditorWindow : public Fl_Double_Window {
#ifdef DEV_TEST
- Fl_Button *plus; // increase width
- Fl_Button *minus; // decrease width
- Fl_Button *vscroll; // toggle vert. scrollbar left/right
- Fl_Button *hscroll; // toggle hor. scrollbar top/bottom
- Fl_Button *lnum; // toggle line number display
- Fl_Button *wrap; // toggle wrap mode
+ Fl_Button *plus; // increase width
+ Fl_Button *minus; // decrease width
+ Fl_Button *vscroll; // toggle vert. scrollbar left/right
+ Fl_Button *hscroll; // toggle hor. scrollbar top/bottom
+ Fl_Button *lnum; // toggle line number display
+ Fl_Button *wrap; // toggle wrap mode
#endif // DEV_TEST
- int wrap_mode;
- int line_numbers;
+ int wrap_mode;
+ int line_numbers;
Fl_Text_Editor *editor;
char search[256];
@@ -485,8 +483,8 @@ void resize_cb(Fl_Widget *b, void *v) {
Fl_Window *w = b->window();
int dw = (int)(long)v;
- const int fac = 16; // factor
- const int num = 1; // loop count
+ const int fac = 16; // factor
+ const int num = 1; // loop count
dw *= fac;
@@ -502,22 +500,22 @@ void scroll_cb(Fl_Widget *b, void *v) {
int align = ed->scrollbar_align();
switch(n) {
- case 1: // vscroll
+ case 1: // vscroll
if (align & FL_ALIGN_LEFT) {
- align &= ~FL_ALIGN_LEFT;
- align |= FL_ALIGN_RIGHT;
+ align &= ~FL_ALIGN_LEFT;
+ align |= FL_ALIGN_RIGHT;
} else {
- align &= ~FL_ALIGN_RIGHT;
- align |= FL_ALIGN_LEFT;
+ align &= ~FL_ALIGN_RIGHT;
+ align |= FL_ALIGN_LEFT;
}
break;
- case 2: // hscroll
+ case 2: // hscroll
if (align & FL_ALIGN_TOP) {
- align &= ~FL_ALIGN_TOP;
- align |= FL_ALIGN_BOTTOM;
+ align &= ~FL_ALIGN_TOP;
+ align |= FL_ALIGN_BOTTOM;
} else {
- align &= ~FL_ALIGN_BOTTOM;
- align |= FL_ALIGN_TOP;
+ align &= ~FL_ALIGN_BOTTOM;
+ align |= FL_ALIGN_TOP;
}
break;
default:
@@ -544,10 +542,10 @@ void lnum_cb(Fl_Widget *w, void* v) {
Fl_Text_Editor *ed = (Fl_Text_Editor*)ew->editor;
ew->line_numbers = 1 - ew->line_numbers;
if (ew->line_numbers) {
- ed->linenumber_width(line_num_width); // enable
+ ed->linenumber_width(line_num_width); // enable
ed->linenumber_size(ed->textsize());
} else {
- ed->linenumber_width(0); // disable
+ ed->linenumber_width(0); // disable
}
ew->redraw();
}
@@ -615,10 +613,10 @@ void linenumbers_cb(Fl_Widget *w, void* v) {
Fl_Menu_Bar* m = (Fl_Menu_Bar*)w;
const Fl_Menu_Item* i = m->mvalue();
if ( i->value() ) {
- e->editor->linenumber_width(line_num_width); // enable
+ e->editor->linenumber_width(line_num_width); // enable
e->editor->linenumber_size(e->editor->textsize());
} else {
- e->editor->linenumber_width(0); // disable
+ e->editor->linenumber_width(0); // disable
}
e->line_numbers = (i->value()?1:0);
e->redraw();
@@ -905,7 +903,7 @@ Fl_Window* new_view() {
w->editor->buffer(textbuf);
w->editor->highlight_data(stylebuf, styletable,
sizeof(styletable) / sizeof(styletable[0]),
- 'A', style_unfinished_cb, 0);
+ 'A', style_unfinished_cb, 0);
#ifdef DEV_TEST
@@ -969,7 +967,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx
index 3c72cdd70..83b75bab9 100644
--- a/test/file_chooser.cxx
+++ b/test/file_chooser.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// File chooser test program.
//
// Copyright 1999-2010 by Michael Sweet.
@@ -10,11 +8,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
// Contents:
//
@@ -50,11 +48,11 @@
// Globals...
//
-Fl_Input *filter;
-Fl_File_Browser *files;
-Fl_File_Chooser *fc;
-Fl_Shared_Image *image = 0;
-Fl_Simple_Terminal *tty = 0;
+Fl_Input *filter;
+Fl_File_Browser *files;
+Fl_File_Chooser *fc;
+Fl_Shared_Image *image = 0;
+Fl_Simple_Terminal *tty = 0;
// for choosing extra groups
Fl_Choice *ch_extra;
@@ -68,29 +66,29 @@ Fl_Check_Button *version = (Fl_Check_Button*)0;
// Functions...
//
-void close_callback(void);
-void create_callback(void);
-void dir_callback(void);
-void fc_callback(Fl_File_Chooser *, void *);
-void multi_callback(void);
-Fl_Image *pdf_check(const char *, uchar *, int);
-Fl_Image *ps_check(const char *, uchar *, int);
-void show_callback(void);
+void close_callback(void);
+void create_callback(void);
+void dir_callback(void);
+void fc_callback(Fl_File_Chooser *, void *);
+void multi_callback(void);
+Fl_Image *pdf_check(const char *, uchar *, int);
+Fl_Image *ps_check(const char *, uchar *, int);
+void show_callback(void);
-void extra_callback(Fl_Choice*,void*);
+void extra_callback(Fl_Choice*,void*);
//
// 'main()' - Create a file chooser and wait for a selection to be made.
//
-int // O - Exit status
-main(int argc, // I - Number of command-line arguments
- char *argv[]) // I - Command-line arguments
+int // O - Exit status
+main(int argc, // I - Number of command-line arguments
+ char *argv[]) // I - Command-line arguments
{
- Fl_Double_Window *window;// Main window
- Fl_Button *button;// Buttons
+ Fl_Double_Window *window;// Main window
+ Fl_Button *button;// Buttons
Fl_Group *grp; // Groups
- Fl_File_Icon *icon; // New file icon
+ Fl_File_Icon *icon; // New file icon
// Make the file chooser...
@@ -125,8 +123,8 @@ main(int argc, // I - Number of command-line arguments
else
filter->value("PDF Files (*.pdf)\t"
"PostScript Files (*.ps)\t"
- "Image Files (*.{bmp,gif,jpg,png})\t"
- "C/C++ Source Files (*.{c,C,cc,cpp,cxx})");
+ "Image Files (*.{bmp,gif,jpg,png})\t"
+ "C/C++ Source Files (*.{c,C,cc,cpp,cxx})");
button = new Fl_Button(365, 10, 25, 25);
button->tooltip("Click to open file browser..");
@@ -250,10 +248,10 @@ dir_callback(void)
//
void
-fc_callback(Fl_File_Chooser *fc, // I - File chooser
- void *data) // I - Data
+fc_callback(Fl_File_Chooser *fc, // I - File chooser
+ void *data) // I - Data
{
- const char *filename; // Current filename
+ const char *filename; // Current filename
tty->printf("fc_callback(fc = %p, data = %p)\n", fc, data);
@@ -279,14 +277,14 @@ multi_callback(void)
// 'pdf_check()' - Check for and load the first page of a PDF file.
//
-Fl_Image * // O - Page image or NULL
-pdf_check(const char *name, // I - Name of file
- uchar *header, // I - Header data
- int) // I - Length of header data (unused)
+Fl_Image * // O - Page image or NULL
+pdf_check(const char *name, // I - Name of file
+ uchar *header, // I - Header data
+ int) // I - Length of header data (unused)
{
- const char *home; // Home directory
- char preview[FL_PATH_MAX], // Preview filename
- command[3 * FL_PATH_MAX]; // Command
+ const char *home; // Home directory
+ char preview[FL_PATH_MAX], // Preview filename
+ command[3 * FL_PATH_MAX]; // Command
if (memcmp(header, "%PDF", 4) != 0)
@@ -297,8 +295,8 @@ pdf_check(const char *name, // I - Name of file
sprintf(command,
"gs -r100 -dFIXED -sDEVICE=ppmraw -dQUIET -dNOPAUSE -dBATCH "
- "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' "
- "-dFirstPage=1 -dLastPage=1 \'%s\' 2>/dev/null", preview, name);
+ "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' "
+ "-dFirstPage=1 -dLastPage=1 \'%s\' 2>/dev/null", preview, name);
if (system(command)) return 0;
@@ -310,19 +308,19 @@ pdf_check(const char *name, // I - Name of file
// 'ps_check()' - Check for and load the first page of a PostScript file.
//
-Fl_Image * // O - Page image or NULL
-ps_check(const char *name, // I - Name of file
- uchar *header, // I - Header data
- int) // I - Length of header data (unused)
+Fl_Image * // O - Page image or NULL
+ps_check(const char *name, // I - Name of file
+ uchar *header, // I - Header data
+ int) // I - Length of header data (unused)
{
- const char *home; // Home directory
- char preview[FL_PATH_MAX], // Preview filename
- outname[FL_PATH_MAX], // Preview PS file
- command[3 * FL_PATH_MAX]; // Command
- FILE *in, // Input file
- *out; // Output file
- int page; // Current page
- char line[256]; // Line from file
+ const char *home; // Home directory
+ char preview[FL_PATH_MAX], // Preview filename
+ outname[FL_PATH_MAX], // Preview PS file
+ command[3 * FL_PATH_MAX]; // Command
+ FILE *in, // Input file
+ *out; // Output file
+ int page; // Current page
+ char line[256]; // Line from file
if (memcmp(header, "%!", 2) != 0)
@@ -341,12 +339,12 @@ ps_check(const char *name, // I - Name of file
page = 0;
while (fgets(line, sizeof(line), in) != NULL) {
- if (strncmp(line, "%%Page:", 7) == 0) {
+ if (strncmp(line, "%%Page:", 7) == 0) {
page ++;
- if (page > 1) break;
- }
+ if (page > 1) break;
+ }
- fputs(line, out);
+ fputs(line, out);
}
fclose(in);
@@ -360,8 +358,8 @@ ps_check(const char *name, // I - Name of file
sprintf(command,
"gs -r100 -dFIXED -sDEVICE=ppmraw -dQUIET -dNOPAUSE -dBATCH "
- "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' \'%s\' 2>/dev/null",
- preview, outname);
+ "-sstdout=\"%%stderr\" -sOUTPUTFILE=\'%s\' \'%s\' 2>/dev/null",
+ preview, outname);
if (system(command)) return 0;
@@ -376,9 +374,9 @@ ps_check(const char *name, // I - Name of file
void
show_callback(void)
{
- int i; // Looping var
- int count; // Number of files selected
- char relative[FL_PATH_MAX]; // Relative filename
+ int i; // Looping var
+ int count; // Number of files selected
+ char relative[FL_PATH_MAX]; // Relative filename
if (filter->value()[0])
@@ -399,7 +397,7 @@ show_callback(void)
{
if (!fc->value(i)) break;
fl_filename_relative(relative, sizeof(relative), fc->value(i));
- tty->printf("%d/%d) %sPicked: '%s'\n Relative: '%s'%s\n", i, count,
+ tty->printf("%d/%d) %sPicked: '%s'\n Relative: '%s'%s\n", i, count,
TERMINAL_GREEN, fc->value(i), relative, TERMINAL_NORMAL);
files->add(relative, Fl_File_Icon::find(fc->value(i), Fl_File_Icon::PLAIN));
}
@@ -407,8 +405,3 @@ show_callback(void)
files->redraw();
}
}
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/fonts.cxx b/test/fonts.cxx
index ac19abce9..dbc8a7a7e 100644
--- a/test/fonts.cxx
+++ b/test/fonts.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Font demo program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -356,7 +354,7 @@ int main(int argc, char **argv) {
char *p = buffer;
if (t & FL_BOLD) {*p++ = '@'; *p++ = 'b';}
if (t & FL_ITALIC) {*p++ = '@'; *p++ = 'i';}
- *p++ = '@'; *p++ = '.'; // Suppress subsequent formatting - some MS fonts have '@' in their name
+ *p++ = '@'; *p++ = '.'; // Suppress subsequent formatting - some MS fonts have '@' in their name
strcpy(p,name);
name = buffer;
}
@@ -377,7 +375,3 @@ int main(int argc, char **argv) {
form->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/forms.cxx b/test/forms.cxx
index d4f9ee0e2..1fff9ca4f 100644
--- a/test/forms.cxx
+++ b/test/forms.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Another forms demo for the Fast Light Tool Kit (FLTK).
//
// This is an XForms program with some changes for FLTK.
@@ -14,11 +12,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include // changed for fltk
@@ -187,7 +185,3 @@ main (int argc, char *argv[])
return 0;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/fractals.cxx b/test/fractals.cxx
index 435ede1b6..da6dec60e 100644
--- a/test/fractals.cxx
+++ b/test/fractals.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fractal drawing demo for the Fast Light Tool Kit (FLTK).
//
// This is a GLUT demo program, with modifications to
@@ -13,11 +11,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -34,10 +32,10 @@ int main(int, char**) {
*
* Usage: fractals
*
- * Homework 6, Part 2: fractal mountains and fractal trees
+ * Homework 6, Part 2: fractal mountains and fractal trees
* (Pretty Late)
*
- * Draws fractal mountains and trees -- and an island of mountains in water
+ * Draws fractal mountains and trees -- and an island of mountains in water
* (I tried having trees on the island but it didn't work too well.)
*
* Two viewer modes: polar and flying (both restrained to y>0 for up vector).
@@ -75,7 +73,7 @@ int main(int, char**) {
# define srand48(x) (srand((x)))
#endif
-typedef enum { NOTALLOWED, MOUNTAIN, TREE, ISLAND, BIGMTN, STEM, LEAF,
+typedef enum { NOTALLOWED, MOUNTAIN, TREE, ISLAND, BIGMTN, STEM, LEAF,
MOUNTAIN_MAT, WATER_MAT, LEAF_MAT, TREE_MAT, STEMANDLEAVES,
AXES } DisplayLists;
@@ -83,9 +81,9 @@ typedef enum { NOTALLOWED, MOUNTAIN, TREE, ISLAND, BIGMTN, STEM, LEAF,
int Rebuild = 1, /* Rebuild display list in next display? */
fractal = TREE, /* What fractal are we building */
- Level = 4; /* levels of recursion for fractals */
+ Level = 4; /* levels of recursion for fractals */
-int DrawAxes = 0;
+int DrawAxes = 0;
/***************************************************************/
/************************* VECTOR JUNK *************************/
@@ -97,7 +95,7 @@ void printvert(float v[3])
fprintf(stderr, "(%f, %f, %f)\n", v[0], v[1], v[2]);
}
-#if 0 // removed for FL, it is in fracviewer.c
+#if 0 // removed for FL, it is in fracviewer.c
/* normalizes v */
void normalize(GLfloat v[3])
{
@@ -140,7 +138,7 @@ float xzlength(float v1[3], float v2[3])
float xzslope(float v1[3], float v2[3])
{
return ((v1[0] != v2[0]) ? ((v1[2] - v2[2]) / (v1[0] - v2[0]))
- : FLT_MAX);
+ : FLT_MAX);
}
@@ -149,14 +147,14 @@ float xzslope(float v1[3], float v2[3])
/***************************************************************/
GLfloat DispFactor[MAXLEVEL]; /* Array of what to multiply random number
- by for a given level to get midpoint
- displacement */
+ by for a given level to get midpoint
+ displacement */
GLfloat DispBias[MAXLEVEL]; /* Array of what to add to random number
- before multiplying it by DispFactor */
+ before multiplying it by DispFactor */
#define NUMRANDS 191
float RandTable[NUMRANDS]; /* hash table of random numbers so we can
- raise the same midpoints by the same amount */
+ raise the same midpoints by the same amount */
/* The following are for permitting an edge of a moutain to be */
/* pegged so it won't be displaced up or down. This makes it */
@@ -164,7 +162,7 @@ float RandTable[NUMRANDS]; /* hash table of random numbers so we can
GLfloat Verts[3][3], /* Vertices of outside edges of mountain */
Slopes[3]; /* Slopes between these outside edges */
-int Pegged[3]; /* Is this edge pegged or not */
+int Pegged[3]; /* Is this edge pegged or not */
/*
* Comes up with a new table of random numbers [0,1)
@@ -180,14 +178,14 @@ void InitRandTable(unsigned int seed)
/* calculate midpoint and displace it if required */
void Midpoint(GLfloat mid[3], GLfloat v1[3], GLfloat v2[3],
- int edge, int level)
+ int edge, int level)
{
unsigned hash;
mid[0] = (v1[0] + v2[0]) / 2;
mid[1] = (v1[1] + v2[1]) / 2;
mid[2] = (v1[2] + v2[2]) / 2;
- if (!Pegged[edge] || (fabs(xzslope(Verts[edge], mid)
+ if (!Pegged[edge] || (fabs(xzslope(Verts[edge], mid)
- Slopes[edge]) > 0.00001)) {
srand48((int)((v1[0]+v2[0])*23344));
hash = unsigned(drand48() * 7334334);
@@ -198,9 +196,9 @@ void Midpoint(GLfloat mid[3], GLfloat v1[3], GLfloat v2[3],
}
/*
- * Recursive moutain drawing routine -- from lecture with addition of
+ * Recursive moutain drawing routine -- from lecture with addition of
* allowing an edge to be pegged. This function requires the above
- * globals to be set, as well as the Level global for fractal level
+ * globals to be set, as well as the Level global for fractal level
*/
static float cutoff = -1;
@@ -239,9 +237,9 @@ void FractalMountain(GLfloat v1[3], GLfloat v2[3], GLfloat v3[3],
GLfloat fraction[8] = { 0.3, 0.3, 0.4, 0.2, 0.3, 0.2, 0.4, 0.4 };
GLfloat bias[8] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
int i;
- float avglen = (xzlength(v1, v2) +
+ float avglen = (xzlength(v1, v2) +
xzlength(v2, v3) +
- xzlength(v3, v1) / 3);
+ xzlength(v3, v1) / 3);
for (i = 0; i < 3; i++) {
Verts[0][i] = v1[i]; /* set mountain vertex globals */
@@ -254,15 +252,15 @@ void FractalMountain(GLfloat v1[3], GLfloat v2[3], GLfloat v3[3],
Slopes[1] = xzslope(Verts[1], Verts[2]);
Slopes[2] = xzslope(Verts[2], Verts[0]);
- lengths[0] = avglen;
- for (i = 1; i < Level; i++) {
+ lengths[0] = avglen;
+ for (i = 1; i < Level; i++) {
lengths[i] = lengths[i-1]/2; /* compute edge length for each level */
}
- for (i = 0; i < Level; i++) { /* DispFactor and DispBias arrays */
+ for (i = 0; i < Level; i++) { /* DispFactor and DispBias arrays */
DispFactor[i] = (lengths[i] * ((i <= 7) ? fraction[i] : fraction[7]));
DispBias[i] = ((i <= 7) ? bias[i] : bias[7]);
- }
+ }
glBegin(GL_TRIANGLES);
FMR(v1, v2, v3, 0); /* issues no GL but vertex calls */
@@ -301,7 +299,7 @@ long TreeSeed; /* for srand48 - remember so we can build "same tree"
at a different level */
/*
- * recursive tree drawing thing, fleshed out from class notes pseudocode
+ * recursive tree drawing thing, fleshed out from class notes pseudocode
*/
void FractalTree(int level, long level_seed)
{
@@ -318,7 +316,7 @@ void FractalTree(int level, long level_seed)
glScalef(0.7, 0.7, 0.7);
srand48(level_seed+1);
- glPushMatrix();
+ glPushMatrix();
glRotatef(110 + drand48()*40, 0, 1, 0);
glRotatef(30 + drand48()*20, 0, 0, 1);
FractalTree(level + 1, level_seed+4);
@@ -412,7 +410,7 @@ void CreateTree(void)
FractalTree(0, TreeSeed);
glPopAttrib();
glPopMatrix();
- glEndList();
+ glEndList();
}
/*
@@ -477,7 +475,7 @@ void CreateIsland(void)
glPopMatrix();
glPopAttrib();
- glEndList();
+ glEndList();
}
@@ -565,7 +563,7 @@ void myGLInit(void)
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
-
+
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
glEnable(GL_LIGHTING);
@@ -590,7 +588,7 @@ void myGLInit(void)
CreateTreeLists();
glFlush();
-}
+}
/***************************************************************/
/************************ GLUT STUFF ***************************/
@@ -792,7 +790,7 @@ int main(int argc, char** argv)
g->end();
b = new Fl_Button(400,50,100,30,"New Fractal"); b->callback(handlemenu,(void*)MENU_RAND);
-
+
b = new Fl_Button( 10,10,100,30,"Mountain"); b->callback(choosefract,(void*)MOUNTAIN);
b = new Fl_Button(110,10,100,30,"Tree"); b->callback(choosefract,(void*)TREE);
b = new Fl_Button(210,10,100,30,"Island"); b->callback(choosefract,(void*)ISLAND);
@@ -817,7 +815,7 @@ int main(int argc, char** argv)
NewFractals();
agvMakeAxesList(AXES);
- myGLInit();
+ myGLInit();
MenuInit();
glutMainLoop(); // you could use Fl::run() instead
@@ -825,7 +823,3 @@ int main(int argc, char** argv)
return 0;
}
#endif
-
-//
-// End of "$Id$".
-//
diff --git a/test/fracviewer.cxx b/test/fracviewer.cxx
index e1467619b..2e8d9cdcb 100644
--- a/test/fracviewer.cxx
+++ b/test/fracviewer.cxx
@@ -50,18 +50,18 @@
#define INIT_EY -2.0
#define INIT_EZ -2.0
#define INIT_MOVE 0.01
-#define MINMOVE 0.001
+#define MINMOVE 0.001
/* Start in this mode */
-#define INIT_MODE POLAR
+#define INIT_MODE POLAR
/* Controls: */
/* map 0-9 to an EyeMove value when number key is hit in FLYING mode */
-#define SPEEDFUNCTION(x) ((x)*(x)*0.001)
+#define SPEEDFUNCTION(x) ((x)*(x)*0.001)
/* Multiply EyeMove by (1+-MOVEFRACTION) when +/- hit in FLYING mode */
-#define MOVEFRACTION 0.25
+#define MOVEFRACTION 0.25
/* What to multiply number of pixels mouse moved by to get rotation amount */
#define EL_SENS 0.5
@@ -92,7 +92,7 @@ int MoveMode = INIT_MODE; /* FLYING or POLAR mode? */
GLfloat Ex = INIT_EX, /* flying parameters */
Ey = INIT_EY,
Ez = INIT_EZ,
- EyeMove = INIT_MOVE,
+ EyeMove = INIT_MOVE,
EyeDist = INIT_DIST, /* polar params */
AzSpin = INIT_AZ_SPIN,
@@ -106,15 +106,15 @@ int agvMoving; /* Currently moving? */
int downx, downy, /* for tracking mouse position */
lastx, lasty,
downb = -1; /* and button status */
-
+
GLfloat downDist, downEl, downAz, /* for saving state of things */
downEx, downEy, downEz, /* when button is pressed */
- downEyeMove;
+ downEyeMove;
GLfloat dAz, dEl, lastAz, lastEl; /* to calculate spinning w/ polar motion */
int AdjustingAzEl = 0;
-int AllowIdle, RedisplayWindow;
+int AllowIdle, RedisplayWindow;
/* If AllowIdle is 1 it means AGV will install its own idle which
* will update the viewpoint as needed and send glutPostRedisplay() to the
* window RedisplayWindow which was set in agvInit(). AllowIdle of 0
@@ -200,7 +200,7 @@ void FlyLookFrom(GLfloat x, GLfloat y, GLfloat z, GLfloat az, GLfloat el)
* Call viewing transformation based on movement mode
*/
void agvViewTransform(void)
-{
+{
switch (MoveMode) {
case FLYING:
FlyLookFrom(Ex, Ey, Ez, EyeAz, EyeEl);
@@ -212,7 +212,7 @@ void agvViewTransform(void)
}
/*
- * keep them vertical; I think this makes a lot of things easier,
+ * keep them vertical; I think this makes a lot of things easier,
* but maybe it wouldn't be too hard to adapt things to let you go
* upside down
*/
@@ -285,7 +285,7 @@ void MoveOn(int v)
/*
* set new redisplay window. If <= 0 it means we are not to install
- * an idle function and will rely on whoever does install one to
+ * an idle function and will rely on whoever does install one to
* put statement like "if (agvMoving) agvMove();" at end of it
*/
void agvSetAllowIdle(int allowidle)
@@ -368,16 +368,16 @@ void agvHandleButton(int button, int state, int x, int y)
lastAz = downAz = EyeAz;
AzSpin = ElSpin = dAz = dEl = 0;
AdjustingAzEl = 1;
- MoveOn(1);
+ MoveOn(1);
break;
case GLUT_MIDDLE_BUTTON:
downDist = EyeDist;
- downEx = Ex;
- downEy = Ey;
- downEz = Ez;
- downEyeMove = EyeMove;
- EyeMove = 0;
+ downEx = Ex;
+ downEy = Ey;
+ downEz = Ez;
+ downEyeMove = EyeMove;
+ EyeMove = 0;
}
} else if (state == GLUT_UP && button == downb) {
@@ -387,19 +387,19 @@ void agvHandleButton(int button, int state, int x, int y)
switch (button) {
case GLUT_LEFT_BUTTON:
if (MoveMode != FLYING) {
- AzSpin = -dAz;
- if (AzSpin < MIN_AZSPIN && AzSpin > -MIN_AZSPIN)
- AzSpin = 0;
- ElSpin = -dEl;
- if (ElSpin < MIN_ELSPIN && ElSpin > -MIN_ELSPIN)
- ElSpin = 0;
- }
+ AzSpin = -dAz;
+ if (AzSpin < MIN_AZSPIN && AzSpin > -MIN_AZSPIN)
+ AzSpin = 0;
+ ElSpin = -dEl;
+ if (ElSpin < MIN_ELSPIN && ElSpin > -MIN_ELSPIN)
+ ElSpin = 0;
+ }
AdjustingAzEl = 0;
MoveOn(1);
- break;
+ break;
case GLUT_MIDDLE_BUTTON:
- EyeMove = downEyeMove;
+ EyeMove = downEyeMove;
}
}
}
@@ -460,14 +460,14 @@ void agvHandleKeys(unsigned char key, int, int) {
SetMove(SPEEDFUNCTION((key-'0')));
else
switch(key) {
- case '+':
+ case '+':
if (EyeMove == 0)
SetMove(MINMOVE);
else
- SetMove(EyeMove *= (1 + MOVEFRACTION));
+ SetMove(EyeMove *= (1 + MOVEFRACTION));
break;
case '-':
- SetMove(EyeMove *= (1 - MOVEFRACTION));
+ SetMove(EyeMove *= (1 - MOVEFRACTION));
break;
}
}
@@ -522,11 +522,11 @@ void agvMakeAxesList(int displaylistnum)
for (j = 0; j < 21; j++) {
// glutSolidCube(0.1);
glTranslatef(i==0, i==1, i==2);
- }
+ }
glPopMatrix();
}
glPopAttrib();
- glEndList();
+ glEndList();
}
diff --git a/test/fracviewer.h b/test/fracviewer.h
index b51e65e8c..72dc5dc11 100644
--- a/test/fracviewer.h
+++ b/test/fracviewer.h
@@ -26,7 +26,7 @@
/*
- * Call agvInit() with glut's current window set to the window in
+ * Call agvInit() with glut's current window set to the window in
* which you want to run the viewer. Right after creating it is fine. It
* will remember that window for possible later use (see below) and
* registers mouse, motion, and keyboard handlers for that window (see below).
@@ -40,14 +40,14 @@
* agvMove();
*
* at the end of your idle function, to let AGV update the viewpoint if it
- * is moving.
+ * is moving.
*
* If allowidle is 1 it means AGV will install its own idle which
* will update the viewpoint as needed and send glutPostRedisplay() to the
* window which was current when agvInit() was called.
*
* agvSetIdleAllow changes this value so you can let AGV install its idle
- * when your idle isn't installed.
+ * when your idle isn't installed.
*
*/
void agvInit(int allowidle);
@@ -61,14 +61,14 @@ typedef enum { FLYING, POLAR } MovementType;
void agvSwitchMoveMode(int move);
/*
- * agvViewTransform basically does the appropriate gluLookAt() for the
+ * agvViewTransform basically does the appropriate gluLookAt() for the
* current position. So call it in your display on the projection matrix
*/
void agvViewTransform(void);
/*
* agvMoving will be set by AGV according to whether it needs you to call
- * agvMove() at the end of your idle function. You only need these if
+ * agvMove() at the end of your idle function. You only need these if
* you aren't allowing AGV to do its own idle.
* (Don't change the value of agvMoving)
*/
@@ -80,7 +80,7 @@ void agvMove(void);
* Keyboard input only matters in flying mode, and then only to set speed.
* Mouse input only uses left two buttons in both modes.
* These are all registered with agvInit(), but you could register
- * something else which called these, or reregister these as needed
+ * something else which called these, or reregister these as needed
*/
void agvHandleButton(int button, int state, int x, int y);
void agvHandleMotion(int x, int y);
diff --git a/test/fromdos.c b/test/fromdos.c
index 54dff5a9f..13450214c 100644
--- a/test/fromdos.c
+++ b/test/fromdos.c
@@ -17,8 +17,8 @@ int main(int argc, char** argv) {
for (;;) {
c = getchar();
while (c == '\r') {
- c = getchar();
- if (c != '\n') putchar(c);
+ c = getchar();
+ if (c != '\n') putchar(c);
}
if (c < 0) break;
putchar(c);
@@ -45,8 +45,8 @@ int main(int argc, char** argv) {
for (;;) {
c = getc(in);
while (c == '\r') {
- c = getc(in);
- if (c == '\n') mod=1; else putc(c,out);
+ c = getc(in);
+ if (c == '\n') mod=1; else putc(c,out);
}
if (c < 0) break;
putc(c,out);
diff --git a/test/fullscreen.cxx b/test/fullscreen.cxx
index 668ea460f..54be3701b 100644
--- a/test/fullscreen.cxx
+++ b/test/fullscreen.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
//
@@ -130,7 +128,7 @@ class fullscreen_window : public Fl_Single_Window {
Fl_Toggle_Light_Button *b4;
};
-fullscreen_window::fullscreen_window(int W, int H, const char *t) : Fl_Single_Window(W, H, t) {
+fullscreen_window::fullscreen_window(int W, int H, const char *t) : Fl_Single_Window(W, H, t) {
}
@@ -234,15 +232,15 @@ void update_screeninfo(Fl_Widget *b, void *p) {
sprintf(line, "Mouse screen work area: %dx%d@%d,%d", w, h, x, y);
browser->add(line);
for (int n = 0; n < Fl::screen_count(); n++) {
- int x, y, w, h;
+ int x, y, w, h;
float dpih, dpiv;
- Fl::screen_xywh(x, y, w, h, n);
+ Fl::screen_xywh(x, y, w, h, n);
Fl::screen_dpi(dpih, dpiv, n);
sprintf(line, "Screen %d: %dx%d@%d,%d DPI:%.1fx%.1f scale:%.2f", n, w, h, x, y, dpih, dpiv, Fl::screen_scale(n));
- browser->add(line);
- Fl::screen_work_area(x, y, w, h, n);
- sprintf(line, "Work area %d: %dx%d@%d,%d", n, w, h, x, y);
- browser->add(line);
+ browser->add(line);
+ Fl::screen_work_area(x, y, w, h, n);
+ sprintf(line, "Work area %d: %dx%d@%d,%d", n, w, h, x, y);
+ browser->add(line);
}
}
@@ -278,13 +276,13 @@ int main(int argc, char **argv) {
#endif
Fl_Window *w;
- if (twowindow) { // make it's own window
+ if (twowindow) { // make it's own window
sw.resizable(&sw);
w = &sw;
- window.set_modal(); // makes controls stay on top when fullscreen pushed
+ window.set_modal(); // makes controls stay on top when fullscreen pushed
argc--;
sw.show();
- } else { // otherwise make a subwindow
+ } else { // otherwise make a subwindow
window.add(sw);
window.resizable(&sw);
w = &window;
@@ -329,7 +327,7 @@ int main(int argc, char **argv) {
Fl_Browser *browser = new Fl_Browser(50,y,window.w()-60,100);
update_screeninfo(0, browser);
y+=100;
-
+
Fl_Button update(50,y,window.w()-60,30,"Update");
update.callback(update_screeninfo, browser);
y+=30;
@@ -338,10 +336,6 @@ int main(int argc, char **argv) {
window.end();
window.show(argc,argv);
-
+
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/gl_overlay.cxx b/test/gl_overlay.cxx
index ab52cc251..a635fd52f 100644
--- a/test/gl_overlay.cxx
+++ b/test/gl_overlay.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// OpenGL overlay test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -26,7 +24,7 @@
#if !HAVE_GL
#include
class shape_window : public Fl_Box {
-public:
+public:
int sides;
shape_window(int x,int y,int w,int h,const char *l=0)
:Fl_Box(FL_DOWN_BOX,x,y,w,h,l){
@@ -143,7 +141,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx
index 8a97e8f4b..5f265f55e 100644
--- a/test/glpuzzle.cxx
+++ b/test/glpuzzle.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// OpenGL puzzle demo for the Fast Light Tool Kit (FLTK).
//
// This is a GLUT demo program to demonstrate fltk's GLUT emulation.
@@ -14,9 +12,9 @@
//
// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// https://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
// Convenience options 'n' and ' ' and command line switch '-n' added for FLTK
@@ -39,9 +37,9 @@ int main(int, char**) {
#include
#include
#include
-#include // changed for fltk
+#include // changed for fltk
#include // added for fltk
-#include "trackball.c" // changed from trackball.h for fltk
+#include "trackball.c" // changed from trackball.h for fltk
#define WIDTH 4
#define HEIGHT 5
@@ -879,7 +877,7 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16])
makeIdentity(inverse);
for (i = 0; i < 4; i++) {
- /*
+ /*
** Look for largest element in column */
swap = i;
for (j = i + 1; j < 4; j++) {
@@ -889,7 +887,7 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16])
}
if (swap != i) {
- /*
+ /*
** Swap rows. */
for (k = 0; k < 4; k++) {
t = temp[i][k];
@@ -902,7 +900,7 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16])
}
}
if (temp[i][i] == 0) {
- /*
+ /*
** No non-zero pivot. The matrix is singular, which
shouldn't ** happen. This means the user gave us a
bad matrix. */
@@ -928,9 +926,9 @@ invertMatrix(const GLfloat src[16], GLfloat inverse[16])
/*
** This is a screwball function. What it does is the following:
- ** Given screen x and y coordinates, compute the corresponding object space
+ ** Given screen x and y coordinates, compute the corresponding object space
** x and y coordinates given that the object space z is 0.9 + OFFSETZ.
- ** Since the tops of (most) pieces are at z = 0.9 + OFFSETZ, we use that
+ ** Since the tops of (most) pieces are at z = 0.9 + OFFSETZ, we use that
** number.
*/
int
@@ -969,10 +967,10 @@ computeCoords(int piece, int mousex, int mousey,
finalMatrix[3 * 4 + 3];
d = finalMatrix[2 * 4 + 3];
- /*
- ** Ok, now we need to solve for z: ** (a + b z) / (c + d
+ /*
+ ** Ok, now we need to solve for z: ** (a + b z) / (c + d
- z) = height. ** ("height" is the height in object space we
+ z) = height. ** ("height" is the height in object space we
want to solve z for) ** ** ==> a + b z = height c +
height d z ** bz - height d z = height c - a ** z =
@@ -984,12 +982,12 @@ computeCoords(int piece, int mousex, int mousey,
z = top / bot;
- /*
+ /*
** Ok, no problem. ** Now we solve for x and y. We know
that w = c + d z, so we compute it. */
w = c + d * z;
- /*
+ /*
** Now for x and y: */
*selx = (in[0] * finalMatrix[0 * 4 + 0] +
in[1] * finalMatrix[1 * 4 + 0] +
@@ -1096,7 +1094,7 @@ moveSelection(float selx, float sely)
} else {
if (deltay > 0 && thePuzzle[selecty][selectx] == 10 &&
selectx == 1 && selecty == 3) {
- /* Allow visual movement of solution piece outside of the
+ /* Allow visual movement of solution piece outside of the
box */
move_x = selectx;
@@ -1497,7 +1495,3 @@ main(int argc, char **argv)
}
#endif // added for fltk's distribution
-
-//
-// End of "$Id$".
-//
diff --git a/test/hello.cxx b/test/hello.cxx
index ac1565996..b301832b7 100644
--- a/test/hello.cxx
+++ b/test/hello.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Hello, World! program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -32,7 +30,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-//
-// End of "$Id$".
-//
-
diff --git a/test/help_dialog.cxx b/test/help_dialog.cxx
index 5fc2dc2c4..2ee19c41a 100644
--- a/test/help_dialog.cxx
+++ b/test/help_dialog.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fl_Help_Dialog test program.
//
// Copyright 1999-2010 by Easy Software Products.
@@ -10,11 +8,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
// Contents:
//
@@ -26,16 +24,16 @@
//
#include
-#include /* FL_PATH_MAX */
-#include /* strcpy(), etc */
+#include /* FL_PATH_MAX */
+#include /* strcpy(), etc */
//
// 'main()' - Display the help GUI...
//
-int // O - Exit status
-main(int argc, // I - Number of command-line arguments
- char *argv[]) // I - Command-line arguments
+int // O - Exit status
+main(int argc, // I - Number of command-line arguments
+ char *argv[]) // I - Command-line arguments
{
Fl_Help_Dialog *help = new Fl_Help_Dialog;
char htmlname[FL_PATH_MAX];
@@ -58,7 +56,7 @@ main(int argc, // I - Number of command-line arguments
}
#endif
- help->load(htmlname); // TODO: add error check (when load() returns int instead of void)
+ help->load(htmlname); // TODO: add error check (when load() returns int instead of void)
help->show(1, argv);
@@ -68,7 +66,3 @@ main(int argc, // I - Number of command-line arguments
return 0;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/help_dialog.html b/test/help_dialog.html
index 01809f234..c5faa0eb4 100644
--- a/test/help_dialog.html
+++ b/test/help_dialog.html
@@ -265,20 +265,20 @@ This text should be between two horizontal lines.
6 Space
7 Space __
8 Space |
- 4 Space + 1 Tab |-- should all be
- 1 Tab __| same indent level
- 1 Tab + 1 Space
- 1 Tab + 2 Space
- 1 Tab + 3 Space
- 1 Tab + 4 Space
- 1 Tab + 5 Space
- 1 Tab + 6 Space
- 1 Tab + 7 Space __
- 1 Tab + 8 Space |
- 4 Space + 1 Tab + 8 Space |-- should all be
- 2 Tab __| same indent level
- 2 Tab + 1 Space
- 2 Tab + 2 Space
- 2 Tab + 3 Space
- ..
+ 4 Space + 1 Tab |-- should all be
+ 1 Tab __| same indent level
+ 1 Tab + 1 Space
+ 1 Tab + 2 Space
+ 1 Tab + 3 Space
+ 1 Tab + 4 Space
+ 1 Tab + 5 Space
+ 1 Tab + 6 Space
+ 1 Tab + 7 Space __
+ 1 Tab + 8 Space |
+ 4 Space + 1 Tab + 8 Space |-- should all be
+ 2 Tab __| same indent level
+ 2 Tab + 1 Space
+ 2 Tab + 2 Space
+ 2 Tab + 3 Space
+ ..
diff --git a/test/icon.cxx b/test/icon.cxx
index 75c43ab39..c36e9a066 100644
--- a/test/icon.cxx
+++ b/test/icon.cxx
@@ -7,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
diff --git a/test/iconize.cxx b/test/iconize.cxx
index a282fcc97..f058ef05c 100644
--- a/test/iconize.cxx
+++ b/test/iconize.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Iconize test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -68,7 +66,3 @@ int main(int argc, char **argv) {
control.callback(window_cb);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/image.cxx b/test/image.cxx
index f0d12743c..d90421ae3 100644
--- a/test/image.cxx
+++ b/test/image.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fl_Image test program for the Fast Light Tool Kit (FLTK).
//
// Notice that Fl_Image is for a static, multiple-reuse image, such
@@ -13,11 +11,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -40,12 +38,12 @@ void make_image() {
for (int x = 0; x < width; x++) {
double X = double(x)/(width-1);
*p++ = uchar(255*((1-X)*(1-Y))); // red in upper-left
- *p++ = uchar(255*((1-X)*Y)); // green in lower-left
- *p++ = uchar(255*(X*Y)); // blue in lower-right
+ *p++ = uchar(255*((1-X)*Y)); // green in lower-left
+ *p++ = uchar(255*(X*Y)); // blue in lower-right
X -= 0.5;
Y -= 0.5;
int alpha = (int)(255 * sqrt(X * X + Y * Y));
- if (alpha < 255) *p++ = uchar(alpha); // alpha transparency
+ if (alpha < 255) *p++ = uchar(alpha); // alpha transparency
else *p++ = 255;
Y += 0.5;
}
@@ -105,7 +103,7 @@ int main(int argc, char **argv) {
exit(1);
}
fl_colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
- fl_visual->visual, AllocNone);
+ fl_visual->visual, AllocNone);
fl_xpixel(FL_BLACK); // make sure black is allocated in overlay visuals
} else {
Fl::visual(FL_RGB);
@@ -146,7 +144,3 @@ int main(int argc, char **argv) {
window.show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/input.cxx b/test/input.cxx
index 3b8db7380..2b6e15c06 100644
--- a/test/input.cxx
+++ b/test/input.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Input field test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -88,7 +86,7 @@ void arrownav_cb(Fl_Widget *w, void *v) {
}
int main(int argc, char **argv) {
- // the following two lines set the correct color scheme, so that
+ // the following two lines set the correct color scheme, so that
// calling fl_contrast below will return good results
Fl::args(argc, argv);
Fl::get_system_colors();
@@ -164,7 +162,3 @@ int main(int argc, char **argv) {
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/input_choice.cxx b/test/input_choice.cxx
index 4e4d16109..b9598d52c 100644
--- a/test/input_choice.cxx
+++ b/test/input_choice.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Test program for Fl_Input_Choice
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -63,8 +61,3 @@ int main(int argc, char **argv) {
win.show(argc, argv);
return Fl::run();
}
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/keyboard.cxx b/test/keyboard.cxx
index 27107de3e..e28a302c7 100644
--- a/test/keyboard.cxx
+++ b/test/keyboard.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
//
@@ -99,23 +97,23 @@ int main(int argc, char** argv) {
window->show(argc,argv);
while (Fl::wait()) {
const char *str;
-
+
// update all the buttons with the current key and shift state:
for (int c = 0; c < window->children(); c++) {
Fl_Widget* b = window->child(c);
if (b->callback() == (Fl_Callback*)key_cb) {
- int i = b->argument();
- if (!i) i = b->label()[0];
+ int i = b->argument();
+ if (!i) i = b->label()[0];
Fl_Button *btn = ((Fl_Button*)b);
int state = Fl::event_key(i);
if (btn->value()!=state)
- btn->value(state);
+ btn->value(state);
} else if (b->callback() == (Fl_Callback*)shift_cb) {
- int i = b->argument();
+ int i = b->argument();
Fl_Button *btn = ((Fl_Button*)b);
int state = Fl::event_state(i);
if (btn->value()!=state)
- btn->value(state);
+ btn->value(state);
}
}
@@ -136,7 +134,7 @@ int main(int argc, char** argv) {
} else {
sprintf(buffer, "0x%04x", k);
for (int i = 0; i < int(sizeof(table)/sizeof(*table)); i++)
- if (table[i].n == k) {keyname = table[i].text; break;}
+ if (table[i].n == k) {keyname = table[i].text; break;}
}
if (strcmp(key_output->value(), keyname))
key_output->value(keyname);
@@ -147,7 +145,3 @@ int main(int argc, char** argv) {
}
return 0;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/keyboard.h b/test/keyboard.h
index 3f5f6fed4..8105e56df 100644
--- a/test/keyboard.h
+++ b/test/keyboard.h
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Keyboard/event test header for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#ifndef keyboard_h
@@ -25,13 +23,8 @@
class MyWindow : public Fl_Window {
int handle(int);
public:
- MyWindow(int w, int h, const char *t=0L)
+ MyWindow(int w, int h, const char *t=0L)
: Fl_Window( w, h, t ) { }
};
#endif // !keyboard_h
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/label.cxx b/test/label.cxx
index 6336cf5e3..7ae739bc4 100644
--- a/test/label.cxx
+++ b/test/label.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Label test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -197,7 +195,3 @@ int main(int argc, char **argv) {
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/line_style.cxx b/test/line_style.cxx
index 32fdbf77a..083ed5b50 100644
--- a/test/line_style.cxx
+++ b/test/line_style.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Line style demo for the Fast Light Tool Kit (FLTK).
//
// Copyright 2000-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -39,8 +37,8 @@ public:
void test_box::draw() {
Fl_Double_Window::draw();
fl_color((uchar)(sliders[0]->value()),
- (uchar)(sliders[1]->value()),
- (uchar)(sliders[2]->value()));
+ (uchar)(sliders[1]->value()),
+ (uchar)(sliders[2]->value()));
// dashes
char dashes[5];
dashes[0] = char(sliders[5]->value());
@@ -52,7 +50,7 @@ void test_box::draw() {
choice[0]->mvalue()->argument() +
choice[1]->mvalue()->argument() +
choice[2]->mvalue()->argument(),
- long(sliders[3]->value()), // width
+ long(sliders[3]->value()), // width
dashes);
// draw the defined fl_rect and fl_vertex first and then
@@ -75,27 +73,27 @@ void test_box::draw() {
}
Fl_Menu_Item style_menu[] = {
- {"FL_SOLID", 0, 0, (void*)FL_SOLID},
- {"FL_DASH", 0, 0, (void*)FL_DASH},
- {"FL_DOT", 0, 0, (void*)FL_DOT},
+ {"FL_SOLID", 0, 0, (void*)FL_SOLID},
+ {"FL_DASH", 0, 0, (void*)FL_DASH},
+ {"FL_DOT", 0, 0, (void*)FL_DOT},
{"FL_DASHDOT",0, 0, (void*)FL_DASHDOT},
{"FL_DASHDOTDOT", 0, 0, (void*)FL_DASHDOTDOT},
{0}
};
Fl_Menu_Item cap_menu[] = {
- {"default", 0, 0, 0},
- {"FL_CAP_FLAT", 0, 0, (void*)FL_CAP_FLAT},
- {"FL_CAP_ROUND", 0, 0, (void*)FL_CAP_ROUND},
- {"FL_CAP_SQUARE", 0, 0, (void*)FL_CAP_SQUARE},
+ {"default", 0, 0, 0},
+ {"FL_CAP_FLAT", 0, 0, (void*)FL_CAP_FLAT},
+ {"FL_CAP_ROUND", 0, 0, (void*)FL_CAP_ROUND},
+ {"FL_CAP_SQUARE", 0, 0, (void*)FL_CAP_SQUARE},
{0}
};
Fl_Menu_Item join_menu[] = {
- {"default", 0, 0, 0},
- {"FL_JOIN_MITER", 0, 0, (void*)FL_JOIN_MITER},
- {"FL_JOIN_ROUND", 0, 0, (void*)FL_JOIN_ROUND},
- {"FL_JOIN_BEVEL", 0, 0, (void*)FL_JOIN_BEVEL},
+ {"default", 0, 0, 0},
+ {"FL_JOIN_MITER", 0, 0, (void*)FL_JOIN_MITER},
+ {"FL_JOIN_ROUND", 0, 0, (void*)FL_JOIN_ROUND},
+ {"FL_JOIN_BEVEL", 0, 0, (void*)FL_JOIN_BEVEL},
{0}
};
@@ -162,7 +160,3 @@ int main(int argc, char **argv) {
form->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx
index ebda7ef8e..a21e80ede 100644
--- a/test/list_visuals.cxx
+++ b/test/list_visuals.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Visual list utility for the Fast Light Tool Kit (FLTK).
//
// List all the visuals on the screen, and dumps anything interesting
@@ -17,11 +15,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#if defined(_WIN32) || defined(__APPLE__)
@@ -101,8 +99,8 @@ static void print_mask(XVisualInfo* p) {
else new_what = '?';
if (new_what != what) {
if (what && (what != '?' || print_anything)) {
- q += sprintf(q,"%d%c", n, what);
- print_anything = 1;
+ q += sprintf(q,"%d%c", n, what);
+ print_anything = 1;
}
what = new_what;
n = 1;
@@ -132,10 +130,10 @@ void list_visuals() {
Atom actualType;
int actualFormat;
if (!XGetWindowProperty(fl_display, RootWindow(fl_display, fl_screen),
- overlayVisualsAtom, 0L, 10000L, False,
- overlayVisualsAtom, &actualType, &actualFormat,
- &sizeData, &bytesLeft,
- (unsigned char **) &overlayInfo))
+ overlayVisualsAtom, 0L, 10000L, False,
+ overlayVisualsAtom, &actualType, &actualFormat,
+ &sizeData, &bytesLeft,
+ (unsigned char **) &overlayInfo))
numoverlayinfo = int(sizeData/4);
}
@@ -145,7 +143,7 @@ void list_visuals() {
int nmbuf = 0, nsbuf = 0;
if (XmbufQueryExtension(fl_display,&event_base, &error_base)) {
XmbufGetScreenInfo(fl_display,RootWindow(fl_display,fl_screen),
- &nmbuf, &mbuf, &nsbuf, &sbuf);
+ &nmbuf, &mbuf, &nsbuf, &sbuf);
}
#endif
@@ -176,7 +174,7 @@ void list_visuals() {
int j = pfv ? pfv->bits_per_pixel : 0;
printf(" %2ld: %s %2d/%d", p->visualid, ClassNames[p->c_class],
- p->depth, j);
+ p->depth, j);
if (j < 10) putchar(' ');
print_mask(p);
@@ -184,11 +182,11 @@ void list_visuals() {
for (j=0; joverlay_visual == long(p->visualid)) {
- printf(" overlay(");
- if (o->transparent_type==1) printf("transparent pixel %ld, ",o->value);
- else if (o->transparent_type==2) printf("transparent mask %ld, ",o->value);
- else printf("opaque, ");
- printf("layer %ld)", o->layer);
+ printf(" overlay(");
+ if (o->transparent_type==1) printf("transparent pixel %ld, ",o->value);
+ else if (o->transparent_type==2) printf("transparent mask %ld, ",o->value);
+ else printf("opaque, ");
+ printf("layer %ld)", o->layer);
}
}
@@ -196,12 +194,12 @@ void list_visuals() {
for (j=0; jvisualid == p->visualid)
- printf(" multibuffer(%d)", m->max_buffers);
+ printf(" multibuffer(%d)", m->max_buffers);
}
for (j=0; jvisualid == p->visualid)
- printf(" stereo multibuffer(%d)", m->max_buffers);
+ printf(" stereo multibuffer(%d)", m->max_buffers);
}
#endif
@@ -229,7 +227,3 @@ int main(int argc, char **argv) {
return 0;
}
#endif
-
-//
-// End of "$Id$".
-//
diff --git a/test/mandelbrot.cxx b/test/mandelbrot.cxx
index 50f048f54..d6cbe338a 100644
--- a/test/mandelbrot.cxx
+++ b/test/mandelbrot.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Mandelbrot set demo for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include "mandelbrot_ui.h"
@@ -105,16 +103,16 @@ int Drawing_Area::idle() {
double wx = xx; double wy = yi;
if (julia) xx = jX;
for (int i=0; ; i++) {
- if (i >= iterations) {*p = 0; break;}
- double t = wx*wx - wy*wy + xx;
- wy = 2*wx*wy + yy;
- wx = t;
- if (wx*wx + wy*wy > 4) {
- wx = t = 1-double(i)/(1<<10);
- if (t <= 0) t = 0; else for (i=brightness; i--;) t*=wx;
- *p = 255-int(254*t);
- break;
- }
+ if (i >= iterations) {*p = 0; break;}
+ double t = wx*wx - wy*wy + xx;
+ wy = 2*wx*wy + yy;
+ wx = t;
+ if (wx*wx + wy*wy > 4) {
+ wx = t = 1-double(i)/(1<<10);
+ if (t <= 0) t = 0; else for (i=brightness; i--;) t*=wx;
+ *p = 255-int(254*t);
+ break;
+ }
}
p++;
}
@@ -157,34 +155,34 @@ int Drawing_Area::handle(int event) {
if (button == 1) {
erase_box();
if (dragged && sw > 3 && sh > 3) {
- X = X + (sx+sw/2-x()-W/2)*scale/W;
- Y = Y + (-sy-sh/2+y()+H/2)*scale/W;
- scale = sw*scale/W;
+ X = X + (sx+sw/2-x()-W/2)*scale/W;
+ Y = Y + (-sy-sh/2+y()+H/2)*scale/W;
+ scale = sw*scale/W;
} else if (!dragged) {
- scale = 2*scale;
- if (julia) {
- if (scale >= 4) {
- scale = 4;
- X = Y = 0;
- }
- } else {
- if (scale >= 2.5) {
- scale = 2.5;
- X = -.75;
- Y = 0;
- }
- }
+ scale = 2*scale;
+ if (julia) {
+ if (scale >= 4) {
+ scale = 4;
+ X = Y = 0;
+ }
+ } else {
+ if (scale >= 2.5) {
+ scale = 2.5;
+ X = -.75;
+ Y = 0;
+ }
+ }
} else return 1;
((Drawing_Window*)(user_data()))->update_label();
new_display();
} else if (!julia) {
if (!jbrot.d) {
- jbrot.make_window();
- jbrot.d->julia = 1;
- jbrot.d->X = 0;
- jbrot.d->Y = 0;
- jbrot.d->scale = 4;
- jbrot.update_label();
+ jbrot.make_window();
+ jbrot.d->julia = 1;
+ jbrot.d->X = 0;
+ jbrot.d->Y = 0;
+ jbrot.d->scale = 4;
+ jbrot.update_label();
}
jbrot.d->jX = X + (ix-x()-W/2)*scale/W;
jbrot.d->jY = Y + (H/2-iy+y())*scale/W;
@@ -212,7 +210,3 @@ void Drawing_Area::resize(int XX,int YY,int WW,int HH) {
}
Fl_Box::resize(XX,YY,WW,HH);
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/mandelbrot.h b/test/mandelbrot.h
index 741f0ffab..d6bae813f 100644
--- a/test/mandelbrot.h
+++ b/test/mandelbrot.h
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Mandelbrot set header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -59,7 +57,3 @@ public:
}
int idle();
};
-
-//
-// End of "$Id$".
-//
diff --git a/test/menubar.cxx b/test/menubar.cxx
index 2dca71707..856aa72a1 100644
--- a/test/menubar.cxx
+++ b/test/menubar.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Menubar test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2020 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -39,7 +37,7 @@
Fl_Simple_Terminal *G_tty = 0;
void window_cb(Fl_Widget* w, void*) {
- puts("window callback called"); // end of program, so stdout instead of G_tty
+ puts("window callback called"); // end of program, so stdout instead of G_tty
((Fl_Double_Window *)w)->hide();
}
@@ -61,9 +59,9 @@ Fl_Menu_Item hugemenu[100];
Fl_Menu_Item menutable[] = {
{"foo",0,0,0,FL_MENU_INACTIVE},
{"&File",0,0,0,FL_SUBMENU},
- {"&Open", FL_ALT+'o', 0, 0, FL_MENU_INACTIVE},
- {"&Close", 0, 0},
- {"&Quit", FL_ALT+'q', quit_cb, 0, FL_MENU_DIVIDER},
+ {"&Open", FL_ALT+'o', 0, 0, FL_MENU_INACTIVE},
+ {"&Close", 0, 0},
+ {"&Quit", FL_ALT+'q', quit_cb, 0, FL_MENU_DIVIDER},
{"shortcut",'a'},
{"shortcut",FL_SHIFT+'a'},
{"shortcut",FL_CTRL+'a'},
@@ -82,65 +80,65 @@ Fl_Menu_Item menutable[] = {
{"shortcut",FL_ALT+FL_SHIFT+FL_F+1},
{"shortcut",FL_ALT+FL_CTRL+FL_F+1},
{"shortcut",FL_ALT+FL_SHIFT+FL_CTRL+FL_F+1, 0,0, FL_MENU_DIVIDER},
- {"&Submenus", FL_ALT+'S', 0, (void*)"Submenu1", FL_SUBMENU},
+ {"&Submenus", FL_ALT+'S', 0, (void*)"Submenu1", FL_SUBMENU},
{"A very long menu item"},
- {"&submenu",FL_CTRL+'S', 0, (void*)"submenu2", FL_SUBMENU},
- {"item 1"},
- {"item 2"},
- {"item 3"},
- {"item 4"},
- {0},
+ {"&submenu",FL_CTRL+'S', 0, (void*)"submenu2", FL_SUBMENU},
+ {"item 1"},
+ {"item 2"},
+ {"item 3"},
+ {"item 4"},
+ {0},
{"after submenu"},
{0},
{0},
{"&Edit",FL_F+2,0,0,FL_SUBMENU},
- {"Undo", FL_ALT+'z', 0},
- {"Redo", FL_ALT+'r', 0, 0, FL_MENU_DIVIDER},
- {"Cut", FL_ALT+'x', 0},
- {"Copy", FL_ALT+'c', 0},
- {"Paste", FL_ALT+'v', 0},
- {"Inactive",FL_ALT+'d', 0, 0, FL_MENU_INACTIVE},
- {"Clear", 0, 0, 0, FL_MENU_DIVIDER},
- {"Invisible",FL_ALT+'e', 0, 0, FL_MENU_INVISIBLE},
- {"Preferences",0, 0},
- {"Size", 0, 0},
+ {"Undo", FL_ALT+'z', 0},
+ {"Redo", FL_ALT+'r', 0, 0, FL_MENU_DIVIDER},
+ {"Cut", FL_ALT+'x', 0},
+ {"Copy", FL_ALT+'c', 0},
+ {"Paste", FL_ALT+'v', 0},
+ {"Inactive", FL_ALT+'d', 0, 0, FL_MENU_INACTIVE},
+ {"Clear", 0, 0, 0, FL_MENU_DIVIDER},
+ {"Invisible", FL_ALT+'e', 0, 0, FL_MENU_INVISIBLE},
+ {"Preferences", 0, 0},
+ {"Size", 0, 0},
{0},
{"&Checkbox",FL_F+3,0,0,FL_SUBMENU},
- {"&Alpha", FL_F+2, 0, (void *)1, FL_MENU_TOGGLE},
- {"&Beta", 0, 0, (void *)2, FL_MENU_TOGGLE},
- {"&Gamma", 0, 0, (void *)3, FL_MENU_TOGGLE},
- {"&Delta", 0, 0, (void *)4, FL_MENU_TOGGLE|FL_MENU_VALUE},
- {"&Epsilon",0, 0, (void *)5, FL_MENU_TOGGLE},
- {"&Pi", 0, 0, (void *)6, FL_MENU_TOGGLE},
- {"&Mu", 0, 0, (void *)7, FL_MENU_TOGGLE|FL_MENU_DIVIDER},
- {"Red", 0, 0, (void *)1, FL_MENU_TOGGLE, 0, 0, 0, 1},
- {"Black", 0, 0, (void *)1, FL_MENU_TOGGLE|FL_MENU_DIVIDER},
- {"00", 0, 0, (void *)1, FL_MENU_TOGGLE},
- {"000", 0, 0, (void *)1, FL_MENU_TOGGLE},
+ {"&Alpha", FL_F+2, 0, (void *)1, FL_MENU_TOGGLE},
+ {"&Beta", 0, 0, (void *)2, FL_MENU_TOGGLE},
+ {"&Gamma", 0, 0, (void *)3, FL_MENU_TOGGLE},
+ {"&Delta", 0, 0, (void *)4, FL_MENU_TOGGLE|FL_MENU_VALUE},
+ {"&Epsilon",0, 0, (void *)5, FL_MENU_TOGGLE},
+ {"&Pi", 0, 0, (void *)6, FL_MENU_TOGGLE},
+ {"&Mu", 0, 0, (void *)7, FL_MENU_TOGGLE|FL_MENU_DIVIDER},
+ {"Red", 0, 0, (void *)1, FL_MENU_TOGGLE, 0, 0, 0, 1},
+ {"Black", 0, 0, (void *)1, FL_MENU_TOGGLE|FL_MENU_DIVIDER},
+ {"00", 0, 0, (void *)1, FL_MENU_TOGGLE},
+ {"000", 0, 0, (void *)1, FL_MENU_TOGGLE},
{0},
{"&Radio",0,0,0,FL_SUBMENU},
- {"&Alpha", 0, 0, (void *)1, FL_MENU_RADIO},
- {"&Beta", 0, 0, (void *)2, FL_MENU_RADIO},
- {"&Gamma", 0, 0, (void *)3, FL_MENU_RADIO},
- {"&Delta", 0, 0, (void *)4, FL_MENU_RADIO|FL_MENU_VALUE},
- {"&Epsilon",0, 0, (void *)5, FL_MENU_RADIO},
- {"&Pi", 0, 0, (void *)6, FL_MENU_RADIO},
- {"&Mu", 0, 0, (void *)7, FL_MENU_RADIO|FL_MENU_DIVIDER},
- {"Red", 0, 0, (void *)1, FL_MENU_RADIO},
- {"Black", 0, 0, (void *)1, FL_MENU_RADIO|FL_MENU_DIVIDER},
- {"00", 0, 0, (void *)1, FL_MENU_RADIO},
- {"000", 0, 0, (void *)1, FL_MENU_RADIO},
+ {"&Alpha", 0, 0, (void *)1, FL_MENU_RADIO},
+ {"&Beta", 0, 0, (void *)2, FL_MENU_RADIO},
+ {"&Gamma", 0, 0, (void *)3, FL_MENU_RADIO},
+ {"&Delta", 0, 0, (void *)4, FL_MENU_RADIO|FL_MENU_VALUE},
+ {"&Epsilon",0, 0, (void *)5, FL_MENU_RADIO},
+ {"&Pi", 0, 0, (void *)6, FL_MENU_RADIO},
+ {"&Mu", 0, 0, (void *)7, FL_MENU_RADIO|FL_MENU_DIVIDER},
+ {"Red", 0, 0, (void *)1, FL_MENU_RADIO},
+ {"Black", 0, 0, (void *)1, FL_MENU_RADIO|FL_MENU_DIVIDER},
+ {"00", 0, 0, (void *)1, FL_MENU_RADIO},
+ {"000", 0, 0, (void *)1, FL_MENU_RADIO},
{0},
{"&Font",0,0,0,FL_SUBMENU /*, 0, FL_BOLD, 20*/},
- {"Normal", 0, 0, 0, 0, 0, 0, 14},
- {"Bold", 0, 0, 0, 0, 0, FL_BOLD, 14},
- {"Italic", 0, 0, 0, 0, 0, FL_ITALIC, 14},
+ {"Normal", 0, 0, 0, 0, 0, 0, 14},
+ {"Bold", 0, 0, 0, 0, 0, FL_BOLD, 14},
+ {"Italic", 0, 0, 0, 0, 0, FL_ITALIC, 14},
{"BoldItalic",0,0,0, 0, 0, FL_BOLD+FL_ITALIC, 14},
- {"Small", 0, 0, 0, 0, 0, FL_BOLD+FL_ITALIC, 10},
- {"Emboss", 0, 0, 0, 0, (uchar)FL_EMBOSSED_LABEL},
- {"Engrave", 0, 0, 0, 0, (uchar)FL_ENGRAVED_LABEL},
- {"Shadow", 0, 0, 0, 0, (uchar)FL_SHADOW_LABEL},
- {"@->", 0, 0, 0, 0, (uchar)FL_SYMBOL_LABEL},
+ {"Small", 0, 0, 0, 0, 0, FL_BOLD+FL_ITALIC, 10},
+ {"Emboss", 0, 0, 0, 0, (uchar)FL_EMBOSSED_LABEL},
+ {"Engrave", 0, 0, 0, 0, (uchar)FL_ENGRAVED_LABEL},
+ {"Shadow", 0, 0, 0, 0, (uchar)FL_SHADOW_LABEL},
+ {"@->", 0, 0, 0, 0, (uchar)FL_SYMBOL_LABEL},
{0},
{"&International",0,0,0,FL_SUBMENU},
{"Sharp Ess",0x0000df},
@@ -156,11 +154,11 @@ Fl_Menu_Item menutable[] = {
{0},
{"E&mpty",0,0,0,FL_SUBMENU},
{0},
- {"&Inactive", 0, 0, 0, FL_MENU_INACTIVE|FL_SUBMENU},
+ {"&Inactive", 0, 0, 0, FL_MENU_INACTIVE|FL_SUBMENU},
{"A very long menu item"},
{"A very long menu item"},
{0},
- {"Invisible",0, 0, 0, FL_MENU_INVISIBLE|FL_SUBMENU},
+ {"Invisible",0, 0, 0, FL_MENU_INVISIBLE|FL_SUBMENU},
{"A very long menu item"},
{"A very long menu item"},
{0},
@@ -170,32 +168,32 @@ Fl_Menu_Item menutable[] = {
};
Fl_Menu_Item pulldown[] = {
- {"Red", FL_ALT+'r'},
- {"Green", FL_ALT+'g'},
- {"Blue", FL_ALT+'b'},
- {"Strange", FL_ALT+'s', 0, 0, FL_MENU_INACTIVE},
- {"&Charm", FL_ALT+'c'},
- {"Truth", FL_ALT+'t'},
- {"Beauty", FL_ALT+'b'},
+ {"Red", FL_ALT+'r'},
+ {"Green", FL_ALT+'g'},
+ {"Blue", FL_ALT+'b'},
+ {"Strange", FL_ALT+'s', 0, 0, FL_MENU_INACTIVE},
+ {"&Charm", FL_ALT+'c'},
+ {"Truth", FL_ALT+'t'},
+ {"Beauty", FL_ALT+'b'},
{0}
};
#ifdef __APPLE__
Fl_Menu_Item menu_location[] = {
- {"Fl_Menu_Bar", 0, 0, 0, FL_MENU_VALUE},
- {"Fl_Sys_Menu_Bar", },
+ {"Fl_Menu_Bar", 0, 0, 0, FL_MENU_VALUE},
+ {"Fl_Sys_Menu_Bar", },
{0}
};
Fl_Sys_Menu_Bar* smenubar;
-void menu_location_cb(Fl_Widget* w, void* data)
+void menu_location_cb(Fl_Widget* w, void* data)
{
Fl_Menu_Bar *menubar = (Fl_Menu_Bar*)data;
if (((Fl_Choice*)w)->value() == 1) { // switch to system menu bar
menubar->hide();
const Fl_Menu_Item *menu = menubar->menu();
- smenubar = new Fl_Sys_Menu_Bar(0,0,0,30);
+ smenubar = new Fl_Sys_Menu_Bar(0,0,0,30);
smenubar->menu(menu);
smenubar->callback(test_cb);
}
@@ -211,7 +209,7 @@ void menu_location_cb(Fl_Widget* w, void* data)
void menu_linespacing_cb(Fl_Widget* w, void*) {
Fl_Value_Slider *fvs = (Fl_Value_Slider*)w;
int val = (int)fvs->value();
- Fl::menu_linespacing(val); // takes effect when someone opens a new menu..
+ Fl::menu_linespacing(val); // takes effect when someone opens a new menu..
}
#define WIDTH 700
@@ -255,7 +253,7 @@ int main(int argc, char **argv) {
window.resizable(&mb);
window.size_range(300,400,0,400);
#ifdef __APPLE__
- Fl_Choice ch2(500,100,150,25,"Use:");
+ Fl_Choice ch2(500,100,150,25,"Use:");
ch2.menu(menu_location);
ch2.callback(menu_location_cb, &menubar);
ch2.value(1);
@@ -276,13 +274,13 @@ int main(int argc, char **argv) {
menu_linespacing_slider.callback(menu_linespacing_cb);
window.end();
-
+
Fl_Sys_Menu_Bar::about(about_cb, NULL);
#ifdef __APPLE__
Fl_Menu_Item custom[] = {
- {"Preferences…", 0, test_cb, NULL, FL_MENU_DIVIDER},
- {"Radio1", 0, test_cb, NULL, FL_MENU_RADIO|FL_MENU_VALUE},
- {"Radio2", 0, test_cb, NULL, FL_MENU_RADIO},
+ {"Preferences…", 0, test_cb, NULL, FL_MENU_DIVIDER},
+ {"Radio1", 0, test_cb, NULL, FL_MENU_RADIO | FL_MENU_VALUE},
+ {"Radio2", 0, test_cb, NULL, FL_MENU_RADIO},
{0}
};
Fl_Mac_App_Menu::custom_application_menu_items(custom);
@@ -291,7 +289,3 @@ int main(int argc, char **argv) {
window.show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/message.cxx b/test/message.cxx
index fe18a3095..1b0f8ecec 100644
--- a/test/message.cxx
+++ b/test/message.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Message test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -27,10 +25,10 @@ int main(int argc, char **argv) {
Fl::get_system_colors();
fl_message("Spelling check sucessful, %d errors found with %g%% confidence",
- 1002, 100*(15/77.0));
+ 1002, 100*(15/77.0));
fl_alert("Quantum fluctuations in the space-time continuum detected,\n"
- "you have %g seconds to comply.\n\n"
+ "you have %g seconds to comply.\n\n"
"\"In physics, spacetime is any mathematical model that combines\n"
"space and time into a single construct called the space-time\n"
"continuum. Spacetime is usually interpreted with space being\n"
@@ -46,7 +44,7 @@ int main(int argc, char **argv) {
const char *r;
r = fl_input("Please enter a string for '%s':", "this is the default value",
- "testing");
+ "testing");
printf("fl_input returned \"%s\"\n", r ? r : "NULL");
r = fl_password("Enter %s's password:", 0, "somebody");
@@ -54,7 +52,3 @@ int main(int argc, char **argv) {
return 0;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/minimum.cxx b/test/minimum.cxx
index 6b7ba12b2..7c8985cc9 100644
--- a/test/minimum.cxx
+++ b/test/minimum.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Minimal update test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
//
@@ -67,7 +65,3 @@ int main(int argc, char **argv) {
window->show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/native-filechooser.cxx b/test/native-filechooser.cxx
index 6730ab65e..dd0c4812d 100644
--- a/test/native-filechooser.cxx
+++ b/test/native-filechooser.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Simple test of the Fl_Native_File_Chooser.
//
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -10,16 +8,16 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
-#include /* strstr() */
+#include /* strstr() */
#include
-#include /* fl_beep() */
+#include /* fl_beep() */
#include
#include
#include
@@ -45,15 +43,15 @@ void PickFile_CB(Fl_Widget*, void*) {
native.preset_file(G_filename->value());
// Show native chooser
switch ( native.show() ) {
- case -1: G_tty->printf("ERROR: %s\n", native.errmsg()); break; // ERROR
- case 1: G_tty->printf("*** CANCEL\n"); fl_beep(); break; // CANCEL
- default: // PICKED FILE
+ case -1: G_tty->printf("ERROR: %s\n", native.errmsg()); break; // ERROR
+ case 1: G_tty->printf("*** CANCEL\n"); fl_beep(); break; // CANCEL
+ default: // PICKED FILE
if ( native.filename() ) {
G_filename->value(native.filename());
- G_tty->printf("filename='%s'\n", native.filename());
+ G_tty->printf("filename='%s'\n", native.filename());
} else {
- G_filename->value("NULL");
- G_tty->printf("filename='(null)'\n");
+ G_filename->value("NULL");
+ G_tty->printf("filename='(null)'\n");
}
break;
}
@@ -67,15 +65,15 @@ void PickDir_CB(Fl_Widget*, void*) {
native.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY);
// Show native chooser
switch ( native.show() ) {
- case -1: G_tty->printf("ERROR: %s\n", native.errmsg()); break; // ERROR
- case 1: G_tty->printf("*** CANCEL\n"); fl_beep(); break; // CANCEL
- default: // PICKED DIR
+ case -1: G_tty->printf("ERROR: %s\n", native.errmsg()); break; // ERROR
+ case 1: G_tty->printf("*** CANCEL\n"); fl_beep(); break; // CANCEL
+ default: // PICKED DIR
if ( native.filename() ) {
G_filename->value(native.filename());
- G_tty->printf("dirname='%s'\n", native.filename());
+ G_tty->printf("dirname='%s'\n", native.filename());
} else {
- G_filename->value("NULL");
- G_tty->printf("dirname='(null)'\n");
+ G_filename->value("NULL");
+ G_tty->printf("dirname='(null)'\n");
}
break;
}
@@ -98,7 +96,7 @@ int main(int argc, char **argv) {
if (argc>argn && strncmp(argv[1], "-psn_", 5)==0)
argn++;
#endif
-
+
Fl_Window *win = new Fl_Window(640, 400+TERMINAL_HEIGHT, "Native File Chooser Test");
win->size_range(win->w(), win->h(), 0, 0);
win->begin();
@@ -115,7 +113,7 @@ int main(int argc, char **argv) {
G_filter->value("Text\t*.txt\n"
"C Files\t*.{cxx,h,c,cpp}\n"
"Tars\t*.{tar,tar.gz}\n"
- "Apps\t*.app");
+ "Apps\t*.app");
G_filter->tooltip("Filter to be used for browser.\n"
"An empty string may be used.\n");
@@ -127,19 +125,19 @@ int main(int argc, char **argv) {
view->textfont(FL_HELVETICA);
view->textsize(10);
view->value("The Filter can be one or more filter patterns, one per line.\n"
- "Patterns can be:\n"
- " - A single wildcard (e.g. \"*.txt\")
\n"
- " - Multiple wildcards (e.g. \"*.{cxx,h,H}\")
\n"
- " - A descriptive name followed by a " TAB " and a wildcard (e.g. \"Text Files" TAB "*.txt\")
\n"
- "
\n"
+ "Patterns can be:\n"
+ " - A single wildcard (e.g. \"*.txt\")
\n"
+ " - Multiple wildcards (e.g. \"*.{cxx,h,H}\")
\n"
+ " - A descriptive name followed by a " TAB " and a wildcard (e.g. \"Text Files" TAB "*.txt\")
\n"
+ "
\n"
"In the above \"Filter\" field, you can use Ctrl-I to enter " TAB " characters as needed.
\n"
- "Example:\n"
- "\n"
- " Text<Ctrl-I>*.txt\n"
- " C Files<Ctrl-I>*.{cxx,h,c,cpp}\n"
- " Tars<Ctrl-I>*.{tar,tar.gz}\n"
- " Apps<Ctrl-I>*.app\n"
- "\n");
+ "Example:\n"
+ "\n"
+ " Text<Ctrl-I>*.txt\n"
+ " C Files<Ctrl-I>*.{cxx,h,c,cpp}\n"
+ " Tars<Ctrl-I>*.{tar,tar.gz}\n"
+ " Apps<Ctrl-I>*.app\n"
+ "\n");
Fl_Button *but = new Fl_Button(win->w()-x-10, win->h()-TERMINAL_HEIGHT-25-10, 80, 25, "Pick File");
but->callback(PickFile_CB);
@@ -153,7 +151,3 @@ int main(int argc, char **argv) {
win->show(argc, argv);
return(Fl::run());
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/navigation.cxx b/test/navigation.cxx
index f6a7f3b91..00a85a653 100644
--- a/test/navigation.cxx
+++ b/test/navigation.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Navigation test program for the Fast Light Tool Kit (FLTK).
//
// Silly test of navigation keys. This is not a recommended method of
@@ -12,11 +10,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -40,7 +38,7 @@ int main(int argc, char **argv) {
// Include a toggle button to control arrow focus
Fl_Light_Button arrowfocus_butt(10,HEIGHT+10,130,20," Arrow Focus");
arrowfocus_butt.callback(ToggleArrowFocus_CB);
- arrowfocus_butt.value(Fl::option(Fl::OPTION_ARROW_FOCUS) ? 1 : 0); // use default
+ arrowfocus_butt.value(Fl::option(Fl::OPTION_ARROW_FOCUS) ? 1 : 0); // use default
arrowfocus_butt.tooltip("Control horizontal arrow key focus navigation behavior.\n"
"e.g. Fl::OPTION_ARROW_FOCUS");
window.end(); // don't auto-add children
@@ -58,7 +56,7 @@ int main(int argc, char **argv) {
int n; for (n=0; n < window.children(); n++) {
Fl_Widget *o = window.child(n);
if (xx()+o->w() && x+w>o->x() &&
- yy()+o->h() && y+h>o->y()) break;
+ yy()+o->h() && y+h>o->y()) break;
if ( !j && ( yy() || (y==o->y() && xx()) ) ) j = o;
}
// skip if intersection:
@@ -68,7 +66,3 @@ int main(int argc, char **argv) {
window.show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/offscreen.cxx b/test/offscreen.cxx
index 23cd368a6..b22218fc1 100644
--- a/test/offscreen.cxx
+++ b/test/offscreen.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Offscreen drawing test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
/* Standard headers */
@@ -69,7 +67,7 @@ private:
// Width and height of the offscreen surface
int offsc_w, offsc_h;
int iters; // Must be set on first pass!
- float scale; // current screen scaling factor value
+ float scale; // current screen scaling factor value
};
/*****************************************************************************/
@@ -119,7 +117,7 @@ void oscr_box::draw()
int oscr_box::handle(int ev)
{
int ret = Fl_Box::handle(ev);
-
+
// handle dragging of visible page area - if a valid context exists
if (has_oscr())
{
@@ -145,32 +143,32 @@ int oscr_box::handle(int ev)
case FL_DRAG:
if (drag_state == 1) // dragging page
{
- int x2 = Fl::event_x_root();
- int y2 = Fl::event_y_root();
- xoff = x1 - x2;
- yoff = y1 - y2;
- x1 = x2;
- y1 = y2;
- page_x += xoff;
- page_y += yoff;
- // check the page bounds
- if (page_x < -w())
- {
- page_x = -w();
- }
- else if (page_x > offsc_w)
- {
- page_x = offsc_w;
- }
- if (page_y < -h())
- {
- page_y = -h();
- }
- else if (page_y > offsc_h)
- {
- page_y = offsc_h;
- }
- redraw();
+ int x2 = Fl::event_x_root();
+ int y2 = Fl::event_y_root();
+ xoff = x1 - x2;
+ yoff = y1 - y2;
+ x1 = x2;
+ y1 = y2;
+ page_x += xoff;
+ page_y += yoff;
+ // check the page bounds
+ if (page_x < -w())
+ {
+ page_x = -w();
+ }
+ else if (page_x > offsc_w)
+ {
+ page_x = offsc_w;
+ }
+ if (page_y < -h())
+ {
+ page_y = -h();
+ }
+ else if (page_y > offsc_h)
+ {
+ page_y = offsc_h;
+ }
+ redraw();
}
ret = 1;
break;
@@ -264,7 +262,3 @@ int main(int argc, char **argv)
return Fl::run();
} // main
-
-//
-// End of "$Id$".
-//
diff --git a/test/output.cxx b/test/output.cxx
index 794b37abe..8bcc4b944 100644
--- a/test/output.cxx
+++ b/test/output.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Output test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -90,7 +88,3 @@ int main(int argc, char **argv) {
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/overlay.cxx b/test/overlay.cxx
index 7e9e018c5..f510d5c9f 100644
--- a/test/overlay.cxx
+++ b/test/overlay.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Overlay window test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -71,7 +69,3 @@ int main(int argc, char **argv) {
ovl->redraw_overlay();
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/pack.cxx b/test/pack.cxx
index 79be48013..87fc49e08 100644
--- a/test/pack.cxx
+++ b/test/pack.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fl_Pack test program for the Fast Light Tool Kit (FLTK).
//
// Rather crude test of the Fl_Pack object.
@@ -13,11 +11,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -105,7 +103,3 @@ int main(int argc, char **argv) {
w->show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/pixmap.cxx b/test/pixmap.cxx
index 4595e31ae..fe79f8758 100644
--- a/test/pixmap.cxx
+++ b/test/pixmap.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Pixmap label test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -87,7 +85,3 @@ int main(int argc, char **argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx
index b2611703b..4a80f3579 100644
--- a/test/pixmap_browser.cxx
+++ b/test/pixmap_browser.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// A shared image test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -50,7 +48,7 @@ void load_file(const char *n) {
return;
}
Fl_Shared_Image *img2 = Fl_Shared_Image::get(n);
-
+
if (!img2) {
b->label("@filenew"); // show an empty document
b->labelsize(64);
@@ -103,7 +101,7 @@ void print_cb(Fl_Widget *widget, void *) {
printer.end_page();
printer.end_job();
}
-
+
void svg_cb(Fl_Widget *widget, void *) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a .svg file");
@@ -147,7 +145,3 @@ int main(int argc, char **argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/resizebox.cxx b/test/resizebox.cxx
index 602612c10..c698ac07a 100644
--- a/test/resizebox.cxx
+++ b/test/resizebox.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Resize box test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#define W1 (big ? 60 : 40)
@@ -87,7 +85,3 @@ int main(int argc, char **argv) {
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/rgb.txt b/test/rgb.txt
index 62eb8961e..8b763621b 100644
--- a/test/rgb.txt
+++ b/test/rgb.txt
@@ -1,753 +1,753 @@
! $Xorg: rgb.txt,v 1.3 2000/08/17 19:54:00 cpqbld Exp $
-255 250 250 snow
-248 248 255 ghost white
-248 248 255 GhostWhite
-245 245 245 white smoke
-245 245 245 WhiteSmoke
-220 220 220 gainsboro
-255 250 240 floral white
-255 250 240 FloralWhite
-253 245 230 old lace
-253 245 230 OldLace
-250 240 230 linen
-250 235 215 antique white
-250 235 215 AntiqueWhite
-255 239 213 papaya whip
-255 239 213 PapayaWhip
-255 235 205 blanched almond
-255 235 205 BlanchedAlmond
-255 228 196 bisque
-255 218 185 peach puff
-255 218 185 PeachPuff
-255 222 173 navajo white
-255 222 173 NavajoWhite
-255 228 181 moccasin
-255 248 220 cornsilk
-255 255 240 ivory
-255 250 205 lemon chiffon
-255 250 205 LemonChiffon
-255 245 238 seashell
-240 255 240 honeydew
-245 255 250 mint cream
-245 255 250 MintCream
-240 255 255 azure
-240 248 255 alice blue
-240 248 255 AliceBlue
-230 230 250 lavender
-255 240 245 lavender blush
-255 240 245 LavenderBlush
-255 228 225 misty rose
-255 228 225 MistyRose
-255 255 255 white
- 0 0 0 black
- 47 79 79 dark slate gray
- 47 79 79 DarkSlateGray
- 47 79 79 dark slate grey
- 47 79 79 DarkSlateGrey
-105 105 105 dim gray
-105 105 105 DimGray
-105 105 105 dim grey
-105 105 105 DimGrey
-112 128 144 slate gray
-112 128 144 SlateGray
-112 128 144 slate grey
-112 128 144 SlateGrey
-119 136 153 light slate gray
-119 136 153 LightSlateGray
-119 136 153 light slate grey
-119 136 153 LightSlateGrey
-190 190 190 gray
-190 190 190 grey
-211 211 211 light grey
-211 211 211 LightGrey
-211 211 211 light gray
-211 211 211 LightGray
- 25 25 112 midnight blue
- 25 25 112 MidnightBlue
- 0 0 128 navy
- 0 0 128 navy blue
- 0 0 128 NavyBlue
-100 149 237 cornflower blue
-100 149 237 CornflowerBlue
- 72 61 139 dark slate blue
- 72 61 139 DarkSlateBlue
-106 90 205 slate blue
-106 90 205 SlateBlue
-123 104 238 medium slate blue
-123 104 238 MediumSlateBlue
-132 112 255 light slate blue
-132 112 255 LightSlateBlue
- 0 0 205 medium blue
- 0 0 205 MediumBlue
- 65 105 225 royal blue
- 65 105 225 RoyalBlue
- 0 0 255 blue
- 30 144 255 dodger blue
- 30 144 255 DodgerBlue
- 0 191 255 deep sky blue
- 0 191 255 DeepSkyBlue
-135 206 235 sky blue
-135 206 235 SkyBlue
-135 206 250 light sky blue
-135 206 250 LightSkyBlue
- 70 130 180 steel blue
- 70 130 180 SteelBlue
-176 196 222 light steel blue
-176 196 222 LightSteelBlue
-173 216 230 light blue
-173 216 230 LightBlue
-176 224 230 powder blue
-176 224 230 PowderBlue
-175 238 238 pale turquoise
-175 238 238 PaleTurquoise
- 0 206 209 dark turquoise
- 0 206 209 DarkTurquoise
- 72 209 204 medium turquoise
- 72 209 204 MediumTurquoise
- 64 224 208 turquoise
- 0 255 255 cyan
-224 255 255 light cyan
-224 255 255 LightCyan
- 95 158 160 cadet blue
- 95 158 160 CadetBlue
-102 205 170 medium aquamarine
-102 205 170 MediumAquamarine
-127 255 212 aquamarine
- 0 100 0 dark green
- 0 100 0 DarkGreen
- 85 107 47 dark olive green
- 85 107 47 DarkOliveGreen
-143 188 143 dark sea green
-143 188 143 DarkSeaGreen
- 46 139 87 sea green
- 46 139 87 SeaGreen
- 60 179 113 medium sea green
- 60 179 113 MediumSeaGreen
- 32 178 170 light sea green
- 32 178 170 LightSeaGreen
-152 251 152 pale green
-152 251 152 PaleGreen
- 0 255 127 spring green
- 0 255 127 SpringGreen
-124 252 0 lawn green
-124 252 0 LawnGreen
- 0 255 0 green
-127 255 0 chartreuse
- 0 250 154 medium spring green
- 0 250 154 MediumSpringGreen
-173 255 47 green yellow
-173 255 47 GreenYellow
- 50 205 50 lime green
- 50 205 50 LimeGreen
-154 205 50 yellow green
-154 205 50 YellowGreen
- 34 139 34 forest green
- 34 139 34 ForestGreen
-107 142 35 olive drab
-107 142 35 OliveDrab
-189 183 107 dark khaki
-189 183 107 DarkKhaki
-240 230 140 khaki
-238 232 170 pale goldenrod
-238 232 170 PaleGoldenrod
-250 250 210 light goldenrod yellow
-250 250 210 LightGoldenrodYellow
-255 255 224 light yellow
-255 255 224 LightYellow
-255 255 0 yellow
-255 215 0 gold
-238 221 130 light goldenrod
-238 221 130 LightGoldenrod
-218 165 32 goldenrod
-184 134 11 dark goldenrod
-184 134 11 DarkGoldenrod
-188 143 143 rosy brown
-188 143 143 RosyBrown
-205 92 92 indian red
-205 92 92 IndianRed
-139 69 19 saddle brown
-139 69 19 SaddleBrown
-160 82 45 sienna
-205 133 63 peru
-222 184 135 burlywood
-245 245 220 beige
-245 222 179 wheat
-244 164 96 sandy brown
-244 164 96 SandyBrown
-210 180 140 tan
-210 105 30 chocolate
-178 34 34 firebrick
-165 42 42 brown
-233 150 122 dark salmon
-233 150 122 DarkSalmon
-250 128 114 salmon
-255 160 122 light salmon
-255 160 122 LightSalmon
-255 165 0 orange
-255 140 0 dark orange
-255 140 0 DarkOrange
-255 127 80 coral
-240 128 128 light coral
-240 128 128 LightCoral
-255 99 71 tomato
-255 69 0 orange red
-255 69 0 OrangeRed
-255 0 0 red
-255 105 180 hot pink
-255 105 180 HotPink
-255 20 147 deep pink
-255 20 147 DeepPink
-255 192 203 pink
-255 182 193 light pink
-255 182 193 LightPink
-219 112 147 pale violet red
-219 112 147 PaleVioletRed
-176 48 96 maroon
-199 21 133 medium violet red
-199 21 133 MediumVioletRed
-208 32 144 violet red
-208 32 144 VioletRed
-255 0 255 magenta
-238 130 238 violet
-221 160 221 plum
-218 112 214 orchid
-186 85 211 medium orchid
-186 85 211 MediumOrchid
-153 50 204 dark orchid
-153 50 204 DarkOrchid
-148 0 211 dark violet
-148 0 211 DarkViolet
-138 43 226 blue violet
-138 43 226 BlueViolet
-160 32 240 purple
-147 112 219 medium purple
-147 112 219 MediumPurple
-216 191 216 thistle
-255 250 250 snow1
-238 233 233 snow2
-205 201 201 snow3
-139 137 137 snow4
-255 245 238 seashell1
-238 229 222 seashell2
-205 197 191 seashell3
-139 134 130 seashell4
-255 239 219 AntiqueWhite1
-238 223 204 AntiqueWhite2
-205 192 176 AntiqueWhite3
-139 131 120 AntiqueWhite4
-255 228 196 bisque1
-238 213 183 bisque2
-205 183 158 bisque3
-139 125 107 bisque4
-255 218 185 PeachPuff1
-238 203 173 PeachPuff2
-205 175 149 PeachPuff3
-139 119 101 PeachPuff4
-255 222 173 NavajoWhite1
-238 207 161 NavajoWhite2
-205 179 139 NavajoWhite3
-139 121 94 NavajoWhite4
-255 250 205 LemonChiffon1
-238 233 191 LemonChiffon2
-205 201 165 LemonChiffon3
-139 137 112 LemonChiffon4
-255 248 220 cornsilk1
-238 232 205 cornsilk2
-205 200 177 cornsilk3
-139 136 120 cornsilk4
-255 255 240 ivory1
-238 238 224 ivory2
-205 205 193 ivory3
-139 139 131 ivory4
-240 255 240 honeydew1
-224 238 224 honeydew2
-193 205 193 honeydew3
-131 139 131 honeydew4
-255 240 245 LavenderBlush1
-238 224 229 LavenderBlush2
-205 193 197 LavenderBlush3
-139 131 134 LavenderBlush4
-255 228 225 MistyRose1
-238 213 210 MistyRose2
-205 183 181 MistyRose3
-139 125 123 MistyRose4
-240 255 255 azure1
-224 238 238 azure2
-193 205 205 azure3
-131 139 139 azure4
-131 111 255 SlateBlue1
-122 103 238 SlateBlue2
-105 89 205 SlateBlue3
- 71 60 139 SlateBlue4
- 72 118 255 RoyalBlue1
- 67 110 238 RoyalBlue2
- 58 95 205 RoyalBlue3
- 39 64 139 RoyalBlue4
- 0 0 255 blue1
- 0 0 238 blue2
- 0 0 205 blue3
- 0 0 139 blue4
- 30 144 255 DodgerBlue1
- 28 134 238 DodgerBlue2
- 24 116 205 DodgerBlue3
- 16 78 139 DodgerBlue4
- 99 184 255 SteelBlue1
- 92 172 238 SteelBlue2
- 79 148 205 SteelBlue3
- 54 100 139 SteelBlue4
- 0 191 255 DeepSkyBlue1
- 0 178 238 DeepSkyBlue2
- 0 154 205 DeepSkyBlue3
- 0 104 139 DeepSkyBlue4
-135 206 255 SkyBlue1
-126 192 238 SkyBlue2
-108 166 205 SkyBlue3
- 74 112 139 SkyBlue4
-176 226 255 LightSkyBlue1
-164 211 238 LightSkyBlue2
-141 182 205 LightSkyBlue3
- 96 123 139 LightSkyBlue4
-198 226 255 SlateGray1
-185 211 238 SlateGray2
-159 182 205 SlateGray3
-108 123 139 SlateGray4
-202 225 255 LightSteelBlue1
-188 210 238 LightSteelBlue2
-162 181 205 LightSteelBlue3
-110 123 139 LightSteelBlue4
-191 239 255 LightBlue1
-178 223 238 LightBlue2
-154 192 205 LightBlue3
-104 131 139 LightBlue4
-224 255 255 LightCyan1
-209 238 238 LightCyan2
-180 205 205 LightCyan3
-122 139 139 LightCyan4
-187 255 255 PaleTurquoise1
-174 238 238 PaleTurquoise2
-150 205 205 PaleTurquoise3
-102 139 139 PaleTurquoise4
-152 245 255 CadetBlue1
-142 229 238 CadetBlue2
-122 197 205 CadetBlue3
- 83 134 139 CadetBlue4
- 0 245 255 turquoise1
- 0 229 238 turquoise2
- 0 197 205 turquoise3
- 0 134 139 turquoise4
- 0 255 255 cyan1
- 0 238 238 cyan2
- 0 205 205 cyan3
- 0 139 139 cyan4
-151 255 255 DarkSlateGray1
-141 238 238 DarkSlateGray2
-121 205 205 DarkSlateGray3
- 82 139 139 DarkSlateGray4
-127 255 212 aquamarine1
-118 238 198 aquamarine2
-102 205 170 aquamarine3
- 69 139 116 aquamarine4
-193 255 193 DarkSeaGreen1
-180 238 180 DarkSeaGreen2
-155 205 155 DarkSeaGreen3
-105 139 105 DarkSeaGreen4
- 84 255 159 SeaGreen1
- 78 238 148 SeaGreen2
- 67 205 128 SeaGreen3
- 46 139 87 SeaGreen4
-154 255 154 PaleGreen1
-144 238 144 PaleGreen2
-124 205 124 PaleGreen3
- 84 139 84 PaleGreen4
- 0 255 127 SpringGreen1
- 0 238 118 SpringGreen2
- 0 205 102 SpringGreen3
- 0 139 69 SpringGreen4
- 0 255 0 green1
- 0 238 0 green2
- 0 205 0 green3
- 0 139 0 green4
-127 255 0 chartreuse1
-118 238 0 chartreuse2
-102 205 0 chartreuse3
- 69 139 0 chartreuse4
-192 255 62 OliveDrab1
-179 238 58 OliveDrab2
-154 205 50 OliveDrab3
-105 139 34 OliveDrab4
-202 255 112 DarkOliveGreen1
-188 238 104 DarkOliveGreen2
-162 205 90 DarkOliveGreen3
-110 139 61 DarkOliveGreen4
-255 246 143 khaki1
-238 230 133 khaki2
-205 198 115 khaki3
-139 134 78 khaki4
-255 236 139 LightGoldenrod1
-238 220 130 LightGoldenrod2
-205 190 112 LightGoldenrod3
-139 129 76 LightGoldenrod4
-255 255 224 LightYellow1
-238 238 209 LightYellow2
-205 205 180 LightYellow3
-139 139 122 LightYellow4
-255 255 0 yellow1
-238 238 0 yellow2
-205 205 0 yellow3
-139 139 0 yellow4
-255 215 0 gold1
-238 201 0 gold2
-205 173 0 gold3
-139 117 0 gold4
-255 193 37 goldenrod1
-238 180 34 goldenrod2
-205 155 29 goldenrod3
-139 105 20 goldenrod4
-255 185 15 DarkGoldenrod1
-238 173 14 DarkGoldenrod2
-205 149 12 DarkGoldenrod3
-139 101 8 DarkGoldenrod4
-255 193 193 RosyBrown1
-238 180 180 RosyBrown2
-205 155 155 RosyBrown3
-139 105 105 RosyBrown4
-255 106 106 IndianRed1
-238 99 99 IndianRed2
-205 85 85 IndianRed3
-139 58 58 IndianRed4
-255 130 71 sienna1
-238 121 66 sienna2
-205 104 57 sienna3
-139 71 38 sienna4
-255 211 155 burlywood1
-238 197 145 burlywood2
-205 170 125 burlywood3
-139 115 85 burlywood4
-255 231 186 wheat1
-238 216 174 wheat2
-205 186 150 wheat3
-139 126 102 wheat4
-255 165 79 tan1
-238 154 73 tan2
-205 133 63 tan3
-139 90 43 tan4
-255 127 36 chocolate1
-238 118 33 chocolate2
-205 102 29 chocolate3
-139 69 19 chocolate4
-255 48 48 firebrick1
-238 44 44 firebrick2
-205 38 38 firebrick3
-139 26 26 firebrick4
-255 64 64 brown1
-238 59 59 brown2
-205 51 51 brown3
-139 35 35 brown4
-255 140 105 salmon1
-238 130 98 salmon2
-205 112 84 salmon3
-139 76 57 salmon4
-255 160 122 LightSalmon1
-238 149 114 LightSalmon2
-205 129 98 LightSalmon3
-139 87 66 LightSalmon4
-255 165 0 orange1
-238 154 0 orange2
-205 133 0 orange3
-139 90 0 orange4
-255 127 0 DarkOrange1
-238 118 0 DarkOrange2
-205 102 0 DarkOrange3
-139 69 0 DarkOrange4
-255 114 86 coral1
-238 106 80 coral2
-205 91 69 coral3
-139 62 47 coral4
-255 99 71 tomato1
-238 92 66 tomato2
-205 79 57 tomato3
-139 54 38 tomato4
-255 69 0 OrangeRed1
-238 64 0 OrangeRed2
-205 55 0 OrangeRed3
-139 37 0 OrangeRed4
-255 0 0 red1
-238 0 0 red2
-205 0 0 red3
-139 0 0 red4
-255 20 147 DeepPink1
-238 18 137 DeepPink2
-205 16 118 DeepPink3
-139 10 80 DeepPink4
-255 110 180 HotPink1
-238 106 167 HotPink2
-205 96 144 HotPink3
-139 58 98 HotPink4
-255 181 197 pink1
-238 169 184 pink2
-205 145 158 pink3
-139 99 108 pink4
-255 174 185 LightPink1
-238 162 173 LightPink2
-205 140 149 LightPink3
-139 95 101 LightPink4
-255 130 171 PaleVioletRed1
-238 121 159 PaleVioletRed2
-205 104 137 PaleVioletRed3
-139 71 93 PaleVioletRed4
-255 52 179 maroon1
-238 48 167 maroon2
-205 41 144 maroon3
-139 28 98 maroon4
-255 62 150 VioletRed1
-238 58 140 VioletRed2
-205 50 120 VioletRed3
-139 34 82 VioletRed4
-255 0 255 magenta1
-238 0 238 magenta2
-205 0 205 magenta3
-139 0 139 magenta4
-255 131 250 orchid1
-238 122 233 orchid2
-205 105 201 orchid3
-139 71 137 orchid4
-255 187 255 plum1
-238 174 238 plum2
-205 150 205 plum3
-139 102 139 plum4
-224 102 255 MediumOrchid1
-209 95 238 MediumOrchid2
-180 82 205 MediumOrchid3
-122 55 139 MediumOrchid4
-191 62 255 DarkOrchid1
-178 58 238 DarkOrchid2
-154 50 205 DarkOrchid3
-104 34 139 DarkOrchid4
-155 48 255 purple1
-145 44 238 purple2
-125 38 205 purple3
- 85 26 139 purple4
-171 130 255 MediumPurple1
-159 121 238 MediumPurple2
-137 104 205 MediumPurple3
- 93 71 139 MediumPurple4
-255 225 255 thistle1
-238 210 238 thistle2
-205 181 205 thistle3
-139 123 139 thistle4
- 0 0 0 gray0
- 0 0 0 grey0
- 3 3 3 gray1
- 3 3 3 grey1
- 5 5 5 gray2
- 5 5 5 grey2
- 8 8 8 gray3
- 8 8 8 grey3
- 10 10 10 gray4
- 10 10 10 grey4
- 13 13 13 gray5
- 13 13 13 grey5
- 15 15 15 gray6
- 15 15 15 grey6
- 18 18 18 gray7
- 18 18 18 grey7
- 20 20 20 gray8
- 20 20 20 grey8
- 23 23 23 gray9
- 23 23 23 grey9
- 26 26 26 gray10
- 26 26 26 grey10
- 28 28 28 gray11
- 28 28 28 grey11
- 31 31 31 gray12
- 31 31 31 grey12
- 33 33 33 gray13
- 33 33 33 grey13
- 36 36 36 gray14
- 36 36 36 grey14
- 38 38 38 gray15
- 38 38 38 grey15
- 41 41 41 gray16
- 41 41 41 grey16
- 43 43 43 gray17
- 43 43 43 grey17
- 46 46 46 gray18
- 46 46 46 grey18
- 48 48 48 gray19
- 48 48 48 grey19
- 51 51 51 gray20
- 51 51 51 grey20
- 54 54 54 gray21
- 54 54 54 grey21
- 56 56 56 gray22
- 56 56 56 grey22
- 59 59 59 gray23
- 59 59 59 grey23
- 61 61 61 gray24
- 61 61 61 grey24
- 64 64 64 gray25
- 64 64 64 grey25
- 66 66 66 gray26
- 66 66 66 grey26
- 69 69 69 gray27
- 69 69 69 grey27
- 71 71 71 gray28
- 71 71 71 grey28
- 74 74 74 gray29
- 74 74 74 grey29
- 77 77 77 gray30
- 77 77 77 grey30
- 79 79 79 gray31
- 79 79 79 grey31
- 82 82 82 gray32
- 82 82 82 grey32
- 84 84 84 gray33
- 84 84 84 grey33
- 87 87 87 gray34
- 87 87 87 grey34
- 89 89 89 gray35
- 89 89 89 grey35
- 92 92 92 gray36
- 92 92 92 grey36
- 94 94 94 gray37
- 94 94 94 grey37
- 97 97 97 gray38
- 97 97 97 grey38
- 99 99 99 gray39
- 99 99 99 grey39
-102 102 102 gray40
-102 102 102 grey40
-105 105 105 gray41
-105 105 105 grey41
-107 107 107 gray42
-107 107 107 grey42
-110 110 110 gray43
-110 110 110 grey43
-112 112 112 gray44
-112 112 112 grey44
-115 115 115 gray45
-115 115 115 grey45
-117 117 117 gray46
-117 117 117 grey46
-120 120 120 gray47
-120 120 120 grey47
-122 122 122 gray48
-122 122 122 grey48
-125 125 125 gray49
-125 125 125 grey49
-127 127 127 gray50
-127 127 127 grey50
-130 130 130 gray51
-130 130 130 grey51
-133 133 133 gray52
-133 133 133 grey52
-135 135 135 gray53
-135 135 135 grey53
-138 138 138 gray54
-138 138 138 grey54
-140 140 140 gray55
-140 140 140 grey55
-143 143 143 gray56
-143 143 143 grey56
-145 145 145 gray57
-145 145 145 grey57
-148 148 148 gray58
-148 148 148 grey58
-150 150 150 gray59
-150 150 150 grey59
-153 153 153 gray60
-153 153 153 grey60
-156 156 156 gray61
-156 156 156 grey61
-158 158 158 gray62
-158 158 158 grey62
-161 161 161 gray63
-161 161 161 grey63
-163 163 163 gray64
-163 163 163 grey64
-166 166 166 gray65
-166 166 166 grey65
-168 168 168 gray66
-168 168 168 grey66
-171 171 171 gray67
-171 171 171 grey67
-173 173 173 gray68
-173 173 173 grey68
-176 176 176 gray69
-176 176 176 grey69
-179 179 179 gray70
-179 179 179 grey70
-181 181 181 gray71
-181 181 181 grey71
-184 184 184 gray72
-184 184 184 grey72
-186 186 186 gray73
-186 186 186 grey73
-189 189 189 gray74
-189 189 189 grey74
-191 191 191 gray75
-191 191 191 grey75
-194 194 194 gray76
-194 194 194 grey76
-196 196 196 gray77
-196 196 196 grey77
-199 199 199 gray78
-199 199 199 grey78
-201 201 201 gray79
-201 201 201 grey79
-204 204 204 gray80
-204 204 204 grey80
-207 207 207 gray81
-207 207 207 grey81
-209 209 209 gray82
-209 209 209 grey82
-212 212 212 gray83
-212 212 212 grey83
-214 214 214 gray84
-214 214 214 grey84
-217 217 217 gray85
-217 217 217 grey85
-219 219 219 gray86
-219 219 219 grey86
-222 222 222 gray87
-222 222 222 grey87
-224 224 224 gray88
-224 224 224 grey88
-227 227 227 gray89
-227 227 227 grey89
-229 229 229 gray90
-229 229 229 grey90
-232 232 232 gray91
-232 232 232 grey91
-235 235 235 gray92
-235 235 235 grey92
-237 237 237 gray93
-237 237 237 grey93
-240 240 240 gray94
-240 240 240 grey94
-242 242 242 gray95
-242 242 242 grey95
-245 245 245 gray96
-245 245 245 grey96
-247 247 247 gray97
-247 247 247 grey97
-250 250 250 gray98
-250 250 250 grey98
-252 252 252 gray99
-252 252 252 grey99
-255 255 255 gray100
-255 255 255 grey100
-169 169 169 dark grey
-169 169 169 DarkGrey
-169 169 169 dark gray
-169 169 169 DarkGray
-0 0 139 dark blue
-0 0 139 DarkBlue
-0 139 139 dark cyan
-0 139 139 DarkCyan
-139 0 139 dark magenta
-139 0 139 DarkMagenta
-139 0 0 dark red
-139 0 0 DarkRed
-144 238 144 light green
-144 238 144 LightGreen
+255 250 250 snow
+248 248 255 ghost white
+248 248 255 GhostWhite
+245 245 245 white smoke
+245 245 245 WhiteSmoke
+220 220 220 gainsboro
+255 250 240 floral white
+255 250 240 FloralWhite
+253 245 230 old lace
+253 245 230 OldLace
+250 240 230 linen
+250 235 215 antique white
+250 235 215 AntiqueWhite
+255 239 213 papaya whip
+255 239 213 PapayaWhip
+255 235 205 blanched almond
+255 235 205 BlanchedAlmond
+255 228 196 bisque
+255 218 185 peach puff
+255 218 185 PeachPuff
+255 222 173 navajo white
+255 222 173 NavajoWhite
+255 228 181 moccasin
+255 248 220 cornsilk
+255 255 240 ivory
+255 250 205 lemon chiffon
+255 250 205 LemonChiffon
+255 245 238 seashell
+240 255 240 honeydew
+245 255 250 mint cream
+245 255 250 MintCream
+240 255 255 azure
+240 248 255 alice blue
+240 248 255 AliceBlue
+230 230 250 lavender
+255 240 245 lavender blush
+255 240 245 LavenderBlush
+255 228 225 misty rose
+255 228 225 MistyRose
+255 255 255 white
+ 0 0 0 black
+ 47 79 79 dark slate gray
+ 47 79 79 DarkSlateGray
+ 47 79 79 dark slate grey
+ 47 79 79 DarkSlateGrey
+105 105 105 dim gray
+105 105 105 DimGray
+105 105 105 dim grey
+105 105 105 DimGrey
+112 128 144 slate gray
+112 128 144 SlateGray
+112 128 144 slate grey
+112 128 144 SlateGrey
+119 136 153 light slate gray
+119 136 153 LightSlateGray
+119 136 153 light slate grey
+119 136 153 LightSlateGrey
+190 190 190 gray
+190 190 190 grey
+211 211 211 light grey
+211 211 211 LightGrey
+211 211 211 light gray
+211 211 211 LightGray
+ 25 25 112 midnight blue
+ 25 25 112 MidnightBlue
+ 0 0 128 navy
+ 0 0 128 navy blue
+ 0 0 128 NavyBlue
+100 149 237 cornflower blue
+100 149 237 CornflowerBlue
+ 72 61 139 dark slate blue
+ 72 61 139 DarkSlateBlue
+106 90 205 slate blue
+106 90 205 SlateBlue
+123 104 238 medium slate blue
+123 104 238 MediumSlateBlue
+132 112 255 light slate blue
+132 112 255 LightSlateBlue
+ 0 0 205 medium blue
+ 0 0 205 MediumBlue
+ 65 105 225 royal blue
+ 65 105 225 RoyalBlue
+ 0 0 255 blue
+ 30 144 255 dodger blue
+ 30 144 255 DodgerBlue
+ 0 191 255 deep sky blue
+ 0 191 255 DeepSkyBlue
+135 206 235 sky blue
+135 206 235 SkyBlue
+135 206 250 light sky blue
+135 206 250 LightSkyBlue
+ 70 130 180 steel blue
+ 70 130 180 SteelBlue
+176 196 222 light steel blue
+176 196 222 LightSteelBlue
+173 216 230 light blue
+173 216 230 LightBlue
+176 224 230 powder blue
+176 224 230 PowderBlue
+175 238 238 pale turquoise
+175 238 238 PaleTurquoise
+ 0 206 209 dark turquoise
+ 0 206 209 DarkTurquoise
+ 72 209 204 medium turquoise
+ 72 209 204 MediumTurquoise
+ 64 224 208 turquoise
+ 0 255 255 cyan
+224 255 255 light cyan
+224 255 255 LightCyan
+ 95 158 160 cadet blue
+ 95 158 160 CadetBlue
+102 205 170 medium aquamarine
+102 205 170 MediumAquamarine
+127 255 212 aquamarine
+ 0 100 0 dark green
+ 0 100 0 DarkGreen
+ 85 107 47 dark olive green
+ 85 107 47 DarkOliveGreen
+143 188 143 dark sea green
+143 188 143 DarkSeaGreen
+ 46 139 87 sea green
+ 46 139 87 SeaGreen
+ 60 179 113 medium sea green
+ 60 179 113 MediumSeaGreen
+ 32 178 170 light sea green
+ 32 178 170 LightSeaGreen
+152 251 152 pale green
+152 251 152 PaleGreen
+ 0 255 127 spring green
+ 0 255 127 SpringGreen
+124 252 0 lawn green
+124 252 0 LawnGreen
+ 0 255 0 green
+127 255 0 chartreuse
+ 0 250 154 medium spring green
+ 0 250 154 MediumSpringGreen
+173 255 47 green yellow
+173 255 47 GreenYellow
+ 50 205 50 lime green
+ 50 205 50 LimeGreen
+154 205 50 yellow green
+154 205 50 YellowGreen
+ 34 139 34 forest green
+ 34 139 34 ForestGreen
+107 142 35 olive drab
+107 142 35 OliveDrab
+189 183 107 dark khaki
+189 183 107 DarkKhaki
+240 230 140 khaki
+238 232 170 pale goldenrod
+238 232 170 PaleGoldenrod
+250 250 210 light goldenrod yellow
+250 250 210 LightGoldenrodYellow
+255 255 224 light yellow
+255 255 224 LightYellow
+255 255 0 yellow
+255 215 0 gold
+238 221 130 light goldenrod
+238 221 130 LightGoldenrod
+218 165 32 goldenrod
+184 134 11 dark goldenrod
+184 134 11 DarkGoldenrod
+188 143 143 rosy brown
+188 143 143 RosyBrown
+205 92 92 indian red
+205 92 92 IndianRed
+139 69 19 saddle brown
+139 69 19 SaddleBrown
+160 82 45 sienna
+205 133 63 peru
+222 184 135 burlywood
+245 245 220 beige
+245 222 179 wheat
+244 164 96 sandy brown
+244 164 96 SandyBrown
+210 180 140 tan
+210 105 30 chocolate
+178 34 34 firebrick
+165 42 42 brown
+233 150 122 dark salmon
+233 150 122 DarkSalmon
+250 128 114 salmon
+255 160 122 light salmon
+255 160 122 LightSalmon
+255 165 0 orange
+255 140 0 dark orange
+255 140 0 DarkOrange
+255 127 80 coral
+240 128 128 light coral
+240 128 128 LightCoral
+255 99 71 tomato
+255 69 0 orange red
+255 69 0 OrangeRed
+255 0 0 red
+255 105 180 hot pink
+255 105 180 HotPink
+255 20 147 deep pink
+255 20 147 DeepPink
+255 192 203 pink
+255 182 193 light pink
+255 182 193 LightPink
+219 112 147 pale violet red
+219 112 147 PaleVioletRed
+176 48 96 maroon
+199 21 133 medium violet red
+199 21 133 MediumVioletRed
+208 32 144 violet red
+208 32 144 VioletRed
+255 0 255 magenta
+238 130 238 violet
+221 160 221 plum
+218 112 214 orchid
+186 85 211 medium orchid
+186 85 211 MediumOrchid
+153 50 204 dark orchid
+153 50 204 DarkOrchid
+148 0 211 dark violet
+148 0 211 DarkViolet
+138 43 226 blue violet
+138 43 226 BlueViolet
+160 32 240 purple
+147 112 219 medium purple
+147 112 219 MediumPurple
+216 191 216 thistle
+255 250 250 snow1
+238 233 233 snow2
+205 201 201 snow3
+139 137 137 snow4
+255 245 238 seashell1
+238 229 222 seashell2
+205 197 191 seashell3
+139 134 130 seashell4
+255 239 219 AntiqueWhite1
+238 223 204 AntiqueWhite2
+205 192 176 AntiqueWhite3
+139 131 120 AntiqueWhite4
+255 228 196 bisque1
+238 213 183 bisque2
+205 183 158 bisque3
+139 125 107 bisque4
+255 218 185 PeachPuff1
+238 203 173 PeachPuff2
+205 175 149 PeachPuff3
+139 119 101 PeachPuff4
+255 222 173 NavajoWhite1
+238 207 161 NavajoWhite2
+205 179 139 NavajoWhite3
+139 121 94 NavajoWhite4
+255 250 205 LemonChiffon1
+238 233 191 LemonChiffon2
+205 201 165 LemonChiffon3
+139 137 112 LemonChiffon4
+255 248 220 cornsilk1
+238 232 205 cornsilk2
+205 200 177 cornsilk3
+139 136 120 cornsilk4
+255 255 240 ivory1
+238 238 224 ivory2
+205 205 193 ivory3
+139 139 131 ivory4
+240 255 240 honeydew1
+224 238 224 honeydew2
+193 205 193 honeydew3
+131 139 131 honeydew4
+255 240 245 LavenderBlush1
+238 224 229 LavenderBlush2
+205 193 197 LavenderBlush3
+139 131 134 LavenderBlush4
+255 228 225 MistyRose1
+238 213 210 MistyRose2
+205 183 181 MistyRose3
+139 125 123 MistyRose4
+240 255 255 azure1
+224 238 238 azure2
+193 205 205 azure3
+131 139 139 azure4
+131 111 255 SlateBlue1
+122 103 238 SlateBlue2
+105 89 205 SlateBlue3
+ 71 60 139 SlateBlue4
+ 72 118 255 RoyalBlue1
+ 67 110 238 RoyalBlue2
+ 58 95 205 RoyalBlue3
+ 39 64 139 RoyalBlue4
+ 0 0 255 blue1
+ 0 0 238 blue2
+ 0 0 205 blue3
+ 0 0 139 blue4
+ 30 144 255 DodgerBlue1
+ 28 134 238 DodgerBlue2
+ 24 116 205 DodgerBlue3
+ 16 78 139 DodgerBlue4
+ 99 184 255 SteelBlue1
+ 92 172 238 SteelBlue2
+ 79 148 205 SteelBlue3
+ 54 100 139 SteelBlue4
+ 0 191 255 DeepSkyBlue1
+ 0 178 238 DeepSkyBlue2
+ 0 154 205 DeepSkyBlue3
+ 0 104 139 DeepSkyBlue4
+135 206 255 SkyBlue1
+126 192 238 SkyBlue2
+108 166 205 SkyBlue3
+ 74 112 139 SkyBlue4
+176 226 255 LightSkyBlue1
+164 211 238 LightSkyBlue2
+141 182 205 LightSkyBlue3
+ 96 123 139 LightSkyBlue4
+198 226 255 SlateGray1
+185 211 238 SlateGray2
+159 182 205 SlateGray3
+108 123 139 SlateGray4
+202 225 255 LightSteelBlue1
+188 210 238 LightSteelBlue2
+162 181 205 LightSteelBlue3
+110 123 139 LightSteelBlue4
+191 239 255 LightBlue1
+178 223 238 LightBlue2
+154 192 205 LightBlue3
+104 131 139 LightBlue4
+224 255 255 LightCyan1
+209 238 238 LightCyan2
+180 205 205 LightCyan3
+122 139 139 LightCyan4
+187 255 255 PaleTurquoise1
+174 238 238 PaleTurquoise2
+150 205 205 PaleTurquoise3
+102 139 139 PaleTurquoise4
+152 245 255 CadetBlue1
+142 229 238 CadetBlue2
+122 197 205 CadetBlue3
+ 83 134 139 CadetBlue4
+ 0 245 255 turquoise1
+ 0 229 238 turquoise2
+ 0 197 205 turquoise3
+ 0 134 139 turquoise4
+ 0 255 255 cyan1
+ 0 238 238 cyan2
+ 0 205 205 cyan3
+ 0 139 139 cyan4
+151 255 255 DarkSlateGray1
+141 238 238 DarkSlateGray2
+121 205 205 DarkSlateGray3
+ 82 139 139 DarkSlateGray4
+127 255 212 aquamarine1
+118 238 198 aquamarine2
+102 205 170 aquamarine3
+ 69 139 116 aquamarine4
+193 255 193 DarkSeaGreen1
+180 238 180 DarkSeaGreen2
+155 205 155 DarkSeaGreen3
+105 139 105 DarkSeaGreen4
+ 84 255 159 SeaGreen1
+ 78 238 148 SeaGreen2
+ 67 205 128 SeaGreen3
+ 46 139 87 SeaGreen4
+154 255 154 PaleGreen1
+144 238 144 PaleGreen2
+124 205 124 PaleGreen3
+ 84 139 84 PaleGreen4
+ 0 255 127 SpringGreen1
+ 0 238 118 SpringGreen2
+ 0 205 102 SpringGreen3
+ 0 139 69 SpringGreen4
+ 0 255 0 green1
+ 0 238 0 green2
+ 0 205 0 green3
+ 0 139 0 green4
+127 255 0 chartreuse1
+118 238 0 chartreuse2
+102 205 0 chartreuse3
+ 69 139 0 chartreuse4
+192 255 62 OliveDrab1
+179 238 58 OliveDrab2
+154 205 50 OliveDrab3
+105 139 34 OliveDrab4
+202 255 112 DarkOliveGreen1
+188 238 104 DarkOliveGreen2
+162 205 90 DarkOliveGreen3
+110 139 61 DarkOliveGreen4
+255 246 143 khaki1
+238 230 133 khaki2
+205 198 115 khaki3
+139 134 78 khaki4
+255 236 139 LightGoldenrod1
+238 220 130 LightGoldenrod2
+205 190 112 LightGoldenrod3
+139 129 76 LightGoldenrod4
+255 255 224 LightYellow1
+238 238 209 LightYellow2
+205 205 180 LightYellow3
+139 139 122 LightYellow4
+255 255 0 yellow1
+238 238 0 yellow2
+205 205 0 yellow3
+139 139 0 yellow4
+255 215 0 gold1
+238 201 0 gold2
+205 173 0 gold3
+139 117 0 gold4
+255 193 37 goldenrod1
+238 180 34 goldenrod2
+205 155 29 goldenrod3
+139 105 20 goldenrod4
+255 185 15 DarkGoldenrod1
+238 173 14 DarkGoldenrod2
+205 149 12 DarkGoldenrod3
+139 101 8 DarkGoldenrod4
+255 193 193 RosyBrown1
+238 180 180 RosyBrown2
+205 155 155 RosyBrown3
+139 105 105 RosyBrown4
+255 106 106 IndianRed1
+238 99 99 IndianRed2
+205 85 85 IndianRed3
+139 58 58 IndianRed4
+255 130 71 sienna1
+238 121 66 sienna2
+205 104 57 sienna3
+139 71 38 sienna4
+255 211 155 burlywood1
+238 197 145 burlywood2
+205 170 125 burlywood3
+139 115 85 burlywood4
+255 231 186 wheat1
+238 216 174 wheat2
+205 186 150 wheat3
+139 126 102 wheat4
+255 165 79 tan1
+238 154 73 tan2
+205 133 63 tan3
+139 90 43 tan4
+255 127 36 chocolate1
+238 118 33 chocolate2
+205 102 29 chocolate3
+139 69 19 chocolate4
+255 48 48 firebrick1
+238 44 44 firebrick2
+205 38 38 firebrick3
+139 26 26 firebrick4
+255 64 64 brown1
+238 59 59 brown2
+205 51 51 brown3
+139 35 35 brown4
+255 140 105 salmon1
+238 130 98 salmon2
+205 112 84 salmon3
+139 76 57 salmon4
+255 160 122 LightSalmon1
+238 149 114 LightSalmon2
+205 129 98 LightSalmon3
+139 87 66 LightSalmon4
+255 165 0 orange1
+238 154 0 orange2
+205 133 0 orange3
+139 90 0 orange4
+255 127 0 DarkOrange1
+238 118 0 DarkOrange2
+205 102 0 DarkOrange3
+139 69 0 DarkOrange4
+255 114 86 coral1
+238 106 80 coral2
+205 91 69 coral3
+139 62 47 coral4
+255 99 71 tomato1
+238 92 66 tomato2
+205 79 57 tomato3
+139 54 38 tomato4
+255 69 0 OrangeRed1
+238 64 0 OrangeRed2
+205 55 0 OrangeRed3
+139 37 0 OrangeRed4
+255 0 0 red1
+238 0 0 red2
+205 0 0 red3
+139 0 0 red4
+255 20 147 DeepPink1
+238 18 137 DeepPink2
+205 16 118 DeepPink3
+139 10 80 DeepPink4
+255 110 180 HotPink1
+238 106 167 HotPink2
+205 96 144 HotPink3
+139 58 98 HotPink4
+255 181 197 pink1
+238 169 184 pink2
+205 145 158 pink3
+139 99 108 pink4
+255 174 185 LightPink1
+238 162 173 LightPink2
+205 140 149 LightPink3
+139 95 101 LightPink4
+255 130 171 PaleVioletRed1
+238 121 159 PaleVioletRed2
+205 104 137 PaleVioletRed3
+139 71 93 PaleVioletRed4
+255 52 179 maroon1
+238 48 167 maroon2
+205 41 144 maroon3
+139 28 98 maroon4
+255 62 150 VioletRed1
+238 58 140 VioletRed2
+205 50 120 VioletRed3
+139 34 82 VioletRed4
+255 0 255 magenta1
+238 0 238 magenta2
+205 0 205 magenta3
+139 0 139 magenta4
+255 131 250 orchid1
+238 122 233 orchid2
+205 105 201 orchid3
+139 71 137 orchid4
+255 187 255 plum1
+238 174 238 plum2
+205 150 205 plum3
+139 102 139 plum4
+224 102 255 MediumOrchid1
+209 95 238 MediumOrchid2
+180 82 205 MediumOrchid3
+122 55 139 MediumOrchid4
+191 62 255 DarkOrchid1
+178 58 238 DarkOrchid2
+154 50 205 DarkOrchid3
+104 34 139 DarkOrchid4
+155 48 255 purple1
+145 44 238 purple2
+125 38 205 purple3
+ 85 26 139 purple4
+171 130 255 MediumPurple1
+159 121 238 MediumPurple2
+137 104 205 MediumPurple3
+ 93 71 139 MediumPurple4
+255 225 255 thistle1
+238 210 238 thistle2
+205 181 205 thistle3
+139 123 139 thistle4
+ 0 0 0 gray0
+ 0 0 0 grey0
+ 3 3 3 gray1
+ 3 3 3 grey1
+ 5 5 5 gray2
+ 5 5 5 grey2
+ 8 8 8 gray3
+ 8 8 8 grey3
+ 10 10 10 gray4
+ 10 10 10 grey4
+ 13 13 13 gray5
+ 13 13 13 grey5
+ 15 15 15 gray6
+ 15 15 15 grey6
+ 18 18 18 gray7
+ 18 18 18 grey7
+ 20 20 20 gray8
+ 20 20 20 grey8
+ 23 23 23 gray9
+ 23 23 23 grey9
+ 26 26 26 gray10
+ 26 26 26 grey10
+ 28 28 28 gray11
+ 28 28 28 grey11
+ 31 31 31 gray12
+ 31 31 31 grey12
+ 33 33 33 gray13
+ 33 33 33 grey13
+ 36 36 36 gray14
+ 36 36 36 grey14
+ 38 38 38 gray15
+ 38 38 38 grey15
+ 41 41 41 gray16
+ 41 41 41 grey16
+ 43 43 43 gray17
+ 43 43 43 grey17
+ 46 46 46 gray18
+ 46 46 46 grey18
+ 48 48 48 gray19
+ 48 48 48 grey19
+ 51 51 51 gray20
+ 51 51 51 grey20
+ 54 54 54 gray21
+ 54 54 54 grey21
+ 56 56 56 gray22
+ 56 56 56 grey22
+ 59 59 59 gray23
+ 59 59 59 grey23
+ 61 61 61 gray24
+ 61 61 61 grey24
+ 64 64 64 gray25
+ 64 64 64 grey25
+ 66 66 66 gray26
+ 66 66 66 grey26
+ 69 69 69 gray27
+ 69 69 69 grey27
+ 71 71 71 gray28
+ 71 71 71 grey28
+ 74 74 74 gray29
+ 74 74 74 grey29
+ 77 77 77 gray30
+ 77 77 77 grey30
+ 79 79 79 gray31
+ 79 79 79 grey31
+ 82 82 82 gray32
+ 82 82 82 grey32
+ 84 84 84 gray33
+ 84 84 84 grey33
+ 87 87 87 gray34
+ 87 87 87 grey34
+ 89 89 89 gray35
+ 89 89 89 grey35
+ 92 92 92 gray36
+ 92 92 92 grey36
+ 94 94 94 gray37
+ 94 94 94 grey37
+ 97 97 97 gray38
+ 97 97 97 grey38
+ 99 99 99 gray39
+ 99 99 99 grey39
+102 102 102 gray40
+102 102 102 grey40
+105 105 105 gray41
+105 105 105 grey41
+107 107 107 gray42
+107 107 107 grey42
+110 110 110 gray43
+110 110 110 grey43
+112 112 112 gray44
+112 112 112 grey44
+115 115 115 gray45
+115 115 115 grey45
+117 117 117 gray46
+117 117 117 grey46
+120 120 120 gray47
+120 120 120 grey47
+122 122 122 gray48
+122 122 122 grey48
+125 125 125 gray49
+125 125 125 grey49
+127 127 127 gray50
+127 127 127 grey50
+130 130 130 gray51
+130 130 130 grey51
+133 133 133 gray52
+133 133 133 grey52
+135 135 135 gray53
+135 135 135 grey53
+138 138 138 gray54
+138 138 138 grey54
+140 140 140 gray55
+140 140 140 grey55
+143 143 143 gray56
+143 143 143 grey56
+145 145 145 gray57
+145 145 145 grey57
+148 148 148 gray58
+148 148 148 grey58
+150 150 150 gray59
+150 150 150 grey59
+153 153 153 gray60
+153 153 153 grey60
+156 156 156 gray61
+156 156 156 grey61
+158 158 158 gray62
+158 158 158 grey62
+161 161 161 gray63
+161 161 161 grey63
+163 163 163 gray64
+163 163 163 grey64
+166 166 166 gray65
+166 166 166 grey65
+168 168 168 gray66
+168 168 168 grey66
+171 171 171 gray67
+171 171 171 grey67
+173 173 173 gray68
+173 173 173 grey68
+176 176 176 gray69
+176 176 176 grey69
+179 179 179 gray70
+179 179 179 grey70
+181 181 181 gray71
+181 181 181 grey71
+184 184 184 gray72
+184 184 184 grey72
+186 186 186 gray73
+186 186 186 grey73
+189 189 189 gray74
+189 189 189 grey74
+191 191 191 gray75
+191 191 191 grey75
+194 194 194 gray76
+194 194 194 grey76
+196 196 196 gray77
+196 196 196 grey77
+199 199 199 gray78
+199 199 199 grey78
+201 201 201 gray79
+201 201 201 grey79
+204 204 204 gray80
+204 204 204 grey80
+207 207 207 gray81
+207 207 207 grey81
+209 209 209 gray82
+209 209 209 grey82
+212 212 212 gray83
+212 212 212 grey83
+214 214 214 gray84
+214 214 214 grey84
+217 217 217 gray85
+217 217 217 grey85
+219 219 219 gray86
+219 219 219 grey86
+222 222 222 gray87
+222 222 222 grey87
+224 224 224 gray88
+224 224 224 grey88
+227 227 227 gray89
+227 227 227 grey89
+229 229 229 gray90
+229 229 229 grey90
+232 232 232 gray91
+232 232 232 grey91
+235 235 235 gray92
+235 235 235 grey92
+237 237 237 gray93
+237 237 237 grey93
+240 240 240 gray94
+240 240 240 grey94
+242 242 242 gray95
+242 242 242 grey95
+245 245 245 gray96
+245 245 245 grey96
+247 247 247 gray97
+247 247 247 grey97
+250 250 250 gray98
+250 250 250 grey98
+252 252 252 gray99
+252 252 252 grey99
+255 255 255 gray100
+255 255 255 grey100
+169 169 169 dark grey
+169 169 169 DarkGrey
+169 169 169 dark gray
+169 169 169 DarkGray
+0 0 139 dark blue
+0 0 139 DarkBlue
+0 139 139 dark cyan
+0 139 139 DarkCyan
+139 0 139 dark magenta
+139 0 139 DarkMagenta
+139 0 0 dark red
+139 0 0 DarkRed
+144 238 144 light green
+144 238 144 LightGreen
diff --git a/test/rotated_text.cxx b/test/rotated_text.cxx
index 0d2eb7f62..4cc73a9c0 100644
--- a/test/rotated_text.cxx
+++ b/test/rotated_text.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Label test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -46,7 +44,7 @@ class Rotated_Label_Box : public Fl_Widget{
fl_font(labelfont(), labelsize());
fl_color(labelcolor());
int dx(0),dy(0);
-
+
if(rt_align&FL_ALIGN_CLIP)fl_push_clip(x(),y(),w(),h());
else fl_push_no_clip();
fl_measure(rt_text,dx,dy);
@@ -213,7 +211,3 @@ int main(int argc, char **argv) {
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/scroll.cxx b/test/scroll.cxx
index 9a82f5503..2ca5ac142 100644
--- a/test/scroll.cxx
+++ b/test/scroll.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fl_Scroll test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -112,7 +110,7 @@ int main(int argc, char** argv) {
Fl_Light_Button but1(150, 310, 200, 25, "box");
but1.callback(box_cb);
-
+
Fl_Choice choice(150, 335, 200, 25, "type():");
choice.menu(choices);
choice.value(3);
@@ -129,7 +127,3 @@ int main(int argc, char** argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/shape.cxx b/test/shape.cxx
index e45e826b6..f87d59c0d 100644
--- a/test/shape.cxx
+++ b/test/shape.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Tiny OpenGL demo program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -62,7 +60,7 @@ void shape_window::draw() {
#include
class shape_window : public Fl_Box {
-public:
+public:
int sides;
shape_window(int x,int y,int w,int h,const char *l=0)
:Fl_Box(FL_DOWN_BOX,x,y,w,h,l){
@@ -100,10 +98,6 @@ int main(int argc, char **argv) {
window.end();
window.show(argc,argv);
-
+
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/subwindow.cxx b/test/subwindow.cxx
index 998813864..73a954824 100644
--- a/test/subwindow.cxx
+++ b/test/subwindow.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Nested window test program for the Fast Light Tool Kit (FLTK).
//
// Test to make sure nested windows work.
@@ -14,11 +12,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -85,9 +83,9 @@ int testwindow::handle(int e) {
if (e != FL_MOVE) printf("%s : %s\n",label(),fl_eventnames[e]);
#endif
if (crsr!=FL_CURSOR_DEFAULT) {
- if (e == FL_ENTER)
+ if (e == FL_ENTER)
cursor(crsr);
- if (e == FL_LEAVE)
+ if (e == FL_LEAVE)
cursor(FL_CURSOR_DEFAULT);
}
if (Fl_Window::handle(e)) return 1;
@@ -164,12 +162,12 @@ int main(int argc, char **argv) {
subwindow->end();
subwindow->use_cursor(FL_CURSOR_HAND);
(new Fl_Box(FL_NO_BOX,0,0,400,100,
- "A child Fl_Window with children of its own may "
- "be useful for imbedding controls into a GL or display "
- "that needs a different visual. There are bugs with the "
- "origins being different between drawing and events, "
- "which I hope I have solved."
- )) -> align(FL_ALIGN_WRAP);
+ "A child Fl_Window with children of its own may "
+ "be useful for imbedding controls into a GL or display "
+ "that needs a different visual. There are bugs with the "
+ "origins being different between drawing and events, "
+ "which I hope I have solved."
+ )) -> align(FL_ALIGN_WRAP);
popup = new Fl_Menu_Button(0,0,400,400);
popup->type(Fl_Menu_Button::POPUP3);
popup->add("This|is|a popup|menu");
@@ -177,7 +175,3 @@ int main(int argc, char **argv) {
window->show(argc, argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/sudoku.cxx b/test/sudoku.cxx
index 2204b65cb..2f116753f 100644
--- a/test/sudoku.cxx
+++ b/test/sudoku.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Sudoku game using the Fast Light Tool Kit (FLTK).
//
// Copyright 2005-2018 by Michael Sweet.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -60,13 +58,13 @@
// Default sizes...
//
-#define GROUP_SIZE 160
-#define CELL_SIZE 50
-#define CELL_OFFSET 5
+#define GROUP_SIZE 160
+#define CELL_SIZE 50
+#define CELL_OFFSET 5
#ifdef __APPLE__
-# define MENU_OFFSET 0
+# define MENU_OFFSET 0
#else
-# define MENU_OFFSET 25
+# define MENU_OFFSET 25
#endif // __APPLE__
// Sound class for Sudoku...
@@ -99,18 +97,18 @@ class SudokuSound {
int remaining;
static OSStatus audio_cb(AudioDeviceID device,
- const AudioTimeStamp *current_time,
- const AudioBufferList *data_in,
- const AudioTimeStamp *time_in,
- AudioBufferList *data_out,
- const AudioTimeStamp *time_out,
- void *client_data);
+ const AudioTimeStamp *current_time,
+ const AudioBufferList *data_in,
+ const AudioTimeStamp *time_in,
+ AudioBufferList *data_out,
+ const AudioTimeStamp *time_out,
+ void *client_data);
#elif defined(_WIN32)
- HWAVEOUT device;
- HGLOBAL header_handle;
- LPWAVEHDR header_ptr;
- HGLOBAL data_handle;
- LPSTR data_ptr;
+ HWAVEOUT device;
+ HGLOBAL header_handle;
+ LPWAVEHDR header_ptr;
+ HGLOBAL data_handle;
+ LPSTR data_ptr;
#else
# ifdef HAVE_ALSA_ASOUNDLIB_H
@@ -128,86 +126,86 @@ class SudokuSound {
SudokuSound();
~SudokuSound();
- void play(char note);
+ void play(char note);
};
// Sudoku cell class...
class SudokuCell : public Fl_Widget {
- bool readonly_;
- int value_;
- int test_value_[9];
+ bool readonly_;
+ int value_;
+ int test_value_[9];
public:
- SudokuCell(int X, int Y, int W, int H);
- void draw();
- int handle(int event);
- void readonly(bool r) { readonly_ = r; redraw(); }
- bool readonly() const { return readonly_; }
- void test_value(int v, int n) { test_value_[n] = v; redraw(); }
- int test_value(int n) const { return test_value_[n]; }
- void value(int v) {
- value_ = v;
- for (int i = 0; i < 8; i ++) test_value_[i] = 0;
- redraw();
- }
- int value() const { return value_; }
+ SudokuCell(int X, int Y, int W, int H);
+ void draw();
+ int handle(int event);
+ void readonly(bool r) { readonly_ = r; redraw(); }
+ bool readonly() const { return readonly_; }
+ void test_value(int v, int n) { test_value_[n] = v; redraw(); }
+ int test_value(int n) const { return test_value_[n]; }
+ void value(int v) {
+ value_ = v;
+ for (int i = 0; i < 8; i ++) test_value_[i] = 0;
+ redraw();
+ }
+ int value() const { return value_; }
};
// Sudoku window class...
class Sudoku : public Fl_Double_Window {
Fl_Sys_Menu_Bar *menubar_;
- Fl_Group *grid_;
- time_t seed_;
- char grid_values_[9][9];
- SudokuCell *grid_cells_[9][9];
- Fl_Group *grid_groups_[3][3];
- int difficulty_;
- SudokuSound *sound_;
-
- static void check_cb(Fl_Widget *widget, void *);
- static void close_cb(Fl_Widget *widget, void *);
- static void diff_cb(Fl_Widget *widget, void *d);
- static void update_helpers_cb(Fl_Widget *, void *);
- static void help_cb(Fl_Widget *, void *);
- static void mute_cb(Fl_Widget *widget, void *);
- static void new_cb(Fl_Widget *widget, void *);
- static void reset_cb(Fl_Widget *widget, void *);
- static void restart_cb(Fl_Widget *widget, void *);
- void set_title();
- static void solve_cb(Fl_Widget *widget, void *);
+ Fl_Group *grid_;
+ time_t seed_;
+ char grid_values_[9][9];
+ SudokuCell *grid_cells_[9][9];
+ Fl_Group *grid_groups_[3][3];
+ int difficulty_;
+ SudokuSound *sound_;
+
+ static void check_cb(Fl_Widget *widget, void *);
+ static void close_cb(Fl_Widget *widget, void *);
+ static void diff_cb(Fl_Widget *widget, void *d);
+ static void update_helpers_cb(Fl_Widget *, void *);
+ static void help_cb(Fl_Widget *, void *);
+ static void mute_cb(Fl_Widget *widget, void *);
+ static void new_cb(Fl_Widget *widget, void *);
+ static void reset_cb(Fl_Widget *widget, void *);
+ static void restart_cb(Fl_Widget *widget, void *);
+ void set_title();
+ static void solve_cb(Fl_Widget *widget, void *);
static Fl_Help_Dialog *help_dialog_;
- static Fl_Preferences prefs_;
+ static Fl_Preferences prefs_;
public:
- Sudoku();
- ~Sudoku();
-
- void check_game(bool highlight = true);
- void load_game();
- void new_game(time_t seed);
- int next_value(SudokuCell *c);
- void resize(int X, int Y, int W, int H);
- void save_game();
- void solve_game();
- void update_helpers();
+ Sudoku();
+ ~Sudoku();
+
+ void check_game(bool highlight = true);
+ void load_game();
+ void new_game(time_t seed);
+ int next_value(SudokuCell *c);
+ void resize(int X, int Y, int W, int H);
+ void save_game();
+ void solve_game();
+ void update_helpers();
};
// Sound class globals...
int SudokuSound::frequencies[9] = {
- 880, // A(5)
- 988, // B(5)
- 1046, // C(5)
- 1174, // D(5)
- 1318, // E(5)
- 1396, // F(5)
- 1568, // G(5)
- 1760, // H (A6)
- 1976 // I (B6)
+ 880, // A(5)
+ 988, // B(5)
+ 1046, // C(5)
+ 1174, // D(5)
+ 1318, // E(5)
+ 1396, // F(5)
+ 1568, // G(5)
+ 1760, // H (A6)
+ 1976 // I (B6)
};
short *SudokuSound::sample_data[9] = { 0 };
int SudokuSound::sample_size = 0;
@@ -223,19 +221,19 @@ SudokuSound::SudokuSound() {
UInt32 size = sizeof(device);
if (AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
- &size, (void *)&device) != noErr) return;
+ &size, (void *)&device) != noErr) return;
size = sizeof(format);
if (AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyStreamFormat,
- &size, &format) != noErr) return;
+ &size, &format) != noErr) return;
// Set up a format we like...
- format.mSampleRate = 44100.0; // 44.1kHz
- format.mChannelsPerFrame = 2; // stereo
+ format.mSampleRate = 44100.0; // 44.1kHz
+ format.mChannelsPerFrame = 2; // stereo
if (AudioDeviceSetProperty(device, NULL, 0, false,
kAudioDevicePropertyStreamFormat,
- sizeof(format), &format) != noErr) return;
+ sizeof(format), &format) != noErr) return;
// Check we got linear pcm - what to do if we did not ???
if (format.mFormatID != kAudioFormatLinearPCM) return;
@@ -248,11 +246,11 @@ SudokuSound::SudokuSound() {
if (AudioDeviceAddIOProc(device, audio_cb, (void *)this) != noErr) return;
AudioDeviceStart(device, audio_cb);
# endif
-
+
sample_size = (int)format.mSampleRate / 20;
#elif defined(_WIN32)
- WAVEFORMATEX format;
+ WAVEFORMATEX format;
memset(&format, 0, sizeof(format));
format.cbSize = sizeof(format);
@@ -330,11 +328,11 @@ SudokuSound::SudokuSound() {
double val = 0.5 * sin(2.0 * M_PI * theta) + theta - (int)theta - 0.5;
if (j < attack) {
- *sample_ptr = (int)(32767 * val * j / attack);
- } else if (j > decay) {
- *sample_ptr = (int)(32767 * val * (sample_size - j + decay) /
- sample_size);
- } else *sample_ptr = (int)(32767 * val);
+ *sample_ptr = (int)(32767 * val * j / attack);
+ } else if (j > decay) {
+ *sample_ptr = (int)(32767 * val * (sample_size - j + decay) /
+ sample_size);
+ } else *sample_ptr = (int)(32767 * val);
sample_ptr[1] = *sample_ptr;
}
@@ -388,12 +386,12 @@ SudokuSound::~SudokuSound() {
// Callback function for writing audio data...
OSStatus
SudokuSound::audio_cb(AudioDeviceID device,
- const AudioTimeStamp *current_time,
- const AudioBufferList *data_in,
- const AudioTimeStamp *time_in,
- AudioBufferList *data_out,
- const AudioTimeStamp *time_out,
- void *client_data) {
+ const AudioTimeStamp *current_time,
+ const AudioBufferList *data_in,
+ const AudioTimeStamp *time_in,
+ AudioBufferList *data_out,
+ const AudioTimeStamp *time_out,
+ void *client_data) {
SudokuSound *ss = (SudokuSound *)client_data;
int count;
float *buffer;
@@ -453,8 +451,8 @@ void SudokuSound::play(char note) {
# endif // HAVE_ALSA_ASOUNDLIB_H
// Just use standard X11 stuff...
- XKeyboardState state;
- XKeyboardControl control;
+ XKeyboardState state;
+ XKeyboardControl control;
// Get original pitch and duration...
XGetKeyboardControl(fl_display, &state);
@@ -466,7 +464,7 @@ void SudokuSound::play(char note) {
XChangeKeyboardControl(fl_display,
KBBellPercent | KBBellPitch | KBBellDuration,
- &control);
+ &control);
XBell(fl_display, 100);
XFlush(fl_display);
@@ -477,7 +475,7 @@ void SudokuSound::play(char note) {
XChangeKeyboardControl(fl_display,
KBBellPercent | KBBellPitch | KBBellDuration,
- &control);
+ &control);
#endif // __APPLE__
}
@@ -555,16 +553,16 @@ SudokuCell::handle(int event) {
case FL_PUSH :
if (!readonly() && Fl::event_inside(this)) {
if (Fl::event_clicks()) {
- // 2+ clicks increments/sets value
- if (value()) {
- if (value() < 9) value(value() + 1);
- else value(1);
- } else value(((Sudoku *)window())->next_value(this));
- }
+ // 2+ clicks increments/sets value
+ if (value()) {
+ if (value() < 9) value(value() + 1);
+ else value(1);
+ } else value(((Sudoku *)window())->next_value(this));
+ }
Fl::focus(this);
- redraw();
- return 1;
+ redraw();
+ return 1;
}
break;
@@ -579,33 +577,33 @@ SudokuCell::handle(int event) {
}
if (Fl::event_state() & (FL_SHIFT | FL_CAPS_LOCK)) {
- int i;
+ int i;
- for (i = 0; i < 8; i ++)
- if (test_value_[i] == key) {
- test_value_[i] = 0;
- break;
- }
+ for (i = 0; i < 8; i ++)
+ if (test_value_[i] == key) {
+ test_value_[i] = 0;
+ break;
+ }
+
+ if (i >= 8) {
+ for (i = 0; i < 8; i ++)
+ if (!test_value_[i]) {
+ test_value_[i] = key;
+ break;
+ }
+ }
if (i >= 8) {
- for (i = 0; i < 8; i ++)
- if (!test_value_[i]) {
- test_value_[i] = key;
- break;
- }
- }
-
- if (i >= 8) {
- for (i = 0; i < 7; i ++) test_value_[i] = test_value_[i + 1];
- test_value_[i] = key;
- }
-
- redraw();
- } else {
- value(key);
- do_callback();
- }
- return 1;
+ for (i = 0; i < 7; i ++) test_value_[i] = test_value_[i + 1];
+ test_value_[i] = key;
+ }
+
+ redraw();
+ } else {
+ value(key);
+ do_callback();
+ }
+ return 1;
} else if (key == 0 || Fl::event_key() == FL_BackSpace ||
Fl::event_key() == FL_Delete) {
if (readonly()) {
@@ -614,8 +612,8 @@ SudokuCell::handle(int event) {
}
value(0);
- do_callback();
- return 1;
+ do_callback();
+ return 1;
}
break;
}
@@ -625,8 +623,8 @@ SudokuCell::handle(int event) {
// Sudoku class globals...
-Fl_Help_Dialog *Sudoku::help_dialog_ = (Fl_Help_Dialog *)0;
-Fl_Preferences Sudoku::prefs_(Fl_Preferences::USER, "fltk.org", "sudoku");
+Fl_Help_Dialog *Sudoku::help_dialog_ = (Fl_Help_Dialog *)0;
+Fl_Preferences Sudoku::prefs_(Fl_Preferences::USER, "fltk.org", "sudoku");
// Create a Sudoku game window...
@@ -636,7 +634,7 @@ Sudoku::Sudoku()
int j, k;
Fl_Group *g;
SudokuCell *cell;
- static Fl_Menu_Item items[] = {
+ static Fl_Menu_Item items[] = {
{ "&Game", 0, 0, 0, FL_SUBMENU },
{ "&New Game", FL_COMMAND | 'n', new_cb, 0, FL_MENU_DIVIDER },
{ "&Check Game", FL_COMMAND | 'c', check_cb, 0, 0 },
@@ -682,7 +680,7 @@ Sudoku::Sudoku()
for (j = 0; j < 3; j ++)
for (k = 0; k < 3; k ++) {
g = new Fl_Group(k * GROUP_SIZE, j * GROUP_SIZE + MENU_OFFSET,
- GROUP_SIZE, GROUP_SIZE);
+ GROUP_SIZE, GROUP_SIZE);
g->box(FL_BORDER_BOX);
if ((int)(j == 1) ^ (int)(k == 1)) g->color(FL_DARK3);
else g->color(FL_DARK2);
@@ -695,9 +693,9 @@ Sudoku::Sudoku()
for (k = 0; k < 9; k ++) {
cell = new SudokuCell(k * CELL_SIZE + CELL_OFFSET +
(k / 3) * (GROUP_SIZE - 3 * CELL_SIZE),
- j * CELL_SIZE + CELL_OFFSET + MENU_OFFSET +
- (j / 3) * (GROUP_SIZE - 3 * CELL_SIZE),
- CELL_SIZE, CELL_SIZE);
+ j * CELL_SIZE + CELL_OFFSET + MENU_OFFSET +
+ (j / 3) * (GROUP_SIZE - 3 * CELL_SIZE),
+ CELL_SIZE, CELL_SIZE);
cell->callback(reset_cb);
grid_cells_[j][k] = cell;
}
@@ -712,7 +710,7 @@ Sudoku::Sudoku()
bm.draw(0, 0);
Fl_Surface_Device::pop_current();
icon(surf.image());
-
+
// Catch window close events...
callback(close_cb);
@@ -767,19 +765,19 @@ Sudoku::check_game(bool highlight) {
else {
for (m = 0; m < 9; m ++)
if ((j != m && grid_cells_[m][k]->value() == val) ||
- (k != m && grid_cells_[j][m]->value() == val)) break;
+ (k != m && grid_cells_[j][m]->value() == val)) break;
if (m < 9) {
if (highlight) {
- cell->color(FL_YELLOW);
- cell->redraw();
- }
-
- correct = false;
- } else if (highlight) {
- cell->color(FL_LIGHT3);
- cell->redraw();
- }
+ cell->color(FL_YELLOW);
+ cell->redraw();
+ }
+
+ correct = false;
+ } else if (highlight) {
+ cell->color(FL_LIGHT3);
+ cell->redraw();
+ }
}
}
@@ -788,40 +786,40 @@ Sudoku::check_game(bool highlight) {
for (k = 0; k < 9; k += 3)
for (int jj = 0; jj < 3; jj ++)
for (int kk = 0; kk < 3; kk ++) {
- SudokuCell *cell = grid_cells_[j + jj][k + kk];
- int val = cell->value();
+ SudokuCell *cell = grid_cells_[j + jj][k + kk];
+ int val = cell->value();
- if (cell->readonly() || !val) continue;
+ if (cell->readonly() || !val) continue;
int jjj;
for (jjj = 0; jjj < 3; jjj ++) {
- int kkk;
+ int kkk;
- for (kkk = 0; kkk < 3; kkk ++)
+ for (kkk = 0; kkk < 3; kkk ++)
if (jj != jjj && kk != kkk &&
- grid_cells_[j + jjj][k + kkk]->value() == val) break;
+ grid_cells_[j + jjj][k + kkk]->value() == val) break;
if (kkk < 3) break;
- }
+ }
if (jjj < 3) {
if (highlight) {
- cell->color(FL_YELLOW);
- cell->redraw();
- }
+ cell->color(FL_YELLOW);
+ cell->redraw();
+ }
- correct = false;
- }
- }
+ correct = false;
+ }
+ }
if (!empty && correct) {
// Success!
for (j = 0; j < 9; j ++) {
for (k = 0; k < 9; k ++) {
- SudokuCell *cell = grid_cells_[j][k];
- cell->color(FL_GREEN);
- cell->readonly(1);
+ SudokuCell *cell = grid_cells_[j][k];
+ cell->color(FL_GREEN);
+ cell->readonly(1);
}
if (sound_) sound_->play('A' + grid_cells_[j][8]->value() - 1);
@@ -864,9 +862,9 @@ Sudoku::diff_cb(Fl_Widget *widget, void *d) {
if (!val)
{
prefs_.set("difficulty_warning", 1);
- fl_alert("Note: 'Hard' and 'Impossible' puzzles may have more than "
- "one possible solution.\n"
- "This is not an error or bug.");
+ fl_alert("Note: 'Hard' and 'Impossible' puzzles may have more than "
+ "one possible solution.\n"
+ "This is not an error or bug.");
}
}
@@ -941,50 +939,50 @@ Sudoku::help_cb(Fl_Widget *, void *) {
help_dialog_ = new Fl_Help_Dialog();
help_dialog_->value(
- "\n"
- "\n"
- "Sudoku Help\n"
- "\n"
- "\n"
+ "\n"
+ "\n"
+ "Sudoku Help\n"
+ "\n"
+ "\n"
- "About the Game
\n"
+ "About the Game
\n"
- "Sudoku (pronounced soo-dough-coo with the emphasis on the\n"
+ "
Sudoku (pronounced soo-dough-coo with the emphasis on the\n"
"first syllable) is a simple number-based puzzle/game played on a\n"
- "9x9 grid that is divided into 3x3 subgrids. The goal is to enter\n"
- "a number from 1 to 9 in each cell so that each number appears\n"
- "only once in each column and row. In addition, each 3x3 subgrid\n"
- "may only contain one of each number.
\n"
-
- "This version of the puzzle is copyright 2005-2010 by Michael R\n"
- "Sweet.
\n"
-
- "Note: The 'Hard' and 'Impossible' difficulty\n"
- "levels generate Sudoku puzzles with multiple possible solutions.\n"
- "While some purists insist that these cannot be called 'Sudoku'\n"
- "puzzles, the author (me) has personally solved many such puzzles\n"
- "in published/printed Sudoku books and finds them far more\n"
- "interesting than the simple single solution variety. If you don't\n"
- "like it, don't play with the difficulty set to 'High' or\n"
- "'Impossible'.
\n"
-
- "How to Play the Game
\n"
-
- "At the start of a new game, Sudoku fills in a random selection\n"
- "of cells for you - the number of cells depends on the difficulty\n"
- "level you use. Click in any of the empty cells or use the arrow\n"
- "keys to highlight individual cells and press a number from 1 to 9\n"
- "to fill in the cell. To clear a cell, press 0, Delete, or\n"
- "Backspace. When you have successfully completed all subgrids, the\n"
- "entire puzzle is highlighted in green until you start a new\n"
- "game.
\n"
-
- "As you work to complete the puzzle, you can display possible\n"
- "solutions inside each cell by holding the Shift key and pressing\n"
- "each number in turn. Repeat the process to remove individual\n"
- "numbers, or press a number without the Shift key to replace them\n"
- "with the actual number to use.
\n"
- "\n"
+ "9x9 grid that is divided into 3x3 subgrids. The goal is to enter\n"
+ "a number from 1 to 9 in each cell so that each number appears\n"
+ "only once in each column and row. In addition, each 3x3 subgrid\n"
+ "may only contain one of each number.
\n"
+
+ "This version of the puzzle is copyright 2005-2010 by Michael R\n"
+ "Sweet.
\n"
+
+ "Note: The 'Hard' and 'Impossible' difficulty\n"
+ "levels generate Sudoku puzzles with multiple possible solutions.\n"
+ "While some purists insist that these cannot be called 'Sudoku'\n"
+ "puzzles, the author (me) has personally solved many such puzzles\n"
+ "in published/printed Sudoku books and finds them far more\n"
+ "interesting than the simple single solution variety. If you don't\n"
+ "like it, don't play with the difficulty set to 'High' or\n"
+ "'Impossible'.
\n"
+
+ "How to Play the Game
\n"
+
+ "At the start of a new game, Sudoku fills in a random selection\n"
+ "of cells for you - the number of cells depends on the difficulty\n"
+ "level you use. Click in any of the empty cells or use the arrow\n"
+ "keys to highlight individual cells and press a number from 1 to 9\n"
+ "to fill in the cell. To clear a cell, press 0, Delete, or\n"
+ "Backspace. When you have successfully completed all subgrids, the\n"
+ "entire puzzle is highlighted in green until you start a new\n"
+ "game.
\n"
+
+ "As you work to complete the puzzle, you can display possible\n"
+ "solutions inside each cell by holding the Shift key and pressing\n"
+ "each number in turn. Repeat the process to remove individual\n"
+ "numbers, or press a number without the Shift key to replace them\n"
+ "with the actual number to use.
\n"
+ "\n"
);
}
@@ -1010,8 +1008,8 @@ Sudoku::load_game() {
sprintf(name, "value%d.%d", j, k);
if (!prefs_.get(name, val, 0)) {
j = 9;
- grid_values_[0][0] = 0;
- break;
+ grid_values_[0][0] = 0;
+ break;
}
grid_values_[j][k] = val;
@@ -1019,7 +1017,7 @@ Sudoku::load_game() {
sprintf(name, "state%d.%d", j, k);
prefs_.get(name, val, 0);
cell->value(val);
-
+
sprintf(name, "readonly%d.%d", j, k);
prefs_.get(name, val, 0);
cell->readonly(val != 0);
@@ -1027,13 +1025,13 @@ Sudoku::load_game() {
if (val) cell->color(FL_GRAY);
else {
cell->color(FL_LIGHT3);
- solved = false;
+ solved = false;
}
for (int m = 0; m < 8; m ++) {
- sprintf(name, "test%d%d.%d", m, j, k);
- prefs_.get(name, val, 0);
- cell->test_value(val, m);
+ sprintf(name, "test%d%d.%d", m, j, k);
+ prefs_.get(name, val, 0);
+ cell->test_value(val, m);
}
}
@@ -1090,35 +1088,35 @@ Sudoku::new_game(time_t seed) {
for (j = 0; j < 9; j += 3) {
for (k = 0; k < 9; k += 3) {
for (t = 1; t <= 9; t ++) {
- for (count = 0; count < 20; count ++) {
- m = j + (rand() % 3);
- n = k + (rand() % 3);
- if (!grid_values_[m][n]) {
- int mm;
+ for (count = 0; count < 20; count ++) {
+ m = j + (rand() % 3);
+ n = k + (rand() % 3);
+ if (!grid_values_[m][n]) {
+ int mm;
- for (mm = 0; mm < m; mm ++)
- if (grid_values_[mm][n] == t) break;
+ for (mm = 0; mm < m; mm ++)
+ if (grid_values_[mm][n] == t) break;
- if (mm < m) continue;
+ if (mm < m) continue;
- int nn;
+ int nn;
- for (nn = 0; nn < n; nn ++)
- if (grid_values_[m][nn] == t) break;
+ for (nn = 0; nn < n; nn ++)
+ if (grid_values_[m][nn] == t) break;
- if (nn < n) continue;
+ if (nn < n) continue;
- grid_values_[m][n] = t;
- break;
- }
- }
+ grid_values_[m][n] = t;
+ break;
+ }
+ }
- if (count == 20) {
- // Unable to find a valid puzzle so far, so start over...
- k = 9;
- j = -3;
- memset(grid_values_, 0, sizeof(grid_values_));
- }
+ if (count == 20) {
+ // Unable to find a valid puzzle so far, so start over...
+ k = 9;
+ j = -3;
+ memset(grid_values_, 0, sizeof(grid_values_));
+ }
}
}
}
@@ -1158,13 +1156,13 @@ Sudoku::new_game(time_t seed) {
cell = grid_cells_[j][k];
if (grid_values_[j][k] == t && !cell->readonly()) {
- cell->value(grid_values_[j][k]);
- cell->readonly(1);
- cell->color(FL_GRAY);
+ cell->value(grid_values_[j][k]);
+ cell->readonly(1);
+ cell->color(FL_GRAY);
- count --;
- break;
- }
+ count --;
+ break;
+ }
}
}
}
@@ -1174,7 +1172,7 @@ Sudoku::new_game(time_t seed) {
// Return the next available value for a cell...
int
Sudoku::next_value(SudokuCell *c) {
- int j = 0, k = 0, m = 0, n = 0;
+ int j = 0, k = 0, m = 0, n = 0;
for (j = 0; j < 9; j ++) {
@@ -1211,7 +1209,7 @@ void
Sudoku::reset_cb(Fl_Widget *widget, void *) {
widget->color(FL_LIGHT3);
widget->redraw();
-
+
((Sudoku *)(widget->window()))->check_game(false);
}
@@ -1243,9 +1241,9 @@ Sudoku::restart_cb(Fl_Widget *widget, void *) {
if (!cell->readonly()) {
solved = false;
int v = cell->value();
- cell->value(0);
- cell->color(FL_LIGHT3);
- if (v && s->sound_) s->sound_->play('A' + v - 1);
+ cell->value(0);
+ cell->color(FL_LIGHT3);
+ if (v && s->sound_) s->sound_->play('A' + v - 1);
}
}
@@ -1272,8 +1270,8 @@ Sudoku::save_game() {
prefs_.set(name, cell->readonly());
for (int m = 0; m < 8; m ++) {
- sprintf(name, "test%d%d.%d", m, j, k);
- prefs_.set(name, cell->test_value(m));
+ sprintf(name, "test%d%d.%d", m, j, k);
+ prefs_.set(name, cell->test_value(m));
}
}
}
@@ -1333,8 +1331,3 @@ main(int argc, char *argv[]) {
// Run until the user quits...
return (Fl::run());
}
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/sudokurc.h b/test/sudokurc.h
index 0cea5434d..ce22927e8 100644
--- a/test/sudokurc.h
+++ b/test/sudokurc.h
@@ -5,7 +5,7 @@
#define IDI_ICON 101
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
diff --git a/test/symbols.cxx b/test/symbols.cxx
index 6bb9455b5..43f5217d8 100644
--- a/test/symbols.cxx
+++ b/test/symbols.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Symbol test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -144,7 +142,3 @@ bt("@redo");
window->show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/table.cxx b/test/table.cxx
index 5c4ab3e69..2e5f0f639 100644
--- a/test/table.cxx
+++ b/test/table.cxx
@@ -5,7 +5,7 @@
#include
#include
#ifdef _WIN32
-#include // atoi
+#include // atoi
#endif /* _WIN32 */
#include
@@ -27,14 +27,14 @@ Fl_Simple_Terminal *G_tty = 0;
class DemoTable : public Fl_Table_Row
{
private:
- Fl_Color cell_bgcolor; // color of cell's bg color
- Fl_Color cell_fgcolor; // color of cell's fg color
+ Fl_Color cell_bgcolor; // color of cell's bg color
+ Fl_Color cell_fgcolor; // color of cell's fg color
protected:
- void draw_cell(TableContext context, // table cell drawing
- int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0);
+ void draw_cell(TableContext context, // table cell drawing
+ int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0);
static void event_callback(Fl_Widget*, void*);
- void event_callback2(); // callback for table events
+ void event_callback2(); // callback for table events
public:
DemoTable(int x, int y, int w, int h, const char *l=0) : Fl_Table_Row(x,y,w,h,l)
@@ -42,7 +42,7 @@ public:
cell_bgcolor = FL_WHITE;
cell_fgcolor = FL_BLACK;
callback(&event_callback, (void*)this);
- end();
+ end();
}
~DemoTable() { }
Fl_Color GetCellFGColor() const { return(cell_fgcolor); }
@@ -52,66 +52,66 @@ public:
};
// Handle drawing all cells in table
-void DemoTable::draw_cell(TableContext context,
- int R, int C, int X, int Y, int W, int H)
+void DemoTable::draw_cell(TableContext context,
+ int R, int C, int X, int Y, int W, int H)
{
static char s[40];
- sprintf(s, "%d/%d", R, C); // text for each cell
+ sprintf(s, "%d/%d", R, C); // text for each cell
switch ( context )
{
- case CONTEXT_STARTPAGE:
- fl_font(FL_HELVETICA, 16);
- return;
-
- case CONTEXT_COL_HEADER:
- fl_push_clip(X, Y, W, H);
- {
- fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, col_header_color());
- fl_color(FL_BLACK);
- fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER);
- }
- fl_pop_clip();
- return;
-
- case CONTEXT_ROW_HEADER:
- fl_push_clip(X, Y, W, H);
- {
- fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, row_header_color());
- fl_color(FL_BLACK);
- fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER);
- }
- fl_pop_clip();
- return;
-
- case CONTEXT_CELL:
- {
- fl_push_clip(X, Y, W, H);
- {
- // BG COLOR
- fl_color( row_selected(R) ? selection_color() : cell_bgcolor);
- fl_rectf(X, Y, W, H);
-
- // TEXT
- fl_color(cell_fgcolor);
- fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER);
-
- // BORDER
- fl_color(color());
- fl_rect(X, Y, W, H);
- }
- fl_pop_clip();
- return;
- }
-
- case CONTEXT_TABLE:
- G_tty->printf("TABLE CONTEXT CALLED\n");
- return;
-
- case CONTEXT_ENDPAGE:
- case CONTEXT_RC_RESIZE:
- case CONTEXT_NONE:
- return;
+ case CONTEXT_STARTPAGE:
+ fl_font(FL_HELVETICA, 16);
+ return;
+
+ case CONTEXT_COL_HEADER:
+ fl_push_clip(X, Y, W, H);
+ {
+ fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, col_header_color());
+ fl_color(FL_BLACK);
+ fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER);
+ }
+ fl_pop_clip();
+ return;
+
+ case CONTEXT_ROW_HEADER:
+ fl_push_clip(X, Y, W, H);
+ {
+ fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, row_header_color());
+ fl_color(FL_BLACK);
+ fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER);
+ }
+ fl_pop_clip();
+ return;
+
+ case CONTEXT_CELL:
+ {
+ fl_push_clip(X, Y, W, H);
+ {
+ // BG COLOR
+ fl_color( row_selected(R) ? selection_color() : cell_bgcolor);
+ fl_rectf(X, Y, W, H);
+
+ // TEXT
+ fl_color(cell_fgcolor);
+ fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER);
+
+ // BORDER
+ fl_color(color());
+ fl_rect(X, Y, W, H);
+ }
+ fl_pop_clip();
+ return;
+ }
+
+ case CONTEXT_TABLE:
+ G_tty->printf("TABLE CONTEXT CALLED\n");
+ return;
+
+ case CONTEXT_ENDPAGE:
+ case CONTEXT_RC_RESIZE:
+ case CONTEXT_NONE:
+ return;
}
}
@@ -179,7 +179,7 @@ void setpositionrow_cb(Fl_Widget *w, void *data)
{
Fl_Input *in = (Fl_Input*)data;
int toprow = atoi(in->value());
- if ( toprow < 0 || toprow >= G_table->rows() )
+ if ( toprow < 0 || toprow >= G_table->rows() )
{ fl_alert("Must be in range 0 thru #rows"); }
else
{ G_table->row_position(toprow); }
@@ -189,7 +189,7 @@ void setpositioncol_cb(Fl_Widget *w, void *data)
{
Fl_Input *in = (Fl_Input*)data;
int leftcol = atoi(in->value());
- if ( leftcol < 0 || leftcol >= G_table->cols() )
+ if ( leftcol < 0 || leftcol >= G_table->cols() )
{ fl_alert("Must be in range 0 thru #cols"); }
else
{ G_table->col_position(leftcol); }
@@ -467,7 +467,7 @@ int main(int argc, char **argv)
widgetbox.labelsize(12);
widgetbox.textsize(12);
widgetbox.menu(widgetbox_choices);
- widgetbox.value(2); // down frame
+ widgetbox.value(2); // down frame
Fl_Input tablecolor(400, 640, 120, 25, "Table Color");
tablecolor.labelsize(12);
diff --git a/test/threads.cxx b/test/threads.cxx
index 2fe40eb54..68370d246 100644
--- a/test/threads.cxx
+++ b/test/threads.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Threading example program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -62,11 +60,11 @@ extern "C" void* prime_func(void* p)
// very simple prime number calculator !
//
- // The return at the end of this function can never be reached and thus
- // will generate a warning with some compilers, however we need to have
- // a return statement or other compilers will complain there is no return
- // statement. To avoid warnings on all compilers, we fool the smart ones
- // into beleiving that there is a chance that we reach the end by testing
+ // The return at the end of this function can never be reached and thus
+ // will generate a warning with some compilers, however we need to have
+ // a return statement or other compilers will complain there is no return
+ // statement. To avoid warnings on all compilers, we fool the smart ones
+ // into beleiving that there is a chance that we reach the end by testing
// n>=0, knowing that logically, n will never be negative in this context.
if (n>=0) for (;;) {
int pp;
@@ -123,7 +121,7 @@ int main(int argc, char **argv)
value2 = new Fl_Value_Output(100, 175, 200, 25, "Max Prime:");
w->end();
w->show();
-
+
browser1->add("Prime numbers:");
browser2->add("Prime numbers:");
@@ -157,8 +155,3 @@ int main() {
fl_alert("Sorry, threading not supported on this platform!");
}
#endif // HAVE_PTHREAD || _WIN32
-
-
-//
-// End of "$Id$".
-//
diff --git a/test/threads.h b/test/threads.h
index d90d6e422..d2c7791dd 100644
--- a/test/threads.h
+++ b/test/threads.h
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Simple threading API for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
// Inline classes to provide portable support for threads and mutexes.
@@ -75,7 +73,3 @@ static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
}
# endif // !HAVE_PTHREAD_H
#endif // !Threads_h
-
-//
-// End of "$Id$".
-//
diff --git a/test/tile.cxx b/test/tile.cxx
index 5bb8cf851..2b6485ef2 100644
--- a/test/tile.cxx
+++ b/test/tile.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fl_Tile test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -91,7 +89,3 @@ int main(int argc, char** argv) {
window.show(argc,argv);
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/tiled_image.cxx b/test/tiled_image.cxx
index f858583df..bb0a8ef55 100644
--- a/test/tiled_image.cxx
+++ b/test/tiled_image.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Fl_Tiled_Image test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -67,7 +65,7 @@ int main(int argc, char **argv) {
exit(1);
}
fl_colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
- fl_visual->visual, AllocNone);
+ fl_visual->visual, AllocNone);
fl_xpixel(FL_BLACK); // make sure black is allocated in overlay visuals
} else {
Fl::visual(FL_RGB);
@@ -90,7 +88,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/tree.fl b/test/tree.fl
index ba1de8510..d44d4c08b 100644
--- a/test/tree.fl
+++ b/test/tree.fl
@@ -76,7 +76,7 @@ int height = cw->h();
height += 10;
if ( height > 50 ) height = 20;
cw->resize(cw->x(), cw->y(), cw->w(), height);
-tree->redraw(); // adjusted height
+tree->redraw(); // adjusted height
tty->printf("'%s' button pushed (height=%d)\\n", w->label(), height);} {}
}
@@ -139,9 +139,9 @@ for ( Fl_Tree_Item *item = tree->first(); item; item=item->next()) {
} else {
item->usericon(&L_document_pixmap);
item->userdeicon(&L_document_deicon_pixmap);
- }
+ }
} else {
- // Don't assign custom icons
+ // Don't assign custom icons
item->usericon(0);
item->userdeicon(0);
@@ -172,14 +172,14 @@ tree->add("Bbb/child-04");
// Assign an FLTK input widget to one of the items with a label() of its own (STR\#2832)
Fl_Tree_Item *i;
if ( ( i = tree->find_item("Bbb/child-02") ) != NULL ) {
- if ( !in ) { // only do this once at program startup
+ if ( !in ) { // only do this once at program startup
tree->begin();
- in = new Fl_Input(1,1,100,1,"Fl_Input test"); // we control w() only
+ in = new Fl_Input(1,1,100,1,"Fl_Input test"); // we control w() only
in->labelsize(10);
in->textsize(10);
- in->align(FL_ALIGN_RIGHT); // show label to the right of the widget
- in->tooltip("Fl_Input inside tree.\\n"
- "The widget's label 'Fl_Input test' should appear to the widget's right.");
+ in->align(FL_ALIGN_RIGHT); // show label to the right of the widget
+ in->tooltip("Fl_Input inside tree.\\n"
+ "The widget's label 'Fl_Input test' should appear to the widget's right.");
}
in->show();
i->widget(in);
@@ -192,14 +192,14 @@ tree->add("Bbb/child-04");
// Assign an FLTK widget to one of the items
Fl_Tree_Item *i;
if ( ( i = tree->find_item("Bbb/child-03") ) != NULL ) {
- if ( !but ) { // only do this once at program startup
+ if ( !but ) { // only do this once at program startup
tree->begin();
but = new Fl_Button(1,1,140,1,"ccc button"); // we control w() only
but->labelsize(10);
- but->callback(Button_CB);
- but->tooltip("Button inside tree.\\n"
- "If 'Item h() from widget' enabled, "
- "pressing button enlarges it.");
+ but->callback(Button_CB);
+ but->tooltip("Button inside tree.\\n"
+ "If 'Item h() from widget' enabled, "
+ "pressing button enlarges it.");
}
but->show();
i->widget(but);
@@ -210,24 +210,24 @@ tree->add("Bbb/child-04");
// Assign an FLTK group to one of the items with widgets
Fl_Tree_Item *i;
const char *tipmsg = "A group of two buttons inside the tree.\\n"
- "If 'Item h() from widget' enabled, "
- "pressing either button enlarges the group "
- "and both buttons together.";
+ "If 'Item h() from widget' enabled, "
+ "pressing either button enlarges the group "
+ "and both buttons together.";
if ( ( i = tree->find_item("Bbb/child-04") ) != NULL ) {
static Fl_Group *grp = 0;
- if ( !grp ) { // only do this once at program startup
+ if ( !grp ) { // only do this once at program startup
tree->begin();
grp = new Fl_Group(100,100,140,18); // build group.. tree handles position
grp->color(FL_WHITE);
grp->begin();
Fl_Button *abut = new Fl_Button(grp->x()+0 ,grp->y()+2,65,15,"D1");
abut->labelsize(10);
- abut->callback(Button_CB);
- abut->tooltip(tipmsg);
+ abut->callback(Button_CB);
+ abut->tooltip(tipmsg);
Fl_Button *bbut = new Fl_Button(grp->x()+75,grp->y()+2,65,15,"D2");
bbut->labelsize(10);
- bbut->callback(Button_CB);
- bbut->tooltip(tipmsg);
+ bbut->callback(Button_CB);
+ bbut->tooltip(tipmsg);
grp->end();
grp->resizable(grp);
@@ -273,7 +273,7 @@ for ( int t=0; t<500; t++ ) {
sprintf(s, "500 Items/item %04d", t+1);
tree->add(s);
}
-tree->close("500 Items"); // close the 500 items by default
+tree->close("500 Items"); // close the 500 items by default
AssignUserIcons();
@@ -373,8 +373,8 @@ if ( item ) {
tty->printf("TREE CALLBACK: label='%s' userdata=%ld reason=%s, changed=%d",
item->label(),
(long)(fl_intptr_t)tree->user_data(),
- reason_as_name(tree->callback_reason()),
- tree->changed() ? 1 : 0);
+ reason_as_name(tree->callback_reason()),
+ tree->changed() ? 1 : 0);
// More than one click? show click count
// Should only happen if reason==FL_TREE_REASON_RESELECTED.
//
@@ -382,7 +382,7 @@ if ( item ) {
tty->printf(", clicks=%d\\n", (Fl::event_clicks()+1));
} else {
tty->printf("\\n");
- }
+ }
} else {
tty->printf("TREE CALLBACK: reason=%s, changed=%d, item=(no item -- probably multiple items were changed at once)\\n",
reason_as_name(tree->callback_reason()),
@@ -508,9 +508,9 @@ tree->redraw();}
callback {static const char *L_open_xpm[] = {
\#ifdef __APPLE__
"11 11 3 1",
- ". c \#fefefe",
- "\# c \#444444",
- "@ c \#000000",
+ ". c \#fefefe",
+ "\# c \#444444",
+ "@ c \#000000",
"\#\#\#\#\#\#\#\#\#\#\#",
"\#.........\#",
"\#.........\#",
@@ -544,9 +544,9 @@ static Fl_Pixmap L_openpixmap(L_open_xpm);
static const char *L_close_xpm[] = {
\#ifdef __APPLE__
"11 11 3 1",
- ". c \#fefefe",
- "\# c \#444444",
- "@ c \#000000",
+ ". c \#fefefe",
+ "\# c \#444444",
+ "@ c \#000000",
"\#\#\#\#\#\#\#\#\#\#\#",
"\#.........\#",
"\#.........\#",
@@ -635,18 +635,18 @@ switch ( connectorstyle_chooser->value() ) {
label {Selection Mode}
callback {// Set selection mode
switch ( selectmode_chooser->value() ) {
- case 0: tree->selectmode(FL_TREE_SELECT_NONE); break; // None
- case 1: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
- case 2: tree->selectmode(FL_TREE_SELECT_MULTI); break; // Multi
+ case 0: tree->selectmode(FL_TREE_SELECT_NONE); break; // None
+ case 1: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
+ case 2: tree->selectmode(FL_TREE_SELECT_MULTI); break; // Multi
case 3: tree->selectmode(FL_TREE_SELECT_SINGLE_DRAGGABLE); break; // Single draggable
- default: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
+ default: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
}} open
tooltip {Tests Fl_Tree::selectmode()
Sets how Fl_Tree handles mouse selection of tree items.
- NONE -- Not selectable by keyboard/mouse
- SINGLE -- Only one item at a time selectable by keyboard/mouse
- MULTI -- Multiple items selectable
- SINGLE+DRAG -- Lets user drag items to different position in tree} xywh {520 273 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ NONE -- Not selectable by keyboard/mouse
+ SINGLE -- Only one item at a time selectable by keyboard/mouse
+ MULTI -- Multiple items selectable
+ SINGLE+DRAG -- Lets user drag items to different position in tree} xywh {520 273 140 21} down_box BORDER_BOX labelsize 12 textsize 11
code0 {selectmode_chooser->value(2);}
code1 {cb_selectmode_chooser(selectmode_chooser, (void*)0);}
} {
@@ -918,7 +918,7 @@ G_cb_counter = 0; tree->open(root, 0); if ( G_cb_counter ) fl_alert("FAIL
G_cb_counter = 0; tree->open_toggle(root, 0); if ( G_cb_counter ) fl_alert("FAILED 'OFF' TEST\\n open_toggle(item) triggered cb!");
G_cb_counter = 0; tree->open("ROOT", 0); if ( G_cb_counter ) fl_alert("FAILED 'OFF' TEST\\n open(path) triggered cb!");
G_cb_counter = 0; tree->close("ROOT", 0); if ( G_cb_counter ) fl_alert("FAILED 'OFF' TEST\\n close(path) triggered cb!");
-tree->open(root,0); // leave root open
+tree->open(root,0); // leave root open
// select/deselect: Make sure these methods don't trigger cb
G_cb_counter = 0; tree->select(root, 0); if ( G_cb_counter ) fl_alert("FAILED 'OFF' TEST\\n select(item) triggered cb!");
@@ -938,7 +938,7 @@ G_cb_counter = 0; tree->open(root, 1); if ( !G_cb_counter ) fl_alert("FAI
G_cb_counter = 0; tree->close(root, 1); if ( !G_cb_counter ) fl_alert("FAILED 'ON' TEST\\n close(item)[2] cb wasn't triggered!");
G_cb_counter = 0; tree->open("ROOT", 1); if ( !G_cb_counter ) fl_alert("FAILED 'ON' TEST\\n open(path) cb wasn't triggered!");
G_cb_counter = 0; tree->close("ROOT", 1); if ( !G_cb_counter ) fl_alert("FAILED 'ON' TEST\\n close(path) cb wasn't triggered!");
-tree->open(root,0); // leave root open
+tree->open(root,0); // leave root open
// select/deselect: Make sure these methods don't trigger cb
G_cb_counter = 0; tree->select(root, 1); if ( !G_cb_counter ) fl_alert("FAILED 'ON' TEST\\n select(item) cb wasn't triggered!");
@@ -956,7 +956,7 @@ G_cb_counter = 0; tree->open(root); if ( !G_cb_counter ) fl_alert("FAILED
G_cb_counter = 0; tree->open_toggle(root); if ( !G_cb_counter ) fl_alert("FAILED 'DEFAULT' TEST: open_toggle(item) cb wasn't triggered!");
G_cb_counter = 0; tree->open("ROOT"); if ( !G_cb_counter ) fl_alert("FAILED 'DEFAULT' TEST: open(path) cb wasn't triggered!");
G_cb_counter = 0; tree->close("ROOT"); if ( !G_cb_counter ) fl_alert("FAILED 'DEFAULT' TEST: close(path) cb wasn't triggered!");
-tree->open(root,0); // leave root open
+tree->open(root,0); // leave root open
// select/deselect: Make sure these methods don't trigger cb
G_cb_counter = 0; tree->select(root); if ( !G_cb_counter ) fl_alert("FAILED 'DEFAULT' TEST\\n select(item) cb wasn't triggered!");
@@ -1131,9 +1131,9 @@ If none selected, all are changed.} xywh {863 55 140 16} type Horizontal color 4
Fl_Button all_labelfgcolor_button {
label {Fl_Tree_Item::labelfgcolor()}
callback {// Get first item's color
-Fl_Color val = GetSelectedItemFGColor(); // Get color of first selected item
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-all_labelfgcolor_button->color(val); // update modified color to button
+Fl_Color val = GetSelectedItemFGColor(); // Get color of first selected item
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+all_labelfgcolor_button->color(val); // update modified color to button
// Do selected items
int count = 0;
@@ -1159,9 +1159,9 @@ tree->redraw();}
Fl_Button all_labelbgcolor_button {
label {Fl_Tree_Item::labelbgcolor()}
callback {// Get first item's color
-Fl_Color val = GetSelectedItemBGColor(); // Get color of first selected item
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-all_labelbgcolor_button->color(val); // update modified color to button
+Fl_Color val = GetSelectedItemBGColor(); // Get color of first selected item
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+all_labelbgcolor_button->color(val); // update modified color to button
// Do selected items
int count = 0;
@@ -1255,8 +1255,8 @@ for ( Fl_Tree_Item *item = tree->first_selected_item();
callback {Fl_Tree_Item *item=tree->first();
while (item) {
if ( item->is_selected() ) {
- if ( tree->remove(item) == -1 ) break;
- item = tree->first();
+ if ( tree->remove(item) == -1 ) break;
+ item = tree->first();
} else {
item = item->next();
}
@@ -1330,8 +1330,8 @@ if ( !bbb) {
return;
}
int onoff = bbbselect_toggle->value();
-if ( onoff ) tree->select(bbb); // select /Bbb
-else tree->deselect(bbb); // deselect /Bbb}
+if ( onoff ) tree->select(bbb); // select /Bbb
+else tree->deselect(bbb); // deselect /Bbb}
tooltip {Toggle selection of just the /Bbb item
(Not children)} xywh {814 199 95 16} selection_color 1 labelsize 9
}
@@ -1344,8 +1344,8 @@ if ( !bbb) {
return;
}
int onoff = bbbselect2_toggle->value();
-if ( onoff ) tree->select_all(bbb); // select /Bbb and its children
-else tree->deselect_all(bbb); // deselect /Bbb and its children}
+if ( onoff ) tree->select_all(bbb); // select /Bbb and its children
+else tree->deselect_all(bbb); // deselect /Bbb and its children}
tooltip {Toggle selection of the /Bbb item and its children} xywh {814 219 95 16} selection_color 1 labelsize 9
}
Fl_Light_Button bbbchild02select_toggle {
@@ -1372,8 +1372,8 @@ if ( !item) {
return;
}
int onoff = rootselect_toggle->value();
-if ( onoff ) tree->select(item); // select /ROOT and its children
-else tree->deselect(item); // deselect /ROOT and its children}
+if ( onoff ) tree->select(item); // select /ROOT and its children
+else tree->deselect(item); // deselect /ROOT and its children}
tooltip {Toggle selection of the ROOT item} xywh {914 199 100 16} selection_color 1 labelsize 9
}
Fl_Light_Button rootselect2_toggle {
@@ -1385,8 +1385,8 @@ if ( !item) {
return;
}
int onoff = rootselect2_toggle->value();
-if ( onoff ) tree->select_all(item); // select /ROOT and its children
-else tree->deselect_all(item); // deselect /ROOT and its children}
+if ( onoff ) tree->select_all(item); // select /ROOT and its children
+else tree->deselect_all(item); // deselect /ROOT and its children}
tooltip {Toggle selection of the ROOT item and all children} xywh {914 219 100 16} selection_color 1 labelsize 9
}
Fl_Box {} {
@@ -1567,8 +1567,8 @@ tree->redraw();}
Fl_Button labelcolor_button {
label {labelcolor()}
callback {Fl_Color val = tree->labelcolor();
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-labelcolor_button->color(val); // update modified color to button
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+labelcolor_button->color(val); // update modified color to button
tree->labelcolor(val);
window->redraw(); // affects window (tree's label is outside tree's area)}
tooltip {Changes Fl_Tree::labelcolor().
@@ -1578,8 +1578,8 @@ This affects the text color of the widget's label.} xywh {813 414 16 16} box DOW
Fl_Button color_button {
label {color()}
callback {Fl_Color val = tree->color();
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-color_button->color(val); // update modified color to button
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+color_button->color(val); // update modified color to button
tree->color(val);
UpdateColorChips();
tree->redraw();}
@@ -1590,8 +1590,8 @@ This affects the background color of the widget. It also affects the bg color of
Fl_Button selection_color_button {
label {selection_color()}
callback {Fl_Color val = tree->selection_color();
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-selection_color_button->color(val); // update modified color to button
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+selection_color_button->color(val); // update modified color to button
tree->selection_color(val);
tree->redraw();}
tooltip {Sets the Fl_Tree::selection_color().
@@ -1601,9 +1601,9 @@ This affects the item's colors when they're selected.} xywh {813 452 16 16} box
Fl_Button item_labelfgcolor_button {
label {item_labelfgcolor()}
callback {Fl_Color val = tree->item_labelfgcolor();
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-tree->item_labelfgcolor(val); // apply modified color to tree
-item_labelfgcolor_button->color(val); // update modified color to button
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+tree->item_labelfgcolor(val); // apply modified color to tree
+item_labelfgcolor_button->color(val); // update modified color to button
tree->redraw();}
tooltip {Sets the default label fg color for newly created items.} xywh {973 414 16 16} box DOWN_BOX labelsize 12 align 7
code0 {o->color(tree->item_labelfgcolor());}
@@ -1611,9 +1611,9 @@ tree->redraw();}
Fl_Button item_labelbgcolor_button {
label {item_labelbgcolor()}
callback {Fl_Color val = tree->item_labelbgcolor();
-if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
-tree->item_labelbgcolor(val); // apply modified color to tree
-item_labelbgcolor_button->color(val); // update modified color to button
+if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
+tree->item_labelbgcolor(val); // apply modified color to tree
+item_labelbgcolor_button->color(val); // update modified color to button
tree->redraw();}
tooltip {Sets the default label bg color for newly created items. When set, this overrides the default behavior of using Fl_Tree::color().} xywh {973 433 16 16} box DOWN_BOX labelsize 12 align 7
code0 {item_labelbgcolor_button->color(tree->item_labelbgcolor());}
@@ -1756,7 +1756,7 @@ RebuildTree();
//Fl::scheme("gtk+");
-Fl_Tooltip::size(10); // small font for tooltips
+Fl_Tooltip::size(10); // small font for tooltips
window->resizable(tree);
window->size_range(window->w(), window->h(), 0, 0);
diff --git a/test/twowin.cxx b/test/twowin.cxx
index 3cad87663..82949c4af 100644
--- a/test/twowin.cxx
+++ b/test/twowin.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Cross-window focus test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -54,7 +52,3 @@ int main(int argc, char **argv) {
win2->show();
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/unittest_about.cxx b/test/unittest_about.cxx
index 9e1636221..966c7cb23 100644
--- a/test/unittest_about.cxx
+++ b/test/unittest_about.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -54,7 +52,3 @@ public:
};
UnitTest about("About...", About::create);
-
-//
-// End of "$Id$".
-//
diff --git a/test/unittest_circles.cxx b/test/unittest_circles.cxx
index 4bf407376..62ef28060 100644
--- a/test/unittest_circles.cxx
+++ b/test/unittest_circles.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -23,8 +21,8 @@
//------- test the circle drawing capabilities of this implementation ----------
//
class CircleTest : public Fl_Box {
-public:
- static Fl_Widget *create() {
+public:
+ static Fl_Widget *create() {
return new CircleTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
CircleTest(int x, int y, int w, int h) : Fl_Box(x, y, w, h) {
@@ -84,7 +82,3 @@ public:
};
UnitTest circle("circles and arcs", CircleTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_images.cxx b/test/unittest_images.cxx
index 80ded9c47..210af96dc 100644
--- a/test/unittest_images.cxx
+++ b/test/unittest_images.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -23,8 +21,8 @@
#include
// Note: currently (March 2010) fl_draw_image() supports transparency with
-// alpha channel only on Apple (Mac OS X), but Fl_RGB_Image->draw()
-// supports transparency on all platforms !
+// alpha channel only on Apple (Mac OS X), but Fl_RGB_Image->draw()
+// supports transparency on all platforms !
//
//------- test the image drawing capabilities of this implementation ----------
@@ -34,7 +32,7 @@
// Default values: CB=1, DX=0, IMG=1, LX=0, FLIPH=0
static int CB = 1; // 1 to show the checker board background for alpha images,
- // 0 otherwise
+ // 0 otherwise
static int DX = 0; // additional (undefined (0)) pixels per line, must be >= 0
// ignored (irrelevant), if LX == 0 (see below)
static int IMG = 1; // 1 to use Fl_RGB_Image for drawing images with transparency,
@@ -53,10 +51,10 @@ static int FLIPH = 0; // 1 = Flip image horizontally (only if IMG == 0)
// ----------------------------------------------------------------------
// Test scenario for fl_draw_image() with pos. and neg. d and ld args:
// ----------------------------------------------------------------------
-// (1) set IMG = 0: normal, but w/o transparency: no checker board
-// (2) set LX = -1: images flipped vertically
-// (3) set FLIPH = 1: images flipped vertically and horizontally
-// (4) set LX = 0: images flipped horizontally
+// (1) set IMG = 0: normal, but w/o transparency: no checker board
+// (2) set LX = -1: images flipped vertically
+// (3) set FLIPH = 1: images flipped vertically and horizontally
+// (4) set LX = 0: images flipped horizontally
// (5) set FLIPH = 0, IMG = 1: back to default (with transparency)
// ----------------------------------------------------------------------
@@ -158,9 +156,9 @@ public:
ImageTest(int x, int y, int w, int h) : Fl_Group(x, y, w, h) {
label("Testing Image Drawing\n\n"
- "This test renders four images, two of them with a checker board\n"
- "visible through the graphics. Color and gray gradients should be\n"
- "visible. This does not test any image formats such as JPEG.");
+ "This test renders four images, two of them with a checker board\n"
+ "visible through the graphics. Color and gray gradients should be\n"
+ "visible. This does not test any image formats such as JPEG.");
align(FL_ALIGN_INSIDE|FL_ALIGN_BOTTOM|FL_ALIGN_LEFT|FL_ALIGN_WRAP);
box(FL_BORDER_BOX);
int cw = 90;
@@ -220,8 +218,8 @@ public:
// bottom left: RGBA
xx = x()+10; yy = y()+10+134;
- fl_color(FL_BLACK); fl_rect(xx, yy, 130, 130); // black frame
- fl_color(FL_WHITE); fl_rectf(xx+1, yy+1, 128, 128); // white background
+ fl_color(FL_BLACK); fl_rect(xx, yy, 130, 130); // black frame
+ fl_color(FL_WHITE); fl_rectf(xx+1, yy+1, 128, 128); // white background
if (CB) { // checker board
fl_color(FL_BLACK); fl_rectf(xx+65, yy+1, 64, 64);
fl_color(FL_BLACK); fl_rectf(xx+1, yy+65, 64, 64);
@@ -259,8 +257,8 @@ public:
// bottom right: Gray+Alpha
xx = x()+10+200; yy = y()+10+134;
- fl_color(FL_BLACK); fl_rect(xx, yy, 130, 130); // black frame
- fl_color(FL_WHITE); fl_rectf(xx+1, yy+1, 128, 128); // white background
+ fl_color(FL_BLACK); fl_rect(xx, yy, 130, 130); // black frame
+ fl_color(FL_WHITE); fl_rectf(xx+1, yy+1, 128, 128); // white background
if (CB) { // checker board
fl_color(FL_BLACK); fl_rectf(xx+65, yy+1, 64, 64);
fl_color(FL_BLACK); fl_rectf(xx+1, yy+65, 64, 64);
@@ -294,7 +292,3 @@ Fl_RGB_Image *ImageTest::i_rgb = 0;
Fl_RGB_Image *ImageTest::i_rgba = 0;
UnitTest images("drawing images", ImageTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_lines.cxx b/test/unittest_lines.cxx
index df1de65ec..b255159fc 100644
--- a/test/unittest_lines.cxx
+++ b/test/unittest_lines.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -23,16 +21,16 @@
//------- test the line drawing capabilities of this implementation ----------
//
class LineTest : public Fl_Box {
-public:
+public:
static Fl_Widget *create() {
return new LineTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
LineTest(int x, int y, int w, int h) : Fl_Box(x, y, w, h) {
label("testing the integer based fl_line calls\n"
- "No red pixels should be visible.\n"
- "If you see bright red pixels, the line drawing alignment is off,\n"
- "or the last pixel in a line does not get drawn.\n"
- "If you see dark red pixels, anti-aliasing must be switched off.");
+ "No red pixels should be visible.\n"
+ "If you see bright red pixels, the line drawing alignment is off,\n"
+ "or the last pixel in a line does not get drawn.\n"
+ "If you see dark red pixels, anti-aliasing must be switched off.");
align(FL_ALIGN_INSIDE|FL_ALIGN_BOTTOM|FL_ALIGN_LEFT|FL_ALIGN_WRAP);
box(FL_BORDER_BOX);
}
@@ -77,7 +75,3 @@ public:
};
UnitTest lines("drawing lines", LineTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_points.cxx b/test/unittest_points.cxx
index 0df95b018..f8affc97e 100644
--- a/test/unittest_points.cxx
+++ b/test/unittest_points.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$:
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -29,14 +27,14 @@ public:
}
PointTest(int x, int y, int w, int h) : Fl_Box(x, y, w, h) {
label("testing the fl_point call\n"
- "You should see four pixels each in black, red, green and blue. "
- "Make sure that pixels are not anti-aliased (blurred across multiple pixels)!");
+ "You should see four pixels each in black, red, green and blue. "
+ "Make sure that pixels are not anti-aliased (blurred across multiple pixels)!");
align(FL_ALIGN_INSIDE|FL_ALIGN_BOTTOM|FL_ALIGN_LEFT|FL_ALIGN_WRAP);
box(FL_BORDER_BOX);
}
void draw() {
Fl_Box::draw();
- int a = x()+10, b = y()+10;
+ int a = x()+10, b = y()+10;
fl_color(FL_WHITE); fl_rectf(a, b, 90, 90);
fl_color(FL_BLACK); fl_rect(a, b, 90, 90);
fl_point(a+10, b+10); fl_point(a+20, b+20);
@@ -54,7 +52,3 @@ public:
};
UnitTest points("drawing points", PointTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_rects.cxx b/test/unittest_rects.cxx
index dc4c4e8ee..69d2ae1e6 100644
--- a/test/unittest_rects.cxx
+++ b/test/unittest_rects.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,29 +7,29 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
-#include // fl_text_extents()
+#include // fl_text_extents()
//
//------- test the rectangle drawing capabilities of this implementation ----------
//
class RectTest : public Fl_Box {
-public:
+public:
static Fl_Widget *create() {
return new RectTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
RectTest(int x, int y, int w, int h) : Fl_Box(x, y, w, h) {
label("testing the fl_rect call\n"
- "No red pixels should be visible. "
- "If you see bright red lines, or if parts of the green frames are hidden, "
- "the rect drawing alignment is off.");
+ "No red pixels should be visible. "
+ "If you see bright red lines, or if parts of the green frames are hidden, "
+ "the rect drawing alignment is off.");
align(FL_ALIGN_INSIDE|FL_ALIGN_BOTTOM|FL_ALIGN_LEFT|FL_ALIGN_WRAP);
box(FL_BORDER_BOX);
}
@@ -51,7 +49,3 @@ public:
};
UnitTest rects("rectangles", RectTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_schemes.cxx b/test/unittest_schemes.cxx
index 6c1d7273a..9f5123ca6 100644
--- a/test/unittest_schemes.cxx
+++ b/test/unittest_schemes.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
@@ -11,11 +9,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -50,8 +48,8 @@ class SchemesTest : public Fl_Group {
SchemesTest *st = (SchemesTest*)data;
const char *name = st->schemechoice->text();
if ( name ) {
- Fl::scheme(name); // change scheme
- st->window()->redraw(); // redraw window
+ Fl::scheme(name); // change scheme
+ st->window()->redraw(); // redraw window
}
}
public:
@@ -79,245 +77,245 @@ public:
{
// Pasted from Edmanuel's gleam test app
{ Fl_Button* o = new Fl_Button(10, 9, 90, 25, "button");
- o->box(FL_UP_BOX);
- o->color((Fl_Color)101);
- o->tooltip("selection_color() = default");
- o->labelfont(5);
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)101);
+ o->tooltip("selection_color() = default");
+ o->labelfont(5);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(10, 36, 90, 25, "button");
- o->box(FL_UP_BOX);
- o->color((Fl_Color)179);
- o->selection_color(o->color());
- o->tooltip("selection_color() = color()");
- o->labelfont(4);
- o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)179);
+ o->selection_color(o->color());
+ o->tooltip("selection_color() = color()");
+ o->labelfont(4);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(10, 63, 90, 25, "button");
- o->box(FL_UP_BOX);
- o->color((Fl_Color)91);
- o->selection_color(fl_lighter(o->color()));
- o->tooltip("selection_color() = fl_lighter(color())");
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)91);
+ o->selection_color(fl_lighter(o->color()));
+ o->tooltip("selection_color() = fl_lighter(color())");
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(10, 90, 90, 25, "button");
- o->box(FL_UP_BOX);
- o->color(FL_INACTIVE_COLOR);
- o->selection_color(fl_darker(o->color()));
- o->tooltip("selection_color() = fl_darker(color())");
- o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->box(FL_UP_BOX);
+ o->color(FL_INACTIVE_COLOR);
+ o->selection_color(fl_darker(o->color()));
+ o->tooltip("selection_color() = fl_darker(color())");
+ o->labelcolor(FL_BACKGROUND2_COLOR);
} // Fl_Button* o
{ Fl_Tabs* o = new Fl_Tabs(10, 120, 320, 215);
- o->color(FL_DARK1);
- o->selection_color(FL_DARK1);
- { Fl_Group* o = new Fl_Group(14, 141, 310, 190, "tab1");
- //o->box(FL_THIN_UP_BOX);
- o->color(FL_DARK1);
- o->selection_color((Fl_Color)23);
- o->hide();
- { Fl_Clock* o = new Fl_Clock(24, 166, 130, 130);
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)12);
- o->selection_color(FL_BACKGROUND2_COLOR);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->tooltip("Fl_Clock with thin up box");
- } // Fl_Clock* o
- { new Fl_Progress(22, 306, 290, 20);
- } // Fl_Progress* o
- { Fl_Clock* o = new Fl_Clock(179, 166, 130, 130);
- o->box(FL_THIN_DOWN_BOX);
- o->color((Fl_Color)26);
- o->tooltip("Fl_Clock with thin down box");
- } // Fl_Clock* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab2");
- //o->box(FL_THIN_UP_BOX);
- o->color(FL_DARK1);
- { Fl_Slider* o = new Fl_Slider(20, 161, 25, 155);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Slider with down box");
- } // Fl_Slider* o
- { Fl_Scrollbar* o = new Fl_Scrollbar(50, 161, 25, 155);
+ o->color(FL_DARK1);
+ o->selection_color(FL_DARK1);
+ { Fl_Group* o = new Fl_Group(14, 141, 310, 190, "tab1");
+ //o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ o->selection_color((Fl_Color)23);
+ o->hide();
+ { Fl_Clock* o = new Fl_Clock(24, 166, 130, 130);
+ o->box(FL_THIN_UP_BOX);
+ o->color((Fl_Color)12);
+ o->selection_color(FL_BACKGROUND2_COLOR);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->tooltip("Fl_Clock with thin up box");
+ } // Fl_Clock* o
+ { new Fl_Progress(22, 306, 290, 20);
+ } // Fl_Progress* o
+ { Fl_Clock* o = new Fl_Clock(179, 166, 130, 130);
+ o->box(FL_THIN_DOWN_BOX);
+ o->color((Fl_Color)26);
+ o->tooltip("Fl_Clock with thin down box");
+ } // Fl_Clock* o
+ o->end();
+ } // Fl_Group* o
+ { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab2");
+ //o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ { Fl_Slider* o = new Fl_Slider(20, 161, 25, 155);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Slider with down box");
+ } // Fl_Slider* o
+ { Fl_Scrollbar* o = new Fl_Scrollbar(50, 161, 25, 155);
o->value(0, 50, 1, 100);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Scrollbar with down box");
- } // Fl_Scrollbar* o
- { Fl_Value_Slider* o = new Fl_Value_Slider(115, 161, 25, 155);
- o->box(FL_DOWN_BOX);
- } // Fl_Value_Slider* o
- { Fl_Value_Output* o = new Fl_Value_Output(240, 265, 75, 25);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Value_Output with down box");
- } // Fl_Value_Output* o
- { Fl_Adjuster* o = new Fl_Adjuster(185, 210, 100, 25);
- o->tooltip("Fl_Adjuster");
- } // Fl_Adjuster* o
- { Fl_Counter* o = new Fl_Counter(185, 180, 100, 25);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Counter with down box");
- } // Fl_Counter* o
- { Fl_Roller* o = new Fl_Roller(85, 161, 25, 155);
- o->box(FL_UP_BOX);
- o->tooltip("Fl_Roller with up box");
- } // Fl_Roller* o
- { Fl_Value_Input* o = new Fl_Value_Input(155, 265, 75, 25);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Value_Input with down box");
- } // Fl_Value_Input* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab3");
- //o->box(FL_THIN_UP_BOX);
- o->color(FL_DARK1);
- o->hide();
- { Fl_Input* o = new Fl_Input(40, 230, 120, 25);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Input with down box");
- } // Fl_Input* o
- { Fl_Output* o = new Fl_Output(40, 260, 120, 25);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_Output with down box");
- } // Fl_Output* o
- { Fl_Text_Editor* o = new Fl_Text_Editor(180, 160, 125, 55);
- o->box(FL_DOWN_FRAME);
- o->color((Fl_Color)80);
- o->tooltip("Fl_Text_Editor with down frame");
- o->textsize(8);
- o->buffer(new Fl_Text_Buffer());
- o->buffer()->text("Text editor");
- } // Fl_Text_Editor* o
- { Fl_Text_Display* o = new Fl_Text_Display(180, 230, 125, 55);
- o->box(FL_DOWN_FRAME);
- o->color((Fl_Color)12);
- o->tooltip("Fl_Text_Display with down frame");
- o->textsize(8);
- o->buffer(new Fl_Text_Buffer());
- o->buffer()->text("Text display");
- } // Fl_Text_Display* o
- { Fl_File_Input* o = new Fl_File_Input(40, 290, 265, 30);
- o->box(FL_DOWN_BOX);
- o->tooltip("Fl_File_Input with down box");
- } // Fl_File_Input* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab4");
- // o->box(FL_THIN_UP_BOX);
- o->color(FL_DARK1);
- o->hide();
- { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 160, 120, 25, "Choice 1");
- o->tooltip("Fl_Radio_Round_Button (default)");
- // don't set selection color (use default selection color)
- o->value(1); // selected
- } // Fl_Radio_Round_Button* o
- { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 190, 120, 25, "Choice 2");
- o->tooltip("Fl_Radio_Round_Button (red)");
- o->selection_color(FL_RED);
- } // Fl_Radio_Round_Button* o
- { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 220, 120, 25, "Choice 3");
- o->tooltip("Fl_Radio_Round_Button (green)");
- o->selection_color(FL_GREEN);
- } // Fl_Radio_Round_Button* o
- { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 250, 120, 25, "Choice 4");
- o->tooltip("Fl_Radio_Round_Button (blue)");
- o->selection_color(FL_BLUE);
- } // Fl_Radio_Round_Button* o
- o->end();
- } // Fl_Group* o
- o->end();
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Scrollbar with down box");
+ } // Fl_Scrollbar* o
+ { Fl_Value_Slider* o = new Fl_Value_Slider(115, 161, 25, 155);
+ o->box(FL_DOWN_BOX);
+ } // Fl_Value_Slider* o
+ { Fl_Value_Output* o = new Fl_Value_Output(240, 265, 75, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Value_Output with down box");
+ } // Fl_Value_Output* o
+ { Fl_Adjuster* o = new Fl_Adjuster(185, 210, 100, 25);
+ o->tooltip("Fl_Adjuster");
+ } // Fl_Adjuster* o
+ { Fl_Counter* o = new Fl_Counter(185, 180, 100, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Counter with down box");
+ } // Fl_Counter* o
+ { Fl_Roller* o = new Fl_Roller(85, 161, 25, 155);
+ o->box(FL_UP_BOX);
+ o->tooltip("Fl_Roller with up box");
+ } // Fl_Roller* o
+ { Fl_Value_Input* o = new Fl_Value_Input(155, 265, 75, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Value_Input with down box");
+ } // Fl_Value_Input* o
+ o->end();
+ } // Fl_Group* o
+ { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab3");
+ //o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ o->hide();
+ { Fl_Input* o = new Fl_Input(40, 230, 120, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Input with down box");
+ } // Fl_Input* o
+ { Fl_Output* o = new Fl_Output(40, 260, 120, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Output with down box");
+ } // Fl_Output* o
+ { Fl_Text_Editor* o = new Fl_Text_Editor(180, 160, 125, 55);
+ o->box(FL_DOWN_FRAME);
+ o->color((Fl_Color)80);
+ o->tooltip("Fl_Text_Editor with down frame");
+ o->textsize(8);
+ o->buffer(new Fl_Text_Buffer());
+ o->buffer()->text("Text editor");
+ } // Fl_Text_Editor* o
+ { Fl_Text_Display* o = new Fl_Text_Display(180, 230, 125, 55);
+ o->box(FL_DOWN_FRAME);
+ o->color((Fl_Color)12);
+ o->tooltip("Fl_Text_Display with down frame");
+ o->textsize(8);
+ o->buffer(new Fl_Text_Buffer());
+ o->buffer()->text("Text display");
+ } // Fl_Text_Display* o
+ { Fl_File_Input* o = new Fl_File_Input(40, 290, 265, 30);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_File_Input with down box");
+ } // Fl_File_Input* o
+ o->end();
+ } // Fl_Group* o
+ { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab4");
+ // o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ o->hide();
+ { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 160, 120, 25, "Choice 1");
+ o->tooltip("Fl_Radio_Round_Button (default)");
+ // don't set selection color (use default selection color)
+ o->value(1); // selected
+ } // Fl_Radio_Round_Button* o
+ { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 190, 120, 25, "Choice 2");
+ o->tooltip("Fl_Radio_Round_Button (red)");
+ o->selection_color(FL_RED);
+ } // Fl_Radio_Round_Button* o
+ { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 220, 120, 25, "Choice 3");
+ o->tooltip("Fl_Radio_Round_Button (green)");
+ o->selection_color(FL_GREEN);
+ } // Fl_Radio_Round_Button* o
+ { Fl_Radio_Round_Button* o = new Fl_Radio_Round_Button(40, 250, 120, 25, "Choice 4");
+ o->tooltip("Fl_Radio_Round_Button (blue)");
+ o->selection_color(FL_BLUE);
+ } // Fl_Radio_Round_Button* o
+ o->end();
+ } // Fl_Group* o
+ o->end();
} // Fl_Tabs* o
{ Fl_Box* o = new Fl_Box(341, 10, 80, 50, "thin box\ndown1");
- o->box(FL_THIN_DOWN_BOX);
- o->color((Fl_Color)20);
- o->labelsize(10);
+ o->box(FL_THIN_DOWN_BOX);
+ o->color((Fl_Color)20);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(430, 10, 80, 50, "thin box\nup1");
- o->box(FL_THIN_UP_BOX);
- o->color(FL_SELECTION_COLOR);
- o->labelcolor((Fl_Color)6);
- o->labelsize(10);
+ o->box(FL_THIN_UP_BOX);
+ o->color(FL_SELECTION_COLOR);
+ o->labelcolor((Fl_Color)6);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(341, 71, 80, 44, "thin box\ndown2");
- o->box(FL_THIN_DOWN_BOX);
- o->color((Fl_Color)190);
- o->labelsize(10);
+ o->box(FL_THIN_DOWN_BOX);
+ o->color((Fl_Color)190);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(430, 71, 80, 44, "thin box\nup2");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)96);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->labelsize(10);
+ o->box(FL_THIN_UP_BOX);
+ o->color((Fl_Color)96);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(341, 127, 80, 50, "box down3");
- o->box(FL_DOWN_BOX);
- o->color((Fl_Color)3);
- o->labelsize(10);
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)3);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(430, 127, 80, 50, "box up3");
- o->box(FL_UP_BOX);
- o->color((Fl_Color)104);
- o->labelcolor((Fl_Color)3);
- o->labelsize(10);
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)104);
+ o->labelcolor((Fl_Color)3);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(341, 189, 80, 50, "box down4");
- o->box(FL_DOWN_BOX);
- o->color((Fl_Color)42);
- o->labelcolor(FL_DARK_RED);
- o->labelsize(10);
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)42);
+ o->labelcolor(FL_DARK_RED);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(430, 189, 80, 50, "box up4");
- o->box(FL_UP_BOX);
- o->color((Fl_Color)30);
- o->labelcolor((Fl_Color)26);
- o->labelsize(10);
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)30);
+ o->labelcolor((Fl_Color)26);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(341, 251, 80, 82, "box down5");
- o->box(FL_DOWN_BOX);
- o->color((Fl_Color)19);
- o->labelcolor((Fl_Color)4);
- o->labelsize(10);
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)19);
+ o->labelcolor((Fl_Color)4);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(430, 251, 80, 82, "box up5");
- o->box(FL_UP_BOX);
- o->color(FL_FOREGROUND_COLOR);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->labelsize(10);
+ o->box(FL_UP_BOX);
+ o->color(FL_FOREGROUND_COLOR);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->labelsize(10);
} // Fl_Box* o
{ Fl_Light_Button* o = new Fl_Light_Button(110, 10, 105, 25, "Light");
- o->box(FL_DOWN_BOX);
- o->color(FL_BACKGROUND2_COLOR);
- o->selection_color((Fl_Color)30);
- o->selection_color((Fl_Color)FL_RED);
- o->tooltip("Fl_Light_Button with down box");
+ o->box(FL_DOWN_BOX);
+ o->color(FL_BACKGROUND2_COLOR);
+ o->selection_color((Fl_Color)30);
+ o->selection_color((Fl_Color)FL_RED);
+ o->tooltip("Fl_Light_Button with down box");
} // Fl_Light_Button* o
{ Fl_Check_Button* o = new Fl_Check_Button(110, 37, 105, 25, "Check");
- o->box(FL_DOWN_FRAME);
- o->down_box(FL_DOWN_BOX);
- o->color(FL_DARK1);
- o->selection_color((Fl_Color)FL_GREEN);
- o->tooltip("Fl_Check_Button with down frame");
+ o->box(FL_DOWN_FRAME);
+ o->down_box(FL_DOWN_BOX);
+ o->color(FL_DARK1);
+ o->selection_color((Fl_Color)FL_GREEN);
+ o->tooltip("Fl_Check_Button with down frame");
} // Fl_Check_Button* o
{ Fl_Input* o = new Fl_Input(220, 10, 100, 25);
- o->box(FL_DOWN_BOX);
- o->color((Fl_Color)23);
- o->tooltip("Fl_Input with down box");
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)23);
+ o->tooltip("Fl_Input with down box");
} // Fl_Input* o
{ Fl_Adjuster* o = new Fl_Adjuster(110, 65, 80, 43);
- o->box(FL_UP_BOX);
- o->color(FL_INACTIVE_COLOR);
- o->selection_color(FL_BACKGROUND2_COLOR);
- o->labelcolor((Fl_Color)55);
- o->tooltip("Fl_Adjuster with up box");
+ o->box(FL_UP_BOX);
+ o->color(FL_INACTIVE_COLOR);
+ o->selection_color(FL_BACKGROUND2_COLOR);
+ o->labelcolor((Fl_Color)55);
+ o->tooltip("Fl_Adjuster with up box");
} // Fl_Adjuster* o
{ Fl_Text_Editor* o = new Fl_Text_Editor(220, 53, 100, 29, "down frame");
- o->box(FL_DOWN_FRAME);
- o->color((Fl_Color)19);
- o->selection_color(FL_DARK1);
- o->tooltip("Fl_Adjuster with down frame");
+ o->box(FL_DOWN_FRAME);
+ o->color((Fl_Color)19);
+ o->selection_color(FL_DARK1);
+ o->tooltip("Fl_Adjuster with down frame");
} // Fl_Text_Editor* o
{ Fl_Text_Editor* o = new Fl_Text_Editor(220, 99, 100, 38, "up frame");
- o->box(FL_UP_FRAME);
- o->color((Fl_Color)19);
- o->selection_color(FL_DARK1);
- o->tooltip("Fl_Text_Editor with up frame");
+ o->box(FL_UP_FRAME);
+ o->color((Fl_Color)19);
+ o->selection_color(FL_DARK1);
+ o->tooltip("Fl_Text_Editor with up frame");
} // Fl_Text_Editor* o
}
subwin->end();
@@ -327,7 +325,3 @@ public:
};
UnitTest schemestest("schemes test", SchemesTest::create);
-
-//
-// End of "$Id$
-//
diff --git a/test/unittest_scrollbarsize.cxx b/test/unittest_scrollbarsize.cxx
index 4c8a23833..f0aacd137 100644
--- a/test/unittest_scrollbarsize.cxx
+++ b/test/unittest_scrollbarsize.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -35,21 +33,21 @@ class MyTable : public Fl_Table {
static char s[10];
switch ( context ) {
case CONTEXT_STARTPAGE: // before page is drawn..
- fl_font(FL_HELVETICA, 8); // set font for drawing operations
- return;
+ fl_font(FL_HELVETICA, 8); // set font for drawing operations
+ return;
case CONTEXT_CELL: // Draw data in cells
sprintf(s, "%c", 'A'+ROW+COL);
- fl_push_clip(X,Y,W,H);
- // Draw cell bg
- fl_color(FL_WHITE); fl_rectf(X,Y,W,H);
- // Draw cell data
- fl_color(FL_GRAY0); fl_draw(s, X,Y,W,H, FL_ALIGN_CENTER);
- // Draw box border
- fl_color(color()); fl_rect(X,Y,W,H);
- fl_pop_clip();
- return;
+ fl_push_clip(X,Y,W,H);
+ // Draw cell bg
+ fl_color(FL_WHITE); fl_rectf(X,Y,W,H);
+ // Draw cell data
+ fl_color(FL_GRAY0); fl_draw(s, X,Y,W,H, FL_ALIGN_CENTER);
+ // Draw box border
+ fl_color(color()); fl_rect(X,Y,W,H);
+ fl_pop_clip();
+ return;
default:
- return;
+ return;
}
}
public:
@@ -63,7 +61,7 @@ class MyTable : public Fl_Table {
// Cols
cols(13); // how many columns
col_width_all(10); // default width of columns
- end(); // end the Fl_Table group
+ end(); // end the Fl_Table group
}
~MyTable() { }
};
@@ -82,60 +80,60 @@ class ScrollBarSizeTest : public Fl_Group {
Fl_Text_Display *text_a, *text_b, *text_c;
Fl_Browser *makebrowser(int X,int Y,int W,int H,const char*L=0) {
- Fl_Browser *b = new Fl_Browser(X,Y,W,H,L);
- b->type(FL_MULTI_BROWSER);
- b->align(FL_ALIGN_TOP);
- for (int t=0; phonetics[t]; t++ ) {
- b->add(phonetics[t]);
- if ( phonetics[t][0] == 'C' ) b->add("Long entry will show h-bar");
- }
- return(b);
+ Fl_Browser *b = new Fl_Browser(X,Y,W,H,L);
+ b->type(FL_MULTI_BROWSER);
+ b->align(FL_ALIGN_TOP);
+ for (int t=0; phonetics[t]; t++ ) {
+ b->add(phonetics[t]);
+ if ( phonetics[t][0] == 'C' ) b->add("Long entry will show h-bar");
+ }
+ return(b);
}
Fl_Tree *maketree(int X,int Y,int W,int H,const char*L=0) {
- Fl_Tree *b = new Fl_Tree(X,Y,W,H,L);
- b->type(FL_TREE_SELECT_MULTI);
- b->align(FL_ALIGN_TOP);
- for (int t=0; phonetics[t]; t++ ) {
- b->add(phonetics[t]);
- if ( phonetics[t][0] == 'C' ) b->add("Long entry will show h-bar");
- }
- return(b);
+ Fl_Tree *b = new Fl_Tree(X,Y,W,H,L);
+ b->type(FL_TREE_SELECT_MULTI);
+ b->align(FL_ALIGN_TOP);
+ for (int t=0; phonetics[t]; t++ ) {
+ b->add(phonetics[t]);
+ if ( phonetics[t][0] == 'C' ) b->add("Long entry will show h-bar");
+ }
+ return(b);
}
MyTable *maketable(int X,int Y,int W,int H,const char*L=0) {
- MyTable *mta = new MyTable(X,Y,W,H,L);
- mta->align(FL_ALIGN_TOP);
- mta->end();
- return(mta);
+ MyTable *mta = new MyTable(X,Y,W,H,L);
+ mta->align(FL_ALIGN_TOP);
+ mta->end();
+ return(mta);
}
Fl_Text_Display *maketextdisplay(int X,int Y,int W,int H,const char*L=0) {
- Fl_Text_Display *dpy = new Fl_Text_Display(X,Y,W,H,L);
- Fl_Text_Buffer *buf = new Fl_Text_Buffer();
- dpy->buffer(buf);
- for (int t=0; phonetics[t]; t++ ) {
- buf->printf("%s\n", phonetics[t]);
- if ( phonetics[t][0] == 'C' ) buf->printf("Long entry will show h-bar\n");
- }
- return(dpy);
+ Fl_Text_Display *dpy = new Fl_Text_Display(X,Y,W,H,L);
+ Fl_Text_Buffer *buf = new Fl_Text_Buffer();
+ dpy->buffer(buf);
+ for (int t=0; phonetics[t]; t++ ) {
+ buf->printf("%s\n", phonetics[t]);
+ if ( phonetics[t][0] == 'C' ) buf->printf("Long entry will show h-bar\n");
+ }
+ return(dpy);
}
void slide_cb2(Fl_Value_Slider *in) {
- const char *label = in->label();
- int val = int(in->value());
- //fprintf(stderr, "VAL='%d'\n",val);
- if ( strcmp(label,"A: Scroll Size") == 0 ) {
- brow_a->scrollbar_size(val);
- tree_a->scrollbar_size(val);
- table_a->scrollbar_size(val);
- text_a->scrollbar_size(val);
- } else {
- Fl::scrollbar_size(val);
- }
- in->window()->redraw();
+ const char *label = in->label();
+ int val = int(in->value());
+ //fprintf(stderr, "VAL='%d'\n",val);
+ if ( strcmp(label,"A: Scroll Size") == 0 ) {
+ brow_a->scrollbar_size(val);
+ tree_a->scrollbar_size(val);
+ table_a->scrollbar_size(val);
+ text_a->scrollbar_size(val);
+ } else {
+ Fl::scrollbar_size(val);
+ }
+ in->window()->redraw();
}
static void slide_cb(Fl_Widget *w, void *data) {
ScrollBarSizeTest *o = (ScrollBarSizeTest*)data;
- o->slide_cb2((Fl_Value_Slider*)w);
+ o->slide_cb2((Fl_Value_Slider*)w);
}
-public:
+public:
static Fl_Widget *create() {
return(new ScrollBarSizeTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H));
}
@@ -146,19 +144,19 @@ public:
// _____________ _______________
// |_____________| |_______________|
// --- ----- <-- tgrpy
- // brow_a brow_b brow_c | 14 |
+ // brow_a brow_b brow_c | 14 |
// ---------- ---------- ---------- --- | <-- browy
// | | | | | | |browh |
// | | | | | | | |
- // ---------- ---------- ---------- --- tgrph
+ // ---------- ---------- ---------- --- tgrph
// | |
- // tree_a tree_b tree_c | 20 |
+ // tree_a tree_b tree_c | 20 |
// ---------- ---------- ---------- --- | <-- treey
// | | | | | | |treeh |
// | | | | | | | |
// ---------- ---------- ---------- --- |
// | |
- // table_a table_b table_c | 20 |
+ // table_a table_b table_c | 20 |
// ---------- ---------- ---------- --- | <-- tabley
// | | | | | | |tableh|
// | | | | | | | |
@@ -203,7 +201,7 @@ public:
slide_browa->callback(slide_cb, (void*)this);
slide_browa->labelsize(12);
int msgbox_x = brow_c->x() + brow_c->w() + 20;
- int msgbox_w = W-(msgbox_x-X);
+ int msgbox_w = W-(msgbox_x-X);
Fl_Box *msgbox = new Fl_Box(msgbox_x,browy,msgbox_w,H-Y-48);
msgbox->label("\nVerify global scrollbar sizing and per-widget scrollbar sizing. "
"Scrollbar's size should change interactively as size sliders are changed. "
@@ -212,14 +210,10 @@ public:
"for all the 'A' group widgets.");
msgbox->labelsize(12);
msgbox->align(FL_ALIGN_INSIDE|FL_ALIGN_CENTER|FL_ALIGN_LEFT|FL_ALIGN_WRAP);
- msgbox->box(FL_FLAT_BOX);
- msgbox->color(53); // 90% gray
+ msgbox->box(FL_FLAT_BOX);
+ msgbox->color(53); // 90% gray
end();
}
};
UnitTest scrollbarsize("scrollbar size", ScrollBarSizeTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_simple_terminal.cxx b/test/unittest_simple_terminal.cxx
index 8d6d44f6c..bfda6fe1c 100644
--- a/test/unittest_simple_terminal.cxx
+++ b/test/unittest_simple_terminal.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -63,7 +61,7 @@ class SimpleTerminal : public Fl_Group {
"\033[7m 30% white Courier 14\n"
"\033[8m 20% white Courier 14\n"
"\033[9m 10% white Courier 14\n"
- "\033[0m");
+ "\033[0m");
}
static void DateTimer_CB(void *data) {
Fl_Simple_Terminal *tty = (Fl_Simple_Terminal*)data;
@@ -76,7 +74,7 @@ public:
return new SimpleTerminal(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
SimpleTerminal(int x, int y, int w, int h) : Fl_Group(x, y, w, h) {
- static Fl_Text_Display::Style_Table_Entry my_stable[] = { // 10 entry grayscale
+ static Fl_Text_Display::Style_Table_Entry my_stable[] = { // 10 entry grayscale
// Font Color Font Face Font Size ANSI Sequence
// ---------- ---------------- --------- -------------
{ 0xffffff00, FL_COURIER_BOLD, 14 }, // "\033[0m" 0 white 100%
@@ -118,7 +116,3 @@ public:
};
UnitTest simple_terminal("simple terminal", SimpleTerminal::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_symbol.cxx b/test/unittest_symbol.cxx
index ddd2d28b4..ee95d1505 100644
--- a/test/unittest_symbol.cxx
+++ b/test/unittest_symbol.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -44,7 +42,7 @@ class SymbolTest : public Fl_Widget
fl_color(FL_BLACK);
fl_draw(txt, X, Y, 10, 10, FL_ALIGN_INSIDE|FL_ALIGN_TOP|FL_ALIGN_LEFT, 0, 1);
}
-public:
+public:
static Fl_Widget *create() {
return new SymbolTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
@@ -63,15 +61,15 @@ public:
fl_font(FL_HELVETICA, fsize);
int xx = x0+10;
int yy = y0+10;
- DrawTextAndBoxes("Text" ,xx,yy); yy += fsize+10; // check no symbols
- DrawTextAndBoxes("@->" ,xx,yy); yy += fsize+10; // check symbol alone
- DrawTextAndBoxes("@-> " ,xx,yy); yy += fsize+10; // check symbol with trailing space
- DrawTextAndBoxes("@-> Rt Arrow" ,xx,yy); yy += fsize+10; // check symbol at left edge
- DrawTextAndBoxes("Lt Arrow @<-" ,xx,yy); yy += fsize+10; // check symbol at right edge
- DrawTextAndBoxes("@-> Rt/Lt @<-" ,xx,yy); yy += fsize+10; // check symbol at lt+rt edges
- DrawTextAndBoxes("@@ At/Lt @<-" ,xx,yy); yy += fsize+10; // check @@ at left, symbol at right
- DrawTextAndBoxes("@-> Lt/At @@" ,xx,yy); yy += fsize+10; // check symbol at left, @@ at right
- DrawTextAndBoxes("@@ At/At @@" ,xx,yy); yy += fsize+10; // check @@ at left+right
+ DrawTextAndBoxes("Text" ,xx,yy); yy += fsize+10; // check no symbols
+ DrawTextAndBoxes("@->" ,xx,yy); yy += fsize+10; // check symbol alone
+ DrawTextAndBoxes("@-> " ,xx,yy); yy += fsize+10; // check symbol with trailing space
+ DrawTextAndBoxes("@-> Rt Arrow" ,xx,yy); yy += fsize+10; // check symbol at left edge
+ DrawTextAndBoxes("Lt Arrow @<-" ,xx,yy); yy += fsize+10; // check symbol at right edge
+ DrawTextAndBoxes("@-> Rt/Lt @<-" ,xx,yy); yy += fsize+10; // check symbol at lt+rt edges
+ DrawTextAndBoxes("@@ At/Lt @<-" ,xx,yy); yy += fsize+10; // check @@ at left, symbol at right
+ DrawTextAndBoxes("@-> Lt/At @@" ,xx,yy); yy += fsize+10; // check symbol at left, @@ at right
+ DrawTextAndBoxes("@@ At/At @@" ,xx,yy); yy += fsize+10; // check @@ at left+right
xx = x0+200;
yy = y0+10;
DrawTextAndBoxes("Line1\nLine2" ,xx,yy); yy += (fsize+10)*2; // check 2 lines, no symbol
@@ -89,7 +87,3 @@ public:
};
UnitTest symbolExtents("symbol text", SymbolTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_text.cxx b/test/unittest_text.cxx
index 5768ae779..80cce72e1 100644
--- a/test/unittest_text.cxx
+++ b/test/unittest_text.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -41,7 +39,7 @@ class TextExtentsTest : public Fl_Widget
fl_color(FL_BLACK);
fl_draw(txt, X, Y);
}
-public:
+public:
static Fl_Widget *create() {
return new TextExtentsTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
@@ -60,12 +58,12 @@ public:
fl_font(FL_HELVETICA, 30);
int xx = x0+55;
int yy = y0+40;
- DrawTextAndBoxes("!abcdeABCDE\"#A", xx, yy); yy += 50; // mixed string
- DrawTextAndBoxes("oacs", xx, yy); xx += 100; // small glyphs
- DrawTextAndBoxes("qjgIPT", xx, yy); yy += 50; xx -= 100; // glyphs with descenders
- DrawTextAndBoxes("````````", xx, yy); yy += 50; // high small glyphs
- DrawTextAndBoxes("--------", xx, yy); yy += 50; // mid small glyphs
- DrawTextAndBoxes("________", xx, yy); yy += 50; // low small glyphs
+ DrawTextAndBoxes("!abcdeABCDE\"#A", xx, yy); yy += 50; // mixed string
+ DrawTextAndBoxes("oacs", xx, yy); xx += 100; // small glyphs
+ DrawTextAndBoxes("qjgIPT", xx, yy); yy += 50; xx -= 100; // glyphs with descenders
+ DrawTextAndBoxes("````````", xx, yy); yy += 50; // high small glyphs
+ DrawTextAndBoxes("--------", xx, yy); yy += 50; // mid small glyphs
+ DrawTextAndBoxes("________", xx, yy); yy += 50; // low small glyphs
fl_font(FL_HELVETICA, 14);
fl_color(FL_RED); fl_draw("fl_measure bounding box in RED", xx, yy); yy += 20;
@@ -82,7 +80,3 @@ public:
};
UnitTest textExtents("rendering text", TextExtentsTest::create);
-
-//
-// End of "$Id$"
-//
diff --git a/test/unittest_viewport.cxx b/test/unittest_viewport.cxx
index 98d557049..52026256a 100644
--- a/test/unittest_viewport.cxx
+++ b/test/unittest_viewport.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -23,11 +21,11 @@
//------- test viewport clipping ----------
//
class ViewportTest : public Fl_Box {
-public:
+public:
static Fl_Widget *create() {
return new ViewportTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
}
- ViewportTest(int x, int y, int w, int h) : Fl_Box(x, y, w, h) {
+ ViewportTest(int x, int y, int w, int h) : Fl_Box(x, y, w, h) {
label("Testing Viewport Alignment\n\n"
"Only green lines should be visible.\n"
"If red lines are visible in the corners of this window,\n"
@@ -49,7 +47,3 @@ public:
};
UnitTest viewport("viewport test", ViewportTest::create);
-
-//
-// End of "$Id$
-//
diff --git a/test/unittests.cxx b/test/unittests.cxx
index 5d0a4ad6e..12b65fe2a 100644
--- a/test/unittests.cxx
+++ b/test/unittests.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
// Fltk unit tests
@@ -29,19 +27,19 @@
#include
#include
#include
-#include // fl_text_extents()
+#include // fl_text_extents()
// WINDOW/WIDGET SIZES
-#define MAINWIN_W 700 // main window w()
-#define MAINWIN_H 400 // main window h()
-#define BROWSER_X 10 // browser x()
-#define BROWSER_Y 25 // browser y()
-#define BROWSER_W 150 // browser w()
-#define BROWSER_H MAINWIN_H-35 // browser h()
-#define TESTAREA_X (BROWSER_W + 20) // test area x()
-#define TESTAREA_Y 25 // test area y()
-#define TESTAREA_W (MAINWIN_W - BROWSER_W - 30) // test area w()
-#define TESTAREA_H BROWSER_H // test area h()
+#define MAINWIN_W 700 // main window w()
+#define MAINWIN_H 400 // main window h()
+#define BROWSER_X 10 // browser x()
+#define BROWSER_Y 25 // browser y()
+#define BROWSER_W 150 // browser w()
+#define BROWSER_H MAINWIN_H-35 // browser h()
+#define TESTAREA_X (BROWSER_W + 20) // test area x()
+#define TESTAREA_Y 25 // test area y()
+#define TESTAREA_W (MAINWIN_W - BROWSER_W - 30) // test area w()
+#define TESTAREA_H BROWSER_H // test area h()
typedef void (*UnitTestCallback)(const char*,Fl_Group*);
@@ -197,7 +195,3 @@ int main(int argc, char **argv) {
Browser_CB(browser,0);
return(Fl::run());
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/utf8.cxx b/test/utf8.cxx
index 5dd9f57df..ed1dd1063 100644
--- a/test/utf8.cxx
+++ b/test/utf8.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// UTF-8 test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -77,13 +75,13 @@ static void cb_exit(Fl_Button*, void*) {
class FontDisplay : public Fl_Widget
{
void draw(void);
-
+
public:
int font, size;
-
+
int test_fixed_pitch(void);
-
- FontDisplay(Fl_Boxtype B, int X, int Y, int W, int H, const char *L = 0)
+
+ FontDisplay(Fl_Boxtype B, int X, int Y, int W, int H, const char *L = 0)
: Fl_Widget(X, Y, W, H, L)
{
box(B);
@@ -109,23 +107,23 @@ int FontDisplay::test_fixed_pitch(void)
{
int w1, w2;
int h1, h2;
-
+
w1 = w2 = 0;
h1 = h2 = 0;
-
+
fl_font((Fl_Font)font, size);
-
+
fl_measure("MHMHWWMHMHMHM###WWX__--HUW", w1, h1, 0);
fl_measure("iiiiiiiiiiiiiiiiiiiiiiiiii", w2, h2, 0);
-
+
if (w1 == w2) return 1; // exact match - fixed pitch
-
+
// Is the font "nearly" fixed pitch? If it is within 5%, say it is...
double f1 = (double)w1;
double f2 = (double)w2;
double delta = fabs(f1 - f2) * 5.0;
if (delta <= f1) return 2; // nearly fixed pitch...
-
+
return 0; // NOT fixed pitch
}
@@ -136,14 +134,14 @@ static FontDisplay *textobj;
static void size_cb(Fl_Widget *, long)
{
int size_idx = sizeobj->value();
-
+
if (!size_idx) return;
-
+
const char *c = sizeobj->text(size_idx);
-
+
while (*c < '0' || *c > '9') c++; // find the first numeric char
pickedsize = atoi(c); // convert the number string to a value
-
+
// Now set the font view to the selected size and redraw it.
textobj->size = pickedsize;
textobj->redraw();
@@ -153,13 +151,13 @@ static void size_cb(Fl_Widget *, long)
static void font_cb(Fl_Widget *, long)
{
int font_idx = fontobj->value() + first_free;
-
+
if (!font_idx) return;
font_idx--;
-
+
textobj->font = font_idx;
sizeobj->clear();
-
+
int size_count = numsizes[font_idx-first_free];
int *size_array = sizes[font_idx-first_free];
if (!size_count)
@@ -192,7 +190,7 @@ static void font_cb(Fl_Widget *, long)
{
// find the nearest available size to the current picked size
if (size_array[i] <= pickedsize) w = i;
-
+
char buf[16];
sprintf(buf, "@b%d", size_array[i]);
sizeobj->add(buf);
@@ -200,7 +198,7 @@ static void font_cb(Fl_Widget *, long)
sizeobj->value(w + 1);
}
size_cb(sizeobj, 0); // force selection of nearest valid size, then redraw
-
+
// Now check to see if the font looks like a fixed pitch font or not...
int looks_fixed = textobj->test_fixed_pitch();
if(looks_fixed)
@@ -231,11 +229,11 @@ static void choose_cb(Fl_Widget *, long)
const char *name = Fl::get_font_name((Fl_Font)font_idx, &font_type);
printf("idx %d\nUser name :%s:\n", font_idx, name);
printf("FLTK name :%s:\n", Fl::get_font((Fl_Font)font_idx));
-
+
Fl::set_font(extra_font, (Fl_Font)font_idx);
- // Fl::set_font(extra_font, Fl::get_font((Fl_Font)font_idx));
+ // Fl::set_font(extra_font, Fl::get_font((Fl_Font)font_idx));
}
-
+
int size_idx = sizeobj->value();
if (!size_idx)
{
@@ -246,10 +244,10 @@ static void choose_cb(Fl_Widget *, long)
const char *c = sizeobj->text(size_idx);
while (*c < '0' || *c > '9') c++; // find the first numeric char
int pickedsize = atoi(c); // convert the number string to a value
-
+
printf("size %d\n\n", pickedsize);
}
-
+
fflush(stdout);
main_win->redraw();
}
@@ -266,30 +264,30 @@ static void own_face_cb(Fl_Widget *, void *)
int font_idx;
int cursor_restore = 0;
static int i_was = -1; // used to keep track of where we were in the list...
-
+
if (i_was < 0) { // not been here before
i_was = 1;
} else {
i_was = fontobj->topline(); // record which was the topmost visible line
fontobj->clear();
- // Populating the font widget can be slower than an old dog with three legs
+ // Populating the font widget can be slower than an old dog with three legs
// on a bad day, show a wait cursor
fnt_chooser_win->cursor(FL_CURSOR_WAIT);
cursor_restore = 1;
}
-
-
+
+
// Populate the font list with the names of the fonts found
for (font_idx = first_free; font_idx < font_count; font_idx++)
{
int font_type;
const char *name = Fl::get_font_name((Fl_Font)font_idx, &font_type);
char buffer[128];
-
+
if(own_face->value() == 0) {
char *p = buffer;
// if the font is BOLD, set the bold attribute in the list
- if (font_type & FL_BOLD) {
+ if (font_type & FL_BOLD) {
*p++ = '@';
*p++ = 'b';
}
@@ -301,9 +299,9 @@ static void own_face_cb(Fl_Widget *, void *)
*p++ = '@';
*p++ = '.';
strcpy(p, name);
- } else {
+ } else {
// Show font in its own face
- // this is neat, but really slow on some systems:
+ // this is neat, but really slow on some systems:
// uses each font to display its own name
sprintf (buffer, "@F%d@.%s", font_idx, name);
}
@@ -334,7 +332,7 @@ static void create_font_widget()
i += fl_utf8encode((unsigned int)c, label + i);
}
label[i] = 0;
-
+
// Create the window layout
fnt_chooser_win = new Fl_Double_Window(380, 420, "Font Selector");
{
@@ -342,61 +340,61 @@ static void create_font_widget()
{
Fl_Group *textgroup = new Fl_Group(0, 0, 380, 105);
{
-
+
textobj = new FontDisplay(FL_FRAME_BOX, 10, 10, 360, 90, label);
textobj->align(FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
textobj->color(53, 3);
-
+
textgroup->box(FL_FLAT_BOX);
textgroup->resizable(textobj);
textgroup->end();
- }
+ }
Fl_Group *fontgroup = new Fl_Group(0, 105, 380, 315);
- {
+ {
fontobj = new Fl_Hold_Browser(10, 110, 290, 270);
fontobj->box(FL_FRAME_BOX);
fontobj->color(53, 3);
fontobj->callback(font_cb);
fnt_chooser_win->resizable(fontobj);
-
+
sizeobj = new Fl_Hold_Browser(310, 110, 60, 270);
sizeobj->box(FL_FRAME_BOX);
sizeobj->color(53, 3);
sizeobj->callback(size_cb);
-
+
// Create the status bar
Fl_Group *stat_bar = new Fl_Group (10, 385, 380, 30);
- {
+ {
fnt_cnt = new Fl_Value_Output(10, 390, 40, 20);
fnt_cnt->label("fonts");
fnt_cnt->align(FL_ALIGN_RIGHT);
-
+
fix_prop = new Fl_Output(100, 390, 40, 20);
fix_prop->color(FL_BACKGROUND_COLOR);
fix_prop->value("prop");
fix_prop->clear_visible_focus();
-
+
own_face = new Fl_Check_Button(150, 390, 40, 20, "Self");
own_face->value(0);
own_face->type(FL_TOGGLE_BUTTON);
own_face->clear_visible_focus();
own_face->callback(own_face_cb);
own_face->tooltip("Display font names in their own face");
-
+
Fl_Box * dummy = new Fl_Box(220, 390, 1, 1);
-
+
choose_btn = new Fl_Button(240, 385, 60, 30);
choose_btn->label("Select");
choose_btn->callback(choose_cb);
-
+
refresh_btn = new Fl_Button(310, 385, 60, 30);
refresh_btn->label("Refresh");
refresh_btn->callback(refresh_cb);
-
+
stat_bar->resizable (dummy);
stat_bar->end();
}
-
+
fontgroup->box(FL_FLAT_BOX);
fontgroup->resizable(fontobj);
fontgroup->end();
@@ -405,7 +403,7 @@ static void create_font_widget()
}
fnt_chooser_win->resizable(tile);
fnt_chooser_win->end();
- fnt_chooser_win->callback((Fl_Callback*)cb_exit);
+ fnt_chooser_win->callback((Fl_Callback*)cb_exit);
}
}
@@ -413,27 +411,27 @@ static void create_font_widget()
int make_font_chooser(void)
{
int font_idx;
-
+
// create the widget frame
create_font_widget();
-
+
// Load the systems available fonts - ask for everything
- // font_count = Fl::set_fonts("*");
+ // font_count = Fl::set_fonts("*");
#ifdef _WIN32
font_count = Fl::set_fonts("*");
#elif defined(__APPLE__)
font_count = Fl::set_fonts("*");
#else
- // Load the systems available fonts - ask for everything that claims to be
+ // Load the systems available fonts - ask for everything that claims to be
// iso10646 compatible
font_count = Fl::set_fonts("-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1");
#endif
-
- // allocate space for the sizes and numsizes array, now we know how many
+
+ // allocate space for the sizes and numsizes array, now we know how many
// entries it needs
sizes = new int*[font_count];
numsizes = new int[font_count];
-
+
// Populate the font list with the names of the fonts found
first_free = FL_FREE_FONT;
for (font_idx = first_free; font_idx < font_count; font_idx++)
@@ -450,20 +448,20 @@ int make_font_chooser(void)
sizes[font_idx-first_free][j] = size_array[j];
}
} // end of font list filling loop
-
+
// Call this once to get the font browser loaded up
own_face_cb(NULL, 0);
-
+
fontobj->value(1);
// optional hard-coded font for testing - do not use!
- // fontobj->textfont(261);
-
+ // fontobj->textfont(261);
+
font_cb(fontobj, 0);
-
+
fnt_cnt->value(font_count);
-
+
return font_count;
-
+
} // make_font_chooser
/* End of Font Chooser Widget code */
@@ -568,16 +566,16 @@ public:
int main(int argc, char** argv)
{
int l;
- const char *latin1 =
+ const char *latin1 =
"\x41\x42\x43\x61\x62\x63\xe0\xe8\xe9\xef\xe2\xee\xf6\xfc\xe3\x31\x32\x33";
char *utf8 = (char*) malloc(strlen(latin1) * 5 + 1);
l = 0;
- // l = fl_latin12utf((const unsigned char*)latin1, strlen(latin1), utf8);
+ // l = fl_latin12utf((const unsigned char*)latin1, strlen(latin1), utf8);
l = fl_utf8froma(utf8, (strlen(latin1) * 5 + 1), latin1, strlen(latin1));
-
+
make_font_chooser();
extra_font = FL_TIMES_BOLD_ITALIC;
-
+
/* setup the extra font */
Fl::set_font(extra_font,
#ifdef _WIN32
@@ -588,15 +586,15 @@ int main(int argc, char** argv)
"-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1"
#endif
);
-
+
main_win = new Fl_Double_Window (200 + 5*75, 400, "Unicode Display Test");
main_win->begin();
-
+
Fl_Input i1(5, 5, 190, 25);
utf8[l] = '\0';
i1.value(utf8);
Fl_Scroll scroll(200,0,5 * 75,400);
-
+
int off = 2;
int end_list = 0x10000 / 16;
if (argc > 1) {
@@ -629,50 +627,50 @@ int main(int argc, char** argv)
}
scroll.end();
main_win->resizable(scroll);
-
+
thescroll = &scroll;
-
+
char *utf8l = (char*) malloc(strlen(utf8) * 3 + 1);
Fl_Input i2(5, 35, 190, 25);
l = fl_utf_tolower((const unsigned char*)utf8, l, utf8l);
utf8l[l] = '\0';
i2.value(utf8l);
-
+
char *utf8u = (char*) malloc(strlen(utf8l) * 3 + 1);
Fl_Input i3(5, 65, 190, 25);
l = fl_utf_toupper((const unsigned char*)utf8l, l, utf8u);
utf8u[l] = '\0';
i3.value(utf8u);
-
+
const char *ltr_txt = "\\->e\xCC\x82=\xC3\xAA";
Fl_Input i4(5, 90, 190, 25);
i4.value(ltr_txt);
i4.textfont(extra_font);
-
- wchar_t r_to_l_txt[] = {/*8238,*/
+
+ wchar_t r_to_l_txt[] = {/*8238,*/
1610, 1608, 1606, 1604, 1603, 1608, 1583, 0};
-
+
char abuf[40];
// l = fl_unicode2utf(r_to_l_txt, 8, abuf);
l = fl_utf8fromwc(abuf, 40, r_to_l_txt, 8);
abuf[l] = 0;
-
+
right_left_input i5(5, 115, 190, 50);
i5.textfont(extra_font);
i5.textsize(30);
i5.value(abuf);
-
+
Fl_Input i7(5, 230, 190, 25);
Fl_Input i8(5, 260, 190, 25);
i7.callback(i7_cb, &i8);
i7.textsize(20);
i7.value(abuf);
i7.when(FL_WHEN_CHANGED);
-
- wchar_t r_to_l_txt1[] = { /*8238,*/
- 1610, 0x20, 1608, 0x20, 1606, 0x20,
+
+ wchar_t r_to_l_txt1[] = { /*8238,*/
+ 1610, 0x20, 1608, 0x20, 1606, 0x20,
1604, 0x20, 1603, 0x20, 1608, 0x20, 1583, 0};
-
+
// l = fl_unicode2utf(r_to_l_txt1, 14, abuf);
l = fl_utf8fromwc(abuf, 40, r_to_l_txt1, 14);
abuf[l] = 0;
@@ -680,27 +678,27 @@ int main(int argc, char** argv)
i6.textfont(extra_font);
i6.textsize(30);
i6.value(abuf);
-
+
// Now try Greg Ercolano's Japanese test sequence
// SOME JAPANESE UTF-8 TEXT
- const char *utfstr =
+ const char *utfstr =
"\xe4\xbd\x95\xe3\x82\x82\xe8\xa1"
- "\x8c\xe3\x82\x8b\xe3\x80\x82";
-
+ "\x8c\xe3\x82\x8b\xe3\x80\x82";
+
UCharDropBox db(5, 300, 190, 30);
db.textsize(16);
db.value("unichar drop box");
-
+
Fl_Output o9(5, 330, 190, 45);
o9.textfont(extra_font);
o9.textsize(30);
o9.value(utfstr);
-
+
main_win->end();
main_win->callback((Fl_Callback*)cb_exit);
fl_set_status(0, 370, 100, 30);
-
+
main_win->show(argc,argv);
fnt_chooser_win->show();
@@ -713,7 +711,3 @@ int main(int argc, char** argv)
return ret;
}
-
-//
-// End of "$Id$".
-//
diff --git a/test/windowfocus.cxx b/test/windowfocus.cxx
index 87238e69a..84c0741b4 100644
--- a/test/windowfocus.cxx
+++ b/test/windowfocus.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Cross-window show/focus test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// 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
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include
@@ -40,8 +38,8 @@ int main(int argc, char **argv) {
Fl_Box *b = new Fl_Box(10, 10, 280, 130);
b->label("Type something to pop the subwindow up. "
- "The focus should stay on the input, "
- "and you should be able to continue typing.");
+ "The focus should stay on the input, "
+ "and you should be able to continue typing.");
b->align(FL_ALIGN_WRAP | FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
input1 = new Fl_Input(10, 150, 150, 25);
@@ -58,7 +56,3 @@ int main(int argc, char **argv) {
return Fl::run();
}
-
-//
-// End of "$Id$".
-//
--
cgit v1.2.3