diff --git a/fluid/.gitignore b/fluid/.gitignore
index f1c3b079f0ad97b9726e06da798bcaec9b8763bc..023bc907c7f4e1af3f44bc2b9f064ee6ad3a84eb 100644
--- a/fluid/.gitignore
+++ b/fluid/.gitignore
@@ -6,7 +6,7 @@ fluid
 fluid-shared
 TAGS
 fluid.app
-pixmaps/*.bck
+../pixmaps/*.bck
 
 # local documentation generation
 
diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt
index b9065616bfe0bf5483a744b9f8a1cff36b277566..c0a398d5f2f34349cb6813813166443413a13209 100644
--- a/fluid/CMakeLists.txt
+++ b/fluid/CMakeLists.txt
@@ -1,7 +1,7 @@
 #
 # CMakeLists.txt to build fluid for the FLTK project using CMake (www.cmake.org)
 #
-# Copyright 1998-2024 by Bill Spitzak and others.
+# Copyright 1998-2025 by Bill Spitzak and others.
 #
 # This library is free software. Distribution and use rights are outlined in
 # the file "COPYING" which should have been included with this file.  If this
@@ -18,96 +18,108 @@
 set(TARGETS fluid)
 
 # Source files for 'fluid-lib' = all source files except the main files
-# (fluid.cxx and fluid.h)
-# Note: macOS (Xcode) needs at least one source file (fluid.cxx) to link the main
+# (main.cxx and main.h)
+# Note: macOS (Xcode) needs at least one source file (main.cxx) to link the main
 # program fluid properly
 
 set(CPPFILES
-  CodeEditor.cxx
-  StyleParse.cxx
-  Fd_Snap_Action.cxx
-  Fl_Function_Type.cxx
-  Fl_Grid_Type.cxx
-  Fl_Group_Type.cxx
-  Fl_Menu_Type.cxx
-  Fl_Type.cxx
-  Fl_Widget_Type.cxx
-  Fl_Window_Type.cxx
-  Fl_Button_Type.cxx
-  Fluid_Image.cxx
-  about_panel.cxx
-  align_widget.cxx
-  settings_panel.cxx
-  autodoc.cxx
-  code.cxx
-  custom_widgets.cxx
-  factory.cxx
-  file.cxx
-  fluid_filename.cxx
-  function_panel.cxx
-  mergeback.cxx
-  pixmaps.cxx
-  shell_command.cxx
-  codeview_panel.cxx
-  template_panel.cxx
-  undo.cxx
-  widget_browser.cxx
-  widget_panel.cxx
+  app/align_widget.cxx
+  app/Fd_Snap_Action.cxx
+  app/fluid.cxx
+  app/Fluid_Image.cxx
+  app/mergeback.cxx
+  app/shell_command.cxx
+  app/undo.cxx
+  io/code.cxx
+  io/file.cxx
+  nodes/factory.cxx
+  nodes/Fl_Button_Type.cxx
+  nodes/Fl_Function_Type.cxx
+  nodes/Fl_Grid_Type.cxx
+  nodes/Fl_Group_Type.cxx
+  nodes/Fl_Menu_Type.cxx
+  nodes/Fl_Type.cxx
+  nodes/Fl_Widget_Type.cxx
+  nodes/Fl_Window_Type.cxx
+  panels/about_panel.cxx
+  panels/codeview_panel.cxx
+  panels/function_panel.cxx
+  panels/settings_panel.cxx
+  panels/template_panel.cxx
+  panels/widget_panel.cxx
+  rsrcs/pixmaps.cxx
+  tools/autodoc.cxx
+  tools/fluid_filename.cxx
+  widgets/CodeEditor.cxx
+  widgets/custom_widgets.cxx
+  widgets/StyleParse.cxx
+  widgets/widget_browser.cxx
 )
 
 # List header files in Apple's Xcode IDE
 
 set(HEADERFILES
-  CodeEditor.h
-  Fd_Snap_Action.h
-  Fl_Function_Type.h
-  Fl_Grid_Type.h
-  Fl_Group_Type.h
-  Fl_Menu_Type.h
-  Fl_Type.h
-  Fl_Widget_Type.h
-  Fl_Window_Type.h
-  Fl_Button_Type.h
-  Fluid_Image.h
-  StyleParse.h
-  about_panel.h
-  align_widget.h
-  settings_panel.h
-  autodoc.h
-  code.h
-  comments.h
-  custom_widgets.h
-  factory.h
-  file.h
-  function_panel.h
-  mergeback.h
-  print_panel.h
-  pixmaps.h
-  shell_command.h
-  codeview_panel.h
-  template_panel.h
-  undo.h
-  widget_browser.h
-  widget_panel.h
+  app/align_widget.h
+  app/Fd_Snap_Action.h
+  app/fluid.h
+  app/Fluid_Image.h
+  app/mergeback.h
+  app/shell_command.h
+  app/undo.h
+  io/code.h
+  io/file.h
+  nodes/factory.h
+  nodes/Fl_Button_Type.h
+  nodes/Fl_Function_Type.h
+  nodes/Fl_Grid_Type.h
+  nodes/Fl_Group_Type.h
+  nodes/Fl_Menu_Type.h
+  nodes/Fl_Type.h
+  nodes/Fl_Widget_Type.h
+  nodes/Fl_Window_Type.h
+  panels/about_panel.h
+  panels/codeview_panel.h
+  panels/function_panel.h
+  panels/settings_panel.h
+  panels/template_panel.h
+  panels/widget_panel.h
+  rsrcs/comments.h
+  rsrcs/pixmaps.h
+  tools/autodoc.h
+  tools/fluid_filename.h
+  widgets/CodeEditor.h
+  widgets/custom_widgets.h
+  widgets/StyleParse.h
+  widgets/widget_browser.h
 )
 
 # Add ExternalCodeEditor: platform specific files
 
 if(WIN32)
-  list(APPEND CPPFILES ExternalCodeEditor_WIN32.cxx)
-  list(APPEND HEADERFILES ExternalCodeEditor_WIN32.h)
+  list(APPEND CPPFILES tools/ExternalCodeEditor_WIN32.cxx)
+  list(APPEND HEADERFILES tools/ExternalCodeEditor_WIN32.h)
 else()
-  list(APPEND CPPFILES ExternalCodeEditor_UNIX.cxx)
-  list(APPEND HEADERFILES ExternalCodeEditor_UNIX.h)
+  list(APPEND CPPFILES tools/ExternalCodeEditor_UNIX.cxx)
+  list(APPEND HEADERFILES tools/ExternalCodeEditor_UNIX.h)
 endif(WIN32)
 
-source_group("Header Files" FILES ${HEADERFILES})
+source_group(
+  TREE
+    ${CMAKE_CURRENT_SOURCE_DIR}
+  FILES
+    ${CPPFILES}
+    ${HEADERFILES}
+    main.cxx
+    main.h
+    CMakeLists.txt
+)
 
 # Build a local object library to avoid compiling all source files
 # multiple times for all fluid targets on Windows (fluid + fluid-cmd).
 
 add_library(fluid-lib OBJECT EXCLUDE_FROM_ALL)
 target_sources(fluid-lib PRIVATE ${CPPFILES} ${HEADERFILES})
+target_include_directories(fluid-lib PRIVATE .)
 target_link_libraries(fluid-lib PUBLIC fltk::images)
 
 # Build targets
@@ -117,8 +129,8 @@ if(APPLE AND NOT FLTK_BACKEND_X11)
   # macOS
 
   set(ICON_NAME fluid.icns)
-  set(ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_NAME}")
-  add_executable(fluid MACOSX_BUNDLE fluid.cxx fluid.h ${ICON_PATH})
+  set(ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../icons/${ICON_NAME}")
+  add_executable(fluid MACOSX_BUNDLE main.cxx main.h ${ICON_PATH})
 
   # create macOS bundle wrapper script
 
@@ -135,10 +147,11 @@ if(APPLE AND NOT FLTK_BACKEND_X11)
 else()
 
   # Option 'WIN32' builds a Windows GUI program, ignored on other platforms
-  add_executable(fluid WIN32 fluid.cxx fluid.h)
+  add_executable(fluid WIN32 main.cxx main.h)
 
 endif()
 
+target_include_directories(fluid PRIVATE .)
 target_link_libraries(fluid PRIVATE fluid-lib)
 
 # Build the console app on Windows
@@ -146,7 +159,8 @@ target_link_libraries(fluid PRIVATE fluid-lib)
 
 if(WIN32)
   list(APPEND TARGETS fluid-cmd)
-  add_executable(fluid-cmd fluid.cxx fluid.h)
+  add_executable(fluid-cmd main.cxx main.h)
+  target_include_directories(fluid-cmd PRIVATE .)
   target_link_libraries(fluid-cmd PRIVATE fluid-lib)
   set(FLTK_FLUID_EXECUTABLE fltk::fluid-cmd)
 else()
@@ -207,8 +221,8 @@ if(UNIX)
 
   # Install desktop icons
   foreach(icon 32 48 64 128)
-    install(FILES icons/fluid-${icon}.png
-      DESTINATION ${FLTK_DATADIR}/icons/hicolor/${icon}x${icon}/apps
+    install(FILES ../icons/fluid-${icon}.png
+      DESTINATION ${FLTK_DATADIR}/../icons/hicolor/${icon}x${icon}/apps
       RENAME fluid.png
     )
   endforeach()
diff --git a/fluid/Fd_Snap_Action.cxx b/fluid/app/Fd_Snap_Action.cxx
similarity index 99%
rename from fluid/Fd_Snap_Action.cxx
rename to fluid/app/Fd_Snap_Action.cxx
index 1e9fee1a318b462599105b9e300844a3e9f000ea..c093af1ff6337a8666ef29a572b27b7f466d1899 100644
--- a/fluid/Fd_Snap_Action.cxx
+++ b/fluid/app/Fd_Snap_Action.cxx
@@ -14,11 +14,11 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fd_Snap_Action.h"
+#include "app/Fd_Snap_Action.h"
 
-#include "Fl_Group_Type.h"
-#include "settings_panel.h"
-#include "file.h"
+#include "io/file.h"
+#include "nodes/Fl_Group_Type.h"
+#include "panels/settings_panel.h"
 
 #include <FL/fl_draw.H>
 #include <FL/Fl_Menu_Bar.H>
diff --git a/fluid/Fd_Snap_Action.h b/fluid/app/Fd_Snap_Action.h
similarity index 99%
rename from fluid/Fd_Snap_Action.h
rename to fluid/app/Fd_Snap_Action.h
index a7485c77055e7e2548a7a415fbeff5dc0a0f844a..50b5203194324d1f2f3388113fa9d95110308fa2 100644
--- a/fluid/Fd_Snap_Action.h
+++ b/fluid/app/Fd_Snap_Action.h
@@ -17,8 +17,8 @@
 #ifndef _FLUID_FD_SNAP_ACTION_H
 #define _FLUID_FD_SNAP_ACTION_H
 
-#include "fluid.h"
-#include "Fl_Window_Type.h"
+#include "app/fluid.h"
+#include "nodes/Fl_Window_Type.h"
 
 #include <string>
 
diff --git a/fluid/Fluid_Image.cxx b/fluid/app/Fluid_Image.cxx
similarity index 98%
rename from fluid/Fluid_Image.cxx
rename to fluid/app/Fluid_Image.cxx
index c57d54c85626ceb8925d9ae64b8fc14405c61682..d25f1702334ab78998ee097dbc0d94965483b41b 100644
--- a/fluid/Fluid_Image.cxx
+++ b/fluid/app/Fluid_Image.cxx
@@ -14,18 +14,18 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fluid_Image.h"
+#include "app/Fluid_Image.h"
 
-#include "fluid.h"
-#include "Fl_Group_Type.h"
-#include "Fl_Window_Type.h"
-#include "file.h"
-#include "code.h"
+#include "app/fluid.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/Fl_Group_Type.h"
+#include "nodes/Fl_Window_Type.h"
+#include "tools/fluid_filename.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Widget.H>
 #include <FL/Fl_Window.H>
-#include "fluid_filename.h"
 #include <FL/fl_string_functions.h>
 #include <FL/fl_utf8.h>     // fl_fopen()
 #include <FL/Fl_File_Chooser.H>
diff --git a/fluid/Fluid_Image.h b/fluid/app/Fluid_Image.h
similarity index 98%
rename from fluid/Fluid_Image.h
rename to fluid/app/Fluid_Image.h
index 73387ffd4c776bb5a3818d3d77f2492572d2ceee..e3b5faaacb6009511c86a8ec8156609cc5804d57 100644
--- a/fluid/Fluid_Image.h
+++ b/fluid/app/Fluid_Image.h
@@ -21,9 +21,9 @@
 #ifndef FLUID_IMAGE_H
 #define FLUID_IMAGE_H
 
-#include <FL/Fl_Shared_Image.H>
+#include "io/code.h"
 
-#include "code.h"
+#include <FL/Fl_Shared_Image.H>
 
 class Fluid_Image {
   bool is_animated_gif_;
diff --git a/fluid/align_widget.cxx b/fluid/app/align_widget.cxx
similarity index 99%
rename from fluid/align_widget.cxx
rename to fluid/app/align_widget.cxx
index a1018e2cabf6db2fcd13906a899c562c15087a15..a9badf9e44842f9f3b21be8e336b8b040539dc17 100644
--- a/fluid/align_widget.cxx
+++ b/fluid/app/align_widget.cxx
@@ -14,11 +14,11 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "align_widget.h"
+#include "app/align_widget.h"
 
-#include "fluid.h"
-#include "Fl_Group_Type.h"
-#include "undo.h"
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "nodes/Fl_Group_Type.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Window.H>
diff --git a/fluid/align_widget.h b/fluid/app/align_widget.h
similarity index 100%
rename from fluid/align_widget.h
rename to fluid/app/align_widget.h
diff --git a/fluid/fluid.cxx b/fluid/app/fluid.cxx
similarity index 99%
rename from fluid/fluid.cxx
rename to fluid/app/fluid.cxx
index e6520b6c0bd935ff0088c489757051ddf74cd399..e9d473fb26dabb21e190472e359c51993c0be4d9 100644
--- a/fluid/fluid.cxx
+++ b/fluid/app/fluid.cxx
@@ -1,7 +1,7 @@
 //
 // FLUID main entry for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -14,27 +14,26 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "fluid.h"
-
-#include "Fl_Type.h"
-#include "Fl_Function_Type.h"
-#include "Fl_Group_Type.h"
-#include "Fl_Window_Type.h"
-#include "widget_browser.h"
-#include "shell_command.h"
-#include "factory.h"
-#include "pixmaps.h"
-#include "undo.h"
-#include "file.h"
-#include "code.h"
-#include "mergeback.h"
-
-#include "settings_panel.h"
-#include "function_panel.h"
-#include "codeview_panel.h"
-#include "template_panel.h"
-#include "about_panel.h"
-#include "autodoc.h"
+#include "app/fluid.h"
+
+#include "app/mergeback.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/Fl_Type.h"
+#include "nodes/Fl_Function_Type.h"
+#include "nodes/Fl_Group_Type.h"
+#include "nodes/Fl_Window_Type.h"
+#include "nodes/factory.h"
+#include "panels/settings_panel.h"
+#include "panels/function_panel.h"
+#include "panels/codeview_panel.h"
+#include "panels/template_panel.h"
+#include "panels/about_panel.h"
+#include "rsrcs/pixmaps.h"
+#include "app/shell_command.h"
+#include "tools/autodoc.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #ifdef __APPLE__
@@ -2195,7 +2194,7 @@ static void sigint(SIGARG) {
     in batch mode. Is that intentional? Does it circumvent issues with Windows'
     stderr and stdout?
  */
-int main(int argc,char **argv) {
+int fluid_main(int argc,char **argv) {
   int i = 1;
 
   setlocale(LC_ALL, "");      // enable multi-language errors in file chooser
diff --git a/fluid/fluid.h b/fluid/app/fluid.h
similarity index 97%
rename from fluid/fluid.h
rename to fluid/app/fluid.h
index 1402319362d2ccb2075ee2f23e65f2cc863d6c48..d02ae79ccec3998325f267267950cdbabb0911a7 100644
--- a/fluid/fluid.h
+++ b/fluid/app/fluid.h
@@ -1,7 +1,7 @@
 //
 // FLUID main entry for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -17,7 +17,8 @@
 #ifndef _FLUID_FLUID_H
 #define _FLUID_FLUID_H
 
-#include "fluid_filename.h"
+#include "tools/fluid_filename.h"
+
 #include <FL/Fl_Preferences.H>
 #include <FL/Fl_Menu_Item.H>
 
@@ -175,6 +176,8 @@ extern Fluid_Project g_project;
 
 // ---- public functions
 
+extern int fluid_main(int argc,char **argv);
+
 extern bool new_project(bool user_must_confirm = true);
 extern void enter_project_dir();
 extern void leave_project_dir();
@@ -202,3 +205,4 @@ inline int fd_max(int a, int b) { return (a > b ? a : b); }
 inline int fd_min(int a, int b, int c) { return fd_min(a, fd_min(b, c)); }
 
 #endif // _FLUID_FLUID_H
+
diff --git a/fluid/mergeback.cxx b/fluid/app/mergeback.cxx
similarity index 99%
rename from fluid/mergeback.cxx
rename to fluid/app/mergeback.cxx
index a0b87534cdc9a8ce82e45cca8ba1bf06c11aa909..f914f6e1e022b06cb66480cfcee3e2d97102cd59 100644
--- a/fluid/mergeback.cxx
+++ b/fluid/app/mergeback.cxx
@@ -17,13 +17,13 @@
 #if 0
 // Matt: disabled
 
-#include "mergeback.h"
+#include "app/mergeback.h"
 
-#include "fluid.h"
-#include "code.h"
-#include "undo.h"
-#include "Fl_Function_Type.h"
-#include "Fl_Widget_Type.h"
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "io/code.h"
+#include "nodes/Fl_Function_Type.h"
+#include "nodes/Fl_Widget_Type.h"
 
 #include <FL/Fl_Window.H>
 #include <FL/fl_ask.H>
diff --git a/fluid/mergeback.h b/fluid/app/mergeback.h
similarity index 100%
rename from fluid/mergeback.h
rename to fluid/app/mergeback.h
diff --git a/fluid/shell_command.cxx b/fluid/app/shell_command.cxx
similarity index 99%
rename from fluid/shell_command.cxx
rename to fluid/app/shell_command.cxx
index e961fc24c94f3600b17d60a3553fee492227032e..df71a00f55398bb3de375448be88298c5bce9099 100644
--- a/fluid/shell_command.cxx
+++ b/fluid/app/shell_command.cxx
@@ -95,11 +95,11 @@
   powershell -c "$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}')
  */
 
-#include "shell_command.h"
+#include "app/shell_command.h"
 
-#include "fluid.h"
-#include "file.h"
-#include "settings_panel.h"
+#include "app/fluid.h"
+#include "io/file.h"
+#include "panels/settings_panel.h"
 
 #include <FL/Fl_Double_Window.H>
 #include <FL/Fl_Menu_Bar.H>
diff --git a/fluid/shell_command.h b/fluid/app/shell_command.h
similarity index 99%
rename from fluid/shell_command.h
rename to fluid/app/shell_command.h
index e5f8e3e8799c5f49200859c4eab6437252ed81dc..b45e2f8cc89e5d1bb0a940b385779ee36291ac90 100644
--- a/fluid/shell_command.h
+++ b/fluid/app/shell_command.h
@@ -17,7 +17,7 @@
 #ifndef _FLUID_SHELL_COMMAND_H
 #define _FLUID_SHELL_COMMAND_H
 
-#include "fluid.h"
+#include "app/fluid.h"
 
 #include <FL/Enumerations.H>
 
diff --git a/fluid/undo.cxx b/fluid/app/undo.cxx
similarity index 96%
rename from fluid/undo.cxx
rename to fluid/app/undo.cxx
index 49aea2d98b9d6770ce1dd64ed586b472b7289a8d..eb50014688f0a7e112c3680029ac8b5208b1e20e 100644
--- a/fluid/undo.cxx
+++ b/fluid/app/undo.cxx
@@ -1,7 +1,7 @@
 //
 // FLUID undo support for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -14,20 +14,20 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "undo.h"
+#include "app/undo.h"
 
-#include "fluid.h"
-#include "file.h"
-#include "Fl_Type.h"
-#include "Fl_Widget_Type.h"
-#include "widget_browser.h"
+#include "app/fluid.h"
+#include "io/file.h"
+#include "nodes/Fl_Type.h"
+#include "nodes/Fl_Widget_Type.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Preferences.H>
 #include <FL/Fl_Menu_Bar.H>
 #include <FL/fl_ask.H>
-#include "fluid_filename.h"
+#include "tools/fluid_filename.h"
 #include "../src/flstring.h"
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
diff --git a/fluid/undo.h b/fluid/app/undo.h
similarity index 96%
rename from fluid/undo.h
rename to fluid/app/undo.h
index 20572351d05c98b6ea74e4e809198e550832fd1b..e8ffab89124030673d9df51c10271e985942101a 100644
--- a/fluid/undo.h
+++ b/fluid/app/undo.h
@@ -1,7 +1,7 @@
 //
 // FLUID undo definitions for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
diff --git a/fluid/documentation/CMakeLists.txt b/fluid/documentation/CMakeLists.txt
index fccdeac97a365f592465aae24bd95cddaecbc14f..b613acee5b1bc785be2bd892e28cd601c92c4fe9 100644
--- a/fluid/documentation/CMakeLists.txt
+++ b/fluid/documentation/CMakeLists.txt
@@ -1,7 +1,7 @@
 #
 # CMakeLists.txt to build docs for the FLTK project using CMake (www.cmake.org)
 #
-# Copyright 1998-2024 by Bill Spitzak and others.
+# Copyright 1998-2025 by Bill Spitzak and others.
 #
 # This library is free software. Distribution and use rights are outlined in
 # the file "COPYING" which should have been included with this file.  If this
diff --git a/fluid/code.cxx b/fluid/io/code.cxx
similarity index 99%
rename from fluid/code.cxx
rename to fluid/io/code.cxx
index 3c789abd38db3320ed9c99838f4214e6a0183f52..b77cad147d2d6385a71d3f9db96ead2fb6731a0c 100644
--- a/fluid/code.cxx
+++ b/fluid/io/code.cxx
@@ -1,7 +1,7 @@
 //
 // Code output routines for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -14,19 +14,19 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "code.h"
+#include "io/code.h"
 
-#include "fluid.h"
-#include "Fl_Group_Type.h"
-#include "Fl_Window_Type.h"
-#include "Fl_Function_Type.h"
-#include "file.h"
-#include "undo.h"
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "nodes/Fl_Group_Type.h"
+#include "nodes/Fl_Window_Type.h"
+#include "nodes/Fl_Function_Type.h"
+#include "tools/fluid_filename.h"
 
 #include <FL/Fl.H>
 #include <FL/fl_string_functions.h>
 #include <FL/fl_ask.H>
-#include "fluid_filename.h"
 #include "../src/flstring.h"
 
 #include <stdarg.h>
diff --git a/fluid/code.h b/fluid/io/code.h
similarity index 100%
rename from fluid/code.h
rename to fluid/io/code.h
diff --git a/fluid/file.cxx b/fluid/io/file.cxx
similarity index 98%
rename from fluid/file.cxx
rename to fluid/io/file.cxx
index 9f5b78c3911fe5bc884e9c7329fe6fb83c8e36f8..b697325dcbd51ea12bbcece8c4598a81361ca8af 100644
--- a/fluid/file.cxx
+++ b/fluid/io/file.cxx
@@ -19,19 +19,19 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "file.h"
-
-#include "fluid.h"
-#include "factory.h"
-#include "Fl_Function_Type.h"
-#include "Fl_Widget_Type.h"
-#include "Fl_Grid_Type.h"
-#include "Fl_Window_Type.h"
-#include "settings_panel.h"
-#include "widget_browser.h"
-#include "shell_command.h"
-#include "code.h"
-#include "undo.h"
+#include "io/file.h"
+
+#include "app/fluid.h"
+#include "app/shell_command.h"
+#include "app/undo.h"
+#include "io/code.h"
+#include "nodes/factory.h"
+#include "nodes/Fl_Function_Type.h"
+#include "nodes/Fl_Widget_Type.h"
+#include "nodes/Fl_Grid_Type.h"
+#include "nodes/Fl_Window_Type.h"
+#include "panels/settings_panel.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Group.H>
diff --git a/fluid/file.h b/fluid/io/file.h
similarity index 99%
rename from fluid/file.h
rename to fluid/io/file.h
index 4000c2b02671b15d37bfb74be94308d746e1611a..470cc1a7b74767b16753826038b6a9f4155d12c7 100644
--- a/fluid/file.h
+++ b/fluid/io/file.h
@@ -17,7 +17,7 @@
 #ifndef _FLUID_FILE_H
 #define _FLUID_FILE_H
 
-#include "Fl_Type.h"
+#include "nodes/Fl_Type.h"
 
 #include <FL/fl_attr.h>
 
diff --git a/fluid/main.cxx b/fluid/main.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d05732d2b641d9470dc9e31d185b237aebc4b889
--- /dev/null
+++ b/fluid/main.cxx
@@ -0,0 +1,23 @@
+//
+// FLUID main entry for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2025 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+//     https://www.fltk.org/COPYING.php
+//
+// Please see the following page on how to report bugs and issues:
+//
+//     https://www.fltk.org/bugs.php
+//
+
+#include "main.h"
+#include "app/fluid.h"
+
+int main(int argc,char **argv) {
+  return fluid_main(argc, argv);
+}
+
diff --git a/fluid/main.h b/fluid/main.h
new file mode 100644
index 0000000000000000000000000000000000000000..a6286962af79f6c3863b239f225a6ecb742b9139
--- /dev/null
+++ b/fluid/main.h
@@ -0,0 +1,22 @@
+//
+// FLUID main entry for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2025 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+//     https://www.fltk.org/COPYING.php
+//
+// Please see the following page on how to report bugs and issues:
+//
+//     https://www.fltk.org/bugs.php
+//
+
+#ifndef _FLUID_MAIN_H
+#define _FLUID_MAIN_H
+
+extern int main(int argc,char **argv);
+
+#endif // _FLUID_MAIN_H
diff --git a/fluid/Fl_Button_Type.cxx b/fluid/nodes/Fl_Button_Type.cxx
similarity index 98%
rename from fluid/Fl_Button_Type.cxx
rename to fluid/nodes/Fl_Button_Type.cxx
index ee12c731af14e2b84ee2e8b0df45a619de1d4111..18620b477d44ba39635eb6922caae8c9ed719635 100644
--- a/fluid/Fl_Button_Type.cxx
+++ b/fluid/nodes/Fl_Button_Type.cxx
@@ -22,10 +22,10 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Button_Type.h"
+#include "nodes/Fl_Button_Type.h"
 
-#include "Fd_Snap_Action.h"
-#include "file.h"
+#include "app/Fd_Snap_Action.h"
+#include "io/file.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Button.H>
diff --git a/fluid/Fl_Button_Type.h b/fluid/nodes/Fl_Button_Type.h
similarity index 97%
rename from fluid/Fl_Button_Type.h
rename to fluid/nodes/Fl_Button_Type.h
index 3eb4a3d1db38fb4928f71e6b54cc4cc10851ea6c..d513c1398145e37d7caa6b99274020b1542e7682 100644
--- a/fluid/Fl_Button_Type.h
+++ b/fluid/nodes/Fl_Button_Type.h
@@ -17,7 +17,7 @@
 #ifndef _FL_BUTTON_TYPE_H
 #define _FL_BUTTON_TYPE_H
 
-#include "Fl_Widget_Type.h"
+#include "nodes/Fl_Widget_Type.h"
 
 /**
  \brief A handler for the simple push button and a base class for all other buttons.
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/nodes/Fl_Function_Type.cxx
similarity index 99%
rename from fluid/Fl_Function_Type.cxx
rename to fluid/nodes/Fl_Function_Type.cxx
index 935cd64057b6d2344807a34a4386496d5f06c1c2..1f0a4fea501f834cfa2e260563173af70a64306a 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/fluid/nodes/Fl_Function_Type.cxx
@@ -14,18 +14,18 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Function_Type.h"
-
-#include "fluid.h"
-#include "Fl_Window_Type.h"
-#include "Fl_Group_Type.h"
-#include "widget_browser.h"
-#include "file.h"
-#include "code.h"
-#include "function_panel.h"
-#include "comments.h"
-#include "mergeback.h"
-#include "undo.h"
+#include "nodes/Fl_Function_Type.h"
+
+#include "app/fluid.h"
+#include "app/mergeback.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/Fl_Window_Type.h"
+#include "nodes/Fl_Group_Type.h"
+#include "panels/function_panel.h"
+#include "rsrcs/comments.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/fl_string_functions.h>
 #include <FL/Fl_File_Chooser.H>
diff --git a/fluid/Fl_Function_Type.h b/fluid/nodes/Fl_Function_Type.h
similarity index 98%
rename from fluid/Fl_Function_Type.h
rename to fluid/nodes/Fl_Function_Type.h
index 91a0e521ae3e5157c29a358f0864933b3d8f45aa..536a511c00763a684b966144ba6cc843ce02a50a 100644
--- a/fluid/Fl_Function_Type.h
+++ b/fluid/nodes/Fl_Function_Type.h
@@ -17,13 +17,13 @@
 #ifndef _FLUID_FL_FUNCTION_TYPE_H
 #define _FLUID_FL_FUNCTION_TYPE_H
 
-#include "Fl_Type.h"
+#include "nodes/Fl_Type.h"
 
-#include "Fluid_Image.h"
+#include "app/Fluid_Image.h"
 #ifdef _WIN32
-#include "ExternalCodeEditor_WIN32.h"
+#include "tools/ExternalCodeEditor_WIN32.h"
 #else
-#include "ExternalCodeEditor_UNIX.h"
+#include "tools/ExternalCodeEditor_UNIX.h"
 #endif
 
 #include <FL/Fl_Widget.H>
diff --git a/fluid/Fl_Grid_Type.cxx b/fluid/nodes/Fl_Grid_Type.cxx
similarity index 99%
rename from fluid/Fl_Grid_Type.cxx
rename to fluid/nodes/Fl_Grid_Type.cxx
index 45110a880683b1bf9ab7e02a60c00a30fd1612e4..2ae05a0cedd3a50d69374852bf6bfad5c84da5e3 100644
--- a/fluid/Fl_Grid_Type.cxx
+++ b/fluid/nodes/Fl_Grid_Type.cxx
@@ -14,15 +14,15 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Grid_Type.h"
-
-#include "fluid.h"
-#include "file.h"
-#include "code.h"
-#include "widget_browser.h"
-#include "undo.h"
-#include "Fd_Snap_Action.h"
-#include "custom_widgets.h"
+#include "nodes/Fl_Grid_Type.h"
+
+#include "app/fluid.h"
+#include "app/Fd_Snap_Action.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "widgets/widget_browser.h"
+#include "widgets/custom_widgets.h"
 
 #include <FL/Fl_Grid.H>
 #include <FL/Fl_Value_Input.H>
diff --git a/fluid/Fl_Grid_Type.h b/fluid/nodes/Fl_Grid_Type.h
similarity index 98%
rename from fluid/Fl_Grid_Type.h
rename to fluid/nodes/Fl_Grid_Type.h
index 2098cf78319cd996870b3892f8688a37a4d0a0fd..1093a38f3e5166727654165dc0f366ee020a1eb1 100644
--- a/fluid/Fl_Grid_Type.h
+++ b/fluid/nodes/Fl_Grid_Type.h
@@ -17,7 +17,7 @@
 #ifndef _FLUID_FL_GRID_TYPE_H
 #define _FLUID_FL_GRID_TYPE_H
 
-#include "Fl_Group_Type.h"
+#include "nodes/Fl_Group_Type.h"
 #include <FL/Fl_Grid.H>
 
 // ---- Fl_Grid_Type --------------------------------------------------- MARK: -
diff --git a/fluid/Fl_Group_Type.cxx b/fluid/nodes/Fl_Group_Type.cxx
similarity index 99%
rename from fluid/Fl_Group_Type.cxx
rename to fluid/nodes/Fl_Group_Type.cxx
index d3ec98fce05191cf48e9be6e7c215a45d03b2f0d..a7ab20473bf2b95a8f4cde046b55022d200bf7f5 100644
--- a/fluid/Fl_Group_Type.cxx
+++ b/fluid/nodes/Fl_Group_Type.cxx
@@ -18,14 +18,14 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Group_Type.h"
-
-#include "fluid.h"
-#include "file.h"
-#include "code.h"
-#include "widget_browser.h"
-#include "undo.h"
-#include "Fd_Snap_Action.h"
+#include "nodes/Fl_Group_Type.h"
+
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "app/Fd_Snap_Action.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Group.H>
diff --git a/fluid/Fl_Group_Type.h b/fluid/nodes/Fl_Group_Type.h
similarity index 99%
rename from fluid/Fl_Group_Type.h
rename to fluid/nodes/Fl_Group_Type.h
index 1f7bc2747832e145d50316d248a672d54a0dfd00..88645a08eae2675d81f38c1ea5719f6ccfcbdfb5 100644
--- a/fluid/Fl_Group_Type.h
+++ b/fluid/nodes/Fl_Group_Type.h
@@ -17,7 +17,7 @@
 #ifndef _FLUID_FL_GROUP_TYPE_H
 #define _FLUID_FL_GROUP_TYPE_H
 
-#include "Fl_Widget_Type.h"
+#include "nodes/Fl_Widget_Type.h"
 
 #include <FL/Fl_Tabs.H>
 #include <FL/Fl_Pack.H>
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/nodes/Fl_Menu_Type.cxx
similarity index 99%
rename from fluid/Fl_Menu_Type.cxx
rename to fluid/nodes/Fl_Menu_Type.cxx
index 35670766bfb11094aa642e977ee75d5729c49cf5..684d765f88929628bb735b4faaada3b29a15084c 100644
--- a/fluid/Fl_Menu_Type.cxx
+++ b/fluid/nodes/Fl_Menu_Type.cxx
@@ -20,17 +20,17 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Menu_Type.h"
-
-#include "fluid.h"
-#include "Fl_Window_Type.h"
-#include "file.h"
-#include "code.h"
-#include "Fluid_Image.h"
-#include "custom_widgets.h"
-#include "mergeback.h"
-#include "undo.h"
-#include "widget_browser.h"
+#include "nodes/Fl_Menu_Type.h"
+
+#include "app/fluid.h"
+#include "app/Fluid_Image.h"
+#include "app/mergeback.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/Fl_Window_Type.h"
+#include "widgets/custom_widgets.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #include <FL/fl_message.H>
diff --git a/fluid/Fl_Menu_Type.h b/fluid/nodes/Fl_Menu_Type.h
similarity index 99%
rename from fluid/Fl_Menu_Type.h
rename to fluid/nodes/Fl_Menu_Type.h
index 41bddced6cf33b38087461ef2ab45c4f47acbcfb..b4ad90081203115bbfbae51991374cb0e023616a 100644
--- a/fluid/Fl_Menu_Type.h
+++ b/fluid/nodes/Fl_Menu_Type.h
@@ -21,9 +21,9 @@
 #ifndef _FLUID_FL_MENU_TYPE_H
 #define _FLUID_FL_MENU_TYPE_H
 
-#include "Fl_Button_Type.h"
+#include "nodes/Fl_Button_Type.h"
 
-#include "Fd_Snap_Action.h"
+#include "app/Fd_Snap_Action.h"
 
 #include <FL/Fl_Choice.H>
 #include <FL/Fl_Menu_.H>
diff --git a/fluid/Fl_Type.cxx b/fluid/nodes/Fl_Type.cxx
similarity index 99%
rename from fluid/Fl_Type.cxx
rename to fluid/nodes/Fl_Type.cxx
index 444047cd815bf196f5957050ac78b30502410552..56a15175ecdc1bc37f2f11e89b3abc2954586f2d 100644
--- a/fluid/Fl_Type.cxx
+++ b/fluid/nodes/Fl_Type.cxx
@@ -94,20 +94,20 @@
 
 */
 
-#include "Fl_Type.h"
-
-#include "fluid.h"
-#include "Fd_Snap_Action.h"
-#include "Fl_Function_Type.h"
-#include "Fl_Widget_Type.h"
-#include "Fl_Window_Type.h"
-#include "Fl_Group_Type.h"
-#include "widget_browser.h"
-#include "file.h"
-#include "code.h"
-#include "undo.h"
-#include "pixmaps.h"
-#include "shell_command.h"
+#include "nodes/Fl_Type.h"
+
+#include "app/fluid.h"
+#include "app/Fd_Snap_Action.h"
+#include "app/shell_command.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/Fl_Function_Type.h"
+#include "nodes/Fl_Widget_Type.h"
+#include "nodes/Fl_Window_Type.h"
+#include "nodes/Fl_Group_Type.h"
+#include "rsrcs/pixmaps.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Browser_.H>
diff --git a/fluid/Fl_Type.h b/fluid/nodes/Fl_Type.h
similarity index 99%
rename from fluid/Fl_Type.h
rename to fluid/nodes/Fl_Type.h
index 50f4b34b196af104ecc19444aa2ffccf99f97cca..478059c1384f876e40fbfae8c3b9fc0b1b7d3fb7 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/nodes/Fl_Type.h
@@ -1,7 +1,7 @@
 //
 // Widget type header file for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -17,11 +17,11 @@
 #ifndef _FLUID_FL_TYPE_H
 #define _FLUID_FL_TYPE_H
 
+#include "io/code.h"
+
 #include <FL/Fl_Widget.H>
 #include <FL/fl_draw.H>
 
-#include "code.h"
-
 class Fl_Type;
 class Fl_Group_Type;
 class Fl_Window_Type;
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/nodes/Fl_Widget_Type.cxx
similarity index 99%
rename from fluid/Fl_Widget_Type.cxx
rename to fluid/nodes/Fl_Widget_Type.cxx
index b92ef53cc278edd8fd96035610195e6eb3d5d09b..27e309cbe0943308077b208c9ec6e18d45951516 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/nodes/Fl_Widget_Type.cxx
@@ -1,7 +1,7 @@
 //
 // Widget type code for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -14,20 +14,20 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Widget_Type.h"
-
-#include "fluid.h"
-#include "Fl_Window_Type.h"
-#include "Fl_Group_Type.h"
-#include "Fl_Menu_Type.h"
-#include "Fl_Function_Type.h"
-#include "file.h"
-#include "code.h"
-#include "Fluid_Image.h"
-#include "settings_panel.h"
-#include "widget_panel.h"
-#include "undo.h"
-#include "mergeback.h"
+#include "nodes/Fl_Widget_Type.h"
+
+#include "app/fluid.h"
+#include "app/Fluid_Image.h"
+#include "app/mergeback.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/Fl_Window_Type.h"
+#include "nodes/Fl_Group_Type.h"
+#include "nodes/Fl_Menu_Type.h"
+#include "nodes/Fl_Function_Type.h"
+#include "panels/settings_panel.h"
+#include "panels/widget_panel.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Group.H>
diff --git a/fluid/Fl_Widget_Type.h b/fluid/nodes/Fl_Widget_Type.h
similarity index 99%
rename from fluid/Fl_Widget_Type.h
rename to fluid/nodes/Fl_Widget_Type.h
index 40470c54463294f996d1078a102e03be6cecd196..76bea3404f92795ef171d96014ec036a9bf58b53 100644
--- a/fluid/Fl_Widget_Type.h
+++ b/fluid/nodes/Fl_Widget_Type.h
@@ -21,7 +21,7 @@
 #ifndef _FLUID_FL_WIDGET_TYPE_H
 #define _FLUID_FL_WIDGET_TYPE_H
 
-#include "Fl_Type.h"
+#include "nodes/Fl_Type.h"
 
 #define NUM_EXTRA_CODE 4
 
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/nodes/Fl_Window_Type.cxx
similarity index 99%
rename from fluid/Fl_Window_Type.cxx
rename to fluid/nodes/Fl_Window_Type.cxx
index de58fb76225804c0ec8c4edc46313d81cc23fdae..c26191b7236a930ff436b8dc3b9131879c4d8274 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/nodes/Fl_Window_Type.cxx
@@ -5,7 +5,7 @@
 // for interacting with the overlay, which allows the user to
 // select, move, and resize the children widgets.
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -18,19 +18,19 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "Fl_Window_Type.h"
-
-#include "Fl_Group_Type.h"
-#include "Fl_Grid_Type.h"
-#include "fluid.h"
-#include "widget_browser.h"
-#include "undo.h"
-#include "settings_panel.h"
-#include "file.h"
-#include "code.h"
-#include "widget_panel.h"
-#include "factory.h"
-#include "Fd_Snap_Action.h"
+#include "nodes/Fl_Window_Type.h"
+
+#include "app/Fd_Snap_Action.h"
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "io/file.h"
+#include "io/code.h"
+#include "nodes/factory.h"
+#include "nodes/Fl_Group_Type.h"
+#include "nodes/Fl_Grid_Type.h"
+#include "panels/settings_panel.h"
+#include "panels/widget_panel.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Overlay_Window.H>
diff --git a/fluid/Fl_Window_Type.h b/fluid/nodes/Fl_Window_Type.h
similarity index 99%
rename from fluid/Fl_Window_Type.h
rename to fluid/nodes/Fl_Window_Type.h
index 3b9a03e6257a0430f3e84c7fc2cf73147183f415..a0695f2a158c5877ab59fa6597990de13040a576 100644
--- a/fluid/Fl_Window_Type.h
+++ b/fluid/nodes/Fl_Window_Type.h
@@ -21,7 +21,7 @@
 #ifndef _FLUID_FL_WINDOW_TYPE_H
 #define _FLUID_FL_WINDOW_TYPE_H
 
-#include "Fl_Group_Type.h"
+#include "nodes/Fl_Group_Type.h"
 
 class Fl_Widget_Class_Type;
 
diff --git a/fluid/factory.cxx b/fluid/nodes/factory.cxx
similarity index 99%
rename from fluid/factory.cxx
rename to fluid/nodes/factory.cxx
index a96a1ec458570c39ce0f21fc24c31760349a8899..ad5d388e1fce10d50d6f778c84b358cd27c981d0 100644
--- a/fluid/factory.cxx
+++ b/fluid/nodes/factory.cxx
@@ -9,7 +9,7 @@
 // to a factory instance for every class (both the ones defined
 // here and ones in other files)
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -22,15 +22,15 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "factory.h"
+#include "nodes/factory.h"
 
-#include "fluid.h"
-#include "Fl_Group_Type.h"
-#include "Fl_Grid_Type.h"
-#include "Fl_Menu_Type.h"
-#include "Fd_Snap_Action.h"
-#include "pixmaps.h"
-#include "undo.h"
+#include "app/Fd_Snap_Action.h"
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "nodes/Fl_Group_Type.h"
+#include "nodes/Fl_Grid_Type.h"
+#include "nodes/Fl_Menu_Type.h"
+#include "rsrcs/pixmaps.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Adjuster.H>
diff --git a/fluid/factory.h b/fluid/nodes/factory.h
similarity index 97%
rename from fluid/factory.h
rename to fluid/nodes/factory.h
index 7f3ca6dfa1820f7b36b864e53272da8d94705535..f1968b167cfafe420a1823799c73c6562a7bfd0b 100644
--- a/fluid/factory.h
+++ b/fluid/nodes/factory.h
@@ -17,7 +17,7 @@
 #ifndef _FLUID_FACTORY_H
 #define _FLUID_FACTORY_H
 
-#include "Fl_Type.h"
+#include "nodes/Fl_Type.h"
 
 struct Fl_Menu_Item;
 
diff --git a/fluid/about_panel.cxx b/fluid/panels/about_panel.cxx
similarity index 99%
rename from fluid/about_panel.cxx
rename to fluid/panels/about_panel.cxx
index b28347ae515a3e9ee2b58a3adee77ba21ee502da..ab36ddc10dfce048f7bb59708f8f27e2cee8d590 100644
--- a/fluid/about_panel.cxx
+++ b/fluid/panels/about_panel.cxx
@@ -201,7 +201,7 @@ Fl_Double_Window* make_about_panel() {
 /**
  Embedded image for internal fluid.html web page.
 */
-unsigned char fluid_flow_chart_800_png[41559] = /* data inlined from documentation/src/fluid_flow_chart_800.png */
+unsigned char fluid_flow_chart_800_png[41559] = /* data inlined from ../documentation/src/fluid_flow_chart_800.png */
 {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,3,32,0,0,1,41,8,6,0,0,0,
 107,224,70,137,0,0,1,110,105,67,67,80,105,99,99,0,0,40,145,117,145,187,75,195,
 80,20,198,127,173,79,172,226,160,131,136,67,6,149,14,22,124,128,56,106,29,92,
diff --git a/fluid/about_panel.fl b/fluid/panels/about_panel.fl
similarity index 93%
rename from fluid/about_panel.fl
rename to fluid/panels/about_panel.fl
index 6ef5bdbd08f5a89c32c39ea0216f5c1c4e11f616..3b5d54b722642ea14f975c990d775f130a0c4fdd 100644
--- a/fluid/about_panel.fl
+++ b/fluid/panels/about_panel.fl
@@ -40,7 +40,7 @@ if (!cbuf[0]) {
     code0 {\#include "../src/flstring.h"} non_modal visible
   } {
     Fl_Box {} {
-      image {icons/fluid.animated.gif} compress_image 1 xywh {10 10 115 120}
+      image {../icons/fluid.animated.gif} compress_image 1 xywh {10 10 115 120}
       code0 {((Fl_Anim_GIF_Image*)(o->image()))->speed(0.5f);}
     }
     Fl_Box {} {
@@ -72,5 +72,5 @@ Version x.x.x}
 }
 
 data fluid_flow_chart_800_png {
-  comment {Embedded image for internal fluid.html web page.} selected public local filename {documentation/src/fluid_flow_chart_800.png}
+  comment {Embedded image for internal fluid.html web page.} selected public local filename {../documentation/src/fluid_flow_chart_800.png}
 }
diff --git a/fluid/about_panel.h b/fluid/panels/about_panel.h
similarity index 100%
rename from fluid/about_panel.h
rename to fluid/panels/about_panel.h
diff --git a/fluid/codeview_panel.cxx b/fluid/panels/codeview_panel.cxx
similarity index 99%
rename from fluid/codeview_panel.cxx
rename to fluid/panels/codeview_panel.cxx
index 78674a7d80e0737a1452287abcf0afc4f421a461..33fb92ebdad4710c4d93a0f4c57184f885d10d25 100644
--- a/fluid/codeview_panel.cxx
+++ b/fluid/panels/codeview_panel.cxx
@@ -17,11 +17,11 @@
 // generated by Fast Light User Interface Designer (fluid) version 1.0500
 
 #include "codeview_panel.h"
-#include "fluid.h"
-#include "file.h"
-#include "../src/flstring.h"
+#include "app/fluid.h"
+#include "io/file.h"
 #include <FL/Fl_Tabs.H>
 #include <FL/Fl_Button.H>
+#include "../src/flstring.h"
 static char *cv_source_filename = NULL;
 static char *cv_header_filename = NULL;
 static char *cv_design_filename = NULL;
diff --git a/fluid/codeview_panel.fl b/fluid/panels/codeview_panel.fl
similarity index 98%
rename from fluid/codeview_panel.fl
rename to fluid/panels/codeview_panel.fl
index 5417ad9c7e50c9a039a9eecbf0d3bc10736feb5e..54f0d790fd6120e9654d1fede1f5d2be05a60dff 100644
--- a/fluid/codeview_panel.fl
+++ b/fluid/panels/codeview_panel.fl
@@ -20,13 +20,10 @@ comment {//
 } {in_source in_header
 }
 
-decl {\#include "fluid.h"} {private local
+decl {\#include "app/fluid.h"} {private local
 }
 
-decl {\#include "file.h"} {private local
-}
-
-decl {\#include "../src/flstring.h"} {selected private local
+decl {\#include "io/file.h"} {private local
 }
 
 decl {\#include <FL/Fl_Tabs.H>} {private local
@@ -35,6 +32,9 @@ decl {\#include <FL/Fl_Tabs.H>} {private local
 decl {\#include <FL/Fl_Button.H>} {private local
 }
 
+decl {\#include "../src/flstring.h"} {selected private local
+}
+
 decl {char *cv_source_filename = NULL;} {private local
 }
 
@@ -296,7 +296,7 @@ Function {make_codeview()} {open
       } {
         Fl_Text_Editor cv_source {
           xywh {10 40 500 410} textfont 4 textsize 11 resizable
-          code0 {\#include "CodeEditor.h"}
+          code0 {\#include "widgets/CodeEditor.h"}
           code1 {o->linenumber_width(60);}
           code2 {o->linenumber_size(o->Fl_Text_Display::textsize());}
           class CodeViewer
@@ -308,7 +308,7 @@ Function {make_codeview()} {open
       } {
         Fl_Text_Editor cv_header {
           xywh {10 40 500 410} textfont 4 textsize 11 resizable
-          code0 {\#include "CodeEditor.h"}
+          code0 {\#include "widgets/CodeEditor.h"}
           code1 {o->linenumber_width(60);}
           code2 {o->linenumber_size(o->Fl_Text_Display::textsize());}
           class CodeViewer
diff --git a/fluid/codeview_panel.h b/fluid/panels/codeview_panel.h
similarity index 98%
rename from fluid/codeview_panel.h
rename to fluid/panels/codeview_panel.h
index 34efd22afeff5e273f0e57b753d59382c2e49e1e..6dbbde1b4cedd4f446e95e712e465ba6496e28de 100644
--- a/fluid/codeview_panel.h
+++ b/fluid/panels/codeview_panel.h
@@ -33,7 +33,7 @@ extern Fl_Double_Window *codeview_panel;
 extern Fl_Tabs *cv_tab;
 #include <FL/Fl_Group.H>
 extern Fl_Group *cv_source_tab;
-#include "CodeEditor.h"
+#include "widgets/CodeEditor.h"
 extern CodeViewer *cv_source;
 extern CodeViewer *cv_header;
 extern TextViewer *cv_strings;
diff --git a/fluid/function_panel.cxx b/fluid/panels/function_panel.cxx
similarity index 99%
rename from fluid/function_panel.cxx
rename to fluid/panels/function_panel.cxx
index 489341c5b41febadf1387a78e2df20a904eafd12..2f8f728174f68edb177a23dc6287c953f761d6ae 100644
--- a/fluid/function_panel.cxx
+++ b/fluid/panels/function_panel.cxx
@@ -17,13 +17,13 @@
 // generated by Fast Light User Interface Designer (fluid) version 1.0500
 
 #include "function_panel.h"
-#include "fluid.h"
-#include "custom_widgets.h"
-#include "pixmaps.h"
-#include "factory.h"
-#include "Fl_Type.h"
-#include "widget_browser.h"
-#include "undo.h"
+#include "app/fluid.h"
+#include "app/undo.h"
+#include "nodes/Fl_Type.h"
+#include "nodes/factory.h"
+#include "rsrcs/pixmaps.h"
+#include "widgets/custom_widgets.h"
+#include "widgets/widget_browser.h"
 
 /**
  Allow widget navigation on text fields with Tab.
diff --git a/fluid/function_panel.fl b/fluid/panels/function_panel.fl
similarity index 98%
rename from fluid/function_panel.fl
rename to fluid/panels/function_panel.fl
index 7c77af00963a525f0033a4341166059ae4a04f68..5ad6325fc38a661b03b9991f797adee8c24960f4 100644
--- a/fluid/function_panel.fl
+++ b/fluid/panels/function_panel.fl
@@ -25,25 +25,25 @@ comment {//
 } {in_source in_header
 }
 
-decl {\#include "fluid.h"} {private local
+decl {\#include "app/fluid.h"} {private local
 }
 
-decl {\#include "custom_widgets.h"} {private global
+decl {\#include "app/undo.h"} {selected private local
 }
 
-decl {\#include "pixmaps.h"} {private local
+decl {\#include "nodes/Fl_Type.h"} {private local
 }
 
-decl {\#include "factory.h"} {private local
+decl {\#include "nodes/factory.h"} {private local
 }
 
-decl {\#include "Fl_Type.h"} {private local
+decl {\#include "rsrcs/pixmaps.h"} {private local
 }
 
-decl {\#include "widget_browser.h"} {private local
+decl {\#include "widgets/custom_widgets.h"} {private global
 }
 
-decl {\#include "undo.h"} {private local
+decl {\#include "widgets/widget_browser.h"} {private local
 }
 
 Function {use_tab_navigation(int, Fl_Text_Editor*)} {
@@ -152,7 +152,7 @@ code_panel->hide(); // otherwise hide..}
     Fl_Text_Editor code_input {
       xywh {10 10 520 130} box DOWN_BOX labelsize 11 textfont 4 textsize 11 resizable
       code0 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);}
-      code1 {\#include "CodeEditor.h"}
+      code1 {\#include "widgets/CodeEditor.h"}
       class CodeEditor
     }
     Fl_Group {} {open
@@ -343,7 +343,7 @@ Function {make_decl_panel()} {open
         Fl_Text_Editor decl_input {
           label {This can be any declaration, like "int x;", an external symbol like "extern int foo();", a \#directive like "\#include <foo.h>", a comment like "//foo" or "/*foo*/", or typedef like "typedef char byte;" or "using std::list;".}
           xywh {10 40 320 45} labelsize 11 align 134 resizable
-          code0 {\#include "CodeEditor.h"}
+          code0 {\#include "widgets/CodeEditor.h"}
           class CodeEditor
         }
         Fl_Box {} {
@@ -591,8 +591,7 @@ Function {type_make_cb(Fl_Widget*,void*d)} {open return_type void
 if (Fl_Type::current && Fl_Type::current->can_have_children())
   add_new_widget_from_user(type_name, Strategy::AS_LAST_CHILD);
 else
-  add_new_widget_from_user(type_name, Strategy::AFTER_CURRENT);} {selected
-  }
+  add_new_widget_from_user(type_name, Strategy::AFTER_CURRENT);} {}
 }
 
 Function {make_widgetbin()} {open
diff --git a/fluid/function_panel.h b/fluid/panels/function_panel.h
similarity index 99%
rename from fluid/function_panel.h
rename to fluid/panels/function_panel.h
index d41a9d355e7f200ed3bbc2abc0e2c8eb9ffd0992..9dffa5c0495e0941bf5807c20a9cc002047735ba 100644
--- a/fluid/function_panel.h
+++ b/fluid/panels/function_panel.h
@@ -41,7 +41,7 @@ Fl_Double_Window* make_function_panel();
 extern Fl_Menu_Item menu_f_public_member_choice[];
 extern Fl_Menu_Item menu_f_public_choice[];
 extern Fl_Double_Window *code_panel;
-#include "CodeEditor.h"
+#include "widgets/CodeEditor.h"
 extern CodeEditor *code_input;
 extern Fl_Return_Button *code_panel_ok;
 extern Fl_Button *code_panel_cancel;
diff --git a/fluid/print_panel.cxx b/fluid/panels/print_panel.cxx
similarity index 99%
rename from fluid/print_panel.cxx
rename to fluid/panels/print_panel.cxx
index bf1dca655b93395c6e0563b32f524a7bdd06f289..f585efee57a3271c71b0c3c0701b6fdacde0e642 100644
--- a/fluid/print_panel.cxx
+++ b/fluid/panels/print_panel.cxx
@@ -17,7 +17,7 @@
 // generated by Fast Light User Interface Designer (fluid) version 1.0500
 
 #include "print_panel.h"
-#include "fluid.h"
+#include "app/fluid.h"
 #include <FL/fl_string_functions.h>
 #include "../src/flstring.h"
 #include <stdlib.h>
diff --git a/fluid/print_panel.fl b/fluid/panels/print_panel.fl
similarity index 93%
rename from fluid/print_panel.fl
rename to fluid/panels/print_panel.fl
index 382eece2b3e3fc4c09cb95dc80260742e1a23141..ae1899c3e5fa69afa6edaa46d55858c4a9ae6e59 100644
--- a/fluid/print_panel.fl
+++ b/fluid/panels/print_panel.fl
@@ -20,7 +20,7 @@ comment {//
 } {in_source in_header
 }
 
-decl {\#include "fluid.h"} {private local
+decl {\#include "app/fluid.h"} {private local
 }
 
 decl {\#include <FL/fl_string_functions.h>} {private local
@@ -233,16 +233,16 @@ print_update_status();}
       xywh {110 45 170 40} labelfont 1 labelsize 12 align 4
     } {
       Fl_Button {print_output_mode[0]} {
-        image {pixmaps/print_color.xpm} compress_image 0 xywh {110 45 30 40} type Radio box BORDER_BOX down_box BORDER_BOX value 1 color 7 selection_color 0
+        image {../pixmaps/print_color.xpm} compress_image 0 xywh {110 45 30 40} type Radio box BORDER_BOX down_box BORDER_BOX value 1 color 7 selection_color 0
       }
       Fl_Button {print_output_mode[1]} {
-        image {pixmaps/print_color.xpm} compress_image 0 xywh {150 50 40 30} type Radio box BORDER_BOX down_box BORDER_BOX color 7 selection_color 0
+        image {../pixmaps/print_color.xpm} compress_image 0 xywh {150 50 40 30} type Radio box BORDER_BOX down_box BORDER_BOX color 7 selection_color 0
       }
       Fl_Button {print_output_mode[2]} {
-        image {pixmaps/print_gray.xpm} compress_image 0 xywh {200 45 30 40} type Radio box BORDER_BOX down_box BORDER_BOX color 7 selection_color 0
+        image {../pixmaps/print_gray.xpm} compress_image 0 xywh {200 45 30 40} type Radio box BORDER_BOX down_box BORDER_BOX color 7 selection_color 0
       }
       Fl_Button {print_output_mode[3]} {
-        image {pixmaps/print_gray.xpm} compress_image 0 xywh {240 50 40 30} type Radio box BORDER_BOX down_box BORDER_BOX color 7 selection_color 0
+        image {../pixmaps/print_gray.xpm} compress_image 0 xywh {240 50 40 30} type Radio box BORDER_BOX down_box BORDER_BOX color 7 selection_color 0
       }
     }
     Fl_Return_Button {} {
diff --git a/fluid/print_panel.h b/fluid/panels/print_panel.h
similarity index 100%
rename from fluid/print_panel.h
rename to fluid/panels/print_panel.h
diff --git a/fluid/settings_panel.cxx b/fluid/panels/settings_panel.cxx
similarity index 99%
rename from fluid/settings_panel.cxx
rename to fluid/panels/settings_panel.cxx
index 291f5d24ad58ee3946171a0112b84e5b0b9e7fbe..a0e2092a89f88f41ce10e8b4f9cb631c7d382019 100644
--- a/fluid/settings_panel.cxx
+++ b/fluid/panels/settings_panel.cxx
@@ -17,12 +17,12 @@
 // generated by Fast Light User Interface Designer (fluid) version 1.0500
 
 #include "settings_panel.h"
-#include "undo.h"
+#include "app/undo.h"
 #include <FL/Fl_Preferences.H>
 #include <FL/Fl_Tooltip.H>
 #include <FL/fl_ask.H>
-#include <string.h>
 #include "../src/flstring.h"
+#include <string.h>
 void scheme_cb(Fl_Scheme_Choice *, void *);
 int w_settings_shell_list_selected;
 
diff --git a/fluid/settings_panel.fl b/fluid/panels/settings_panel.fl
similarity index 98%
rename from fluid/settings_panel.fl
rename to fluid/panels/settings_panel.fl
index 540ca48df74f9b851bd28a82e9f2eb901e43beae..a53e96b4b2aff0bc13b05ecccee945eb25179f29 100644
--- a/fluid/settings_panel.fl
+++ b/fluid/panels/settings_panel.fl
@@ -49,28 +49,28 @@ comment {//
 } {in_source in_header
 }
 
-decl {\#include "fluid.h"} {public global
+decl {\#include "app/fluid.h"} {public global
 }
 
-decl {\#include "undo.h"} {private global
+decl {\#include "app/undo.h"} {private global
 }
 
-decl {\#include "widget_browser.h"} {public global
+decl {\#include "app/Fd_Snap_Action.h"} {public global
 }
 
-decl {\#include "Fd_Snap_Action.h"} {public global
+decl {\#include "app/shell_command.h"} {public global
 }
 
-decl {\#include "shell_command.h"} {public global
+decl {\#include "tools/fluid_filename.h"} {public local
 }
 
-decl {\#include <FL/Fl_Text_Buffer.H>} {public local
+decl {\#include "widgets/widget_browser.h"} {public global
 }
 
-decl {\#include <FL/Fl_Text_Display.H>} {public local
+decl {\#include <FL/Fl_Text_Buffer.H>} {public local
 }
 
-decl {\#include "fluid_filename.h"} {public local
+decl {\#include <FL/Fl_Text_Display.H>} {public local
 }
 
 decl {\#include <FL/fl_string_functions.h>} {public local
@@ -88,10 +88,10 @@ decl {\#include <FL/Fl_Tooltip.H>} {private global
 decl {\#include <FL/fl_ask.H>} {private global
 }
 
-decl {\#include <string.h>} {private global
+decl {\#include "../src/flstring.h"} {selected private global
 }
 
-decl {\#include "../src/flstring.h"} {private global
+decl {\#include <string.h>} {private global
 }
 
 decl {void init_scheme(void);} {
@@ -196,8 +196,8 @@ Function {make_settings_window()} {open
       xywh {10 10 320 530} selection_color 12 labelsize 11 labelcolor 255 resizable
     } {
       Fl_Group w_settings_general_tab {
-        label General open selected
-        scale_image {36 24} image {icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 resizable
+        label General open
+        scale_image {36 24} image {../icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 resizable
       } {
         Fl_Group {} {
           callback {propagate_load(o, v);} open
@@ -332,7 +332,7 @@ Examples:
       Fl_Group w_settings_project_tab {
         label Project
         callback {propagate_load(o, v);} open
-        scale_image {36 24} image {icons/document_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
+        scale_image {36 24} image {../icons/document_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
       } {
         Fl_Group {} {open
           xywh {100 78 220 30}
@@ -448,7 +448,7 @@ or just ".ext" to set extension.}
       Fl_Group w_settings_layout_tab {
         label Layout
         callback {propagate_load(o, v);} open
-        scale_image {36 24} image {icons/layout_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
+        scale_image {36 24} image {../icons/layout_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
       } {
         Fl_Box {} {
           label {Layout:}
@@ -893,7 +893,7 @@ g_layout_list.update_dialogs();}
       Fl_Group w_settings_shell_tab {
         label Shell
         callback propagate_load open
-        scale_image {36 24} image {icons/shell_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
+        scale_image {36 24} image {../icons/shell_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
       } {
         Fl_Group {} {
           callback propagate_load open
@@ -1512,18 +1512,18 @@ if (v == LOAD) {
           }
         }
         Fl_Box w_settings_shell_fd_project {
-          image {pixmaps/fd_project.png} compress_image 1 bind_image 1 bind_deimage 1 xywh {20 70 16 15} labelsize 11 hide deactivate
+          image {../pixmaps/fd_project.png} compress_image 1 bind_image 1 bind_deimage 1 xywh {20 70 16 15} labelsize 11 hide deactivate
           code0 {o->image()->scale(16, 16);}
         }
         Fl_Box w_settings_shell_fd_user {
-          image {pixmaps/fd_user.png} compress_image 1 bind_image 1 bind_deimage 1 xywh {20 70 16 15} labelsize 11 hide deactivate
+          image {../pixmaps/fd_user.png} compress_image 1 bind_image 1 bind_deimage 1 xywh {20 70 16 15} labelsize 11 hide deactivate
           code0 {o->image()->scale(16, 16);}
         }
       }
       Fl_Group w_settings_i18n_tab {
         label Locale
         callback {propagate_load(o, v);} open
-        scale_image {36 24} image {icons/language_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
+        scale_image {36 24} image {../icons/language_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
       } {
         Fl_Group {} {
           callback propagate_load open
@@ -1664,7 +1664,7 @@ if (v == LOAD) {
       Fl_Group w_settings_user_tab {
         label User
         callback {propagate_load(o, v);} open
-        scale_image {36 24} image {icons/user_circle_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
+        scale_image {36 24} image {../icons/user_circle_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 hide
         code0 {\#include <FL/fl_show_colormap.H>}
       } {
         Fl_Box {} {
diff --git a/fluid/settings_panel.h b/fluid/panels/settings_panel.h
similarity index 97%
rename from fluid/settings_panel.h
rename to fluid/panels/settings_panel.h
index a582f69e6e182e1757866dc0c0dfc51815e47eff..918e69c8aa7f2ec58b50facb44eed849490be075 100644
--- a/fluid/settings_panel.h
+++ b/fluid/panels/settings_panel.h
@@ -19,13 +19,13 @@
 #ifndef settings_panel_h
 #define settings_panel_h
 #include <FL/Fl.H>
-#include "fluid.h"
-#include "widget_browser.h"
-#include "Fd_Snap_Action.h"
-#include "shell_command.h"
+#include "app/fluid.h"
+#include "app/Fd_Snap_Action.h"
+#include "app/shell_command.h"
+#include "tools/fluid_filename.h"
+#include "widgets/widget_browser.h"
 #include <FL/Fl_Text_Buffer.H>
 #include <FL/Fl_Text_Display.H>
-#include "fluid_filename.h"
 #include <FL/fl_string_functions.h>
 #include <FL/Fl_Scheme_Choice.H>
 /**
diff --git a/fluid/template_panel.cxx b/fluid/panels/template_panel.cxx
similarity index 98%
rename from fluid/template_panel.cxx
rename to fluid/panels/template_panel.cxx
index 7bc8943c0fd0d28635b8670f5ef7909088ad372a..ec4a5e29a2abc3f8c66f1d00feb8b0bf523e8eeb 100644
--- a/fluid/template_panel.cxx
+++ b/fluid/panels/template_panel.cxx
@@ -17,11 +17,11 @@
 // generated by Fast Light User Interface Designer (fluid) version 1.0500
 
 #include "template_panel.h"
-#include "fluid.h"
+#include "app/fluid.h"
+#include "tools/fluid_filename.h"
 #include <FL/Fl_Shared_Image.H>
 #include <FL/fl_ask.H>
 #include <FL/fl_string_functions.h>
-#include "fluid_filename.h"
 #include "../src/flstring.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -218,7 +218,7 @@ void template_delete_cb(Fl_Button *, void *) {
 }
 
 static int tmpl_FLTK_License_fl_size = 614;
-static unsigned char tmpl_FLTK_License_fl[397] = /* data compressed and inlined from templates/FLTK_License.fl */
+static unsigned char tmpl_FLTK_License_fl[397] = /* data compressed and inlined from ../templates/FLTK_License.fl */
 {120,156,133,82,77,79,27,49,16,189,239,175,120,162,23,144,202,110,130,56,20,
 78,208,80,170,8,148,34,17,14,61,33,239,122,118,61,194,177,87,246,44,75,26,229,
 191,215,94,18,245,88,159,236,241,251,154,177,191,64,43,81,104,217,18,90,31,32,
@@ -240,7 +240,7 @@ static unsigned char tmpl_FLTK_License_fl[397] = /* data compressed and inlined
 190,201,192};
 
 static int tmpl_1of7GUIs_fl_size = 763;
-static unsigned char tmpl_1of7GUIs_fl[486] = /* data compressed and inlined from templates/1of7GUIs.fl */
+static unsigned char tmpl_1of7GUIs_fl[486] = /* data compressed and inlined from ../templates/1of7GUIs.fl */
 {120,156,109,82,203,138,219,64,16,188,207,87,52,228,178,102,177,45,25,59,
 187,142,73,14,121,56,187,36,224,92,76,142,102,36,181,164,206,142,102,196,60,252,
 88,33,216,223,200,61,127,146,63,201,151,164,37,69,176,9,97,4,163,26,122,170,
diff --git a/fluid/template_panel.fl b/fluid/panels/template_panel.fl
similarity index 96%
rename from fluid/template_panel.fl
rename to fluid/panels/template_panel.fl
index f4e4f8bb2888255d574e49e90e18414b8680b105..cbbb5c7ffb13ddd7e49d9cc67a845a8462bebf7d 100644
--- a/fluid/template_panel.fl
+++ b/fluid/panels/template_panel.fl
@@ -20,7 +20,10 @@ comment {//
 } {in_source in_header
 }
 
-decl {\#include "fluid.h"} {private local
+decl {\#include "app/fluid.h"} {private local
+}
+
+decl {\#include "tools/fluid_filename.h"} {selected private local
 }
 
 decl {\#include <FL/Fl_Shared_Image.H>} {private local
@@ -32,9 +35,6 @@ decl {\#include <FL/fl_ask.H>} {private local
 decl {\#include <FL/fl_string_functions.h>} {private local
 }
 
-decl {\#include "fluid_filename.h"} {private local
-}
-
 decl {\#include "../src/flstring.h"} {private local
 }
 
@@ -211,14 +211,13 @@ if ((ext = strrchr(pngfile, '.')) != NULL) {
 }
 
 template_browser->remove(item);
-template_browser->do_callback();} {selected
-  }
+template_browser->do_callback();} {}
 }
 
-data tmpl_FLTK_License_fl {private local filename {templates/FLTK_License.fl} compressed
+data tmpl_FLTK_License_fl {private local filename {../templates/FLTK_License.fl} compressed
 }
 
-data tmpl_1of7GUIs_fl {private local filename {templates/1of7GUIs.fl} compressed
+data tmpl_1of7GUIs_fl {private local filename {../templates/1of7GUIs.fl} compressed
 }
 
 Function {template_install(const char *path, const char *name, const uchar *inSrc, int inSrcLen, int inDstLen)} {open return_type void
diff --git a/fluid/template_panel.h b/fluid/panels/template_panel.h
similarity index 100%
rename from fluid/template_panel.h
rename to fluid/panels/template_panel.h
diff --git a/fluid/widget_panel.cxx b/fluid/panels/widget_panel.cxx
similarity index 99%
rename from fluid/widget_panel.cxx
rename to fluid/panels/widget_panel.cxx
index ec61c1083053895de3434a703d6b12233731e9bd..cd377985171b6f202d2d3dbc52a6d504cd9642e1 100644
--- a/fluid/widget_panel.cxx
+++ b/fluid/panels/widget_panel.cxx
@@ -17,9 +17,9 @@
 // generated by Fast Light User Interface Designer (fluid) version 1.0500
 
 #include "widget_panel.h"
-#include "undo.h"
-#include "Fl_Widget_Type.h"
-#include "Fl_Grid_Type.h"
+#include "app/undo.h"
+#include "nodes/Fl_Widget_Type.h"
+#include "nodes/Fl_Grid_Type.h"
 #include <FL/Fl_Grid.H>
 extern void set_modflag(int mf, int mfc=-1);
 
diff --git a/fluid/widget_panel.fl b/fluid/panels/widget_panel.fl
similarity index 99%
rename from fluid/widget_panel.fl
rename to fluid/panels/widget_panel.fl
index 470248e7deb833b10c6da1b3affd8b3490f8c0e2..57ae3027378405bbcf3412e1947cb002c4265aba 100644
--- a/fluid/widget_panel.fl
+++ b/fluid/panels/widget_panel.fl
@@ -25,19 +25,19 @@ comment {//
 } {in_source in_header
 }
 
-decl {\#include "undo.h"} {private global
+decl {\#include "app/undo.h"} {private global
 }
 
-decl {\#include "Fl_Widget_Type.h"} {private global
+decl {\#include "nodes/Fl_Widget_Type.h"} {private global
 }
 
-decl {\#include "Fl_Grid_Type.h"} {private global
+decl {\#include "nodes/Fl_Grid_Type.h"} {private global
 }
 
-decl {\#include <FL/Fl_Grid.H>} {private global
+decl {\#include "widgets/custom_widgets.h"} {selected public global
 }
 
-decl {\#include "custom_widgets.h"} {public global
+decl {\#include <FL/Fl_Grid.H>} {private global
 }
 
 decl {extern void set_modflag(int mf, int mfc=-1);} {private local
@@ -332,7 +332,7 @@ Function {make_widget_panel()} {
   comment {Create a panel that can be used with all known widgets} open
 } {
   Fl_Window {} {
-    comment {Use a Double Window to avoid flickering.} open selected
+    comment {Use a Double Window to avoid flickering.} open
     xywh {372 208 420 400} type Double labelsize 11 align 80 resizable hotspot
     code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0} visible
   } {
@@ -1076,7 +1076,7 @@ wCallback->do_callback(wCallback, v);} open
               label {Callback:}
               callback callback_cb
               tooltip {The callback function or code for the widget. Use the variable name 'o' to access the Widget pointer and 'v' to access the user value.} xywh {95 225 310 80} box DOWN_BOX labelfont 1 labelsize 11 align 4 textfont 4 textsize 11 resizable
-              code0 {\#include "CodeEditor.h"}
+              code0 {\#include "widgets/CodeEditor.h"}
               class CodeEditor
             }
           }
diff --git a/fluid/widget_panel.h b/fluid/panels/widget_panel.h
similarity index 99%
rename from fluid/widget_panel.h
rename to fluid/panels/widget_panel.h
index 38e70cc71589428a745054cb08facf610de33d1e..de827464efde3b234fe4bc9c24bb1217e6098f9e 100644
--- a/fluid/widget_panel.h
+++ b/fluid/panels/widget_panel.h
@@ -19,7 +19,7 @@
 #ifndef widget_panel_h
 #define widget_panel_h
 #include <FL/Fl.H>
-#include "custom_widgets.h"
+#include "widgets/custom_widgets.h"
 #include <FL/Fl_Double_Window.H>
 extern Fl_Double_Window *image_panel_window;
 #include <FL/Fl_Group.H>
@@ -161,7 +161,7 @@ extern Fl_Input *v_input[4];
 #include <FL/Fl_Tile.H>
 #include <FL/Fl_Text_Editor.H>
 extern Fl_Text_Editor *wComment;
-#include "CodeEditor.h"
+#include "widgets/CodeEditor.h"
 extern void callback_cb(CodeEditor*, void*);
 extern CodeEditor *wCallback;
 extern Fl_Group *wp_cpp_callback;
diff --git a/fluid/comments.h b/fluid/rsrcs/comments.h
similarity index 100%
rename from fluid/comments.h
rename to fluid/rsrcs/comments.h
diff --git a/fluid/pixmaps.cxx b/fluid/rsrcs/pixmaps.cxx
similarity index 74%
rename from fluid/pixmaps.cxx
rename to fluid/rsrcs/pixmaps.cxx
index 3d9e9d76962ef2932579ae7ef3200c4d1ef85643..dbcebe04394356d3776a3de61050f9d823c19d29 100644
--- a/fluid/pixmaps.cxx
+++ b/fluid/rsrcs/pixmaps.cxx
@@ -14,75 +14,75 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "pixmaps.h"
+#include "rsrcs/pixmaps.h"
 
-#include "Fl_Type.h"
+#include "nodes/Fl_Type.h"
 
 #include <FL/Fl_Pixmap.H>
 
-#include "pixmaps/bind.xpm"
-#include "pixmaps/lock.xpm"
-#include "pixmaps/protected.xpm"
-#include "pixmaps/invisible.xpm"
-#include "pixmaps/compressed.xpm"
-
-#include "pixmaps/flWindow.xpm"
-#include "pixmaps/flButton.xpm"
-#include "pixmaps/flCheckButton.xpm"
-#include "pixmaps/flRoundButton.xpm"
-#include "pixmaps/flBox.xpm"
-#include "pixmaps/flGroup.xpm"
-#include "pixmaps/flFunction.xpm"
-#include "pixmaps/flCode.xpm"
-#include "pixmaps/flCodeBlock.xpm"
-#include "pixmaps/flComment.xpm"
-#include "pixmaps/flData.xpm"
-#include "pixmaps/flDeclaration.xpm"
-#include "pixmaps/flDeclarationBlock.xpm"
-#include "pixmaps/flClass.xpm"
-#include "pixmaps/flTabs.xpm"
-#include "pixmaps/flInput.xpm"
-#include "pixmaps/flChoice.xpm"
-#include "pixmaps/flMenuitem.xpm"
-#include "pixmaps/flMenubar.xpm"
-#include "pixmaps/flSubmenu.xpm"
-#include "pixmaps/flScroll.xpm"
-#include "pixmaps/flTile.xpm"
-#include "pixmaps/flWizard.xpm"
-#include "pixmaps/flPack.xpm"
-#include "pixmaps/flReturnButton.xpm"
-#include "pixmaps/flLightButton.xpm"
-#include "pixmaps/flRepeatButton.xpm"
-#include "pixmaps/flMenuButton.xpm"
-#include "pixmaps/flOutput.xpm"
-#include "pixmaps/flTextDisplay.xpm"
-#include "pixmaps/flTextEdit.xpm"
-#include "pixmaps/flFileInput.xpm"
-#include "pixmaps/flBrowser.xpm"
-#include "pixmaps/flCheckBrowser.xpm"
-#include "pixmaps/flFileBrowser.xpm"
-#include "pixmaps/flClock.xpm"
-#include "pixmaps/flHelp.xpm"
-#include "pixmaps/flProgress.xpm"
-#include "pixmaps/flSlider.xpm"
-#include "pixmaps/flScrollBar.xpm"
-#include "pixmaps/flValueSlider.xpm"
-#include "pixmaps/flAdjuster.xpm"
-#include "pixmaps/flCounter.xpm"
-#include "pixmaps/flDial.xpm"
-#include "pixmaps/flRoller.xpm"
-#include "pixmaps/flValueInput.xpm"
-#include "pixmaps/flValueOutput.xpm"
-#include "pixmaps/flSpinner.xpm"
-#include "pixmaps/flWidgetClass.xpm"
-#include "pixmaps/flTree.xpm"
-#include "pixmaps/flTable.xpm"
-#include "pixmaps/flSimpleTerminal.xpm"
-#include "pixmaps/flInputChoice.xpm"
-#include "pixmaps/flCheckMenuitem.xpm"
-#include "pixmaps/flRadioMenuitem.xpm"
-#include "pixmaps/flFlex.xpm"
-#include "pixmaps/flGrid.xpm"
+#include "../pixmaps/bind.xpm"
+#include "../pixmaps/lock.xpm"
+#include "../pixmaps/protected.xpm"
+#include "../pixmaps/invisible.xpm"
+#include "../pixmaps/compressed.xpm"
+
+#include "../pixmaps/flWindow.xpm"
+#include "../pixmaps/flButton.xpm"
+#include "../pixmaps/flCheckButton.xpm"
+#include "../pixmaps/flRoundButton.xpm"
+#include "../pixmaps/flBox.xpm"
+#include "../pixmaps/flGroup.xpm"
+#include "../pixmaps/flFunction.xpm"
+#include "../pixmaps/flCode.xpm"
+#include "../pixmaps/flCodeBlock.xpm"
+#include "../pixmaps/flComment.xpm"
+#include "../pixmaps/flData.xpm"
+#include "../pixmaps/flDeclaration.xpm"
+#include "../pixmaps/flDeclarationBlock.xpm"
+#include "../pixmaps/flClass.xpm"
+#include "../pixmaps/flTabs.xpm"
+#include "../pixmaps/flInput.xpm"
+#include "../pixmaps/flChoice.xpm"
+#include "../pixmaps/flMenuitem.xpm"
+#include "../pixmaps/flMenubar.xpm"
+#include "../pixmaps/flSubmenu.xpm"
+#include "../pixmaps/flScroll.xpm"
+#include "../pixmaps/flTile.xpm"
+#include "../pixmaps/flWizard.xpm"
+#include "../pixmaps/flPack.xpm"
+#include "../pixmaps/flReturnButton.xpm"
+#include "../pixmaps/flLightButton.xpm"
+#include "../pixmaps/flRepeatButton.xpm"
+#include "../pixmaps/flMenuButton.xpm"
+#include "../pixmaps/flOutput.xpm"
+#include "../pixmaps/flTextDisplay.xpm"
+#include "../pixmaps/flTextEdit.xpm"
+#include "../pixmaps/flFileInput.xpm"
+#include "../pixmaps/flBrowser.xpm"
+#include "../pixmaps/flCheckBrowser.xpm"
+#include "../pixmaps/flFileBrowser.xpm"
+#include "../pixmaps/flClock.xpm"
+#include "../pixmaps/flHelp.xpm"
+#include "../pixmaps/flProgress.xpm"
+#include "../pixmaps/flSlider.xpm"
+#include "../pixmaps/flScrollBar.xpm"
+#include "../pixmaps/flValueSlider.xpm"
+#include "../pixmaps/flAdjuster.xpm"
+#include "../pixmaps/flCounter.xpm"
+#include "../pixmaps/flDial.xpm"
+#include "../pixmaps/flRoller.xpm"
+#include "../pixmaps/flValueInput.xpm"
+#include "../pixmaps/flValueOutput.xpm"
+#include "../pixmaps/flSpinner.xpm"
+#include "../pixmaps/flWidgetClass.xpm"
+#include "../pixmaps/flTree.xpm"
+#include "../pixmaps/flTable.xpm"
+#include "../pixmaps/flSimpleTerminal.xpm"
+#include "../pixmaps/flInputChoice.xpm"
+#include "../pixmaps/flCheckMenuitem.xpm"
+#include "../pixmaps/flRadioMenuitem.xpm"
+#include "../pixmaps/flFlex.xpm"
+#include "../pixmaps/flGrid.xpm"
 
 Fl_Pixmap *bind_pixmap;
 Fl_Pixmap *lock_pixmap;
diff --git a/fluid/pixmaps.h b/fluid/rsrcs/pixmaps.h
similarity index 100%
rename from fluid/pixmaps.h
rename to fluid/rsrcs/pixmaps.h
diff --git a/fluid/templates/FLTK_License.fl b/fluid/templates/FLTK_License.fl
index 7530bb5fb67b849840349124638a7bb83849654c..95bd151f8f92ea8d30282c63c6db12f40d849091 100644
--- a/fluid/templates/FLTK_License.fl
+++ b/fluid/templates/FLTK_License.fl
@@ -5,7 +5,7 @@ code_name {.cxx}
 comment {//
 // @INSTANCE@ for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
diff --git a/fluid/ExternalCodeEditor_UNIX.cxx b/fluid/tools/ExternalCodeEditor_UNIX.cxx
similarity index 99%
rename from fluid/ExternalCodeEditor_UNIX.cxx
rename to fluid/tools/ExternalCodeEditor_UNIX.cxx
index 4f0bea3f97d5dc8a5d82ce1f694e3670f09f0a03..09d7e617811f885b981597e136aa1bbc29186580 100644
--- a/fluid/ExternalCodeEditor_UNIX.cxx
+++ b/fluid/tools/ExternalCodeEditor_UNIX.cxx
@@ -5,7 +5,7 @@
 
 #include "ExternalCodeEditor_UNIX.h"
 
-#include "fluid.h"
+#include "app/fluid.h"
 
 #include <FL/Fl.H>      /* Fl_Timeout_Handler.. */
 #include <FL/fl_ask.H>  /* fl_alert() */
diff --git a/fluid/ExternalCodeEditor_UNIX.h b/fluid/tools/ExternalCodeEditor_UNIX.h
similarity index 98%
rename from fluid/ExternalCodeEditor_UNIX.h
rename to fluid/tools/ExternalCodeEditor_UNIX.h
index 9d49cf617afd972c631df49ef788c82e74c01eda..644f22afa1f7ac868f6a73e785df01ac0bfb4558 100644
--- a/fluid/ExternalCodeEditor_UNIX.h
+++ b/fluid/tools/ExternalCodeEditor_UNIX.h
@@ -7,9 +7,9 @@
 #ifndef _EXTCODEEDITOR_H
 #define _EXTCODEEDITOR_H
 
-#include <FL/Fl.H>
+#include "app/fluid.h"
 
-#include "fluid.h"
+#include <FL/Fl.H>
 
 #include <errno.h>      /* errno */
 #include <string.h>     /* strerror() */
diff --git a/fluid/ExternalCodeEditor_WIN32.cxx b/fluid/tools/ExternalCodeEditor_WIN32.cxx
similarity index 99%
rename from fluid/ExternalCodeEditor_WIN32.cxx
rename to fluid/tools/ExternalCodeEditor_WIN32.cxx
index bb7d5791a3c7285f60cadee2033519a6295b6b64..c58f22a308ef348ccc5a609348db3be66a8c6e50 100644
--- a/fluid/ExternalCodeEditor_WIN32.cxx
+++ b/fluid/tools/ExternalCodeEditor_WIN32.cxx
@@ -16,14 +16,14 @@
 
 //      Note: This entire file Windows only.
 
+#include "tools/ExternalCodeEditor_WIN32.h"
+#include "app/fluid.h"
+
 #include <FL/Fl.H>      // Fl_Timeout_Handler..
 #include <FL/fl_ask.H>  // fl_alert()
 #include <FL/fl_utf8.h> // fl_utf8fromwc()
 #include <FL/fl_string_functions.h> // fl_strdup()
 
-#include "ExternalCodeEditor_WIN32.h"
-#include "fluid.h"
-
 #include <stdio.h>      // snprintf()
 #include <stdlib.h>
 
diff --git a/fluid/ExternalCodeEditor_WIN32.h b/fluid/tools/ExternalCodeEditor_WIN32.h
similarity index 100%
rename from fluid/ExternalCodeEditor_WIN32.h
rename to fluid/tools/ExternalCodeEditor_WIN32.h
diff --git a/fluid/autodoc.cxx b/fluid/tools/autodoc.cxx
similarity index 98%
rename from fluid/autodoc.cxx
rename to fluid/tools/autodoc.cxx
index a6c7f2fc50e678ffd0b899856df9a60a401846f3..59f9a7b27aded812874044593747cca4acee63a7 100644
--- a/fluid/autodoc.cxx
+++ b/fluid/tools/autodoc.cxx
@@ -1,7 +1,7 @@
 //
 // Self-generate snapshots of user interface for FLUID documentation.
 //
-// Copyright 2024 by Bill Spitzak and others.
+// Copyright 2024-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -16,16 +16,17 @@
 
 #ifndef NDEBUG
 
-#include "autodoc.h"
-#include "fluid.h"
-#include "factory.h"
-#include "widget_browser.h"
-#include "widget_panel.h"
-#include "Fl_Widget_Type.h"
-#include "Fl_Window_Type.h"
-#include "function_panel.h"
-#include "settings_panel.h"
-#include "codeview_panel.h"
+#include "tools/autodoc.h"
+
+#include "app/fluid.h"
+#include "nodes/factory.h"
+#include "nodes/Fl_Widget_Type.h"
+#include "nodes/Fl_Window_Type.h"
+#include "panels/widget_panel.h"
+#include "panels/function_panel.h"
+#include "panels/settings_panel.h"
+#include "panels/codeview_panel.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/Enumerations.H>
 #include <FL/fl_draw.H>
diff --git a/fluid/autodoc.h b/fluid/tools/autodoc.h
similarity index 97%
rename from fluid/autodoc.h
rename to fluid/tools/autodoc.h
index 51f9739ea9002b1975cfe47044ac5bec4e69a45b..33b0bd6fc80d84ea882a2c3738ce4ea52159eb27 100644
--- a/fluid/autodoc.h
+++ b/fluid/tools/autodoc.h
@@ -1,7 +1,7 @@
 //
 // Widget snapshot header-only file for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 2023-2024 by Bill Spitzak and others.
+// Copyright 2023-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
diff --git a/fluid/fluid_filename.cxx b/fluid/tools/fluid_filename.cxx
similarity index 99%
rename from fluid/fluid_filename.cxx
rename to fluid/tools/fluid_filename.cxx
index 9bb3b1f73214b14726f2c90a681f0536c8a83ee4..cd9dadfa6f2293ebbff0d6eae163f0d54dd9d573 100644
--- a/fluid/fluid_filename.cxx
+++ b/fluid/tools/fluid_filename.cxx
@@ -29,14 +29,13 @@
         the next release after 1.4.x will be. We'll use std::string instead!
 */
 
-#include <stdlib.h>
-#include <string>
-
 #include <FL/filename.H>
 #include <FL/Fl.H>
 #include <FL/fl_string_functions.h>
 #include "../src/flstring.h"
 
+#include <stdlib.h>
+#include <string>
 
 /**
  Return a new string that contains the name part of the filename.
diff --git a/fluid/fluid_filename.h b/fluid/tools/fluid_filename.h
similarity index 99%
rename from fluid/fluid_filename.h
rename to fluid/tools/fluid_filename.h
index 5fa23c82e8a078f2762de87859124c5d375d3921..1486e61abad0ba33ec7aeb7e1aee28b40f3a6a3f 100644
--- a/fluid/fluid_filename.h
+++ b/fluid/tools/fluid_filename.h
@@ -34,7 +34,6 @@
 
 #include <FL/Fl_Export.H>
 #include <FL/platform_types.h>
-
 #include <FL/filename.H>
 
 #  if defined(__cplusplus)
diff --git a/fluid/CodeEditor.cxx b/fluid/widgets/CodeEditor.cxx
similarity index 99%
rename from fluid/CodeEditor.cxx
rename to fluid/widgets/CodeEditor.cxx
index 2fffcd8bc09b677fdfbe768cd1d6d0850e102459..ca114b577ef847cb7a4f47fff5d4dd4ce107ec53 100644
--- a/fluid/CodeEditor.cxx
+++ b/fluid/widgets/CodeEditor.cxx
@@ -2,7 +2,7 @@
 // Code editor widget for the Fast Light Tool Kit (FLTK).
 // Syntax highlighting rewritten by erco@seriss.com 09/15/20.
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -19,7 +19,7 @@
 // Include necessary headers...
 //
 
-#include "CodeEditor.h"
+#include "widgets/CodeEditor.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/fluid/CodeEditor.h b/fluid/widgets/CodeEditor.h
similarity index 98%
rename from fluid/CodeEditor.h
rename to fluid/widgets/CodeEditor.h
index 9cfa50abe52a528fb7fafd0d7ff2b86a0d2719cd..cc720d6182665a6420d141f28dec93e3c20740e7 100644
--- a/fluid/CodeEditor.h
+++ b/fluid/widgets/CodeEditor.h
@@ -2,7 +2,7 @@
 // Code editor widget for the Fast Light Tool Kit (FLTK).
 // Syntax highlighting rewritten by erco@seriss.com 09/15/20.
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
diff --git a/fluid/StyleParse.cxx b/fluid/widgets/StyleParse.cxx
similarity index 100%
rename from fluid/StyleParse.cxx
rename to fluid/widgets/StyleParse.cxx
diff --git a/fluid/StyleParse.h b/fluid/widgets/StyleParse.h
similarity index 100%
rename from fluid/StyleParse.h
rename to fluid/widgets/StyleParse.h
diff --git a/fluid/custom_widgets.cxx b/fluid/widgets/custom_widgets.cxx
similarity index 97%
rename from fluid/custom_widgets.cxx
rename to fluid/widgets/custom_widgets.cxx
index b50169f3a50cff76449800fa1d7a3db4cbf86833..25a63078362f362478b4faac88dc98a051c359e8 100644
--- a/fluid/custom_widgets.cxx
+++ b/fluid/widgets/custom_widgets.cxx
@@ -14,13 +14,13 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "custom_widgets.h"
+#include "widgets/custom_widgets.h"
 
-#include "fluid.h"
-#include "Fl_Window_Type.h"
-#include "factory.h"
-#include "widget_panel.h"
-#include "widget_browser.h"
+#include "app/fluid.h"
+#include "nodes/Fl_Window_Type.h"
+#include "nodes/factory.h"
+#include "panels/widget_panel.h"
+#include "widgets/widget_browser.h"
 
 #include <FL/platform.H>
 #include <FL/Fl_Button.H>
diff --git a/fluid/custom_widgets.h b/fluid/widgets/custom_widgets.h
similarity index 100%
rename from fluid/custom_widgets.h
rename to fluid/widgets/custom_widgets.h
diff --git a/fluid/widget_browser.cxx b/fluid/widgets/widget_browser.cxx
similarity index 99%
rename from fluid/widget_browser.cxx
rename to fluid/widgets/widget_browser.cxx
index c54231263c26feb3f01baa219d8f9ca7b8cb9247..9f7c8ff6c7249a40eab65bc74da475d1dae86e54 100644
--- a/fluid/widget_browser.cxx
+++ b/fluid/widgets/widget_browser.cxx
@@ -1,7 +1,7 @@
 //
 // Widget Browser code for the Fast Light Tool Kit (FLTK).
 //
-// Copyright 1998-2024 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -14,11 +14,11 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "widget_browser.h"
+#include "widgets/widget_browser.h"
 
-#include "fluid.h"
-#include "Fl_Widget_Type.h"
-#include "pixmaps.h"
+#include "app/fluid.h"
+#include "nodes/Fl_Widget_Type.h"
+#include "rsrcs/pixmaps.h"
 
 #include <FL/Fl.H>
 #include <FL/Fl_Browser_.H>
diff --git a/fluid/widget_browser.h b/fluid/widgets/widget_browser.h
similarity index 100%
rename from fluid/widget_browser.h
rename to fluid/widgets/widget_browser.h