Commit Graph

912 Commits

Author SHA1 Message Date
Albrecht Schlosser 42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
This second step replaces FL/x.H with FL/platform.H in all source files.
Dependencies have been adjusted as well.

This commit completes the replacement of FL/x.H with FL/platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 21:17:17 +00:00
Albrecht Schlosser cc595ce4ed Replace FL/x.H with FL/platform.H - step 1.
This first step replaces FL/x.H with FL/platform.H but keeps a small
FL/x.H that #include's FL/platform.H for backwards compatibility.
Documentation sources in documentation/src/*.dox have been fixed,
but references in other source files need to be fixed in another step.
Dependencies have been adjusted.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 17:46:48 +00:00
Albrecht Schlosser a000e12d6c Fix invalid porsche1.xpm file.
test/pixmaps/porsche1.xpm was likely an experimental version of file
test/pixmaps/porsche.xpm. I fixed it instead of removing because it
looks nice as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12634 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-16 03:05:35 +00:00
Albrecht Schlosser 7aef0cad39 CMake: enable building FLTK in a subdirectory of another project.
Basically replace CMAKE_XXX_DIR with CMAKE_CURRENT_XXX_DIR where
XXX = SOURCE or BINARY.

Patch proposal by cleanrock, FLTK PR #4:
https://github.com/fltk/test-only/pull/4

Patch modified to fix target dirs for test programs and doxygen docs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-10 20:49:03 +00:00
Manolo Gouy d361de4d0d STR#3437 : Support display of windows in tabbed form as in MacOS 10.12 Sierra
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12596 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18 15:19:15 +00:00
Albrecht Schlosser 0a61f9d739 Improve schemes unittest (add selection colors to buttons).
Use check and radio buttons with different selection colors to
verify selection colors with different schemes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-13 18:30:19 +00:00
Greg Ercolano 310c545179 Fixes STR#3428: allows command line to specify alternate html file on Mac platform
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12568 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-19 01:18:16 +00:00
Albrecht Schlosser 853a716610 Replace remaining calls of getenv() with fl_getenv().
Note: don't use fl_getenv() in Fl_System_Driver and derived classes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-17 17:25:33 +00:00
Manolo Gouy f300e00f79 Proper return value from test window::handle() when the event is not processed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-17 06:52:27 +00:00
Albrecht Schlosser f3896460d6 Replace chdir() with new wrapper fl_chdir().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12558 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-12 18:00:45 +00:00
Greg Ercolano a20d472faf Updated scrollbar size's instructions, increased font size.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-04 06:11:45 +00:00
Greg Ercolano 127147ca97 Addresses STR# 3423; adds missing scrollbar_size() methods and honors global Fl::scrollbar_size().
Includes mods to unittest's scrollbar size test.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12538 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-02 21:14:40 +00:00
Greg Ercolano 3256932e2a test/valuators demo modified to use Fl_Simple_Terminal.
Also added missing callback to show Fl_Spinner values.

Improved callback messages to indicate which widget's value is being displayed.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12537 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-02 03:03:12 +00:00
Greg Ercolano 68f07db58a Added Fl_Simple_Terminal widget, and mods to test+example programs (STR #3411).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12506 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-17 00:28:56 +00:00
Albrecht Schlosser a8b58f6b79 Replace inappropriate usage of __WATCOM__ with _MSC_VER.
Note: this is in parts temporary since some of the functions redefined
for Visual Studio will be replaced with fl_*() functions in later commits.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:46:16 +00:00
Albrecht Schlosser aff3a0ac12 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12493 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 15:00:06 +00:00
Albrecht Schlosser 66b1690aa8 Replace remaining calls to getenv() with fl_getenv().
... except in driver code that uses Fl_System_Driver::getenv().

Todo: Check if all remaining calls of getenv() in driver code are correct
or might use ::getenv() to avoid one calling level for optimization.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 14:58:30 +00:00
Greg Ercolano 73f1c43474 Fixed seemingly random whitespace..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-06 23:30:07 +00:00
Manolo Gouy 0b797d704c Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12477 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 16:26:51 +00:00
Manolo Gouy 7a9d5be6cb Undo commit at r.12475 that is not adequate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 12:21:46 +00:00
Manolo Gouy 5e6bf76b0a Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 11:46:33 +00:00
Greg Ercolano 213b955442 Added control for when() to test browser's callback behavior.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19 17:17:44 +00:00
Manolo Gouy 1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Albrecht Schlosser fa5851b292 Fix typos (comments and documentation).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12406 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-28 11:10:01 +00:00
Manolo Gouy 52249a960d Associate gl_font() and gl_draw() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12405 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-27 08:01:55 +00:00
Albrecht Schlosser 3a5e2f074b Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:18:46 +00:00
Manolo Gouy 1c818271b1 Complete previous commit at r.12385 that was partial.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12386 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-15 15:26:50 +00:00
Manolo Gouy d42e7374a5 Update support of rescaling which no longer involves hide/show of the window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12385 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-15 14:52:50 +00:00
Albrecht Schlosser 463b3e5d9d Fix blocks demo keyboard handling, add new shortcut.
The blocks demo was unintentionally intercepting ctrl/+ which was
introduced in FLTK 1.4.0 to change scaling for HiDPI screens. Now this
is separated: use ctrl/+/-/0 to change scaling, use '+' alone to change
the game level.

The new keyboard shortcut ALT+SHIFT+H allows users to reset their high
scores without editing the preferences file.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 18:44:19 +00:00
Albrecht Schlosser 768ba675b0 Fix test/blocks "runaway timer" bug.
Bug #1: When entering the next level an _additional_ timeout was started,
hence multiple timers would run in parallel and increase the game's speed
more than (supposedly) intended.

Bug #2: When the game was over, these additional timers were not stopped,
hence level 1 was never again as slow as it should be.

This is fixed in this commit. Additionally the timer values are defined
as preprocessor macros (constants) for easier fine tuning. To compensate
for the lower speed in higher levels the LEVEL_FACTOR was reduced from
0.95 to 0.90 so the higher levels are slightly faster than without this
fix.

Note: the result of this fix (generally less speed increase per level)
may result in higher scores.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12353 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 18:15:52 +00:00
Albrecht Schlosser 7aea5b50a0 test/blocks: improve timer test code.
This commit does not change operative code but adds the ability to test
the timer callback under Windows and improves the timer statistics.

The code has been formatted in some parts, but not "everywhere".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 17:25:51 +00:00
Albrecht Schlosser d9460d787b Update dependencies (makedepend).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 19:42:12 +00:00
Albrecht Schlosser 90a6c3eb35 Remove obsolete comment, fix code formatting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-05 13:41:16 +00:00
Albrecht Schlosser 3eb6b7ea58 CMake: replace improperly used variables with correct ones.
CMake variables FLTK_SOURCE_DIR and FLTK_BINARY_DIR are only defined
if the project name is exactly "FLTK" (all uppercase). These variables
are generated (set) by CMake as <PROJECT_NAME>_SOURCE_DIR etc.

The correct variables are CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR,
respectively, which are always defined.

This commit enables future changes of the FLTK project name, e.g. to
"fltk" or "fltk-1.4.0" (a versioned project name), if we like...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12281 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29 17:51:27 +00:00
Manolo Gouy f2c27b5090 Add void fl_scale_offscreen(Fl_Offscreen &ctx) to support the rescaling of an offscreen buffer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12240 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-18 17:26:34 +00:00
Albrecht Schlosser a1d3936554 Allow to disable shadows in Fl_Clock and derived widgets.
As discussed on 2017-05-15 in fltk.general, thread "Fl_clock".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12237 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-15 15:30:52 +00:00
Albrecht Schlosser 3ec23df83a Fl_Help_View: fix table header in help_dialog.html (STR #3227).
The html code in the example (test/help_dialog.html) was broken.
Fixing the example html code was enough, no code changes needed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-21 21:10:12 +00:00
Albrecht Schlosser 680631b834 Fix dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-19 10:53:04 +00:00
Albrecht Schlosser 3311119335 Fix svn attributes of *.c, *.cxx, *.cmake and others.
- set svn:keywords Id
- set svn:eol-style native


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12193 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-12 15:12:35 +00:00
Albrecht Schlosser 5544404f7a Enable Up/Down keys in Fl_Spinner if input has focus (STR #2989).
Previously Up/Down keys worked only if one of the buttons was pressed
before so that it had the focus.

test/valuators.fl: The second Fl_Spinner widget (FL_FLOAT_INPUT) now has
wrap mode disabled whereas the first one (FL_INT_INPUT) uses wrap mode
(default, compatible with FLTK 1.3.x and older).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-10 21:47:08 +00:00
Albrecht Schlosser 843183478b Fix tab group positions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-05 14:43:03 +00:00
Manolo Gouy 3ce40f3faf Reset offscreen surface when the window is hidden.
This is necessary for compatibility with rescaling, so line widths are also rescaled.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-19 15:42:31 +00:00
Albrecht Schlosser 1e5826e84b Add radio buttons to unittests_schemes in 4th tab.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-11 16:39:19 +00:00
Albrecht Schlosser 16774ddc4e Rename test/help demo program to test/help_dialog.
This change avoids a name conflict with CMake's auto-generated target 'help'
for "Unix Makefiles", "Ninja", and supposedly other generators as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-08 02:06:52 +00:00
Manolo Gouy e7356529bb Allow ESC to close window and don't transmit CTRL character to fl_draw()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12167 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-26 08:13:19 +00:00
Manolo Gouy 6645a6b225 It is better to reset the line width after having finished to draw with a modified width.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-14 18:38:01 +00:00
Manolo Gouy 43935dffeb Add static void Fl_Surface_Device::push_current(Fl_Surface_Device *new_current) and pop_current() to set/unset the current drawing surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-07 15:09:52 +00:00
Manolo Gouy e5d53b026c Test program "device": add several calls to image destructors to exercise them.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-30 07:12:29 +00:00
Albrecht Schlosser 6d4b93e9c7 Finally remove FLTK_ABI_VERSION preprocessor macro from code.
FLTK_ABI_VERSION has been renamed to FL_ABI_VERSION in FLTK 1.4.0.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-19 01:20:53 +00:00
Albrecht Schlosser 49a2e4206e Fix test/native-filechooser help display artefact (STR #3349).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12081 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-06 10:48:40 +00:00