Commit Graph

94 Commits

Author SHA1 Message Date
Greg Ercolano
38af0c823b Add Fl_Terminal to "Scrollbar Size" unittest (#931)
This involved enlarging the unittest main window to make room
for the additional test.

Adding this test revealed a problem in Fl_Terminal's global
scrollbar size handling, which is fixed here as well.

Also fixed a small issue in the demo's debugging terminal
with the horiz scrollbar.
2024-03-11 13:20:17 -07:00
Matthias Melcher
04a5098a58 #840: Generously adds Fl::args_to_utf8() for MinGW support. 2023-12-15 13:04:57 +01:00
erco77
6842a43a31
Fl_Terminal widget (#800)
Pull Fl_Terminal widget from Greg's fork
2023-11-14 07:01:52 -08:00
Albrecht Schlosser
510ba8e46d Fix test/demo for X11 on macOS (e.g. XQuartz)
This modification became necessary since "__APPLE__" is no longer
undefined by the build system when X11 is used on macOS.
2023-03-22 20:29:23 +01:00
Matthias Melcher
1fc269b0d4
Move global FLTK options into new app fltk-admin (#560) 2023-01-21 17:14:41 +01:00
Albrecht Schlosser
bafd3fd3d7 Add Fl_Scheme_Choice widget and use it in test programs
This widget offers the selection of all known FLTK schemes as a simple
widget based on Fl_Choice.

Some test and demo programs use Fl_Scheme_Choice to enable the developer
or user to switch schemes quickly for comparison.

Todo:
 - add features to add new schemes during runtime (partially done)
 - update status when the scheme is changed by Fl::scheme("...")
2023-01-12 19:21:09 +01:00
Albrecht Schlosser
b1ba37c5ba Add "Oxy" scheme (STR 2675, STR 3477)
This commit is similar to the patch given in STR 3477, oxy_v5.diff:
https://www.fltk.org/strfiles/3477/oxy_v5.diff

... with modifications, and updated to current FLTK code.
2022-11-25 00:00:48 +01:00
ManoloFLTK
2ffd4e4f1a Replace all calls to sprintf() by calls to snprintf(). 2022-09-26 16:12:18 +02:00
Albrecht Schlosser
64548e2f3a Improve layout, fix resizing of test/demo
Add an invisible box as resizable() to 'demogrp' to avoid bad resizing
behavior while the debug terminal is enabled. The old version would
disable some buttons including the 'exit' button if the window was
resized to a smaller size.

Simplify the popup menu (remove strcmp()).
2022-08-08 17:35:56 +02:00
Albrecht Schlosser
02dfdd590d Fix macOS bundle: set missing fields for test apps
- MACOSX_BUNDLE_BUNDLE_NAME: CFBundleName
 - MACOSX_BUNDLE_GUI_IDENTIFIER: CFBundleIdentifier

test/demo.cxx: Remove confusing quotes from demo variable output.
2021-04-08 13:50:32 +02:00
ManoloFLTK
c70a091fa3 Match format specifier and variable type. 2020-11-25 08:29:47 +01:00
Albrecht Schlosser
f3005a44f8 CMake: move test executables to build/bin/test 2020-08-21 17:10:30 +02:00
ManoloFLTK
e3270a6032 Simpler macOS-specific code in main(). 2020-07-25 12:43:43 +02:00
ManoloFLTK
e2d3b03899 Simpler macOS-specific code. 2020-07-23 09:24:29 +02:00
Albrecht Schlosser
4957dd48c2 Fix macOS code + remove obsolete code
Albrecht:

- move fl_chdir(data_path) up before fl_getcwd() prints it
- add statements to open the argument (i.e. file) with data_path
- update comments, remove obsolete code

Greg:

- on Mac we need absolute path for child filename parameters
2020-07-21 11:41:37 +02:00
Greg Ercolano
889ab64962 Add Fl_Simple_Terminal for cross platform debugging 2020-07-21 11:11:03 +02:00
Albrecht Schlosser
af7f485e06 Consolidate test/demo for all build systems
This is an attempt to unify the code for all build systems (CMake,
autotools with make), platforms (operating systems) and toolchains
(make + gcc/clang, Visual Studio IDE, Xcode ...) to avoid duplicate
code and clarify the differences for future devs and to simplify
maintenance.

The goal is to minimize the platform specific code.

Much of the new code are comments to describe the different situations.
The main program does now all the "hard work" to construct the paths
necessary to access the other applications and data files.

Use macOS specific code to determine the application path (app_path)
in main() instead of function dobut(), when test apps are activated.

Remove obsolete comments and dead code.

Tested on Windows and Linux with both autotools/configure/make
and CMake with make (Linux + MinGW), Visual Studio.
2020-07-21 11:11:03 +02:00
Albrecht Schlosser
f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
Albrecht Schlosser
8a7d4c9f61 Remove CodeWarrior "support"
Metrowerks CodeWarrior was an ancient macOS compiler (discontinued
since 2005) that defined the macro __MWERKS__. Code using this macro
and several comments have been removed.
2020-03-11 14:38:02 +01:00
Albrecht Schlosser
4c1b92eb52 Implement fl_putenv() as cross-platform putenv() 2020-02-10 12:10:40 +01:00
Matthias Melcher
d97836f5dd macOS: fixed all demo programs that need to access resources
MacOS uses bundles instead of executables. CMake creates those bundles in various locations, depending on the generator used (Xcode or Makefiles). I tried to fix all instances where demo apps did not find the resources they needed. This probably must be done for Linux and MSWindows as well.
2019-12-23 14:33:24 +01:00
Matthias Melcher
452a410a3e STR #2714: remove new shadow lint for MacOS 2019-02-02 17:47:55 +01:00
Albrecht Schlosser
474d6e2393 Fix 'fluid.app' for case sensitive macOS file systems.
Change 'Fluid.app' to 'fluid.app'.

Also changed documentation and (https) links in modified files.
2018-12-04 14:20:33 +01:00
Albrecht Schlosser
52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
Albrecht Schlosser
42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
This second step replaces FL/x.H with FL/platform.H in all source files.
Dependencies have been adjusted as well.

This commit completes the replacement of FL/x.H with FL/platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 21:17:17 +00:00
Albrecht Schlosser
f3896460d6 Replace chdir() with new wrapper fl_chdir().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12558 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-12 18:00:45 +00:00
Albrecht Schlosser
a8b58f6b79 Replace inappropriate usage of __WATCOM__ with _MSC_VER.
Note: this is in parts temporary since some of the functions redefined
for Visual Studio will be replaced with fl_*() functions in later commits.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:46:16 +00:00
Manolo Gouy
89954986bb Remove another instance of the USING_XCODE preprocessor variable
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11912 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-31 17:01:27 +00:00
Manolo Gouy
b1e25e4838 Remove one instance of the USING_XCODE preprocessor variable that is not necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-31 16:14:39 +00:00
Albrecht Schlosser
d98a8e13e6 Fix compiler warning when compiled with USING_XCODE [-fpermissive].
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-09 12:37:44 +00:00
Albrecht Schlosser
b4126742f2 Fix and simplify exe name handling in demo (Windows).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11294 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-05 14:40:49 +00:00
Albrecht Schlosser
6cc67c18f2 Reflect changes in new Windows IDE (Debug Mode).
Windows executables in Debug mode don't have the trailing 'd'
they used to have with the old (bundled) IDE files.
The removal of 'd' (e.g. from askd.exe) was removed.

Also prepared test/CMakeLists.txt for a better installation
path of test files (copied from the source directory).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-30 21:00:12 +00:00
Manolo Gouy
3e6b497b64 Mac OS: fix demo for programs that are run with an argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10690 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-08 15:44:57 +00:00
Ian MacArthur
770c280708 Adjust test/demo.cxx to support the newly added
"gleam" scheme.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10115 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-02-26 21:21:14 +00:00
Manolo Gouy
d9666eb8c9 Demo now runs Mac OS test applications both if they are bundled or unbundled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9747 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-10 12:49:59 +00:00
Manolo Gouy
598e2cb63b MacOS: create a bundled version of all example programs with fltk-config --post
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9736 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-05 14:53:03 +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
Manolo Gouy
03af588ef9 Added missing #include's when compiled using Xcode
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8252 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-11 10:36:44 +00:00
Manolo Gouy
874bca74f5 Mac OS X: removed all uses of Carbon (except for older OS versions) and re-organized
text input around the NSTextInput protocol.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-03 16:50:34 +00:00
Matthias Melcher
e203237eb3 Integrated menu into demo resource branch for OS X. Indicating items that open more choices with ...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8167 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-02 03:50:54 +00:00
Manolo Gouy
a8530c73fa Adopted use of FL_LIBRARY #define symbol under Mac OS X. This allows to compile
client applications without including Mac OS system headers, with a gain in speed of 
compilation and portability. The source files of all FLTK libraries must now be compiled with 
-DFL_LIBRARY under Mac OS X. Make, CMake and Xcode project support files
have been modified accordingly.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-23 14:24:29 +00:00
Matthias Melcher
9092dccab8 Changed all fixed filename buffers (that I could find) to use FL_PATH_MX instead. Raised FL_PATH_MX from skipy 256 characters to 2048, which corresponds with modern file systems.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-19 21:20:10 +00:00
Matthias Melcher
e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher
1e77c19688 Fixed file access code to use UTF-8 strings (STR #2440)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-18 20:00:01 +00:00
Matthias Melcher
8f79d200a0 Fixed the remaining warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7767 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-28 21:47:01 +00:00
Matthias Melcher
bfeac78693 Trying to bring the Xcode 3 OS X builds to a better standard, including automatic builds and project templates. 1 of 3 done.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-24 20:53:36 +00:00
Matthias Melcher
32716d6b1e Updated the Fluid IDE support for the current source file structure. Changed the Fl_Tree rendering code around a bit to make the tree more like MSWindows on Windows and more like Apple on Apple machines. I hope you guys like it. I also moved the function to load Fl_Preferences into an Fl_Tree into the Fl_Tree class where it belongs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7672 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-10 09:44:45 +00:00
Matthias Melcher
421f908c69 Bringing supported IDEs to the newest setup, add device and others.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-27 08:51:54 +00:00
Matthias Melcher
3b65dcead9 Fixed Demo for OS X to use the correct command to launch other applications from the right current directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7133 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-21 22:46:13 +00:00
Matthias Melcher
0650daaaac Fixed silly deletion in Demo.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-21 17:56:25 +00:00