Commit Graph

3797 Commits

Author SHA1 Message Date
Albrecht Schlosser
a51a940890 Fix compiler warnings (gcc 6.1).
Some of these warnings were benign (code formatting), but one of them
showed a potential bug (zero divide in test/fraciewer.cxx).

Fixed warnings:

 2 suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
 1 this 'while' clause does not guard... [-Wmisleading-indentation]
 1 this 'for' clause does not guard... [-Wmisleading-indentation]
 1 this 'else' clause does not guard... [-Wmisleading-indentation]


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-29 09:23:44 +00:00
Albrecht Schlosser
9721373219 Doc changes: set fl_font before fl_measure() (STR #3243)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-24 08:53:08 +00:00
Greg Ercolano
60ac8a8eba Fixes STR #3270; when an image is used as a link,
this mod synchronizes the link's hot spot with the image.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-23 04:25:40 +00:00
Greg Ercolano
f22cd53795 Fixes to fl_choice() docs, added screenshots.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-22 02:05:44 +00:00
Greg Ercolano
2bb2192dd3 Solves STR#3294; added methods to let user set the userdeicon,
and removed the performance degrading automatic deicon creation.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-21 00:35:06 +00:00
Albrecht Schlosser
fa2bb6514b Improve drawing of rounded box (STR #2943).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11814 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 22:10:23 +00:00
Albrecht Schlosser
97bb88960e Fix unnecessary case-sensitive comparison (STR #2899).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11813 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 20:01:08 +00:00
Albrecht Schlosser
6e503e90a0 Allow widget callback to be NULL (STR #2835).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 19:23:16 +00:00
Albrecht Schlosser
f40cb28308 Fix uninitialized variable warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 10:24:35 +00:00
Greg Ercolano
1c761bedc3 Solves STR# 3305 as ABI feature 1.3.4.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-14 18:48:43 +00:00
Greg Ercolano
e45dfc2b20 Small code simplification as suggested in comment #15 of STR#2828
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-14 01:12:21 +00:00
Greg Ercolano
5a340a2e5e Solves STR#3306.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-13 23:19:12 +00:00
Albrecht Schlosser
189591d4b6 Documentation fixes and clarifications.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-09 17:06:46 +00:00
Manolo Gouy
dcf8bc2afa Fix for STR#3316: use same value for the size argument of glGenLists() and glDeleteLists()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-22 06:55:40 +00:00
Manolo Gouy
1919691343 Use Xrandr to get the true DPI of the display under the X11 platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-22 05:58:30 +00:00
Manolo Gouy
6b95819984 Make Fl_Gl_Window::pixels_per_unit() return a float (rather than int) value.
This is compatible with future scaling factors applicable to the GUI.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11787 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-22 05:44:14 +00:00
Greg Ercolano
e09806d249 Some small Fl_Sys_Menu_Bar related doc mods as per STR#3317.
WIP -- more to come; just checking in what I have for now..

	1) rank -> index
	2) Added docs for index \return values for some methods 
	3) Some clarification in the internal docs about rank vs. index
	4) Enabled Fl_Menu_Item's enum flags to be able to be links (added @file
	   to Fl_Menu_Item.H) so references to e.g. "::FL_MENU_TOGGLE" will show
	   up as links in doxygen docs.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-18 00:32:18 +00:00
Manolo Gouy
da46b5caa3 Fix positionning of text after <HR> directive (partial fix of STR #3227).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11768 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-03 11:40:26 +00:00
Albrecht Schlosser
2058a25373 Hopefully final fix of HTML entity handling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-31 11:31:58 +00:00
Manolo Gouy
d850775282 Proper handling of html entities (&name;) in text selections of Fl_Help_View widget.
This commit reproduces the same changes in the fltk-1.3-porting branch.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11761 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-31 09:12:40 +00:00
Greg Ercolano
6b288980cb Fl_Text_Editor documentation mods for kf_xxx functions.
(Discussion on fltk.coredev May 29 - 30th 2016)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-30 22:01:06 +00:00
Greg Ercolano
8a68fd1de8 Doc mod to refer to fltk color chip table.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-28 15:39:05 +00:00
Albrecht Schlosser
1127234621 Fix compiler warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11749 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-22 13:43:12 +00:00
Albrecht Schlosser
bc9bb9bd70 Fix Fl_Help_View buffer overflow (STR #3275).
This version works much better than the previous one:

 - fixed buffer overflow ("stack corruption")
 - fixed potential long text truncation
 - fixed tab formatting at line start or any offset divisible by 8
 - better handling of HTML entities (aka quoted characters)
 - code simplifications, e.g. HV_Edit_Buffer::cmp() + width()

Todo:

 - improve and standardize handling of HTML entities
 - more tests

Missing features and known bugs:

 - strike out text (not implemented)
 - table and horizontal line formatting issues (STR #3227)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11745 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-17 16:25:27 +00:00
Albrecht Schlosser
21768d9410 Fix documentation of Fl_Tile (STR #3303).
Clarify that the resizable() box should be the first child to ensure
correct event delivery to children.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-09 11:25:57 +00:00
Manolo Gouy
489bb91a82 Safer code for gl_draw() when used on normal window and Mac OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11725 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-09 08:01:16 +00:00
Manolo Gouy
8feb1bda5f Make all platforms get same kind of Fl_Image object when pasting an image from clipboard.
Previously the X11 platform got an Fl_Shared_Image whereas other got an Fl_RGB_Image,
which made image deletion difficult. Now all platforms get an Fl_RGB_Image object.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-05 07:21:24 +00:00
Albrecht Schlosser
17f677e0a3 Fix more compiler warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11535 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-05 21:12:49 +00:00
Albrecht Schlosser
11322ede59 Avoid size recalculation if Fl_Browser::textsize() didn't change.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11464 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29 11:34:10 +00:00
Albrecht Schlosser
474db7e1ff [CMake] Revert r 11460.
Sorry for the noise.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29 10:23:45 +00:00
Albrecht Schlosser
c7bf9ce91b [CMake] Fix library name(s).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11460 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29 09:54:17 +00:00
Albrecht Schlosser
4db4c2910e Fix Fl_Browser::textsize(int) to adjust the scrollbars (STR #3057).
Setting a different text size didn't affect the scrollbars.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11453 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-28 16:16:29 +00:00
Albrecht Schlosser
12d5c63bb8 [CMake] Simplify CMake build files, remove redundancies.
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@11444 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-27 18:30:51 +00:00
Albrecht Schlosser
448e02574b [CMake] Remove redundant linking in CMake build process (STR #3298).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-27 16:56:23 +00:00
Albrecht Schlosser
3356a15d18 Fix compiler warning.
Back-porting from branch-1.3-porting.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-25 20:55:13 +00:00
Albrecht Schlosser
de74c82d42 Enable definition of Unicode conv. options on compiler command line.
Three documented pre-processor variables can now be defined on the
compiler command line to avoid editing the FLTK src code. The default
values still apply unchanged.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11404 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-23 13:36:50 +00:00
Albrecht Schlosser
612e6d7974 Fix Doxygen warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-20 17:55:17 +00:00
Manolo Gouy
014ea2f871 Fix potential memory error in Mac OS code for printing window titlebars.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11370 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-19 06:04:19 +00:00
Manolo Gouy
71ed0752fb Fix minor default in Fl_Window::wait_for_expose() under Mac OS.
If the exposed window contains a sub-window the sub-window can disappear
after having been drawn. This can be seen with the device demo
completed with a wait_for_expose() call just after the main window show().
The fix applies wait_for_expose() recursively for all subwindows.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-12 05:35:40 +00:00
Manolo Gouy
a0f26d3cf4 Fix freeze of Fl_Native_File_Chooser occurring under Mac OS + X11.
The fclose(stderr) apparently freezes the opening of the GTK file chooser.
It is replaced by 2>&- which closes stderr for the lpstat command.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11329 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-09 16:08:39 +00:00
Albrecht Schlosser
a0d519142c Add localization of modifier key names in shortcut labels.
Modifier key names like Alt, Shift, Ctrl, Meta can now be localized by
setting global string pointers. See documentation of fl_shortcut_label().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 16:58:43 +00:00
Albrecht Schlosser
15477700ed Improve documentation of Fl_Valuator class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11316 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 13:42:59 +00:00
Albrecht Schlosser
6f18ec06d5 Fix overflow in Fl_Valuator::precision(int) to 0...9 (STR #3280).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11315 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 13:40:18 +00:00
Ian MacArthur
337e115c54 Fl_Tree failed to compile if built with no ABI guard set (or the default 1.3.0 set).
The variable "_lastselect" had been added to the methods Fl_Tree::remove() and Fl_Tree::clear() without any ABI guards, but "_lastselect" was added to the class ABI at 10301 (so far as I can tell).

Builds now with my patch: not sure it is correct, but... Will commit anyway since it allows the lib to build, but please feel free to fix it better!




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11314 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 09:56:46 +00:00
Manolo Gouy
d01ff3864f With X11 + Xdbe, deallocate the Fl_Double_Window's back buffer at window close.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 05:18:28 +00:00
Greg Ercolano
c9e114945e lastselect_: reset to zero in remove() + clear(), added description comment for variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07 20:35:28 +00:00
Albrecht Schlosser
0d316c3140 Remove obsolete files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11295 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-05 16:24:37 +00:00
Albrecht Schlosser
3948405951 Fix negative 'd' and 'ld' args in fl_draw_image() (X11 + Windows).
This commit fixes a regression in FLTK 1.3.x, where negative values
of 'd' (pixel delta) and 'ld' (line delta) didn't work anymore under
Unix/Linux (X11) and Windows.

With this commit the regression is fixed on all supported platforms.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 15:45:26 +00:00
Manolo Gouy
35010115c9 Allow fl_draw_image(buf,X,Y,W,H,D,L) calls with abs(L)>D*W on the Mac OS platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 07:51:53 +00:00
Manolo Gouy
f4cc803b3c Have fl_draw_image(buf,X,Y,W,H,D,L) support negative D and/or L arguments on Mac OS X - continued.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11254 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-01 15:08:57 +00:00