summaryrefslogtreecommitdiff
path: root/fluid/CMakeLists.txt
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
2025-06-27FLUID: Move i18n settings into its own classMatthias Melcher
2025-04-21Fix "fully support ... own shared libraries" (#1238)Albrecht Schlosser
- If shared libraries are built, then fluid, fltk-options, and the "games" are linked against the shared FLTK libraries. On some platforms the static and the shared versions of fluid and fltk-options are built. The games are only built if FLTK_BUILD_TEST is enabled. - The CMake 'install' target now installs the games (if built) and their man pages on all platforms (no matter if that is useful, for instance on Windows). - On macOS 'CMAKE_INSTALL_RPATH' is set so *installed* programs automatically find their shared FLTK libraries. The "shared" versions of fluid and fltk-options got their own '.plist' files. This works for both the executables themselves as well as those included in bundles. There may be more to do on the macOS platform.
2025-04-15Fluid: hiding MergeBack form the main menu.Matthias Melcher
Hiding menuitem if option is not available. Also testing the new FL_BEFORE_MENU event.
2025-04-04CMake: simplify fluid buildAlbrecht Schlosser
- define variable MAIN_FILES to avoid repetition - make target_include_directories(fluid-lib) PUBLIC rather than PRIVATE
2025-03-30Fixes a couple of compiler warnings on AppleClang.Matthias Melcher
2025-03-16Fluid: restructuring and rejuvenation of the source code.Matthias Melcher
* Add classes for application and project * Removed all globals from Fluid.h * Extracting args and project history into their own classes * Moving globals into Application class * Initialize values inside headers for some classes. * Undo functionality wrapped in a class inside Project. * File reader and writer are now linked to a project. * Avoid global project access * Nodes (former Types) will be managed by a new Tree class. * Removed static members (hidden globals) form Node/Fl_Type. * Adding Tree iterator. * Use nullptr instead of 0, NULL, or 0L * Renamed Fl_..._Type to ..._Node, FL_OVERRIDE -> override * Renaming ..._type to ...::prototype * Splitting Widget Panel into multiple files. * Moved callback code into widget panel file. * Cleaning up Fluid_Image -> Image_asset * Moving Fd_Snap_Action into new namespace fld::app::Snap_Action etc. * Moved mergeback into proj folder. * `enum ID` is now `enum class Type`.
2025-03-08Fluid: last incremental chage, restructuringMatthias Melcher
2025-03-07Cleaning up widget browser, renamed to Node_Browser.Matthias Melcher
2025-03-07Fluid: Rebuilding most of the widget directory.Matthias Melcher
One file per logical unit. Namespaces. Non-static data member initializers to never get an uninitialized field again.
2025-03-07Fixes for icon path and Windows includes.Matthias Melcher
2025-03-07Restructuring Fluid source files.Matthias Melcher
2024-04-17Separate FLUID user documentation, screen shot automation (#936)Matthias Melcher
* CMake integration, no autotiools * alignment panel is now correctly renamed to setting panel * source view is now correctly renamed to code view * Merge FLTK FLUID docs into FLUID user manual. * Add two simple entry tutorials * Remove FLUID chapter form FLTK docs. * GitHub action to generate HTML and PDF docs and make the available as artefacts
2024-03-02FLUID: comments, typos, formattingMatthias Melcher
2024-02-20Remove unused FLUID documentation refs in CMake configMatthias Melcher
2024-02-14CMake: fix installation on macOSAlbrecht Schlosser
fluid and fltk-options are now installed correctly as bundles and as stand-alone executables side by side in the 'bin' folder relative to CMAKE_INSTALL_PREFIX. This works but the installation folders may be changed in the future. Targets fltk::fluid is now exported correctly so find_package(FLTK CONFIG ...) works with both the build folder and an installed version.
2024-02-12CMake: set FLTK_VERSION and FLTK_FLUID_EXECUTABLE in the cacheAlbrecht Schlosser
This is useful if FLTK is built as a subproject, for instance by using FetchContent.
2024-02-07Introduce "Modern CMake" in FLTKAlbrecht Schlosser
This is a big commit and there are too many changes to list them all. The main changes are: - rename all CMake build options to 'FLTK_*' - export library targets with namespace (prefix) 'fltk::' - standardize shared library target names with suffix '-shared' - set public build properties on libraries for consumers - document library names and aliases in README.CMake.txt - document changes in "Migrating Code from FLTK 1.3 to 1.4" - partial backwards compatibility for old user projects Included but not directly related changes: - fix Windows (Visual Studio) DLL build - add CMake function fl_debug_target() to show target properties - don't build test programs if FLTK is a subproject - internal: reformat CMake code: remove space before '(' Thanks to Matthias and Manolo for their help, testing, and feeback.
2023-11-15CMake: Raise cmake_minimum_required from 3.12 to 3.15Albrecht Schlosser
Remove code that checks CMake versions lower than 3.15
2023-11-07FLUID: More user documentationMatthias Melcher
2023-11-05FLUID: Separates developer and user documentationMatthias Melcher
2023-11-02FLUID: Restructures user documentation.Matthias Melcher
2023-11-01FLUID: Adds options to draw ghosted outlines.Matthias Melcher
2023-10-26FLUID: Refactors MergeBackMatthias Melcher
* moved functionality into its own files * refactored all methods to be less than a page * documented all calls * tested all situations I could think of
2023-10-22Make Fl_String and Fl_Int_Vector private (#789)Albrecht Schlosser
- add CMake option 'OPTION_USE_STD' - add configure option '--enable-use_std' - move FL/Fl_String.H to src/Fl_String.H - move FL/Fl_Int_Vector.H to src/Fl_Int_Vector.H - remove Fl_String from demo program examples/callbacks.cxx - remove Fl_Int_Vector from public header FL/Fl_Table.H - some methods of Fl_Table are no longer inline - add CMake option OPTION_USE_STD to allow std::string in some selected functions and methods Experimental, may be removed before release: - use either Fl_Int_Vector or std::vector in Fl_Table depending on CMake OPTION_USE_STD or configure --enable-use_std Move all fl_filename* functions that use Fl_String to fluid Main changes in fluid: - add fluid_filename.h and .cxx - include "fluid_filename.h" rather than <FL/filename.H> Update fl_input(), fl_password() and test/ask - add maxchar parameter to fl_input() and fl_password() - fl_input_str() and fl_password_str() are optional and return std::string if enabled (FLTK_USE_STD)
2023-10-20FLUID: basic Fl_Grid supportMatthias Melcher
* no settings for children yet * ne good interactive editing for children
2023-09-12Fix Visual Studio shared library buildAlbrecht Schlosser
Todo: fluid-shared can't (yet) be built agains the shared fltk lib because of some linker errors. Needs investigation. Note: fluid-shared is basically a test program to demonstrate linking against the shared FLTK libs but doesn't work yet using VS (MSVC). This is no problem for the functionality.
2023-08-29FLUID: separate SourceView panel into its own fileMatthias Melcher
hereby removing almost 200 lines of unrelated code form fluid.cxx and making the location of the panel code more obvious. Needs a make depend on Linux.
2023-07-19FLUID: emulated RTTI for all typesMatthias Melcher
Complete type hierarchy in Fl_Types doc Window now derives correctly from Group Menu Items now correctly (functionally in FLUID) derived form Button Menu Buttons have a better hierarchy Fixing two possible crash bugs where Input_Choice was assumed to be a Menu_ Hoping I have not degraded the original code!
2023-07-10FLUID source files sorting improvedMatthias Melcher
2023-05-07[CMake] Use an object library to speed up fluid buildAlbrecht Schlosser
Currently 'fluid' comes as up to three different targets, compiled from the same source files (fluid, fluid-cmd, and fluid-shared). The object library is built from all source files except fluid.cxx and finally all 'fluid*' programs are linked with this library. This avoids compiling the same source files multiple times.
2023-03-18Fix and update alignment #346 (#701)Matthias Melcher
* interactive layout alignment rewritten * interface for new alignment rules * new alignment dialog box * user defined layout rules added * layout rules can be stored in projects, settings, and external files * Valgrind verification
2023-03-09CMake: build shared libs with OPTION_CAIROEXT (issue #250)Albrecht Schlosser
- remove separate libfltk_cairo to avoid cyclic dependencies, but - keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility - move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx - add preliminary Cairo support for Visual Studio (MSVC) Static linking is not affected by this change, but users building with hand-made Makefiles will have to remove libfltk_cairo starting with FLTK 1.4.0. The dummy library can be linked for backwards compatibility but it will be removed later (in 1.4.x or 1.5.0). The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo if and only if FLTK is built with one of the Cairo options. This has always been the case for OPTION_CAIROEXT but is now also true if only OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo enabled shared FLTK library will also be linked with libcairo. The same is true for configure options --enable-cairo and --enable-cairoext, respectively. Preliminary Cairo support for MSVC now detects a Cairo installation using the CMake variable FLTK_CAIRO_DIR which must be set by the user. Note that this feature is temporary and may be changed in the future for a better and more comfortable version.
2023-02-15Move class Fl_Shortcut_Button from FLUID to core (#677) (#680)Matthias Melcher
2023-02-02Fix position() methods that shadow Fl_Widget::position()Matthias Melcher
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2022-09-23Fixes incorrect install of fluid in macOS Applications directory.Gonzalo Garramuño
This requires sudo permissions to do it, and breaks ExtenalProject_Add.
2022-04-03Build and use fluid-cmd on Windows for .fl files (#224, #293)Albrecht Schlosser
On Windows fluid.exe is a "GUI" program and does not allow console output which can be a problem in automated builds. In Visual Studio the fluid GUI program would pop up console windows when generating .cxx and .h files from .fl files. The new (additional) fluid-cmd.exe is built as console application for users that need it and it is used in the FLTK build process on Windows to convert the .fl files.
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-01Installing Fluid correctly on macOSMatthias Melcher
2021-12-18Generate FL/fl_config.h rather than FL/abi-version.hAlbrecht Schlosser
... 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-13#322: remove Fluid's dependency on fltk_forms.Matthias Melcher
2021-12-13STR 3442: copy/paste now inserts widget as expected.Matthias Melcher
Fluid would add pasted widgets as the last child of the current group, even if they were cut at the beginning of the group. This patch adds a 'startegy' to adding widgets to allow merging closer to the 'current' widget. Also added d'n'd for the widget bin and some other UI improvements. STR 3442: some preparation, variable renaming STR 3442: unifying functions to add widgets. Adding widgets interactively is merged into one function, making undo/redo work as expected and removing unexpected differences between adding by menu or bin. STR 3442: adding drag'n'drop for windows from bin. Just drag the window symbol out of the tree and drop it anywhere on the desktop. Visual representation of dragged Window. STR 3442: insert individual nodes after 'current' STR 3442: adding new widget at expected positions. The widget bin can finally do drag'n'drop. Widgets appear in the tree close to the last selection. Duplicating now ads right below. Cut and paste inserts after last selection. Fluid: replaced #define with strict enum type.
2021-12-08Fluid: restructuring and commenting.Matthias Melcher
tl;dr : making Fluid maintainable, no changes in code execution and logic. This is a pretty extensive restructuring of the Fluid source tree. It was neccessary because source and header files were getting much too big to handle. Many source files had no header, and many headers declared functions that were in diffrent source files. Reorganized much of the include statements. Added comments to some of the files. Added Doxygen configuration file for standalone Fluid docs. Tested everything by rebuilding Fluid .fl designs with the resorted version of Fluid.
2021-12-04Fluid support for high res graphicsMatthias Melcher
Changing all pixmaps to Hi DPI Fixed wrong tooltip Fixed misleading "invisible" indicator
2021-12-03CMake for Apple Xcode usability improvementsMatthias Melcher
2021-11-11CMake: Build fluid when cross-compilingAlbrecht Schlosser
2021-07-26Add CMake compatibility functions and macrosAlbrecht Schlosser
CMake/compatibility.cmake: define functions and macros to be used if a particular CMake functionality requires a higher CMake version than FLTK's minimum CMake version, see 'cmake_minimum_required(...)' in the root CMakeLists.txt. Note: target_link_directories() is available since CMake 3.13
2021-05-31Windows platform: use GDI+ to antialias oblique lines and curves.ManoloFLTK
2021-05-13Refactor macOS bundle generation to avoid "quarantine"Albrecht Schlosser
macOS Big Sur 11.3 introduced a new "security feature" such that app bundles created from existing bundle templates in downloaded files (tar distibutions, expanded) could no longer be executed without unsetting the "quarantine" attribute. This commit fixes this by creating all bundles from scratch. Known *workaround* for older tarballs and snapshots: $ xattr -d -r com.apple.quarantine xxx.app
2021-04-30CMake: improve detection and configuration of image libsAlbrecht Schlosser
Also: fix old (pre 3.13) link_directories() usage