summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2023-10-16Add Fl_Grid widget and test and demo programsAlbrecht Schlosser
- FL/Fl_Grid.H: header file - src/Fl_Grid.cxx: implementation - examples/grid-simple.cxx: simple example program - test/cube.cxx: use Fl_Grid for layout - test/grid_alignment.cxx: test cell alignment and other functions - test/grid_buttons.cxx: demo program as discussed in fltk.general - test/grid_login.cxx: like test/flex_login.cxx but with Fl_Grid - test/flex_login.cxx: modified to match test/grid_login.cxx
2023-10-16Update .gitignore filesAlbrecht Schlosser
Add missing executables
2023-08-15Improved, yet compatible, widget callback system using macros (#729)Matthias Melcher
* adds FL/fl_callback.macros.H * adds FL_FUNCTION_CALLBACK_n(widget, function, [type, data]) * adds FL_METHOD_CALLBACK_n(widget, class, instance, method, [type, data]) * adds FL_INLINE_CALLBACK_n(widget, [type, name, data], callback_body) * adds `examples/callback` * full documentation
2023-07-19FLUID: RTTI improvements, 'is_a90' now const, apply RTTIMatthias Melcher
2023-03-09Fix Visual Studio (MSVC) compiler warningsAlbrecht Schlosser
2023-02-23Move animated gif images to the test/images folderAlbrecht Schlosser
... to make them accessible to the help_dialog test if built with CMake.
2023-02-07Fix clang compiler warningAlbrecht Schlosser
Warning was: "implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648" Not a big deal in this context, but anyway.
2023-02-05Fix examples/.gitignore (add missing files)Albrecht Schlosser
2023-02-04Fix deprecated warnings in examples/table* demo programsAlbrecht Schlosser
Also: adjust comments, update copyright year
2023-02-02Update dependencies and fix whitespace errorsAlbrecht Schlosser
- replace tabs with spaces - remove trailing whitespace
2023-01-21Animated GIF support (Fl_Anim_GIF_Image class) (#375)wcout
2023-01-16Improve examples/chart-simple demo programAlbrecht Schlosser
Make sure that the first chart entry is not zero because this wouldn't show the first part of FL_SPECIALPIE_CHART separated from the circle.
2023-01-12Add Fl_Scheme_Choice to examples/tree-custom-draw-itemsAlbrecht Schlosser
- add Fl_Scheme_Choice widget for quick scheme selection - fix label alignment of selection box - set selection_color() - set selectbox() - make the tree the resizable() of the window
2022-12-30Use `FL_OVERRIDE` for all overridden virtual methods (#611)Matthias Melcher
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-15Rename some Fl_Flex methods for FLTK compliance (#594)Albrecht Schlosser
Change some method names to comply with FLTK style as discussed in fltk.coredev, thread "Fl_Flex method name question". * Rename Fl_Flex::margins(...) to Fl_Flex::margin(...) (use singular form for all margin related methods) * Remove Fl_Flex::setSize() and isSetSize() "backwards compatibility" methods * Rename Fl_Flex::set_size(...) to fixed(...) Note: the latter affects existing (pre-release) fluid (.fl) files: you may want to edit and replace "set_size_tuples" with "fixed_size_tuples"
2022-11-19CMake: fix building examples w/o test programsAlbrecht Schlosser
As reported in fltk.coredev in thread "CMAKE build with build examples. On and test OFF fails" $ cmake .. -D FLTK_BUILD_EXAMPLES=ON -D FLTK_BUILD_TEST=OFF failed with: Unknown CMake command "FLTK_RUN_FLUID".
2022-11-01Fix trailing whitespaceAlbrecht Schlosser
2022-10-06Fix use of several FLTK widgets above an GL scene.ManoloFLTK
The code failed with 2 or more widgets when FLTK would trigger partial redraws of the widgets, unless the Fl_Gl_Window was FL_DAMAGE_ALL. This commit also adds a second FLTK widget to example/OpenGL3test to check this multiple widget situation, and fixes an error where operator ! was used instead of ~ .
2022-09-29Support of FLTK widgets in OpenGL 3 windows - cont'd.ManoloFLTK
This commit allows to switch between FL_DOUBLE / FL_SINGLE modes in widget-containing GL3 windows. Demo program examples/OpenGL3test is modified to show FLTK widgets even if the platform does not support OpenGL 3.
2022-09-28macOS: support of FLTK widgets in OpenGL 3 windows - cont'd.ManoloFLTK
This code is OK under macOS 10 9 and 13.
2022-09-27Simpler code to support FLTK widgets in macOS OpenGL 3 windows.ManoloFLTK
Also, the application-level code to add widgets to a GL3 window becomes platform-independent.
2022-09-26Replace all calls to sprintf() by calls to snprintf().ManoloFLTK
2022-09-25Add cross-platform support for adding widgets to an OpenGL3-based Fl_Gl_Window.ManoloFLTK
Under non-macOS platforms, the key is to call glUseProgram(0); after having used OpenGL 3 which allows to then use OpenGL 1 and draw FLTK widgets over the OpenGL3 scene. Under macOS, this is impossible because macOS GL3 contexts are not compatible with GL1. The solution implemented here is to create an additional Fl_Gl_Window placed above and sized as the GL3-based window, to give it a non opaque, GL1-based context, and to put the FLTK widgets in that additional window.
2022-09-23Use adequate #include for fl_wl_display().ManoloFLTK
2022-09-22Wayland: fix error detection during call to glewInit().ManoloFLTK
2022-08-08Add option to test Fl_Flex in test/pack.cxxAlbrecht Schlosser
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-07Add Fl_Flex demo "howto-flex-simple" to examplesAlbrecht Schlosser
This demo program uses an Fl_Flex widget with one row of buttons.
2022-04-26Make Cairo example compatible with Cairo version < 1.12 (#436)Albrecht Schlosser
2022-03-09CMake: Fix OpenGL3 examples libglew link order (#226)Albrecht Schlosser
2022-03-07CMake/MinGW/MSYS2: fix building examples with libglew32 (#226)Albrecht Schlosser
CMake/resources.cmake: add NAMES option to find_library examples/CMakeLists.txt: fix linking libGLEW/libglew32
2022-03-04Add the Wayland platform to FLTK 1.4ManoloFLTK
2022-01-23Remove experimental platforms Android, Pico, SDL (PR #376)Albrecht Schlosser
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule" https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-17Remove unnecessary CMake test statement (#358)Albrecht Schlosser
Sorry for the noise, this statement was included in my proposed patch.
2022-01-16Issue #358 cont'd: Fl_Cairo_Window coord system docsGreg Ercolano
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-16Adding Albrecht's CMakeLists.txt patchGreg Ercolano
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-16For issue #358 - adds examples/cairo-draw-x.cxxGreg Ercolano
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.
2021-11-18Reformat and move clipboard demo from examples to test folderAlbrecht Schlosser
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-16Fix remaining VS compiler warnings in example programsAlbrecht Schlosser
2021-11-08Add missing files (executables) to .gitignore filesAlbrecht Schlosser
2021-09-01Remove stray tabGreg Ercolano
2021-08-31Fix MSVC 'fileno' warning in example program (#109)Albrecht Schlosser
2021-08-30Fix MSVC compiler warnings (PR #267)fire-eggs
2021-08-30Fix VS2017 'pclose' error, and DIR formattingGreg Ercolano
2021-08-30Fix two compiler warnings [-Wunused-variable]Albrecht Schlosser
2021-08-27Remove compiler warnings '-Wextra-semi' (see also PR #266)Albrecht Schlosser
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-06-26Fix "failure to call pclose" (#240)fire-eggs
2021-03-21Hide window in quit callback in wizard-simple exampleAlbrecht Schlosser
2021-03-21Fix menu-with-images example w/o using exit()Albrecht Schlosser
Use window->hide() in quit callback instead.
2021-03-21Remove unnecessary system includes from public headersAlbrecht Schlosser
Add includes of system headers in the implementation files where necessary.
2021-03-19Add fluid callback demo program to examples folderAlbrecht Schlosser
This example demonstrates how to build an entire program using fluid and how to add static and virtual class methods as callbacks.