Commit Graph

2122 Commits

Author SHA1 Message Date
ManoloFLTK d2870d6f7d Define useful implementations of Fl_Graphics_Driver::push_no_clip() and pop_clip(). 2018-12-04 15:11:03 +01:00
ManoloFLTK b985b884f8 Give a meaningful default implementation to a few more member functions of class Fl_Graphics_Driver. 2018-12-04 12:57:32 +01:00
Manolo Gouy c33d3c6aaa Remove unused arguments from the Fl_Device_Plugin::print() member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-30 09:01:12 +00:00
Manolo Gouy b511f6a7a4 Use the Fl_Gl_Device_Plugin mechanism to simplify the construction of a layer-backed GL window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-29 17:50:55 +00:00
Manolo Gouy 46f08f6d21 Documentation: reveal where the Fl_Preferences text files are located on each platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13136 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-27 12:41:39 +00:00
Albrecht Schlosser 75b6cee6cc Document that Fl_Widget::GROUP_RELATIVE bit is not used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-19 16:50:57 +00:00
Manolo Gouy b79f3ed1f2 Prepare for support of MacOS 10.14 Mojave.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13067 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-16 09:28:25 +00:00
Albrecht Schlosser 86b0756e15 Update dependencies and fluid files, fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-30 10:41:16 +00:00
Manolo Gouy b3b29632fb Doc only: better doc of recently added events: FL_SCREEN_CONFIGURATION_CHANGED, FL_FULLSCREEN,...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-30 08:31:53 +00:00
Manolo Gouy 153b175d90 Better doc for using OpenGL version 3.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13023 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-21 07:45:32 +00:00
Manolo Gouy a3529e7c3f Improved documentation related to access to OpenGL 3 under X11 platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13022 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-20 15:56:39 +00:00
Manolo Gouy a9e2a78bb0 Improve the documentation of scaling factor-related operations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13013 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-09 11:51:38 +00:00
Manolo Gouy cd399d9898 Support for GUI scaling: add API to get/set the scaling factor value.
Also, define an FLTK event triggered when the scaling is changed and an option
to disable the transient window showing the new scaling factor.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-08 20:08:10 +00:00
Albrecht Schlosser fb0f940c51 Update doxygen files to fix broken PDF generation.
Note: PDF generation "worked" with the previous configuration up to
doxygen 1.8.6 on my "old" Ubuntu 14.04 system but did no longer work
with doxygen 1.8.7 - 1.8.13 (the latter on Ubuntu 18.04).

Tests showed that 1.8.14 is seriously broken and git:master (aka 1.8.15,
but not yet released as of today) is not usable as well. Hopefully there
will be some doxygen fixes in the future.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13010 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-07 09:01:32 +00:00
Greg Ercolano 205570d134 Fl_Tree documentation fixes for html/pdf, doxygen 1.8.5
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-06 18:04:46 +00:00
Manolo Gouy a4194a40ab Have the Doxygen doc of fl_draw_pixmap() show the default value of the last argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-04 16:42:32 +00:00
Albrecht Schlosser bf19362179 Add missing Fl_Cairo_Window constructors (STR #3160).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-27 09:05:12 +00:00
Manolo Gouy 99cf1dd858 Make Fl_Graphics_Driver::newMainGraphicsDriver() public rather than private.
An FLTK app may be interested in calling it.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-10 10:51:02 +00:00
Manolo Gouy 87d186d68c Remove useless 'friend' statements from declaration of class Fl_Image_Surface
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12982 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 12:00:40 +00:00
Manolo Gouy 73613f8c2f Use #include <FL/platform_types.h> to define type Fl_Offscreen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 11:09:13 +00:00
Manolo Gouy 51389ca460 Add examples/SVG_File_Surface.cxx and refer to it in the doc of class Fl_Surface_Device
This example code shows how to subclass Fl_Surface_Device and Fl_Graphics_Driver to
endow FLTK with a new kind of graphics output.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 09:27:04 +00:00
Manolo Gouy 3199e3331b Move Fl_Gl_Window_Driver.H from FL/ to src/
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12977 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26 14:23:51 +00:00
Manolo Gouy 7046e99f96 Move Fl_System_Driver.H from FL/ to src/
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26 14:12:43 +00:00
Manolo Gouy 26cb08badb Move Fl_Screen_Driver.H from FL/ to src/
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26 14:04:09 +00:00
Manolo Gouy 7ebe8e21b0 Move Fl_Window_Driver.H from FL/ to src/
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26 13:43:18 +00:00
Manolo Gouy 82c7a1baa7 Move Fl_Sys_Menu_Bar_Driver.H from FL/ to src/
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26 07:38:54 +00:00
Matthias Melcher b8e97d7c28 Doxygen only: fixed all block comments starting with an asterisk to space-only, fixed doxygen keywords prepended with @ to use a backward slash instead. No code was changed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 20:50:22 +00:00
Matthias Melcher b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
The original intention of FL_PORTING was to mark all places in the
source code where changes are required to port FLTK to a new platform.
Thanks to the driver system, this approach has become somewhat
misleading, so I removed all references.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 17:04:18 +00:00
Matthias Melcher a9fd08ff5a Doxygen: created Group to document drivers, disabled by default
Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in
to enable driver documentation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 16:47:40 +00:00
Albrecht Schlosser ec0ac46aa8 Move platform specific shortcut code to platform drivers.
Tested on Windows and Linux (not tested on MacOS/Android).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-20 15:52:58 +00:00
Manolo Gouy 32b35e62d2 Turn static function Fl_Graphics_Driver * Fl_Graphics_Driver::newMainGraphicsDriver() private.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12943 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-15 07:42:17 +00:00
Manolo Gouy bfac49015c Fix for STR#3475: X11 platform, re-use current screen scaling factor when processing a screen reconfiguration event.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12939 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-08 11:31:30 +00:00
Manolo Gouy f3971319b9 MacOS: have Fl_OpenGL_Display_Device::capture_gl_rectangle() capture also the overlay of GL windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12938 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-30 20:20:47 +00:00
Manolo Gouy 8ef4035b6d Replace Fl_Paged_Device::newPrinterDriver() by Fl_Printer::newPrinterDriver().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12937 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-25 06:54:03 +00:00
Manolo Gouy bbd5514691 Rewrite static function Fl_Image_Surface::rescale(Fl_Image_Surface*&) as member function Fl_Image_Surface::rescale().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-25 04:36:49 +00:00
Greg Ercolano b721f519ac Added separate diagram for fl_arc(x,y,r,a1,a2) (very different from fl_arc(x,y,w,h,a1,a2))
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12935 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24 19:48:41 +00:00
Greg Ercolano 2694217d76 Extra refs for fl_pie/fl_arc diagrams..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24 18:02:55 +00:00
Manolo Gouy c886fe9c33 Add documentation for Fl::reset_marked_text() and Fl::insertion_point_location().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24 10:58:47 +00:00
Manolo Gouy f90450ad05 Make static member function Fl_Window_Driver* Fl_Window_Driver::driver(const Fl_Window *) inline.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-23 16:42:43 +00:00
Manolo Gouy ce71c4b679 Add Fl::screen_scale(int) function to get the scaling factor value of a screen.
This allows to keep class Fl_Screen_Driver away from the public API.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12926 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-22 17:00:27 +00:00
Manolo Gouy 509c5be0d5 Remove useless #include directives.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12922 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-14 14:58:21 +00:00
Manolo Gouy 8b7f7c78b2 Remove public member function Fl_Window_Driver *Fl_Window::driver() so class Fl_Window_Driver is not in FLTK public API.
This function is replaced by static Fl_Window_Driver* Fl_Window_Driver::(const Fl_Window *win).
The purpose is to have class Fl_Window_Driver outside from FLTK ABI.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-12 09:36:36 +00:00
Manolo Gouy 2b7aac129b Rename Fl_Paged_Device::start_job() to begin_job() and Fl_Paged_Device::start_page() to begin_page().
The new function names begin_job() and begin_page() better match end_job() and end_page() with which
they must be used by pair.
The old names start_job() and start_page() are maintained for API compatibility with FLTK 1.3.x

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-09 14:16:35 +00:00
Greg Ercolano 28807a3fab Added convenience method update_menubutton(),
which tries to keep the menu synchronized with the Fl_Input field,
assuming there's a match.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12908 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-07 21:24:06 +00:00
Manolo Gouy 4ede9cec29 New Fl_Image_Surface::rescale() class function and document equivalence between Fl_Offscreen-based and Fl_Image_Surface-based approaches.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-07 13:43:28 +00:00
Manolo Gouy 41eb376060 Make member function Fl_Image_Surface::get_offscreen_before_delete() be private.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12904 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06 15:03:04 +00:00
Manolo Gouy ccae86b291 Remove useless #include <FL/Fl_Shared_Image.H> following usage of the new Fl_Image::scale() member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06 10:20:45 +00:00
Manolo Gouy 5c16dcb65b Simplify Fl_XXX_Window_Driver::capture_titlebar_and_borders() using Fl_Image::scale().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12902 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06 07:14:13 +00:00
Manolo Gouy aab1b72af4 Improve fl_overlay_rect() when GUI is scaled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12901 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06 06:46:40 +00:00
Manolo Gouy 20ccb6b7f2 Shorten the list of virtual member functions used to support Fl_Widget_Surface derived classes.
Change Fl_Cocoa_Screen_Driver::read_win_rectangle() so it captures only
from the current window and ignores its subwindows, as do other Fl_Screen_Driver derived classes.

Remove Fl_Cocoa_Printer_Driver::print_window_part() that is no longer necessary.
Remove Fl_Printer::print_widget() and Fl_Printer::print_window_part() that
are no longer necessary.

Stop Fl_Widget_Surface::print_window_part() from being virtual because its platform-independent
implementation should suffice.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12894 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-04 15:11:47 +00:00
Manolo Gouy b73ff860cc Make virtual void Fl_Surface_Device::end_current_() have no argument because none is used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12889 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-01 17:09:15 +00:00
Manolo Gouy 929efec855 Expand the doc of class Fl_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-27 16:50:27 +00:00
Manolo Gouy 9c389d34f9 Simplify API for Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen off) with non-null offscreen.
The caller no longer needs to call Fl_Image_Surface::get_offscreen_before_delete() before object deletion,
because the object destructor knows the offscreen has not been created by the Fl_Image_Surface constructor.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-26 12:00:49 +00:00
Manolo Gouy 54b697cd49 Reorganise access to the value of the GUI scaling factor with public getter and protected, virtual setter member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 10:39:46 +00:00
Manolo Gouy d375918a5e Documentation: place Doxygen doc next to function implementation
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12857 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 08:43:19 +00:00
Manolo Gouy 15e3f4b2d2 Simplify the implementation of printing of Fl_Pixmap images under Windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 15:03:51 +00:00
Manolo Gouy c5ab11bbec Comments only: extend "Implementation note about image drawing" to describe the mask_bitmap virtual member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:21:54 +00:00
Manolo Gouy 26aabc91e1 Remove virtual member Fl_GraphicsDriver::mask_bitmap(char **) and its re-implementations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:00:29 +00:00
Manolo Gouy 9b01ff63e7 Remove Fl_PostScript_Graphics_Driver::mask_bitmap(char **) that is useless.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 10:43:28 +00:00
Manolo Gouy e85fd31f54 Comments only: complete "Implementation note about image drawing" about how to destroy cached images.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 08:03:16 +00:00
Manolo Gouy f089bd6445 Remove useless re-implementation of this virtual member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12839 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 07:56:52 +00:00
Manolo Gouy ecc1f90506 Comments only: extend the description of how Fl_Graphics_Driver derived classes support image classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12838 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-15 06:44:50 +00:00
Manolo Gouy 25d39c1b57 Remove useless 'friend' statements from class Fl_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 15:26:42 +00:00
Manolo Gouy 82e70fae04 Comments only: more extensive explanation of how virtual member functions of Fl_Graphics_Driver can support image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 15:10:59 +00:00
Manolo Gouy bfac5462be Remove Fl_Pixmap::prepare() and Fl_Bitmap::prepare() that were used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 13:37:47 +00:00
Manolo Gouy 2abe8bd413 Homogenise and simplify the API of Fl_Graphics_Driver::cache(image-type *) virtual member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13 13:22:15 +00:00
Manolo Gouy e440b8859f Simplify code for image drawing by PostScript graphics driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12832 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13 11:50:20 +00:00
Manolo Gouy 178343b2ee Image drawing: simplify the code organisation to better support Fl_Image::scale() - continued
This completes changes introduced at r.12828.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 14:54:53 +00:00
Manolo Gouy 16705ef734 Image drawing: simplify the code organisation to better support Fl_Image::scale().
Graphics drivers now use up to 6 virtual member functions to support Fl_Image
drawing in the context of GUI and image rescaling :
  virtual void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_bitmap(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy)
and
  virtual void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_fixed(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 13:07:00 +00:00
Albrecht Schlosser efc3ec1b7b Remove unnecessary dependency on FL/Fl_Rect.H.
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
2018-04-12 12:58:10 +00:00
Albrecht Schlosser e71fc7e4c3 Document Fl_Rect::r() and b() to be outside the rectangle.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 18:41:34 +00:00
Greg Ercolano c7080e826e General description: mention how to move items around
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12824 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 18:37:18 +00:00
Greg Ercolano e4916d617e Added mention of the new Fl::menu_linespacing() in the Fl_Menu_ docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 17:29:23 +00:00
Greg Ercolano 309d9a61b9 Added Fl::menu_linespacing() to solve STR# 2927.
Method name follows Fl_Tree::linespacing().
Implemented similarly to Fl::scrollbar_size(), since its use crosses Fl_Menu_Item and 'menuwindow' classes.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 17:17:37 +00:00
Manolo Gouy 458d063643 Image classes: memorise the width and the height of the cached form of the image to support GUI scaling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-28 13:00:12 +00:00
Matthias Melcher 3b7e1a5ec6 Android: Draws Fl_Bitmap.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 21:28:18 +00:00
Matthias Melcher e8818e968c Android: Widgets can now request the on-screen keyboard when they get focus. This may fail if visible_focus is disabled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 15:33:22 +00:00
Manolo Gouy 77cc7b147a Documentation: give more detail for Fl_Image::w(int W) and Fl_Image::h(int H)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12802 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 08:20:17 +00:00
Matthias Melcher fada3a8291 Android: Rough, verz rough kezboard handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 17:08:25 +00:00
Manolo Gouy b8a50851fd Fix Fl_Image::copy() and its versions for derived image classes following the introduction of Fl_Image::scale()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 17:03:24 +00:00
Manolo Gouy 9f9631e685 Rename Fl_Image::pixel_w() and pixel_h() to Fl_Image::data_w() and data_h().
The docs of class Fl_Image and of Fl_Image::scale() are beefed up.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-22 16:38:38 +00:00
Matthias Melcher 0b8116ff72 Android: Implemented vector drawing and polygons.
Started to implement arc and pie drawing

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-22 15:27:02 +00:00
Manolo Gouy 916b44e361 New member function Fl_Image::scale(int width, int height) to set the FLTK size of an image.
Each image has now two sizes implemented as follows:
   - the pixel size is stored in private members pixel_w_ and pixel_h_
    with public accessors pixel_w() and pixel_h()
   - the FLTK size is stored in private members w_ and h_ and read by w() and h()
   - when the image is constructed, the two sizes have the same value
   - the protected w(int) and h(int) member functions set both FLTK and pixel sizes.
   - the public scale(int, int) member function is essentially nothing but
   set the FLTK size and don't change the pixel size.
   - when the image is drawn, its FLTK size determines how big it is drawn, its pixel
   size determines how much data are available to draw it.

FLTK 1.3.4 with FL_ABI_VERSION=10304 contained an equivalent member function
but only for the Fl_Shared_Image class.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-19 17:43:18 +00:00
Albrecht Schlosser 6dbe7ca8ed Fix a doxygen warning, update copyright.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-18 15:25:08 +00:00
Matthias Melcher 67f0018dca Removed warning for Android. Fixed "FIXME" in Fl_Tooltip. Removed tab characters.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12748 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 09:34:20 +00:00
Matthias Melcher ac04494e91 Android: fixed Fl_Rect.H commit.
Cleaned up some driver code.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12743 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 20:54:27 +00:00
Matthias Melcher b0a514366e Android: added support for Fl::add_timeout() and friends.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12742 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 20:10:49 +00:00
Matthias Melcher 1b52ead802 Android: Reinstated working simple cliping functionality based on an
improved Fl_Rect_Region class instead of Fl_Rect. Commented out 
 complex clipping.
 
 Android lib and apps now use C++11 because they can (and I like it).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12741 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 12:57:28 +00:00
Manolo Gouy 371cfd1476 Make Fl_Graphics_Driver constructor protected, as it was in FLTK 1.3.x
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12740 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 09:42:45 +00:00
Matthias Melcher 88ce4aec17 Android: Made Fl_Rect virtual. Maybe a bad idea?
Also, added rectangular clipping which works.
Expanding now to a more complex clipping scheme to make multiple
windows work.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12739 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 22:00:59 +00:00
Manolo Gouy d8d04bf772 Documentation: homogenize to 'scale factor' and 'drawing unit'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12737 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 14:49:09 +00:00
Matthias Melcher 5591ba811a Android: adding and fixing to the graphics clipping code
Android has no classic window manager, so FLTK has to
make sure that popup windows, dialog boxes and multi
window interfaces work as expectd.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 13:17:41 +00:00
Matthias Melcher c0cbf0fbde Android: crude graphics clipping
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 00:46:12 +00:00
Matthias Melcher 7b3e9347ba Android: move Android specific platform events to FL/android.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09 21:21:23 +00:00
Manolo Gouy 7f78b1ef14 Windows: remove necessity to compile with -DFLTK_HIDPI_SUPPORT to make WIN32 FLTK apps DPI-aware.
At this point, Windows FLTK apps detect HighDPI displays and rescale their GUI accordingly. They also
all reply to ctrl/+/-/0/ keystrokes to enlarge/shrink/reset their windows. 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09 16:27:27 +00:00
Matthias Melcher 626ecbfca0 Android: specific event for Android. Use Fl::add_system_handler() and Fl::event(), for example: FL_ANDROID_EVENT_LOW_MEMORY
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12720 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-07 23:01:50 +00:00
Manolo Gouy 2df5cb850a Comments: update comment of class Fl_Scalable_Graphics_Driver to indicate what platforms use it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-07 11:55:38 +00:00
Manolo Gouy 358bdf577e MacOS: add more detail to the doc of global variable fl_mac_os_version
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12715 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-07 10:12:50 +00:00
Albrecht Schlosser 4b00b0f320 Set svn properties on new Android source files.
The Android example files in directory Android/... are not touched.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12702 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-02 20:16:51 +00:00
Matthias Melcher 42555053a1 More Android changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12699 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-02 20:03:04 +00:00
Matthias Melcher b19efed409 Adding crude Android native screen driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12695 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-02 16:34:43 +00:00
Manolo Gouy 7049da0445 Documentation: make code examples use Fl_Surface_Device::push_current()/pop_current()
instead of the deprecated Fl_Surface_Device::set_current().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12688 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-25 06:53:34 +00:00
Manolo Gouy a0863e393a Document that fl_mac_set_about() is deprecated, MacOS-specific and replaced by cross-platform Fl_Sys_Menu_Bar::about().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12685 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-22 17:04:37 +00:00
Manolo Gouy 06b925964d Remove Fl::run_also_windowless() and FL::wait_also_windowless() from planned public FLTK 1.4 API.
These were introduced at r12647, that is, during development of the 1.4 API.
These functions provided windowless support only on the MacOS platform,
where this can be obtained without those functions.
Windowless support on other platforms would require changing the event 
loop. There's no evidence from STR's there's a demand for windowless mode
on other platforms.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12680 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-20 09:08:38 +00:00
Manolo Gouy b6c790a93f Slight documentation fix for class Fl_Sys_Menu_Bar.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12672 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-17 08:28:51 +00:00
Manolo Gouy 0cef82d746 Remove Fl_Window_Driver::current_cursor() and its platform-specific forms that are now unused.
This became unused when window scaling no longer involved window destruction/recreation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12668 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-16 16:24:32 +00:00
Manolo Gouy 838168defc Restore documentation of function Fl_Mac_App_Menu::custom_application_menu_items()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-12 09:16:04 +00:00
Manolo Gouy f5bd951f5c Slight rewording of the documentation of types fl_intptr_t and fl_uintptr_t.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-12 07:18:36 +00:00
Manolo Gouy 36bcbe8eb0 Rewording of the documentation of types fl_intptr_t and fl_uintptr_t.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-11 18:33:20 +00:00
Manolo Gouy 3ca12a3a02 Document platform-dependent types fl_intptr_t and fl_uintptr_t
Most other platform-dependent types of FL/platform_types.h are also documented.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-11 18:25:11 +00:00
Manolo Gouy 4dde3e5485 Documentation: separate the doc of the 2 versions of Fl::add_fd() as Doxygen mandates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12662 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10 17:51:17 +00: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
Manolo Gouy c472d5d8b7 Fix fl_read_image() under MacOS platform when GUI is rescaled.
This commit also simplifies the platform-dependent support of fl_read_image():
only Fl_XXX_Screen_Driver::read_win_rectangle() contains platform-specific
code to capture pixels from the current window or from an offscreen buffer.
Platform-independent function Fl_Screen_Driver::traverse_to_gl_subwindows()
captures subwindows that intersect with the area fl_read_image() targets.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 13:48:22 +00:00
Manolo Gouy b78b2f7f5f Move xxx_also_windowless member functions from Fl_System_Driver to Fl_Screen_Driver.
Because these functions are related to Fl_Screen_Driver::wait(double)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-08 12:47:40 +00:00
Manolo Gouy 0c8ca7944a Documentation: add \version info to new member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12651 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-08 07:37:43 +00:00
Manolo Gouy dcc82d8926 STR#3450: Draw text with OpenGL using textures on all platforms.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-07 15:34:44 +00:00
Manolo Gouy 425ab2e8bc Add support for detection and processing of clean program termination request.
The default handling of cmd-Q/Quit program under MacOS was to terminate the
program if all its windows are closed without returning from FLTK's event loop.
This was running against a strong design feature of FLTK that programs
should always complete their event loop and return from main() when cleanly
terminating.

In the new code for the MacOS platform, cmd-Q/Quit program no longer terminates
the program. Instead, the event loop is interrupted and a call to Fl::program_should_quit()
allows to detect that program termination has been requested, if necessary.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12647 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-06 17:26:11 +00:00
Albrecht Schlosser b4079d6fd3 Fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-02 17:28:41 +00:00
Albrecht Schlosser 716924d1d4 Fix remaining issue in FL/porting.H.
This file is not used in the normal build process but was intended to
be used as a template for a platform specific file. This is likely
obsolete anyway since the new driver approach no longer uses #ifdef's
to separate platform specific code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 22:49:52 +00:00
Albrecht Schlosser 1d97f94e56 Fix broken Windows and macOS builds.
The check whether mac.H or win32.H were included directly was wrong
after the recent rename of x.H to platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 22:34:48 +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 cc595ce4ed Replace FL/x.H with FL/platform.H - step 1.
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
2018-01-31 17:46:48 +00:00
Albrecht Schlosser fbcd3a908a Clarify documentation of Fl_Boxtype.
Fl_Boxtype enum values with leading underscore are reserved and should
not be used. Use the name w/o leading underscore instead.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12633 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-15 15:02:13 +00:00
Manolo Gouy 3b437dae8c Put a default implementation of parse_color() in Fl_Screen_Driver and only Fl_X11_Screen_Driver reimplements it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-09 07:26:49 +00:00
Manolo Gouy b4521fd1bf Add necessary inline implementation of Fl_SVG_Image::copy(void).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12620 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-04 15:45:59 +00:00
Manolo Gouy 1a341391e7 Add Doxygen comments explaining the purpose of Fl_Window_Driver::draw_begin()/draw_end().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-04 15:23:18 +00:00
Manolo Gouy 5d97cf1f96 Fix comment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-30 10:43:36 +00:00
Manolo Gouy 2d7a670e28 Remove 'friend class Fl_PicoSDL_Window_Driver' from Fl_Window.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-29 07:45:27 +00:00
Manolo Gouy b2ce33fcfd Definition of class Fl_Window: use 'private:' more accurately
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-29 07:25:50 +00:00
Manolo Gouy d361de4d0d STR#3437 : Support display of windows in tabbed form as in MacOS 10.12 Sierra
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12596 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18 15:19:15 +00:00
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 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
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 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 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 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
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
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
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
Manolo Gouy 3d53e5b496 Doxygen doc: minor rewording for the Fl_SVG_Image class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12539 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-03 09:04:56 +00:00
Greg Ercolano 127147ca97 Addresses STR# 3423; adds missing scrollbar_size() methods and honors global Fl::scrollbar_size().
Includes mods to unittest's scrollbar size test.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12538 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-02 21:14:40 +00:00
Manolo Gouy 839f52bc18 Fix for STR#3421: Fl_SVG_Image crashes if passed an svg file that is a static const char* string
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-31 16:56:23 +00:00
Greg Ercolano 2a3e869210 STR #3395: Revisions as per chris's comment #4.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12530 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-27 17:03:55 +00:00
Greg Ercolano a27da5e582 Solves STR#3395.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-26 16:07:53 +00:00
Manolo Gouy eb440f2d70 Doxygen doc: separate the doc of the getter and the setter member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12525 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-25 05:26:49 +00:00
Greg Ercolano bc42454074 Addresses STR #2788 for cursor positioning with mouse-click on different sides of character.
Applying guyben's patch (with small mods suggested by albrecht & greg in comments 7-11).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12511 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-18 07:16:46 +00:00
Greg Ercolano dbc9f1131c Changed Fl_Simple_Terminal::draw() public -> protected
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12507 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-17 00:38:38 +00:00
Greg Ercolano 68f07db58a Added Fl_Simple_Terminal widget, and mods to test+example programs (STR #3411).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12506 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-17 00:28:56 +00:00
Albrecht Schlosser f9cfe1378d Rename fl_open_ext() parameter 'translation' to 'binary'.
The default (0) is 'text' mode, non-zero is 'binary' mode on platforms
that distinguish text and binary mode.

Currently Windows is the only supported platform that needs this.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 12:34:24 +00:00
Albrecht Schlosser 41f92be2f1 Replace remaining calls to unlink() with fl_unlink().
Tested under Linux, MinGW, and Visual Studio 2015.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12496 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 10:18:53 +00:00
Manolo Gouy db83933f58 Remove the Fl_SVG_Image::fl_gzopen() member function that is less useful with the new fl_open_ext() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12491 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 07:17:01 +00:00
Manolo Gouy 789ed089c9 Add fl_open_ext() to control whether the file is opened in binary/text mode.
This new function allows to write Fl_SVG_Image::fl_gzopen() in a completely platform-independent way.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-12 14:42:12 +00:00
Greg Ercolano 2eeff9d310 Small clarification in dev docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-11 01:35:07 +00:00
Greg Ercolano 5488a4a1e7 Added docs for the mLineStarts[] array, and related mNVisibleLines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-09 02:41:42 +00:00
Greg Ercolano d0e1d16ae8 Added printf() and vprintf() to Fl_Text_Buffer
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12483 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-08 20:38:36 +00:00
Albrecht Schlosser 63420dd956 Fix name clash with zlib gzopen on (64-bit) Linux.
Compilation error message:

src/Fl_SVG_Image.cxx:80:21: error: out-of-line definition of 'gzopen64' does
not match any declaration in 'Fl_SVG_Image'; did you mean 'gzopen'?
void* Fl_SVG_Image::gzopen(const char *fname) {
                    ^~~~~~
                    gzopen
/usr/include/zlib.h:1709:20: note: expanded from macro 'gzopen'
#    define gzopen gzopen64
                   ^

The culprit was the macro defined in zlib.h (above).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-05 18:32:52 +00:00
Manolo Gouy 0b797d704c Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12477 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 16:26:51 +00:00
Manolo Gouy 7a9d5be6cb Undo commit at r.12475 that is not adequate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 12:21:46 +00:00
Manolo Gouy 5e6bf76b0a Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 11:46:33 +00:00
Greg Ercolano 6434d5d602 Added missing accessor for Fl_Text_Display's cursor_style()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-03 05:15:10 +00:00
Albrecht Schlosser 64052828ca Add public accessor Fl_Shared_Image::original().
This public, inline, and read-only accessor is intended for debugging
purposes but can be useful for user code as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-02 11:18:41 +00:00
Greg Ercolano 37a8ef98f0 Small doc simplification/shortening
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12471 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-27 03:30:13 +00:00
Manolo Gouy da2d4a8ee5 Convert the initialisation of global variables fl_local_shift, fl_local_meta, etc... using the driver approach.
This avoids repeating the default values "Shift", "Meta", etc... for several platforms.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19 19:33:54 +00:00
Greg Ercolano e483ee8885 Reverting to previous; apparently this was a bug in doxygen 1.7.4's support of header markdown.
The following is valid, documented, "standard markdown" for headers in doxygen:

    This is a level 1 header
    ========================

    This is a level 2 header
    ------------------------

Upgrading doxygen from 1.7.4 to 1.8.13 fixed the problem.
So beware of 1.7.4 wrt to these kinds of header markdown;
the result in the docs was no header, the header text + underbars
were appearing inline with the text, crlfs removed.

Not sure exactly what version of doxygen this was fixed in;
a search in their bugzilla for 'headers' seemed to show no
directly relevant matches, other than maybe bug #681898.
https://bugzilla.gnome.org/show_bug.cgi?id=681898



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-14 00:50:36 +00:00
Greg Ercolano b2c94264d9 Doxygen fix: The trick of using a line of dashes under a section heading no longer works.
This has been working fine for years, not sure what version of doxygen dropped this.
I'm running 1.7.4 here, and that trick isn't working for the Fl_Browser_.H docs.

Changed to using <B> and </B> and <BR> which seems to work OK in both HTML and PDF
generation.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12458 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 23:25:59 +00:00
Manolo Gouy 435d135825 SVG support: draw images at full screen resolution also when there are several pixels per graphical unit, as with Apple retina displays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12456 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 16:15:34 +00:00
Greg Ercolano 6779015697 Add reference to image in docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:12:21 +00:00
Albrecht Schlosser 900314d4f4 Documentation and copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 15:26:36 +00:00
Albrecht Schlosser a6803d71c6 Remove leading underscore from labeltyps as far as possible.
Removed obsolete '\todo' item from docs (done with recent commits).

Removed redundant code from label assignment (e.g. use FL_IMAGE_LABEL
instead of label type assignment + use of _FL_IMAGE_LABEL).

See recent commits.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 13:05:48 +00:00
Greg Ercolano 3fe7b8c396 Doxygen Fl_Multi_Label example code added. (STR #3400)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12445 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 21:27:53 +00:00
Albrecht Schlosser 322208b855 Add missing Fl_Labeltype and Fl_Boxtype definitions.
Some labeltypes and boxtypes were missing a #define for the enum
without a leading underscore and the corresponding setup function
to initialize the internal table of boxtypes and labeltypes, for
instance _FL_MULTI_LABEL. This is now fixed so (hopefully) all boxtypes
and labeltypes can and _should_ be used w/o leading underscore.

Note: if there are still boxtypes or labeltypes that can't be used w/o
leading underscore this should be considered a bug and is to be fixed ASAP.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:54:10 +00:00
Manolo Gouy 8e558595e6 Make virtual member function Fl_Image::draw_scaled(int X, int Y, int W, int H) protected rather than private.
Consequently, remove the trailing _ from its name reserved for private class members.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12433 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 12:35:06 +00:00
Manolo Gouy dd9f32c3f5 Fix typo in documentation of Fl_SVG_Image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:30:19 +00:00
Manolo Gouy d6349e180a Set svn:keywords
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:20:52 +00:00
Manolo Gouy 1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Manolo Gouy df8c9ba80c Add missing default values for virtual member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12411 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 17:44:09 +00:00
Manolo Gouy eae09e7fa0 Create virtual Fl_Image::draw_scaled_(int X, int Y, int W, int H) and its implementations for image classes.
This allows to use the virtual function mechanism to adapt scaled image drawing both to the
image type and the graphics driver type.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12410 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 15:49:58 +00:00
Manolo Gouy 9fc2d43102 Improve Doxygen comments related to image drawing
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12407 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 08:59:50 +00:00
Manolo Gouy c7405a22a8 X11 platform: cleaner implementation of changing the active drawing surface and maintaining clip regions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12396 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-24 12:40:29 +00:00
Manolo Gouy c2d5cf4067 Simplify using Fl_XXX_Graphics_Driver::copy_offscreen() instead of Fl_Scalable_Graphics_Driver::copy_offscreen_unscaled()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-20 20:18:15 +00:00
Albrecht Schlosser b4e434774f Remove unnecessary #include files from Fl_Help_View.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12392 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:46:20 +00:00
Albrecht Schlosser 2828cbde2c Avoid #include's of unrelated system headers in Fl_Table*.H.
Possible side effect: programs that relied upon inclusion of unrelated
system headers by FL/Fl_Table.H or FL/Fl_Table_Row.H may fail to compile.

Removed include files (some only on certain platforms, list may be incomplete):

#include <FL/Fl.H>             // moved to implementation (.cxx)
#include <FL/Fl_Box.H>         // moved to implementation (.cxx)
#include <FL/Fl_Scrollbar.H>   // moved to implementation (.cxx)

#include <sys/types.h>
#include <string.h>            // memcpy
#include <malloc.h>            // WINDOWS only: malloc/realloc
#include <stdlib.h>            // UNIX: malloc/realloc


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:16:08 +00:00
Manolo Gouy c88466928d Replace static protected bool Fl_Window_Driver::is_a_rescale by a private static variable and a public getter.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28 15:51:05 +00:00
Manolo Gouy 3f572e327f Rename Fl_Window_Driver::in_resize_after_scale_change to 'is_a_rescale' which is more expressive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27 14:38:35 +00:00
Albrecht Schlosser 6b24b20966 Fix confusing behavior of class Fl_Text_Selection.
Fl_Text_Selection got a new method length() and returns 0 in length()
and in all offsets (start(), end(), position()) if no text is selected
(selected() == false).

The behavior in FLTK 1.3 and earlier versions (returning undefined
values if !selected()) was confusing.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-26 12:32:13 +00:00
Manolo Gouy 5a8a2e1ee5 Remove virtual Fl_Window_Driver::reuse_icons() no longer useful after r.12349.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 15:28:43 +00:00
Manolo Gouy 9c47bc322c Remove Fl_Window_Driver::reuse_cursor() that is no longer used since commit r12349.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 11:31:19 +00:00
Manolo Gouy 225c3d6da3 Rewrite Fl_Window_Driver::resize_after_scale_change() removing calls to Fl_Window::hide() and Fl_Window::show().
Windows are now rescaled with a call to Fl_Window::resize() which has been slightly modified.
Static member variable bool Fl_Window_Driver::in_resize_after_scale_change is created,
and is true if and only if Fl_Window::resize() is called by Fl_Window_Driver::resize_after_scale_change().
This new flag allows Fl_Window::resize() to perform correctly the rescaling of the window.
Fl_Gl_Window::resize() and Fl_Double_Window::resize() also consult the value of
the Fl_Window_Driver::in_resize_after_scale_change flag.
The platform-specific Fl_WinAPI_Window_Driver::resize() and Fl_X11_Window_Driver::resize()
also use  the Fl_Window_Driver::in_resize_after_scale_change flag.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 10:57:24 +00:00
Albrecht Schlosser a8c4f77d50 Improve docs of Fl_Widget::callback() and do_callback().
Clarify that all variants of do_callback() call clear_changed() after
the callback and that 'long Fl_Widget::argument()' may truncate the
user_data value on some (particularly Windows 64-bit) platforms.

Some code has been reformatted and refactored with better variable names,
but there are no effective code changes.

Obsolete, inactive code was removed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 15:16:37 +00:00
Albrecht Schlosser db1f29fdb5 Update Fl_Widget_Tracker docs with better example code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 15:06:11 +00:00
Manolo Gouy 4764b9bc2e Fl_Window_Driver::flush_single() needs not be a virtual member function.
It is really an accessor to protected method Fl_Window::flush().
Rename it to Fl_Window_Driver::flush_Fl_Window to reflect that.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 08:10:45 +00:00
Albrecht Schlosser c92fee897b Fix Visual Studio shared library build (STR #3389).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-12 21:51:42 +00:00
Manolo Gouy b601e9558d Add missing definition of the 'uchar' type in FL/x.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-11 13:22:56 +00:00
Matthias Melcher a8f4fbc2ef STR #2823.2/2: Improved Fl_Preferences "dirty" flag handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12305 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 21:00:17 +00:00
Albrecht Schlosser 0c210ae867 Introduce Fl_Group::bounds(), deprecate Fl_Group::sizes().
The new method Fl_Group::bounds() replaces Fl_Group::sizes() whose
internal array structure was not documented.

Fl_Group::bounds() uses the new and documented class Fl_Rect for its
internal structure.

src/Fl_Tile.cxx now uses bounds() instead of sizes().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12302 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 19:16:40 +00:00
Manolo Gouy 8dccfc8838 HiDPI support under WIN32 platform: completed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-03 17:31:57 +00:00
Manolo Gouy 582701ba07 HiDPI support: keep window's icons after rescaling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28 15:15:34 +00:00
Manolo Gouy 322b62a9f1 HiDPI support: keep window's cursor after rescaling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12275 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28 13:33:53 +00:00
Manolo Gouy 7f15c3010c WIN32 platform: more progress for full HiDPI support
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12273 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-27 12:17:29 +00:00