Commit Graph

183 Commits

Author SHA1 Message Date
Albrecht Schlosser
a5b9cc888b Add option to test Fl_Flex in test/pack.cxx
This new feature demonstrates that Fl_Flex can be used (almost) as
a drop-in replacement of Fl_Pack.

Add missing file to examples/.gitignore.
2022-08-08 11:07:40 +02:00
Albrecht Schlosser
e6c2503453 Add Fl_Flex demo "howto-flex-simple" to examples
This demo program uses an Fl_Flex widget with one row of buttons.
2022-08-07 18:01:59 +02:00
Albrecht Schlosser
c74a482756 Make Cairo example compatible with Cairo version < 1.12 (#436) 2022-04-26 15:36:29 +02:00
Albrecht Schlosser
345e04c083 CMake: Fix OpenGL3 examples libglew link order (#226) 2022-03-09 22:38:05 +01:00
Albrecht Schlosser
fbf7a347ec CMake/MinGW/MSYS2: fix building examples with libglew32 (#226)
CMake/resources.cmake: add NAMES option to find_library

examples/CMakeLists.txt: fix linking libGLEW/libglew32
2022-03-07 15:05:07 +01:00
ManoloFLTK
3718effc43 Add the Wayland platform to FLTK 1.4 2022-03-04 15:41:00 +01:00
Albrecht Schlosser
04ccc8cc46 Remove experimental platforms Android, Pico, SDL (PR #376)
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule"
https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-23 18:12:47 +01:00
Albrecht Schlosser
cd611e3957 Remove unnecessary CMake test statement (#358)
Sorry for the noise, this statement was included in my proposed patch.
2022-01-17 15:17:17 +01:00
Greg Ercolano
196430b016 Issue #358 cont'd: Fl_Cairo_Window coord system docs
Elaborated on Fl_Cairo_Window's use of FLTK style coordinates,
    and how this differs from cairo's default native normalized
    coordinate system, and shows how to switch from one to the other.

    Also, small comment fix to the cairo example regarding the "X" color.
2022-01-16 16:59:49 -08:00
Greg Ercolano
313212b497 Adding Albrecht's CMakeLists.txt patch
Albrecht submitted this in issue 358.
    Tested the variations:

    	cmake ..		                               -- examples and cairo off
	cmake -D FLTK_BUILD_EXAMPLES=on                        -- examples on, cairo off
	cmake -D FLTK_BUILD_EXAMPLES=on -D OPTION_CAIRO=on ..  -- examples on, cairo on

    When examples are 'on', they build into the bin/examples directory.
2022-01-16 15:42:23 -08:00
Greg Ercolano
6546814a23 For issue #358 - adds examples/cairo-draw-x.cxx
Since this is the first cairo example in the examples directory,
    it necessarily involved changes to the Makefile and to fltk-config
    to properly handle the absence/existance of the cairo libs.

    TBD: Add docs to the cario widget describing coordinate system
    and how it differs from the default cairo normalized coordinate system.
2022-01-16 15:22:16 -08:00
Albrecht Schlosser
0bc06e8f1a Reformat and move clipboard demo from examples to test folder
The clipboard demo is more a test program than an example and very
useful even if the examples are not built.

Also update dependencies.
2021-11-18 13:44:41 +01:00
Albrecht Schlosser
55f3df268c Fix remaining VS compiler warnings in example programs 2021-11-16 21:25:54 +01:00
Albrecht Schlosser
5e7eede311 Add missing files (executables) to .gitignore files 2021-11-08 19:44:40 +01:00
Greg Ercolano
9e0f140f0a Remove stray tab 2021-09-01 10:05:36 -07:00
Albrecht Schlosser
0f57e272a7 Fix MSVC 'fileno' warning in example program (#109) 2021-08-31 18:12:41 +02:00
fire-eggs
753631a0b5 Fix MSVC compiler warnings (PR #267) 2021-08-30 22:13:32 +02:00
Greg Ercolano
975d34de43 Fix VS2017 'pclose' error, and DIR formatting 2021-08-30 11:56:21 -07:00
Albrecht Schlosser
418699fcea Fix two compiler warnings [-Wunused-variable] 2021-08-30 14:28:35 +02:00
Albrecht Schlosser
6ac305a508 Remove compiler warnings '-Wextra-semi' (see also PR #266)
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows
(cross-compiled on Linux) and removed all "extra semicolon" warnings
I could find. I didn't check on macOS (yet).

Note: Linux configured with and w/o Pango but not w/o Xft. Compilation
with other options (e.g. Cairo) might still emit such warnings.
2021-08-27 14:52:43 +02:00
fire-eggs
571ff10553 Fix "failure to call pclose" (#240) 2021-06-26 14:46:39 +02:00
Albrecht Schlosser
8d26d5ed4b Hide window in quit callback in wizard-simple example 2021-03-21 02:10:19 +01:00
Albrecht Schlosser
90dbf0c77d Fix menu-with-images example w/o using exit()
Use window->hide() in quit callback instead.
2021-03-21 01:58:54 +01:00
Albrecht Schlosser
41266df7ae Remove unnecessary system includes from public headers
Add includes of system headers in the implementation files
where necessary.
2021-03-21 00:42:28 +01:00
Albrecht Schlosser
edd52ca1e8 Add fluid callback demo program to examples folder
This example demonstrates how to build an entire program using fluid
and how to add static and virtual class methods as callbacks.
2021-03-19 13:48:41 +01:00
Greg Ercolano
19ae897553 Added chart-simple example 2021-03-18 19:41:27 -07:00
Albrecht Schlosser
bbaec9bd88 Update CMake and make files, minor edits only
There are no functional changes to be expected, mostly formatting
and comments.
2021-02-15 19:45:20 +01:00
Albrecht Schlosser
206675a3b1 Fix examples build (configure/make)
Fix more issues caused by moving fltk-versions from examples to test
and adding examples to the CMake build process (gitlab-ci)
2020-08-21 20:00:00 +02:00
Albrecht Schlosser
3b9a04ae2e CMake: add examples folder to build (optional)
- replace misnamed option 'OPTION_BUILD_EXAMPLES' with 'FLTK_BUILD_TEST'
- add option 'FLTK_BUILD_EXAMPLES' to build apps in examples folder
- move examples/fltk-versions.cxx to test/fltk-versions.cxx
- [Travis-CI] enable option 'FLTK_BUILD_EXAMPLES' for automatic builds
2020-08-21 18:55:12 +02:00
Albrecht Schlosser
adc3a29cdc Fix link and comments in example program
The mentioned link to fltk.general was incorrect; fixed and added
thread title for further reference.

Fixed typo and adjusted comments.
2020-08-20 12:42:53 +02:00
Albrecht Schlosser
5380706be7 Fix compiler warning in example [-Wliteral-suffix]
[gcc] warning: invalid suffix on literal; C++11 requires a space
  between literal and string macro [-Wliteral-suffix]
2020-08-15 13:30:11 +02:00
Albrecht Schlosser
7b34385511 Fix simple SVG example (howto-simple-svg) 2020-08-13 20:25:03 +02:00
Greg Ercolano
e9688822ec Convert example from strdup -> std::string 2020-08-01 14:19:40 -07:00
Greg Ercolano
b409588012 Remove unneeded strdup from example, fold tabs 2020-08-01 14:19:40 -07:00
Greg Ercolano
2141c63628 Implement + deploy fl_strdup() 2020-08-01 14:19:40 -07:00
Greg Ercolano
44375763aa A few extra comments for table-spreadsheet.
Also small but unnecessary code change to reset row_edit/col
to zero after editing for example clarity.

Unnecessary b/c those vars are ignored anyway when input
visibility turned off, so change is more cosmetic codewise.
2020-07-13 09:47:26 -07: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
8d4b0c15f7 Move class Fl_SVG_File_Surface from libfltk to libfltk_images.
File examples/SVG_File_Surface.cxx is no longer useful because it was a very
partial implementation of what is now class Fl_SVG_File_Surface.
2020-06-29 11:36:09 +02:00
Albrecht Schlosser
811033af19 Reorganize .gitignore file(s)
Move ignored files in /examples/ and /test/ to their own folders,
i.e. to examples/.gitignore and test/.gitignore, resp.
2020-04-20 14:25:08 +02:00
ManoloFLTK
ea09ea1009 Use visible size information when copying macOS image from clipboard. 2020-01-18 17:09:10 +01:00
Greg Ercolano
7e656413ff Added simple "draw an 'X'" example. 2019-08-22 12:15:41 -07:00
Greg Ercolano
5255640e7a Added table-with-right-column-stretch-fit.cxx example 2019-08-20 06:34:09 -07:00
Greg Ercolano
8070d645a9 Merge branch 'master' of github.com:fltk/fltk 2019-08-14 12:13:28 -07:00
Greg Ercolano
e3042481ee Added new example code: howto-remap-numpad-keyboard-keys.cxx 2019-08-14 12:11:38 -07:00
Albrecht Schlosser
84c5523f99 Restore "silent" compilation of examples
'.SILENT:' statement had been commented out in previous commit.
2019-07-28 18:22:57 +02:00
Greg Ercolano
6046da2992 Added new browser-simple.cxx example 2019-07-26 13:07:36 -07:00
Greg Ercolano
8d0647732f Fix time drawing color (was not being set)
The items showing the current time looked ugly on linux
when selected, since they were drawing in the leftover
blue color used for drawing the R-G-B box pattern.
2019-04-16 10:56:33 -07:00
ManoloFLTK
9b7f020ed3 Update procedure for OpenGL3 support. 2019-04-04 18:42:45 +02:00
Albrecht Schlosser
810b914717 Update examples: minor changes, rename, update .gitignore
.gitignore, Makefile: add missing files, sort example filenames.
Makefile.FLTK: update and extend FLTKCONFIG definition examples.

Rename README.examples to README.txt (easier for Windows users).

README.txt: minor edits, fix link, remove trailing whitespace.
2018-12-10 15:00:45 +01:00
ManoloFLTK
45278560f2 Simpler implementation of class SVG_Graphics_Driver is enough. 2018-12-04 12:31:55 +01:00