The fluid version and other values in .fl files are written as float
values which means that locale settings apply since we enabled the
locale with "setlocale()".
Update the "rebuild" target in fluid and src folders to update
the fluid (.fl) files and related {.cxx|.h} files.
LDFLAGS often contains "-L*" flags as provided outside the build to tell the linker where to search for libraries. If these are included -before- the ones used for internal linkage as found in LINKSHARED, and FLTK is already installed on the system, then the already-installed FLTK libraries will be found before those internal to the build. Moving the LDFLAGS after LINKSHARED generally solves this issue. Worst case the move won't hurt linking since all of the flags are still included in the link command.
Now bundle wrapper scripts are created in the particular build folder,
i.e. in subdir 'Debug', 'Release' etc. in multi config builds (Xcode).
To do this, the scripts are now copied whenever the target is built
and not during the configuration phase.
To do: "install" wrapper scripts.
- raise minimum CMake version from 2.6.3 to 3.2.3 (Jun 01, 2015)
- indent all CMake files according to the CMP (2 col.)
- refactor FLTK version number definitions and usage
- unify CMake and autoconf/configure variable names:
- FL_VERSION -> FLTK_VERSION
- FL_MAJOR_VERSION -> FLTK_VERSION_MAJOR
- etc. for _MINOR_ and _PATCH_, respectively
- note: this does not affect FL_VERSION etc. in source code
- generate "export headers" for all libraries (experimental: OFF)
- port some forgotten goodies from branch-1.3 to master
- merge and improve macro 'create_example' (WIP)
- remove "temporary" options and code for older CMake versions
- include and use 'GenerateExportHeader' (experimental, WIP: OFF)
- note: created header files are not yet used
- build only *one* DLL with Visual Studio (tested, works)
- similar to the bundled IDE projects in 1.3.x
- add some dynamically linked test/demo programs ('*-shared')
if shared libraries are built (WIP)
- split 'macros.cmake': use one file per macro
Fluid would write trailing whitespace at some points when generating
.cxx and .h files from .fl files.
This was an old issue but became obvious since we removed trailing
whitespace from source and header files recently.
This commit fixes all whitespace errors in files generated from .fl
files in the FLTK repository, i.e. in fluid/, src/, and test/ folders.
I can't guarantee that I found all possible whitespace errors, but
this commit:
Fixes#100
- 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.
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.
Fixed including binaries and text to use the same path as the source code. This is consistent with the way the file is selected in the corresponding dialog box. Since the old behavior was false, I don't think this will break any existing projects.
The code to determine whether the GTK library is available is now in Fl_X11_System_Driver::probe_for_GTK()
called both by Fl_Printer::begin_job() and Fl_Native_File_Chooser.
New Fl::option OPTION_PRINTER_USES_GTK allows to deactivate use of
the Gnome print dialog.
Minor change in Fl_Native_File_Chooser: GTK version 3 is searched before version 2,
whereas the search order was the opposite before.
fluid/template_panel.{fl|cxx}:
.../fluid/template_panel.cxx:261:44: warning: ‘%s’ directive output
may be truncated writing up to 255 bytes into a region of size
between 0 and 1023 [-Wformat-truncation=]
Solution: increase buffer size from 1024 to 1400.
fluid/undo.cxx: fix warning [-Wformat-truncation=]
This fix also removes some static variables and simplifies the
function undo_filename(). It does no longer copy the full filename
string back to a given buffer. Now it returns a pointer to the
internal filename string.
Summary: fix compiler warning, save memory, simplify a function, and
speed up code by not copying data unnecessarily.
The intention is to improve (and minimize) diffs when dependencies
are changed and `make depend' is executed.
(1) use `makedepend ... -w 20'
(2) `sort -u' the resultant file with some more "magic".
(1) makes sure that there is only one dependent file per line,
(2) makes lines unique since `makedepend' can output one file
many times which is redundant and makes diffs hard to read.
This uses 'mv', 'grep', and 'sort' in all FLTK library Makefiles.
Image libraries are intentionally left for a later update.
When editing code in Fluid, the COde_Type class will now
remember the last cursor position and reopen the editor
dialog at that position (not for external editor).
When writing comments, FLuid would check if the comment was
C compatible. However, comments don;t need to comply to C
syntax. We could check for the "*/", but is that really needed?
This is particularly useful for fluid/about_panel.{fl,cxx,h}.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12888 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_Rect.H is no longer included by Fl_Group.H to avoid unnecessary
dependencies on Fl_Rect.H. Currently it is only needed to access the
array returned by the protected method bounds().
Also clarified documentation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
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
This first step replaces FL/x.H with FL/platform.H but keeps a small
FL/x.H that #include's FL/platform.H for backwards compatibility.
Documentation sources in documentation/src/*.dox have been fixed,
but references in other source files need to be fixed in another step.
Dependencies have been adjusted.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
... except in driver code that uses Fl_System_Driver::getenv().
Todo: Check if all remaining calls of getenv() in driver code are correct
or might use ::getenv() to avoid one calling level for optimization.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Remove leading underscore from _FL_IMAGE_LABEL.
Remove redundant assignment of image().
Thanks to Greg for finding these issues.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit fixes the truncated string drawing that was partly fixed
in svn r 9112 (FLTK 1.3.1, 2011-10-01).
Combined port of svn r 12057 and 12059. The latter adds sanity checks
and fixes potential buffer overflows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12060 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Documentation has been fixed and clarified, and ld() handling is now
consistent in Fl_(RGB_)Image, their subclasses and fl_draw_image()
and similar functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12029 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Limit line numbering to New>Code editor.
(was affecting Properties->Callback and New>Code>Comment editors)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11906 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Solves STR #3318: options for how to handle external editors on fluid quit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11880 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fixed warnings:
42 cast to pointer from integer of different size [-Wint-to-pointer-cast]
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11852 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit changes all files except src/Fl_File_Chooser2.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
IDE generated with CMake, still many warnings, but compiles and runs.
Note: we *must* get rid of all VisualStudio-specific #define's like:
#define unlink _unlink
This one led to a compilation error (not a warning).
src/Fl_File_Icon.cxx: I had to add _MSC_VER (WIN32) distinction as in
previous code (FLTK 1.3). Obviously MinGW is more Unixy than MS VC++
since MinGW compiled and linked the code. Needs a better fix ...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11580 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
[CMake] Simplify CMake build files, remove redundancies.
Ports of branch-1.3, svn r 11442 and 11444:
Remove src/fl_call_main.c from non-Windows (static) libraries. It would
be an empty object file anyway.
Use CMake variables to set up used files and linked libraries to remove
redundancies. All files and libs are used only in the definition of
CMake variables and used later in static and shared builds, resp.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11447 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Note: the manually edited dep's have not been updated.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11385 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit adds the basic setup in CMake to allow SDL as a base
library for FLTK on OS X (and probably for other platforms as well).
The SDL library driver set is derived from yet another new driver
set named 'Pico'. 'Pico' is a base class for a driver that will
allow porting of FLTK with the tinyest amount of effort. This
implementation of the SDL driver shall be documented very well
to explain the porting process.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit includes all fixes from branch-1.3 (svn r 11243) and additional
fixes for warnings that crept in during the porting efforts, particularly
C++ ("//") comments in C and included header files, and some more.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11246 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
to build an X11-using version of FLTK on the Mac OS platform.
This matches the recent support of the --enable-x11 option
by the configure script on the mac.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10986 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The files "config.h" generated by configure and CMake are now almost
identical, except a few comments and some still missing or failing
config tests, for instance checks for some functions in libraries.
[Note: tested and compared on Linux.]
configh.cmake.in: Fixed many #cmakedefine and #cmakedefine01 statements
so they #define their variables as 0 or 1, or /* #undef */ it, resp.,
as it is done in the configure build.
Added tests:
- libXrender
Fixed tests:
- function glXGetProcAddressARB
Todo (still failing tests in CMake):
- HAVE_PNG_GET_VALID
- HAVE_PNG_SET_TRNS_TO_ALPHA
- HAVE_DLSYM
Other remaining issues:
- compiler flags introduced in configure/make build
- HAVE_SYS_NDIR_H - maybe missing test in configure ?
- HAVE_SYS_DIR_H - maybe missing test in configure ?
- HAVE_NDIR_H - maybe missing test in configure ?
- WORDS_BIGENDIAN and #include <mac_endianness.h> ...
i.e. Mac OS X specific #include needed or not ?
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10984 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1) Changed the way fluid attaches images to widgets and menu items so
it is compatible with running fluid-generated code containing such images
in a static initializer. Images are now attached calling a function:
widget->image( image_function_name() );
and this function is defined before in fluid-generated code as:
static Fl_Image *image_function_name() {
static Fl_Image *image = new image_type(......);
return image;
}
2) Changed src/Fl_File_Chooser.fl so the source code generate by fluid
from it is compatible with running in a static initializer.
3) Changed src/Fl_File_Chooser.cxx and FL/Fl_File_Chooser.H
to the result of running fluid on src/Fl_File_Chooser.fl
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This is intended circumvent the Apache/Subversion protocol issue
described by Ian in the previous few commits.
Todo: If this works we can remove the uncompressed files again ...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The Apache server is currently mis-handling
files with a .gz extension, and this causes
checksum errors and blocks checkouts etc.
Renaming the files does not work (it also
fails) but it seems deleting the files, then
adding them back with a "new" name does work.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10926 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This cast broke Windows 64-bit compilation with a hard error.
$ x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++ (GCC) 4.8.3
Error message:
widget_panel.cxx:82:41: error: cast from ‘void*’ to ‘long int’ loses precision [-fpermissive]
wCallback->do_callback(wCallback, (long)v);
^
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10668 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Boy, this has been bothering me since the early eighties (or whenever
I checked that in first). Sorry that it took me a little while.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
These makefiles included '../watcom.mif' which had already been removed
and they had not been updated anyway.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10634 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Note to devs: if I missed something, please mark follow-up commits with
[Version 1.3.4] so we can find the necessary commits for version updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This option opens a fluid ('.fl') file and saves it overwriting the old
file with the current syntax and library version number.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Also, added explanatory comment of the purpose of a GNUC-specific
attribute in FL/fl_ask.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121