Commit Graph

31 Commits

Author SHA1 Message Date
Matthias Melcher d51046cdea FLUID: Add Synchronized Resize. #1055 2024-08-31 20:36:34 +02:00
Matthias Melcher 95daa77c49 FLUID: Fixes undo/redo mixup.
If undo or redo menu is deactivated, fltk resends undo events
as redo and vice versa, so instead now we just beep.
2023-11-05 22:19:03 +01:00
Albrecht Schlosser 1209e9dcd7 Make Fl_String and Fl_Int_Vector private (#789)
- 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-22 19:35:17 +02:00
Matthias Melcher b5a1da9612 FLUID: minor fixes 2023-08-29 22:50:12 +02:00
Matthias Melcher f37347dd6e
Fix and consolidate settings dialogs (#346, #703) 2023-03-19 20:04:01 +01:00
Matthias Melcher fa41211cca
FLUID event handling and UI changes (#575)
* Full support o when()
* Making undo suspend nesting
* Finally correct undo handling for Label: input
* Documentation.
* Adding more undo checkpoints for the Widget Panel
* Quick selection of default user_data types
* Pulldown menu for system colors
* Make sure that partially typed text fields are propagated before saving
2022-12-10 13:11:49 +01:00
Matthias Melcher 8b7021ba8b
Fluid: Keep widget panel open during undo/redo (#566) 2022-12-01 01:00:12 +01:00
Matthias Melcher 3626e82057 GitHub #326: browser scrolling should be much improved
Code now convinces browser to rebuild when the tree changes by UI.
When widgets are move, the current widget should always be visible.
It's the responsibility of the UI callback to update the browser.
2021-12-17 18:38:26 +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
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 1a8b94162d Fix Windows (VS) compiler warnings in fluid 2021-08-30 23:45:16 +02: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
Albrecht Schlosser adb2a719d4 Fix fluid undo/redo menu activation and deactivation
(1) fix typo in recent commit
(2) deactivate undo/redo menus on startup and after reset

Fixes issue #84
2020-05-24 22:24:48 +02:00
Greg Ercolano dcfe826b2f Fix broken undo
Replaced hardwired index#s for undo/redo menu items with dynamic lookup.
2020-05-24 09:02:24 -07:00
Albrecht Schlosser ba8db654ff Fix one compiler warning (STR 3529)
fluid/undo.cxx: fix warning [-Wformat-truncation=]

This fix also removes some static variables and simplifies the
function undo_filename(). It does no longer copy the full filename
string back to a given buffer. Now it returns a pointer to the
internal filename string.

Summary: fix compiler warning, save memory, simplify a function, and
  speed up code by not copying data unnecessarily.
2019-08-29 17:17:37 +02: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 41f92be2f1 Replace remaining calls to unlink() with fl_unlink().
Tested under Linux, MinGW, and Visual Studio 2015.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12496 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:18:53 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Matthias Melcher 9092dccab8 Changed all fixed filename buffers (that I could find) to use FL_PATH_MX instead. Raised FL_PATH_MX from skipy 256 characters to 2048, which corresponds with modern file systems.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-19 21:20:10 +00:00
Matthias Melcher e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher 167d767e0f Changed the copyright to 2009 for header files. Still todo: src and test directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:11:32 +00:00
Fabien Costantini ae697b80b2 Doxygen documentation : took the opportunity to update copyright info as we modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16 07:26:22 +00:00
Michael R Sweet 00c66abc0e Update copyright years and use "#ifndef" instead of "#if !defined".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5701 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-20 18:43:10 +00:00
Matthias Melcher 8ea59b412e Fixed Watcom compiler setup without verification using a patch by mnieuw
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5699 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-20 17:02:41 +00:00
Matthias Melcher cdc1d7d5e3 Fixed FLUID undo. Thanks Fabien fr finding this.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 18:12:05 +00:00
Michael R Sweet e321cb37bf VC++ 2005 Support, drop old files, add icons for Sudoku
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-27 14:45:48 +00:00
Michael R Sweet e3ce6cd15a Cast GetCurrentProcessId to int to avoid compiler warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4277 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-13 16:32:52 +00:00
Michael R Sweet c279f087a1 Add missing include for undo functions (STR #773)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10 22:33:34 +00:00
Michael R Sweet 0bc98fd29e Preliminary template save support in FLUID, plus some bug fixes.
fluid/Fl_Type.h:
    - Added read_image() declaration to Fl_Window_Type class.

fluid/Fl_Window_Type.cxx:
    - Added Overlay_Window::read_image() and
      Fl_Window_Type::read_image() functions.
    - Fl_Window_Type::fix_overlay(): update menu indices.
    - toggle_overlays(): update menu indices.

fluid/fluid.cxx:
    - save_template_cb(): Added to save to
      ~/.fltk/fltk.org/fluid/templates, along with PNG screenshot
      of first window.
    - "Save To" instead of "Save to".
    - Use fl_alert() for errors, not fl_message().
    - Add "File/Save Template..." and "File/Print..." (not yet
      implemented) menu items.
    - toggle_widgetbin_cb(): update menu indices.

fluid/undo.cxx:
    - Update menu item indices.
    - Don't need extra slash in undo checkpoint filename.

src/Fl_PNG_Image.cxx:
    - Fix typo in #endif comment.

src/Fl_Window.cxx:
    - Fl_Window::draw(): save/restore flags() when changing label.
    - Fl_Window::iconlabel(): save/restore flags() when changing label.

src/fl_rect.cxx:
    - fl_not_clipped(): don't use current window for gross clipping.





git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 17:41:56 +00:00
Michael R Sweet 4e965380bc Use uppercase letters for shortcut labels (e.g. "Ctrl+N", not
"Ctrl+n") to be consistent with other toolkits.

Remove debug printf from undo_checkpoint().

Change "Show Widget Panel" to "Show Properties" since it displays any
Fl_Type dialog, not just the widget panel.

Add "properties" to all of the type dialogs (UI consistency)

Remove extra elipsis (...) from code items in the new menu.

Revert Grid shortcut to Ctrl+G, since Alt+G is used to run a shell
command again.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 14:35:18 +00:00
Michael R Sweet 0bbcbe666d Do'h! Forgot to add these files...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 13:38:04 +00:00