Commit Graph

70 Commits

Author SHA1 Message Date
Albrecht Schlosser
666bbda70e Fix tabs, trailing spaces, and update dependencies 2024-08-10 20:32:19 +02:00
Matthias Melcher
02a208b928 Fixed warning in Sudoku (unused variable) 2024-08-10 14:49:51 +02:00
Matthias Melcher
44a8508ffe Add Sudoku undo and redo. 2024-08-04 23:42:03 +02:00
Matthias Melcher
fad1a67734 Sudoku formatting, hint updates. 2024-08-04 17:28:35 +02:00
Matthias Melcher
cee2af13b3 Fix Sudoku's use of Fl_Sys_Menu->parent(). 2024-08-04 16:46:04 +02:00
ManoloFLTK
754340e101 macOS audio is usable with XQuartz 2023-08-16 11:18:19 +02:00
ManoloFLTK
4aae2d1224 Allow build of sudoku app with macOS + XQuartz 2023-08-16 10:27:41 +02:00
Matthias Melcher
e8b378302c Undoing previous changes 2023-08-15 22:59:07 +02:00
Matthias Melcher
3b093e895b Lot's of changes, must rethink UI. 2023-08-15 17:09:51 +02:00
Matthias Melcher
af22676abf Missing includes 2023-08-15 17:09:51 +02:00
Matthias Melcher
0de186e614 Sudoku into smaller pieces. 2023-08-15 17:09:51 +02:00
Matthias Melcher
a1b55385e3 Random testing and fixing. 2023-08-15 17:09:51 +02:00
Matthias Melcher
d27188198a Removed unused code 2023-08-15 17:09:51 +02:00
Matthias Melcher
0c8083a06d Adding generator 2023-08-15 17:09:51 +02:00
Matthias Melcher
44c874b731
Use FL_OVERRIDE for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
2022-12-30 19:14:36 +01:00
ManoloFLTK
2ffd4e4f1a Replace all calls to sprintf() by calls to snprintf(). 2022-09-26 16:12:18 +02:00
Matthias Melcher
09eff7243a
Fixing and upgrading Fl_Preferences (#374)
* Added filename function to Fl_Preferences

Static function to get filename before opening.
Member to get filename after opening.
Bug fixes for memory mapped preferences.

* ERROR is a macro on Windows, don't use it

* Added Fl_Preferences::dirty().

User can now check if the database will be written
when flushed or destroyed.
Flush returns a crude error code.

* Fl_Preferences::get binary data returns # of bytes read.

* Verified group deletion code

* Fl_Preferences ignores locale.

This will make .prefs files interchangeable
between different computers.

* Updating the Preferences Mode to ignore locale.

* Fixes in docs.
2022-01-19 16:08:29 +01:00
Albrecht Schlosser
5438954d8c Generate FL/fl_config.h rather than FL/abi-version.h
... as discussed in fltk.coredev in thread "RFC: introduce public
config header <FL/fl_config.h>", see:
https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ

- Rename abi-version.h to fl_config.h, rename input files,
  update dependencies, .gitignore, CMake, configure and Makefiles.

- Include Cairo options in FL/fl_config.h

- Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency.

- Include <FL/fl_config.h> in config.h and wherever necessary,
  fix include order (move FL/Fl.H to the top) and more.

- Move USE_X11 to fl_config.h and rename to FLTK_USE_X11

- Do not include <config.h> in Cairo demo program which is no
  longer required in Cairo programs since FLTK 1.4.0
2021-12-18 22:44:08 +01:00
ManoloFLTK
d01aab2ece Replace list of excluded platforms by name of chosen platform.
Since FL/platform.H defines USE_X11 for the X11 platform, it's better to target
the X11 platform by
  #include <FL/platform.H>
  #if USE_X11
rather than by
  #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__)
that would have to grow with future platforms.
2021-04-19 14:07:37 +02:00
Albrecht Schlosser
f09e17c3c5 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.
2020-07-06 20:28:20 +02:00
ManoloFLTK
ef48a0ddb9 Use cross-platform code to set the window icon. 2020-01-18 13:03:29 +01:00
Matthias Melcher
b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
The original intention of FL_PORTING was to mark all places in the
source code where changes are required to port FLTK to a new platform.
Thanks to the driver system, this approach has become somewhat
misleading, so I removed all references.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 17:04:18 +00:00
Albrecht Schlosser
52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
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
020a96b4a8 Fix more compiler warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-05 21:15:45 +00:00
Matthias Melcher
acf6c881d3 Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03 22:54:29 +00:00
Albrecht Schlosser
3e1da3012a Remove Fl::*sleep() method family, as discussed in fltk.coredev.
Hopefully this doesn't break Windows or Mac OX IDE builds, please help
testing.

Short story: these functions showed compatibility problems, lacked some
quality (regarding interruption by signals), and maybe more.

This is a combined commit that reverts three (3) svn commits. The following
lists are extracted from git, but show the svn revisions and files:

    Remove Fl::*sleep() family, part 1: revert svn r 10287.

:100644 100644 a988702... 794920f... M	ide/Xcode4/FLTK.xcodeproj/project.pbxproj

    Remove Fl::*sleep() family, part 2: revert svn r 10151.

:100644 100644 cf839e6... bfde9c4... M	ide/Xcode3/FLTK.xcodeproj/project.pbxproj
:100644 100644 794920f... c0c772a... M	ide/Xcode4/FLTK.xcodeproj/project.pbxproj

    Remove Fl::*sleep() family, part 2b: revert svn r 10151 (continued).

:100644 100644 bfde9c4... abf2922... M	ide/Xcode3/FLTK.xcodeproj/project.pbxproj

    Remove Fl::*sleep() family, part 3: revert svn r 10150.

:100644 100644 b469018... e76a3e5... M	FL/Fl.H
:100644 100644 7bb7899... 4d4755d... M	ide/VisualC2008/fltk.lib.vcproj
:100644 100644 9d9a2cf... 334aef8... M	ide/VisualC2008/fltkdll.vcproj
:100644 100644 5533a54... e30058b... M	ide/VisualC2010/fltk.lib.vcxproj
:100644 100644 e49f691... 1259c87... M	ide/VisualC2010/fltk.lib.vcxproj.filters
:100644 100644 946f31a... d53ab80... M	src/CMakeLists.txt
:100644 000000 fed36fd... 0000000... D	src/Fl_sleep.cxx
:100644 100644 3d9656c... 3b265f9... M	src/Makefile
:100644 100644 6eadbcb... 5dd5872... M	test/sudoku.cxx


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-30 16:05:22 +00:00
Fabien Costantini
54b0123eab Added a new portable sleep API(ABI compatible). Now features a flexible multi-usage sleep() api accepting decimals, msleep() for millisecs only, usleep() for microsecs. Updated Makefiles, cmakefiles, vs2008, vs2010 with the new Fl_sleep add-on. Documented new API. still needs to be added in Xcode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10150 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-21 04:10:12 +00:00
Manolo Gouy
6c92cc9a8d Fix STR#3063: compilation using Mac OS 10.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-04-27 13:57:09 +00:00
Greg Ercolano
4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Matthias Melcher
e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher
d0c53ccedf Removed remaining 'deprecated function' warnings for Xcode
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-10 22:56:56 +00:00
Albrecht Schlosser
db322329bc Fixed index for difficulty menu entry - thanks to Manolo Gouy for
finding this (STR #2221).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-12-21 16:28:58 +00:00
Greg Ercolano
b475babf17 Most test demos converted to use Fl_Double_Window
to prevent flicker when new users run test/demo programs.

For details, see fltk.development thread started 04/16/09,
"Subject: browser demo flicker".




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6772 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-21 09:09:37 +00:00
Matthias Melcher
a6e76c29fd Cahngad copyrights in 'test'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:35:13 +00:00
Matthias Melcher
a87355980e STR 1885: fixed silly bugs in Sudoku
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6053 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-02-26 20:37:01 +00:00
Michael R Sweet
73d01dd659 Fix all compiler warnings from various build systems.
Fix vsnprintf() implementation to properly handle long and long long ints.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20 00:01:06 +00:00
Michael R Sweet
3d54048d52 Add "mute sound" option to sudoku game, on request from a user.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5675 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-08 16:37:03 +00:00
Matthias Melcher
ecdd893933 - Added automated little helpers to Sudoku
(Menu Difficulty->add helpers)
- Added example code for Wizard with the
  Tabs demo (STR #1564)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5638 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-01-24 12:03:36 +00:00
Michael R Sweet
f27180b7cd Do some rearranging of image and desktop support files.
Add new Block Attack! game...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-25 06:58:33 +00:00
Michael R Sweet
f5cbdbb1b5 Add wording and tweak difficulty levels so that the Easy and
Normal levels always generate "valid" Sudoku puzzles while Hard
and Impossible are free to make Sudoku puzzles more
fun/challenging (STR #1361)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-24 18:09:44 +00:00
Matthias Melcher
b179cc108a Fixed Sudoku window positioning (STR #1398)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-23 11:34:36 +00:00
Michael R Sweet
7d8d1883d5 Don't increment read-only cells on a multiple-click.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4795 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-02-22 15:29:10 +00:00
Michael R Sweet
c78a31ce34 Fix compile error.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4744 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-13 22:46:30 +00:00
Michael R Sweet
21a8aed499 Fix bugs in Sudoku demo:
1. "Check Game" now flags subgrids with duplicate numbers.
    2. "Restart Game" now starts a new game if the current game
       has been solved.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4743 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-13 18:53:38 +00:00
Michael R Sweet
31d3e28bba Use 0 instead of NULL in waveOutOpen() call...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-14 02:59:59 +00:00
Michael R Sweet
b398e8422b Fix "restart game" - we aren't saving the seed, and even so we don't get
the same sequence on Linux anyways.

Also, multiple clicks in a cell sets/increments the value.

Finally, use alternate background color to produce checkerboard-like
pattern.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4695 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-12 04:23:05 +00:00
Michael R Sweet
0ce3c4c6f1 Add WIN32 audio support, and protect against accidental restarts
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4691 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-09 18:31:34 +00:00
Michael R Sweet
a6e6888a2d Add OSX audio support to Sudoku (THANK YOU IAN!)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4690 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-08 03:51:21 +00:00
Michael R Sweet
bed8043ef2 Add sound design notes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4688 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-06 18:59:21 +00:00