Commit Graph

7733 Commits

Author SHA1 Message Date
Manolo Gouy
f24ee501b9 STR#3320 continued: make sure there's no undrawn space between nested rectangles and images.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12595 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18 12:13:33 +00:00
Manolo Gouy
3f9f4debbb STR#3444: Add MacOS support for application rescaling (not quite complete)
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes.
A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly.

GLUT apps can also be scaled (across platforms).

SVG images are re-rasterized after app scaling for optimal drawing.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18 08:52:55 +00:00
Manolo Gouy
31f16205cb Fl_Window_Driver constructor: initialise wait_for_expose_value to 0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-17 06:47:37 +00:00
Manolo Gouy
e3d9c46869 Initialize all member variables in the Fl_Window_Driver constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12592 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-16 13:29:51 +00:00
Albrecht Schlosser
0e1916de51 Remove VS specific #pragma comment (lib, ...).
This Visual Studio specific pragma hides missing library references
on Visual Studio builds, but since comctl32 is not the only necessary
Windows dll and this has never been extended to other libs, this pragma
is unnecessary and potentially confusing, so I removed it.

Documentation of dependencies mentions comctl32 (and more) and future
CMake generation of user project VS IDE files can reference the FLTK
dependencies by internal (CMake) means anyway.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12591 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-15 13:04:07 +00:00
Albrecht Schlosser
0a61f9d739 Improve schemes unittest (add selection colors to buttons).
Use check and radio buttons with different selection colors to
verify selection colors with different schemes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-13 18:30:19 +00:00
Manolo Gouy
bc4662fd23 SVG images: fix image printing under MacOS when not used as a scaled Fl_Shared_Image
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12589 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-13 15:32:20 +00:00
Manolo Gouy
d9a99c64fd Doxygen doc of class Fl_Shared_Image: add that the SVG format is also supported.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12588 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-12 09:23:48 +00:00
Albrecht Schlosser
31e816786e Fix spelling and clarify documentation.
Add a hint that localization of shortcut modifiers fl_local_ctrl
etc. should not be done in static initializers because random static
initialization order might overwrite strings with internal values.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12587 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-08 12:26:50 +00:00
Manolo Gouy
eb763ae432 Further simpler code to initialise the MacOS-specific implementation of Fl_Sys_Menu_Bar_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-07 16:10:21 +00:00
Manolo Gouy
2da4cf8b9f Simpler code to initialise the MacOS-specific implementation of Fl_Sys_Menu_Bar_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12585 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-07 15:35:07 +00:00
Manolo Gouy
dc569ef8fb Make sure GUI is updated after activation of a menu item from Fl_Sys_Menu_Bar
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-07 08:43:37 +00:00
Manolo Gouy
24a5fa7632 MacOS: support running fl_open_display() in static initializer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12583 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-06 07:38:05 +00:00
Manolo Gouy
fdbee3daed Doxygen: remove warning
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12582 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-05 16:17:12 +00:00
Manolo Gouy
0a26b0dd68 Some code simplification for class Fl_Sys_Menu_Bar
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12581 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-05 16:05:35 +00:00
Manolo Gouy
82312ed61b Set svn properties.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12580 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-04 17:41:09 +00:00
Manolo Gouy
8612fea277 Make Fl_Sys_Menu_Bar class usable in static initializers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12579 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-04 17:39:19 +00:00
Manolo Gouy
6586b77975 Restore possibility to run fl_open_display() within a static initializer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12578 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-03 15:46:12 +00:00
Manolo Gouy
f609261697 Remove Fl_Sys_Menu_Bar.mm from list of input files
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12577 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-03 14:34:47 +00:00
Manolo Gouy
ad7628afed Set proper properties
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12576 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-02 19:17:31 +00:00
Manolo Gouy
34dd1b15fb Converted class Fl_Sys_Menu_Bar to the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12575 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-02 16:20:30 +00:00
Manolo Gouy
a8fe10cf88 MacOS: use rounded bottom corners when drawing windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12574 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-30 16:14:13 +00:00
Manolo Gouy
08f72d626c Fl_Widget_Surface::draw(Fl_Widget *widget,...): clip drawing to the window bounds when widget is a window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12573 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-30 13:55:19 +00:00
Manolo Gouy
c354268f44 Top-level menus should not be inactivated. Their items can be.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12572 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-27 20:57:52 +00:00
Greg Ercolano
0fb2a55fc8 Fixes issued raised in STR #3422; Fl_Text_Display constructor order issues;
organize member initialization first, method calls last.

Also: 
    Reorg'ed member initialization to match order in .H
    to detect missing member inits.

    Noticed member mModifyingTabDistance is unused.
    Tagged with XXX: but left in place, since it's
    a protected member, and might be utilized by user code.
    We should probably remove this member.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12570 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-23 19:34:33 +00:00
Manolo Gouy
02d58597e9 MacOS native file chooser: STR#3406 continued - restore broken filename preset in save dialog.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12569 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-22 12:42:42 +00:00
Greg Ercolano
310c545179 Fixes STR#3428: allows command line to specify alternate html file on Mac platform
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12568 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-19 01:18:16 +00:00
Albrecht Schlosser
a877466a21 Fix illegal memory access after free when closing fluid (STR #3427).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12567 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-18 18:13:06 +00:00
Albrecht Schlosser
16db9a0c82 Fix crash when closing fluid with Fl_Table (STR #3427).
Many thanks to Chris for the patch!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-18 17:55:47 +00:00
Albrecht Schlosser
853a716610 Replace remaining calls of getenv() with fl_getenv().
Note: don't use fl_getenv() in Fl_System_Driver and derived classes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-17 17:25:33 +00:00
Manolo Gouy
f300e00f79 Proper return value from test window::handle() when the event is not processed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-17 06:52:27 +00:00
Manolo Gouy
15750ea378 MacOS: Fix STR#3406 where native file chooser does not show preset file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-13 21:41:33 +00:00
Manolo Gouy
00eef649ca MacOS: complete commit at r.12559 that contained a typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-13 14:47:49 +00:00
Manolo Gouy
b171a28de4 MacOS: make -[FLWindowDelegate windowShouldClose:] more robust by testing for NULL pointer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12559 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-13 14:43:58 +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
Manolo Gouy
cfdc38f760 MacOS: improve drawing of rounded corners of window titlebar
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12557 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-12 08:00:21 +00:00
Albrecht Schlosser
f4f4030cc2 Refactor Fl_WinAPI_System_Driver string conversion and more.
Remove duplicated code by using local (static) string conversion functions.
This makes the code better maintainable and removes redundancies.

Rename some variables (particularly one-letter names) to more useful
names, minor code reformatting to be more compatible with the CMP.

To do: check for potential memory leaks, maybe free temporary buffers.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12556 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 21:23:15 +00:00
Manolo Gouy
10143bc50a Test commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 10:54:52 +00:00
Manolo Gouy
9646c04b54 Test commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12554 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 09:46:58 +00:00
Manolo Gouy
6a7008684f Test commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12553 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 09:45:16 +00:00
Manolo Gouy
5ac0d892c1 Test commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12552 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 09:44:09 +00:00
Manolo Gouy
ee929944ce Minor reformatting
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 09:04:26 +00:00
Manolo Gouy
7356d4ef21 Make a comment more detailed
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-11 09:01:51 +00:00
Albrecht Schlosser
4a088d28f5 Add missing platform wrapper fl_chdir() for chdir().
Tested under Windows and Linux, but not yet used in library code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12549 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-10 12:56:00 +00:00
Manolo Gouy
ff1e508e5d MacOS: improve drawing of the rounded corners of window titlebars.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-09 15:27:26 +00:00
Manolo Gouy
9aaf6df90c MacOS: fix capture of window titlebar under MacOS 10.13 "High Sierra"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-07 17:01:20 +00:00
Albrecht Schlosser
660f4160af Fix compiler warning [-Wunused-result].
Full warning:
  ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’,
  declared with attribute warn_unused_result [-Wunused-result]

Note: added "FIXME ...": current code ignores file read error.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12546 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-05 20:43:44 +00:00
Albrecht Schlosser
c348189008 Fix doxygen docs: missing excludes and CMake paths.
This commit fixes two issues:

Doxygen build with CMake needs paths relative to CMake source dir.

Missing excluded files taken from STR #3320, file #42 (by Manolo):
  http://www.fltk.org/strfiles/3320/scaling_rect_r12544.patch


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-05 19:56:41 +00:00
Manolo Gouy
b74d0b8a94 Fix drawing of tab characters when display is rescaled.
The problem is announced in comment #99 of
http://www.fltk.org/str.php?L3320

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-05 15:47:17 +00:00
Greg Ercolano
f47c0e9e51 fl_text_extents(): added example, included reference to fl_font() and fl_measure().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12543 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-05 04:18:44 +00:00