Commit Graph

76 Commits

Author SHA1 Message Date
Matthias Melcher
983777535e GitHub #329: fixed missing code
Commented out code was obsolete.
line_len was a true bug which can shred the end of lines.

Removed Warning
2021-12-16 19:51:37 +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
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
Albrecht Schlosser
5cb72ef065 Fix whitespace and minor formatting issues 2020-11-17 16:11:03 +01: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
Matthias Melcher
2b1bed470f Fix Fluid batch mode with Fl_Simple_Terminal.
Fl_Simple_Terminal would connect Fluid to the Display in batch mode. We
fix that by creating an Fl_Text_Display instead.
2019-02-16 00:00:24 +01:00
Matthias Melcher
2b6347d0bd STR #3445: Duplicating Widget Class in Fluid no longer crashes. 2019-02-01 21:32:48 +01:00
Matthias Melcher
6ff11dd8d0 Added Fl_Simple_Terminal to Fluid. 2019-01-14 01:43:17 +01:00
Matthias Melcher
6a61772c80 STR 3460: Fluid menu item types
Added pulldown menus to create radio style and checkbox style
menu items without going through the Class menu.
2019-01-14 01:14:40 +01:00
Matthias Melcher
011e5c498a Added new functionality to Fluid: the 'binary data' type can now include text files as well as binary files into the source code. There is an additional check box in the dialog. Terminology is now "inlined data" instead of "binary data". Texts were modified to reflect the changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-25 15:17:16 +00:00
Albrecht Schlosser
900314d4f4 Documentation and copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 15:26:36 +00:00
Albrecht Schlosser
141c3594d2 Fluid: remove redundant code, fix FL_IMAGE_LABEL labeltype.
Remove leading underscore from _FL_IMAGE_LABEL.
Remove redundant assignment of image().

Thanks to Greg for finding these issues.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 13:44:15 +00:00
Albrecht Schlosser
e629a9275b Fluid: align internal tables (no code changes).
Note: tab width 8.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12447 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 12:55:30 +00:00
Albrecht Schlosser
c96c4c35b0 Add 'fluid -u' command-line switch to upgrade fluid files in batch mode.
This option opens a fluid ('.fl') file and saves it overwriting the old
file with the current syntax and library version number.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-09 20:37:45 +00:00
Albrecht Schlosser
5b774e9970 Use fl_ascii_strcasecmp in fluid/factory.cxx (STR #3006).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-25 10:37:35 +00:00
Albrecht Schlosser
41b85d18a4 Fix strcasecmp() issues (again), see STR #2994.
This new temporary fix improves handling of strcasecmp() for
CMake-generated Makefiles (cmake -G "MSYS Makefiles" ..).

For some unknown reason (maybe other compiler flags?) this showed
lots of *warnings* again. A better fix (replacing direct calls to
strcasecmp() with fl_strcasecmp() or similar will follow later.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-21 11:07:43 +00:00
Albrecht Schlosser
eb980231be Fixed recent MinGW build WRT configure not finding strcasecmp() (STR #2994).
Note: This fix is temporary and should be revisited later.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10044 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-03 17:24:00 +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
bb6392f7ec Added Table and Tree support to Fluid.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-03 08:28:38 +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
fb1b0fab0a Added new type 'Binary Data' to Fluid. Use this to include an arbitrary file as a byte array into your source code. Changes to load jpegs etc. from program memory will follow.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-15 16:43:51 +00:00
Matthias Melcher
1238d1576b Very crude extension of Fluid 1 to read Fluid 2 files (and possibly write them back as Fluid 1 files, but not Fluid 2!). Also, I started a README that points out the differences between FLTK 1 and FLTK 2 and tries to give some help in designing a downward compatible FLTK 3.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6912 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-10-02 19:08:55 +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
Matthias Melcher
8683ea2c81 Adding keyboard shortcut to Fl_Value_Input and Fl_Text_Editor
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-04-23 14:19:58 +00:00
Matthias Melcher
8d6b757bfe Fl_Value_Input is not derived from Fl_Input_. Fixing Fluid.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-04-22 23:54:47 +00:00
Matthias Melcher
8198e51799 Added support for keyboard shortcuts to Fl_Input_ derived widgets (STR #1770). Code added for Fluid. Documentation updated.
This commit must be considered partial because there is no shortcut handling for Fl_Text_Display derived widgets or Fl_Value_Input which is derived form Fl_Valuator.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-04-22 23:33:17 +00:00
Michael R Sweet
3fb13c36d7 Don't open display when generating source code for Fl_Help_View
widget (STR #1318)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5658 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-02 20:09:53 +00:00
Michael R Sweet
7e3daaf145 Update copyrights on changed files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-07-26 19:53:19 +00:00
Matthias Melcher
05bd3ade18 Added support for floating point Fl_Spinner
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5221 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-22 07:35:39 +00:00
Matthias Melcher
11de032d6d If the value field for scrollbars was not zero, Fluid would generate code that accesses the hidden function Fl_Scrollbar::value(double), causing a compile time error. The fix circumevents the hidden function by calling Fl_Slider::value. It would be better to change the entire Fluid interface to reflect the Scrollbar interface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5214 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-19 08:34:19 +00:00
Matthias Melcher
f74a812003 STR #1158: Fl_Spinner is now fully supported by Fluid. Previously, min, max, step and value could not be edited the usual way because spinner is derived from Fl_Group, not Fl_Valuator...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5038 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-27 22:47:59 +00:00
Matthias Melcher
a15e974676 - I enlarged the 'minimal update' area in Fl_Input_, so that characters that overlap the font box will be correctly erased during minimal redraw. The original code assumes that character fin in a box from 0,0 to charcter width/height. However, many newer fonts overlap that box and leave traces when redrawn. See 'j' and 'W' in Helvetica on Mac and Windows.
- added textsize etc. support for Fluid Live Mode for Fl_Input type.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-07-20 11:11:51 +00:00
Michael R Sweet
13d8286b8a FLUID didn't set the initial size of widgets properly (STR #850)
Fl_Tabs would steal focus away from its children on a window
focus change (STR #870)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-05-19 15:57:32 +00:00
Michael R Sweet
1c399af444 Update source file headers with STR web page.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:13:17 +00:00
Michael R Sweet
2abfda36ab Preliminary support for widget classes (still need to do code writing
methods...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-28 04:23:32 +00:00
Michael R Sweet
e12e37c5f9 Add Fl_Spinner widget (another combo of existing widgets in a header file)
Set the window callback to do the same as the cancel button in the template
panel.

Clean up widget bin + tooltips (didn't have correct tooltips for new widgets)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 23:38:14 +00:00
Michael R Sweet
0919d57c33 Template panel for "new" and "save template" actions, complete with
preview images that are generated when you save the template.

Use @INSTANCE@ anywhere you want to substitute an instance name.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 21:27:20 +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
a2f4b27b27 Undo/redo support for FLUID.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 04:00:48 +00:00
Michael R Sweet
81bd60b47d More UI cleanup.
fluid/*.fl:
    - Go through all of the UIs and make sure they conform to the
      UI guidelines.

fluid/fluid.cxx:
    - Change fl_ask() and fl_choice() to use the "Save"/"Don't
      Save" and similar button labels instead of "Yes" and "No",
      per UI guidelines.

fluid/factory.cxx:
fluid/Fl_Type.h:
    - Make sure that widget and type names are capitalized.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 08:38:21 +00:00
Michael R Sweet
59004878f3 Many FLUID updates...
fluid/align_widget.cxx:
    - Add widget_size_cb() to set default size and size of
      labels and text for selected widgets.

fluid/factory.cxx:
    - More normalization of menus - "..." when opening a window,
      Capitalized Words.
    - cb(): Assign default label/text size and resize to ideal
      size.
    - Make sure that all buttons, input, and valuator widgets
      have default label strings.
    - Fl_*_Button::ideal_size(): fix ideal width calcs to match
      widget.

fluid/Fl_Menu_Type.cxx:
    - Fl_Menu_Item_Type::make(): set default label size.

fluid/Fl_Type.h:
    - Add Fl_Widget_Type::default_size global.
    - Fl_Menu_Item_Type::type_name(): return "Menu_Item".
    - Fl_Submenu_Type::type_name(): return "Submenu".
    - Update ideal_size() methods to use a default height that
      is evenly divisible by 5.
    - Fl_Choice_Type::ideal_size() and
      Fl_Menubutton_Type::ideal_size(): fix ideal width calcs to
      match widget.
    - Fl_Menu_Bar::ideal_size(): add, returning the window
      width.

fluid/fluid.cxx:
    - Add "Layout/Widget Size" submenu.
    - "File/Write code..." becomes "File/Write Code..." and
      "File/Write strings..." becomes "File/Write Strings..."

fluid/fluid.plist:
    - Bump version number and copyright info.

fluid/Fl_Widget_Type.cxx:
    - Fl_Widget_Type::ideal_size(): add box dw/dh and enforce a
      minimum size of 15x15.
    - labelsize_cb(): use Fl_Widget_Type::default_size instead
      of FL_NORMAL_SIZE.
    - textsize_cb(): use Fl_Widget_Type::default_size instead of
      FL_NORMAL_SIZE.

fluid/Fl_Window_Type.cxx:
    - Fl_Window_Type::newdx(): require at least 2 pixels of
      movement.
    - Fl_Window_Type::draw_overlay(): adjust bounding box for
      outside labels above and below.
    - Fl_Window_Type::handle(): reset dx/dy on FL_PUSH.

fluid/function_panel.cxx:
fluid/function_panel.fl:
fluid/function_panel.h:
    - Update some of the windows for the "small" size.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 04:09:32 +00:00
Matthias Melcher
fc1a4cf809 Added a new Type to fluid called 'Comment' to be used for standardized Copyright notices and other comments throughout the source code.
- simply add the 'Comment' type from the 'New' menu or the Widget Bin
- comments in the very first position will be added at the very beginning of the source file or header. Comments at the end are at the very end in source and headers as well.
- if the users enters simple text, FLUID will add '// ' in front of every line. If a line already starts with '//' or a block starts with '/*', the text will be copied verbatim.
- text can be loaded from files
- text can be stored in a database and quickly retrieved later via a pulldown menu. The pulldown menu is customizable.

Enjoy!

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-09 21:26:53 +00:00
Michael R Sweet
cdcb8a50e2 More guide stuff - most of the widgets that need it should have their
own custom ideal_size() function, and we now snap when showing the
alignment guides.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-07 23:55:49 +00:00
Michael R Sweet
add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +00:00
Michael R Sweet
2df3459457 Added Greg Ercolano's simple Fl_Input_Choice widget which is a
combination of the Fl_Input and Fl_Menu_Button widgets (STR
#650)

FL/Fl_Input_Choice.H:


documentation/Fl_Input_Choice.html:
    - Added.

documentation/fltk.book:
    - Added Fl_Input_Choice.html + --no-embedfonts option.

documentation/index.html:
    - Update version number and revision.

documentation/input_choice.jpg:
    - Added.

documentation/preface.html:
    - Update version number and revision.

documentation/widgets.html:
    - Add Fl_Input_Choice to lists.

fluid/Fl_Menu_Type.cxx:
    - Add Fl_Input_Choice_Type class and instance.

fluid/Fl_Type.h:
    - Add Fl_Input_Choice_Type class and instance.

fluid/factory.cxx:
    - Add Fl_Input_Choice menu item.

test/Makefile:
    - Add input_choice example.

test/input_choice.cxx:
    - Added.

test/demo.menu:
    - Add input_choice example.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:14:22 +00:00
Matthias Melcher
53e7546c23 Fixed a few warnings in OS X. The fluid stuff was 'touche'd, but not changed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 16:28:36 +00:00
Michael R Sweet
a3d0905c9e Copyright updates and prep for 1.1.5rc1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11 04:39:01 +00:00