Commit Graph

6464 Commits

Author SHA1 Message Date
Albrecht Schlosser
a72bba7a3c Add some test options to test/editor.cxx.
These options are not enabled by default, but you can enable them by
defining macro DEV_TEST. This adds buttons to toggle wrap mode,
scrollbar positions, and to increase or decrease the window size (width).

Note: this can be used to test STR #3272 and the fixes in a follow-up
commit.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-22 16:36:38 +00:00
Albrecht Schlosser
557b2fff45 Update CHANGES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11203 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-21 12:24:11 +00:00
Albrecht Schlosser
0c4dcd8a45 Fix Fl_Text_Display wrap mode when line numbers are on (STR #3272).
This is part 1 of the proposed patch, slightly reformatted.
See STR #3272, comments #1 - #3.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11202 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-21 12:20:47 +00:00
Greg Ercolano
2fd2cd1e7a Some code cleanup of FNFC Win32: no functional changes.
> Replace huge static WCHAR wpattern[] array with dynamic in win32 FNFC (ABI 1.3.4)
      (Should decrease the memory weight WIN32 lib)

    > Simplify current working directory management

    > Comment simplification, CMP adherence



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-18 04:21:27 +00:00
Manolo Gouy
de47a8f7b1 Improve image drawing to double-resolution Fl_Image_Surface objects (Mac OS only).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11179 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-15 17:06:48 +00:00
Greg Ercolano
7ba4a6c9c2 Applying patch for buffer overflow provided by Michael Sartain on fltk.coredev 02/10/2016
Subject: Fl_Tree::item_pathname() byte overflow



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-15 06:11:45 +00:00
Albrecht Schlosser
0e47a4a8a9 Fix HTML entities in Fl_Help_View.
Removed obsolete ENC() macro, fixed some encodings that were still
Windows CP-1252: converted to correct Unicode values.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 19:49:08 +00:00
Greg Ercolano
f6e6c20843 Addresses issue raised by Michael Sartain on fltk.coredev on 02/11/2016;
prevent problems with Fl_Tree::_item_focus remaining valid after clear().
Applied his patch, plus extra checks added to Fl_Tree_Item's dtor.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 14:29:47 +00:00
Albrecht Schlosser
0462cae6d1 [Cairo] Remove part of the dependency of FL/Fl.H on config.h.
To use Fl_Cairo_Window one ddi not only need to configure with --enable-cairo,
but also needed to #include <config.h> before #include <FL/Fl.H>.

This commit removes the smaller part of the dependency of the public header
file FL/Fl.H on config.h. This needs a better solution in FLTK 1.4.0.

The user still needs to define FLTK_HAVE_CAIRO _before_ #include <FL/Fl.H>.

Note: This is not compatible with fluid, since fluid _always_ includes
FL/Fl.H as the first statement in generated header files.

See also the discussion in fltk.general:

https://groups.google.com/d/msg/fltkgeneral/_C1OJhMLQl0/pHUFtz9SCwAJ



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11167 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 17:35:36 +00:00
Manolo Gouy
1e2118d20f Simpler code to support drawing to high-resolution Fl_Image_Surface object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 06:14:40 +00:00
Manolo Gouy
bd8b8fd717 Mention Fl_Shared_Image *Fl_Image_Surface::highres_image().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11 20:49:29 +00:00
Manolo Gouy
249e2e9b00 Add Fl_Shared_Image *Fl_Image_Surface::highres_image() to draw into high-resolution bitmap.
This new member function returns a high resolution bitmap image scaled to the adequate
drawing size. This allows to create a bitmap image able to fill all pixels of a high resolution
display. This is functional only for the Mac OS platform and with FL_ABI_VERSION >= 10304. 
On other platforms, the new member function returns an unscaled bitmap.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11156 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11 20:42:51 +00:00
Albrecht Schlosser
90a2d680e5 Fix valgrind warning (uninitialized variable) in Fl_Window.
Visible only with FLTK_ABI_VERSION >= 10303, since FLTK 1.3.3.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 01:11:03 +00:00
Albrecht Schlosser
29bbb3f263 [CMake only] Add examples/fltk-versions to test programs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11133 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 00:58:18 +00:00
Albrecht Schlosser
cd4284f056 Fixed Windows drag'n'drop not showing insert position (STR #3209).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-07 10:10:52 +00:00
Manolo Gouy
4592043ee2 Support of OPTION_APPLE_X11 by CMake: do not use hard-coded paths
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-03 10:28:57 +00:00
Albrecht Schlosser
dab925c1e9 Update CHANGES for release (up to svn r11112).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11124 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-03 01:28:58 +00:00
Manolo Gouy
551fd6b077 Support for OPTION_APPLE_X11 -- OpenGL libraries
OPTION_APPLE_X11 is a very special option, and the best
way to support it with CMake still requires expert advice.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 14:51:15 +00:00
Albrecht Schlosser
9ae2f1f259 Update CHANGES for release (up to svn r10679).
To be continued...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 13:54:32 +00:00
Manolo Gouy
678c3a1fc7 Set depth of image returned by Fl_Image_Surface::image() back to 3 on Mac OS X.
This depth was set to 4 at r.10999 to help dealing with images of windows with rounded
corners. But it was not such a good idea to have an image depth that changes with the platform.
For example, the shapedwindow example program was made more complicated.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11118 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 07:15:57 +00:00
Albrecht Schlosser
d9ef5c51be Document ABI version configuration and CHANGES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11114 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 02:45:09 +00:00
Albrecht Schlosser
622e1383d6 [CMake] Document usage of .fl files w/o fltk_wrap_ui (STR #3281).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11112 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 00:46:43 +00:00
Manolo Gouy
573fad2a6d Fix the shapedwindow test program.
Now that Fl_Image_Surface can produce a depth-4 image, it is necessary
to control the A component of the image for the window shape to be correct.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-01 14:21:32 +00:00
Albrecht Schlosser
18e72ba9e7 Fix another compiler warning [-Wformat=].
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11096 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 04:28:04 +00:00
Albrecht Schlosser
1d85cc43f3 Fix compiler warnings [-Wsign-compare] (STR #2988).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11095 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 03:40:58 +00:00
Albrecht Schlosser
e934dd5468 Fix compiler warnings (STR #2988).
gcc issued lots of warnings if compiled with -Wundef. This shows access
to undefined preprocessor macros, particularly for config tests.

This update is similar, but not identical to fltk-cpp-fixes.patch as
posted on STR #2988 (file #1). There have been changes in the configure
script and the  macros in configh.in and configh.cmake.in meanwhile.

This commit compiles with -Wundef w/o such warnings under Linux and
Windows (MinGW).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 02:49:56 +00:00
Albrecht Schlosser
2fbffa98fa Porting back changes of branch-1.3-porting.
The old behavior is retained, but the files have been modified
to match the new versions in the porting branch as much as possible.

The porting branch has its own (modified) version. Windows executables
built with the new IDE's (generated by CMake) don't have the trailing 'd'
in Debug mode.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11091 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-30 21:11:16 +00:00
Albrecht Schlosser
1139af35af [CMake] Work around CMake bug in CMake versions 3.4.x.
CMake versions 3.4.x crash when using fltk_wrap_ui, a built-in CMake
command. According to the CMake devs this will be fixed in CMake 3.5.

However, since fltk_wrap_ui is no longer necessary (it can replaced by
custom build commands) and some Linux distributions deploy CMake 3.4.x
we decided to use an own replacement function.

This makes sure that FLTK can be built with CMake 3.4.x, but FLTK users
may still have to rewrite their own CMake files to not use fltk_wrap_ui.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11081 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-29 13:09:30 +00:00
Greg Ercolano
01e5f26f2f Fixed incomplete example.
Re: David Allen's post today on fltk.general



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-25 18:41:59 +00:00
Albrecht Schlosser
e8d6a11e78 Documentation fixes (Fl_Text_Buffer and Fl_Text_Display).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 23:15:15 +00:00
Albrecht Schlosser
70f66d5ded Delete obsolete FL/ folder in ide/VisualC6.
ide/VisualC6/FL/abi-version.h is not used anymore.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 23:10:14 +00:00
Matthias Melcher
abb3281b5e Updated screenshot of all available symbols
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11044 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 10:48:33 +00:00
Greg Ercolano
8f72a7a790 Small tweak for one of VS's macros.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11042 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 01:47:58 +00:00
Greg Ercolano
a50000484d If FL/abi-version.h doesn't exist, it's created from abi-version.ide
(STR#3249)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11041 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 01:35:22 +00:00
Manolo Gouy
88b8887842 deleted
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20 05:41:58 +00:00
Manolo Gouy
1a1c68e0c5 Changed the run-script so t copies abi-version.ide to FL/abi-version.h
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11014 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20 05:41:25 +00:00
Manolo Gouy
1a9f105ef6 Added 'run script phase' that copies abi-version.ide
to ide/Xcode4/FL/abi-version.h before building the FLTK library.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-19 17:42:30 +00:00
Albrecht Schlosser
2b6c2bc7af Make VisualC2008/2010 projects create FL/abi-version.h (STR #3249).
First step towards a hopefully clean creation of FL/abi-version.h for all
Windows (Visual Studio) and maybe also Xcode projects (if necessary) in
order to "simulate" configure and CMake methods to create this file.

I could only modify the VisualC2008 and VisualC2010 project files, because
I don't have VisualC6 and/or Xcode. Help needed...

To do for remaining <ide> directories (ide/VisualC6 and maybe ide/Xcode4):

 (1) Remove <ide>/FL folders including <ide>/FL/abi-version.h.
 (2) Add a Pre-Build event or equivalent on project 'fltk' for all
     potential build configurations (Debug, Release, ...)
 (3) Maybe add project dependencies to ensure that the Pre-Build event
     of project 'fltk' is executed before all other projects.

Notes:

 (a) Command line for Pre-Build events of VS2008/2010:
     "copy /Y $(SolutionDir)..\..\abi-version.ide $(SolutionDir)..\..\FL\abi-version.h"
     Something similar should work for VC6 as well.

 (b) While building the projects I found some wrong output settings in zlib
     projects. These have been fixed in this commit as well (unrelated).
     
 (c) .gitignore has been extended to ignore all intermediate build files
     of VS2008/VS2010 ide projects.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11010 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-19 14:02:10 +00:00
Albrecht Schlosser
797e4d60cc Fix undefined reference building shared cairo library (STR #3276).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-16 01:48:04 +00:00
Manolo Gouy
7523748660 Mention new method Fl_Image_Surface::draw_decorated_window().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11000 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-07 05:09:11 +00:00
Manolo Gouy
739e4a8eaf Mac OS: improved the Fl_Image_Surface class so it returns an RGBA image
allowing to draw exactly windows with rounded corners.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10999 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-06 20:47:39 +00:00
Manolo Gouy
2f642a51c9 Fixed typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10998 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-06 20:41:57 +00:00
Manolo Gouy
c9712614df 1) The Fl_Window::decorated_h() computation was incorrect under MSWindows10
because it did not use the correct dwmapi.dll - based implementation.
This commit uses the correct way to compute the width and height of window
borders in Fl_Window::decorated_h() and in Fl_Paged_Device::draw_decorated_window().

2) Fixed the computation of enhanced metafile units that correspond to a given pixel size
used by the Fl_Copy_Surface class on the WIN32 platform.

Tested with MSWindows XP, 7 and 10 using the device test app.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10997 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-05 11:59:08 +00:00
Manolo Gouy
95fb87eff5 1) For the X11 and the Mac OS platforms, a default font (FL_HELVETICA, FL_NORMAL_SIZE)
is used when fl_draw() is called while no font has been set before. This commit does the same
on the MSWindows platform, for consistency.

2) Slightly improved Fl_Image_Surface::draw_decorated_window() under WIN32.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10996 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-05 05:48:58 +00:00
Manolo Gouy
94e2c48f5f Implemented Fl_Image_Surface::draw_decorated_window().
This gives the same drawing capabilities to all supported drawing 
surfaces: display, printer, clipboard, in-memory bitmap image,
PostScript file.

Also, completed the Mac OS implementation of 
Fl_Copy_Surface::draw_decorated_window(Fl_Window *win, int delta_x=0, int delta_y=0)
that did not honor non-zero last arguments.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10990 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04 13:16:23 +00:00
Manolo Gouy
d37269a23b The changes introduced at r.10921 destroyed program-controlled window resizing.
This change hopefully repairs that.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-31 10:39:51 +00:00
Manolo Gouy
69ec698e41 Mac OS: modified CMake config files to allow use of OPTION_APPLE_X11
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
2015-12-31 06:19:59 +00:00
Albrecht Schlosser
3beb45165a [CMake] config.h, part 2 - full compatibility with autoconf.
This commit makes the file config.h generated by CMake 100% compatible
with the one generated by autoconf/configure.

Fixes in this commit:
 - Set FLTK_DATADIR and FLTK_DOCDIR with the same default values.
   Note: needs some cleanup, option values are not clear, '/fltk'
   is currently appended in export.cmake (needs improvement).
 - Simulation of autoconf macro AC_HEADER_DIRENT for correct
   definition of only one 'dirent' header file.
 - Fix more function checks:
    - dlsym
    - png_get_valid
    - png_set_tRNS_to_alpha
 - Improve "Big Endian" check for __APPLE__ (mac_endianness.h).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10985 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-30 21:13:07 +00:00
Albrecht Schlosser
4f5e6e7732 Harmonize configure and CMake build system (part 1).
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
2015-12-30 14:37:35 +00:00
Albrecht Schlosser
17c4817592 Add configure and CMake checks for X11/Xregion.h.
Configure and CMake now both check if X11/Xregion.h exists on the
build system and set HAVE_X11_XREGION_H in config.h accordingly.

src/Fl_Pixmap.cxx: modified to use the configure test as proposed by Manolo
in fltk.coredev on Dec 13 2015 in thread "Using X11 backend on OS X".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-30 12:10:15 +00:00