Commit Graph

870 Commits

Author SHA1 Message Date
Matthias Melcher 08c69a548c STR 3442: changed .cxx file, but not .fl 2021-12-13 18:17:07 +01:00
Matthias Melcher 160832ce04 STR 3442: copy/paste now inserts widget as expected.
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-13 18:17:07 +01:00
James Palmer a802aaeb17 Fluid: "Widget Class" subclasses Group but incorrectly shows Window subtypes. 2021-12-13 12:06:07 +01:00
Albrecht Schlosser 20f7db27ba Fluid: use fl_strdup() to fix MSVC compiler warning 2021-12-11 14:49:42 +01:00
Matthias Melcher 8e864bae21 Fluid PR 313: update subtype menu to show "Normal" when deactivated.
Based on jdpalmer's pull request:
If the subtype menu is disabled because there are no subtypes, the deactivated menu will still display the subtype of the last widget that had a subtype value. Clearing the menu when there are no subtypes fixes this minor inconsistency.
2021-12-11 13:19:15 +01:00
Matthias Melcher 1c962bf5e2 STR 3210: indentation is now controlled in one single position for all source and header files. 2021-12-11 03:40:07 +01:00
Albrecht Schlosser 235f9ed709 Fluid: clean up Doxyfile, fix two minor doxygen issues
Note: I "downgraded" this Doxyfile from 1.9.2 to 1.9.1 and edited all
offending tags in the file for compatibility with 1.9.1 and 1.9.2.

Older versions may issue warnings.
2021-12-10 17:52:39 +01:00
Matthias Melcher 6d7faa93e1 Fluid: added keyboard shortcuts documentation. 2021-12-10 15:16:42 +01:00
Matthias Melcher 5655f79d63 STR 3426: indicating in the title bar if the design is newer than the code file.
In this first version, we assume that the code file is newer whenever it is written,
until the current design is modified in any way. So instead of a status bar at the bottom
of the main window, the title bar will now show the status of the design and the code at
the same place.
2021-12-10 01:22:24 +01:00
Matthias Melcher a4b6175dbe STR 3210: be smarter about appending ';' in callbacks 2021-12-09 22:38:04 +01:00
Matthias Melcher c175d1276d STR 3210: fixing indentation of Fl_Menu_Item cnd Widget allbacks.
also added and fixed a few comments

STR 3210: fixed indenting of widget callbacks.

Also fixed what is considered a 'name' (could still be improved).
Also better formatting inlined functions in the header.
2021-12-09 21:51:37 +01:00
Matthias Melcher 0c1f78c1f2 STR 3460.D: fixed .fl file reading code 2021-12-09 18:55:51 +01:00
Matthias Melcher 83f6bb50b2 Fluid: sample documentation, please check http://messagepad.org/fluid/code.html 2021-12-09 18:25:51 +01:00
Matthias Melcher ace6a64161 Fluid STR 3460.D: making dialog more interactive. 2021-12-09 12:42:56 +01:00
Matthias Melcher 4f2febd801 Fluid STR 3460.D: Shell commands are now saved in the .fl file (user option)
The shell properties toolbox is completely redesigned:

This dialog box offers a field for a command line and three check buttons
 to generate and save various files before the command is run.

 If the fourth checkbox, "use settings in .fl design files" is checked,
 all shell settings will be store in the current .fl file, and they will
 be read and restored when the .fl is loaded again.

 Fluid will save different shell settings for different operating system as
 it is common that a different OS requires a different shell command.

 Fluid comes with default shell settings. Pressing the "save as default" button
 will store the current setting in the Fluid app settings and are used for new
 designs, or if the "use settings..." box is not checked.

 Fluid app settings are saved per user and per machine.
2021-12-09 02:48:40 +01:00
Matthias Melcher 1be158a840 STR 3460.b: fixed scrollbar update in widget_browser
Also fixed a bug where a Manu item was accessed by index, which
already was out of sync.
2021-12-08 20:52:51 +01:00
Albrecht Schlosser b9c0933de2 Update dependencies (no code changes)
Done after the first large commit of fluid changes.
2021-12-08 19:23:01 +01:00
Matthias Melcher 17c8f73a88 STR 3460.C: Code Properties remembers the editor's scroll bar position. 2021-12-08 18:55:44 +01:00
Matthias Melcher 16dae3ea06 Fluid: restructuring and commenting.
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-08 15:52:15 +01:00
Albrecht Schlosser 9154291940 Fix filename in doxygen comment, update dependencies 2021-12-06 00:43:24 +01:00
Matthias Melcher a646c3f012 Fluid: fixing missing return. 2021-12-05 23:46:11 +01:00
Matthias Melcher ff869e7419 Fluid STR 3460: Shell Cmd would saye code to wrong path. 2021-12-05 23:30:41 +01:00
Matthias Melcher 45d1d95b57 Fluid: Adding shortcuts for Checkbox and Radio Menuitems. 2021-12-05 21:51:18 +01:00
Matthias Melcher 2e08864f9e Fluid: Adding shortcuts for Checkbox and Radio Menuitems. 2021-12-05 21:50:46 +01:00
Matthias Melcher 7d26ee6ac2 Fluid: fixed typos in pixmap's XPM format. 2021-12-05 13:02:03 +01:00
Matthias Melcher 30371740ac STR #2842: new widgets will be created where the user clicked the RMB
If a user adds a new widget using the right mouse button in any of the
design's windows, the new widget will be located with its top left corner
at the selected position.
2021-12-05 00:40:08 +01:00
Matthias Melcher 204ac3dfdf Fluid: adapting menu to pixmap changes. 2021-12-05 00:18:41 +01:00
Matthias Melcher 21a75a18f8 Fluid support for high res graphics
Changing all pixmaps to Hi DPI
Fixed wrong tooltip
Fixed misleading "invisible" indicator
2021-12-04 23:28:07 +01:00
Albrecht Schlosser 7a7e50df6e Rename FL/Fl_String.H to FL/Fl_String_class.H
The previous name existed already with different case (fl_string.h)
in the FL folder which broke the build on macOS and Windows.

This may be a temporary fix - until I find a better way.
2021-12-04 15:34:41 +01:00
Albrecht Schlosser b6de09cff2 Re-enable nested (aka recursive) common dialogs (STR 3242, #282)
Apply Fl_Dialog_r10831.patch as given in STR 3242:
https://www.fltk.org/strfiles/3242/Fl_Dialog_r10831.patch

Reformat, add missing pieces, rename private members, cleanup...

Improve documentation, add fl_choice_n() (issue #282)

New methods fl_input_str() and fl_password_str() return Fl_String
2021-12-04 14:49:27 +01:00
Matthias Melcher c55fd6f704 CMake for Apple Xcode usability improvements 2021-12-03 20:29:20 +01: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 654e20ff8b CMake: Build fluid when cross-compiling 2021-11-11 23:11:06 +01:00
Albrecht Schlosser 6d1f5608ba Support all image depths (1-4) in fl_write_png() 2021-11-11 20:58:09 +01:00
Albrecht Schlosser 500e470d39 Refactor fluid: make fl_write_png() public
The new function fl_write_png() was moved to its own file and is now
publicly available ("exported") so other programs can use it.

This function was used in fluid to write a window screenshot (.png)
together with a template (.fl) to preferences storage.
2021-11-09 20:36:23 +01:00
Albrecht Schlosser 5c5244b162 Fix a fluid crash when writing a template screenshot
We need to show() the window before we call fl_read_image() if it
is not shown yet, otherwise fluid would crash.
2021-11-09 19:36:26 +01:00
Albrecht Schlosser 14f842708d Fix indenting, whitespace errors and dependencies
(no code changes)
2021-10-27 20:52:08 +02:00
Albrecht Schlosser 8863ef7901 Avoid multiple definition of macro __fl_attr()
This could happen if both FL/fl_ask.H and fluid/Fl_Type.h were
included in the same file.
2021-10-17 12:24:39 +02:00
Albrecht Schlosser b6a69db9a6 Rename 'fileno()' method to 'get_fileno()' for MinGW
See fltk.coredev thread "fltk-1.4 fluid build broken on 32-bit mingw"
https://groups.google.com/g/fltkcoredev/c/W9LWbsNuGZg/m/MW1BVAkeAgAJ

This regression was introduced in commit c8c1f51db7 in an
attempt to fix a Visual Studio (MSVC) warning but broke "old" MinGW
builds that define 'fileno' as a macro.
2021-09-28 12:40:43 +02:00
Albrecht Schlosser c8c1f51db7 Fix MSVC "fileno" warnings in fluid 2021-08-30 23:45:16 +02:00
Albrecht Schlosser 1a8b94162d Fix Windows (VS) compiler warnings in fluid 2021-08-30 23:45:16 +02:00
Albrecht Schlosser 410a01c6db Add CMake compatibility functions and macros
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-07-26 17:40:26 +02:00
Albrecht Schlosser 3c84894f19 Windows: Fix compiler warning: unused variable 2021-05-31 14:20:08 +02:00
ManoloFLTK b027d2ba57 Windows platform: use GDI+ to antialias oblique lines and curves. 2021-05-31 08:28:06 +02:00
Albrecht Schlosser 773467dee4 Refactor macOS bundle generation to avoid "quarantine"
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-05-13 16:18:13 +02:00
Albrecht Schlosser b5cdd2fa71 Update copyright in fluid bundle (macOS: Info.plist) 2021-05-07 16:50:52 +02:00
Albrecht Schlosser a484541d4b CMake: improve detection and configuration of image libs
Also: fix old (pre 3.13) link_directories() usage
2021-04-30 19:47:47 +02:00
Albrecht Schlosser 2555e3b37e Fix build with Cairo for CMake < 3.13
target_link_directories() was introduced in CMake 3.13
2021-04-30 12:46:58 +02: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 49a78bc482 Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files

To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
2021-03-01 10:45:59 +01:00