Commit Graph

223 Commits

Author SHA1 Message Date
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
Manolo Gouy d600ccc034 Remove unnecessary platform-specific #if / #endif clauses.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13139 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-29 09:20:08 +00:00
Manolo Gouy b0e0e0912c MacOS ≥ 10.10: Fl_Window::fullscreen() and fullscreen_off() no longer call Fl_Window::hide() + Fl_Window::show()
The new procedure essentially resizes the window, as done on the X11+EWMH and Windows platforms.
This improves in particular the possibility to turn an Fl_Gl_Window fullscreen on and off.
MacOS ≥ 10.10 is required because the procedure isn't stable (random crashes during fast switches) with 10.9.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13045 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-12 12:46:09 +00:00
Manolo Gouy 9a105ea686 Less code is enough to start the OpenGL 3 window fullscreen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-03 17:16:07 +00:00
Greg Ercolano d1df5376f1 Added example of dynamically setting style buffer with text editor.
This example greatly simplifies the test/editor example to focus on
just the mechanics of dynamic style buffer manipulation via the
add_modify_callback().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-29 19:54:10 +00:00
Manolo Gouy ec88e4a7c0 Show also how to create the OpenGL3 GLUT window fullscreen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-21 09:26:01 +00:00
Albrecht Schlosser 76d5ed4f4b Update Makefile + ignored files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12986 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 20:44:21 +00:00
Manolo Gouy e0cfcc5dda Add proper FLTK header and footer to this new source file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12984 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 14:43:17 +00:00
Manolo Gouy 51389ca460 Add examples/SVG_File_Surface.cxx and refer to it in the doc of class Fl_Surface_Device
This example code shows how to subclass Fl_Surface_Device and Fl_Graphics_Driver to
endow FLTK with a new kind of graphics output.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 09:27:04 +00:00
Manolo Gouy 09f15fcac0 Slightly simplify examples/clipboard.cxx using Fl_Image::scale().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12880 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-29 16:29:13 +00:00
Greg Ercolano 3a20682764 Fixed title bar
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-21 14:57:15 +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
Greg Ercolano a7a4098644 Remove the requirement for opengl in fltk-config.
opengl apps were left out of the targets list on purpose
so that only non-opengl apps would build.

TODO: Determine a way to detect the presence of fltk opengl libs
      from within the Makefile using only fltk-config, so as to 
      conditionally build the opengl examples.

      Do NOT use fltk's own build system (../makeinclude or cmake)
      to determine this, so the Makefiles will work as user examples.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-29 18:47:28 +00:00
Manolo Gouy 839f52bc18 Fix for STR#3421: Fl_SVG_Image crashes if passed an svg file that is a static const char* string
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-31 16:56:23 +00:00
Greg Ercolano b1cff66e86 Added check if nanosvg is enabled or not.
The example posts a warning dialog if it's not (vis a vis test/cube demo)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12535 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-30 03:57:33 +00:00
Greg Ercolano 78c699caa0 Makefile for new example.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12534 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-30 03:43:42 +00:00
Greg Ercolano a9d17eca1a Added a new example to demonstrate using Fl_SVG_Image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12533 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-30 03:43:25 +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 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 e2a28fa071 Add divider above Quit menu item. (needed for demo screenshot)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:10:25 +00:00
Albrecht Schlosser 3d90148065 Remove leading underscore from labeltype(s) in new demo.
Since svn r12443 we can use all labeltypes (including FL_IMAGE_LABEL and
FL_MULTI_LABEL) w/o leading underscore. We can also use both documented
variants to assign an FL_MULTI_LABEL to an Fl_Menu_Item.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12444 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 19:06:32 +00:00
Greg Ercolano 2670903db9 Simplified the example's menu item callback.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:36:35 +00:00
Greg Ercolano 2a41af1fc3 Applied Manolo's recommendation (fltk.coredev), removing unnecessary item->image(*pixmap) call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:12:58 +00:00
Greg Ercolano 88204a5524 Added example code to demonstrate Fl_Multi_Label for STR#3400.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 00:50:06 +00:00
Albrecht Schlosser ae983b74f2 Enhance howto-drag-and-drop example program.
Refer to discussion if fltk.general, thread "Drag and drop issue"
in August September 2017.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-08 15:02:04 +00:00
Albrecht Schlosser 7fc5bfc1ca Add tooltips to new draggable-group example program.
... as suggested by Greg.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-12 14:53:39 +00:00
Albrecht Schlosser f643714879 Add draggable-group example program.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12372 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-05 16:44:49 +00:00
Albrecht Schlosser e7af621409 Fix whitespace and comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12369 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-05 09:43:12 +00:00
Greg Ercolano 38f134c1ed Some compilers probably need string.h for strcmp()..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12322 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-17 01:20:00 +00:00
Greg Ercolano 0173358351 Added new example program 'nativefilechooser-simple.cxx'
(Simpler than the application example)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-17 01:13:28 +00:00
Albrecht Schlosser b7851fac8e Add missing #include in fltk-versions example program.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-12 21:49:19 +00:00
Manolo Gouy 7847c2d87a WIN32 HiDPI support: fix copy and paste of image data when rescaling is applied.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12297 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 14:31:40 +00:00
Albrecht Schlosser 21da3f3755 Flush output of examples/fltk-versions for Windows (MinGW).
MinGW wouldn't flush the output before closing the window.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12202 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 15:02:08 +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
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 7659192447 Fix one compiler warning and one error on Windows 64-bit.
These warnings and errors were found using gcc 6.1 (64-bit) under Windows.

The error in examples/howto-add_fd-and-popen.cxx (-fpermissive) is due
to the wrong definition of Fl_FD_Handler under Windows 64-bit (FL_SOCKET!).

This should really be fixed in a better way in FLTK 1.4.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11871 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-11 12:41:17 +00:00
Manolo Gouy 22596d3f5f Make Fl_Gl_Window::pixels_per_unit() return a float (rather than int) value.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-22 07:45:53 +00:00
Manolo Gouy dcb26fc188 Remove unneeded extern declaration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-05 07:42:48 +00:00
Manolo Gouy e6b4af2c47 Fix how to access clipboard content at program start.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-04 05:59:18 +00:00
Manolo Gouy d47b431750 Fix potential memory leak under X11 when pasted image is not accepted by the receiving app.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11709 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-03 14:28:45 +00:00
Albrecht Schlosser 524ebcef0b Fix example programs after removal of some system #include's.
This adds missing headers that were previously included in other
FLTK header files.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-31 21:48:15 +00:00
Albrecht Schlosser 29a9e89b39 Remove FLTK_ABI_VERSION from all but *tree*.* and documentation.
Everything related to Fl_Tree and its test and demo programs has been
cleaned.

Documentation needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-26 02:55:14 +00:00
Manolo Gouy 2d5dbc3925 Add necessary #include directive
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11334 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-10 13:22:29 +00:00
Manolo Gouy 5866281d4f Set depth of image returned by Fl_Image_Surface::image() back to 3 on Mac OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11119 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 08:38:55 +00:00
Manolo Gouy 6f799cb648 Fix shapedwindow test program.
same commit as in 1.3 branch

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-01 14:24:24 +00:00
Manolo Gouy 3e8556195b Added required header and footer for new source files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10955 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-10 16:20:37 +00:00
Manolo Gouy 4bc4736eb7 Replaced call to Fl_Window::resize() by call to Fl_Widget::position() that is enough.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10952 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-08 09:39:42 +00:00
Manolo Gouy 22af09dae7 Mac OS: support for high resolution OpenGL windows.
Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941
are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added.

The documentation explains in more detail how to write cross-platform
FLTK code supporting high resolution OpenGL windows on retina displays.

The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02 09:59:37 +00:00
Manolo Gouy 597ac17bda Mac OS: added Fl::event_x_pixel() and Fl::event_y_pixel() that return the mouse event position
in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display.
On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y().
The example/OpenGL3test demo program is modified to call these new functions.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01 16:17:37 +00:00
Manolo Gouy 848744bcf0 Removed compilation warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10877 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-28 05:43:38 +00:00
Manolo Gouy 7e025aac22 Added support for OpenGL V3 and higher.
On the X11/MSWindows platforms, this requires external installation of the GLEW library.
This fixes STR#3198 and STR#3257.
Added two new examples programs.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-27 08:40:56 +00:00
Greg Ercolano 5534ce4c57 Small mod to enable highlighting in total cells.
This way someone hitting 'End' can see where the "cursor" is.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-19 21:38:17 +00:00
Albrecht Schlosser e5d7f8367e Add "deprecated" warning to examples/fltk-versions.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12 17:45:13 +00:00
Albrecht Schlosser 333b5268c3 Add FLTK version test program examples/fltk-versions.cxx.
This program can be used to verify that the FLTK runtime system
(ABI version) is binary compatible with the compiled and linked program.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-21 12:44:46 +00:00
Albrecht Schlosser d24a6b2633 Move RGB image scaling algorithm methods in base class Fl_Image.
See also discussion in fltk.coredev of Sept 07, 2014 and later
with subject "Fixing the nearest-neighbour scaling".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-14 11:53:51 +00:00
Manolo Gouy f1b2c92fce STR#3093 continued: deleted the Fl_Shaped_Window class. Instead, added new member function Fl_Window::shape(Fl_Image*)
that gives a non-rectangular shape to a standard window. The benefit is that it works with Fl_Double_Window and Fl_Menu_Window as well.
It also works for free with Fl_Gl_Window on the X11 platform only.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-21 14:10:36 +00:00
Greg Ercolano 36b1ad056a Removed leftover item variable (now unused)
as noted by Albrecht on fltk.coredev today;
was giving warnings with Windows/MinGW builds.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10319 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-17 16:27:01 +00:00
Albrecht Schlosser 49e21120b6 Improve clipboard example program, fix compilation warnings.
Use show(argc,argv) to enable command line arguments and colors,
fix indentation, Windows compilation warnings, and change tab
selection color, which was too dark on my Win7 system (low
contrast with tab labels).

I also added #define TAB_COLOR to make changing the tab selection
colors easier, if needed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-17 11:51:56 +00:00
Manolo Gouy 535fc72035 Fixed header/footer lines
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-02 09:12:32 +00:00
Ian MacArthur 9c583c5bbc Add Manolo's new shapedwindow demo to the Makefile
for the examples folder.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-08-28 09:13:27 +00:00