Commit Graph

1377 Commits

Author SHA1 Message Date
Matthias Melcher
d3bd470734 Re-ordering a few more functions. It's nice to see how clear functions like rectf() become without the #ifdef mess.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11013 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20 00:39:46 +00:00
Matthias Melcher
bd78fa1c48 Starting to cut out individual graphics function, so that multiple drivers can coexist (cfg_gfx). Found the missing pixels in the OpenGL gfx driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20 00:11:43 +00:00
Matthias Melcher
9872f74053 Fixed typos for Linux compilation. OpenGL driver compiles and somewhat works, except for text rendering (as expected).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11009 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-19 00:46:54 +00:00
Matthias Melcher
b86f2f735a Replaced static initializer with Fl_OpenGL_Display_Device.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-18 22:55:46 +00:00
Matthias Melcher
884928f68c Fixed stupid typo in variable name
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11007 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-18 21:23:54 +00:00
Matthias Melcher
eb8207ff1b Trying to create a more detaild way to configure the library, added runtime information, added an OpenGL graphics driver that renders a button on top of an OpenGL window (see test/cube).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-17 00:44:07 +00:00
Manolo Gouy
eeb65bef23 1) Replicate in branch-1.3-porting all recent changes of branch-1.3
2) Advance branch-1.3-porting with new function Fl_X::capture_titlebar_and_borders()
that contains all the platform-specific code of all operations related to drawing
window borders and title bars. What is platform-specific and what is not
is therefore much clearer, to ease porting.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-10 19:08:16 +00:00
Matthias Melcher
b1520373ae Created pseudo code for all FL_PORTED section so that FLTK compiles and links (Xcode, hello, other C flags: -D FL_PORTING -U __APPLE__ -U __APPLE_QUARTZ__)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04 23:09:32 +00:00
Albrecht Schlosser
d32b291a72 Fix typos in #pragma FL_PORTING.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04 13:40:57 +00:00
Matthias Melcher
acf6c881d3 Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03 22:54:29 +00:00
Manolo Gouy
6eb4354996 Doc change only: clearly document that FLTK has at any time a current drawing surface and a current graphics device.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-22 10:15:28 +00:00
Manolo Gouy
309a76e81c Trying to find how to best write the // "$Id$" lines in src/Fl_File_Chooser.fl
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10973 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-19 06:35:26 +00:00
Manolo Gouy
43bfe74b25 Running FLTK in static initializers (cont'd):
1) Changed the way fluid attaches images to widgets and menu items so
it is compatible with running fluid-generated code containing such images
in a static initializer. Images are now attached calling a function:
  widget->image( image_function_name() );
and this function is defined before in fluid-generated code as:
   static Fl_Image *image_function_name() {
     static Fl_Image *image = new image_type(......);
     return image;
   }

2) Changed src/Fl_File_Chooser.fl so the source code generate by fluid
from it is compatible with running in a static initializer.

3) Changed src/Fl_File_Chooser.cxx and FL/Fl_File_Chooser.H
to the result of running fluid on src/Fl_File_Chooser.fl 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-18 18:56:58 +00:00
Manolo Gouy
1b548ae1d5 Running FLTK in static initializers (cont'd):
the static method Fl_Surface_Device::surface() can be called before main() starts.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-16 07:18:34 +00:00
Manolo Gouy
cf14f77a90 Allowing to use FLTK objects in static initializers (cont'd).
For fl_file_chooser() and Fl_File_Chooser objects.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10961 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-13 09:36:14 +00:00
Albrecht Schlosser
8a826c257d Fix Doxygen docs of new method Fl_Gl_Window::pixels_per_unit().
Moved the docs up (before #ifdef ...) so they are also generated on
Mac OS X platforms.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10946 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02 11:56:25 +00:00
Manolo Gouy
22af09dae7 Mac OS: support for high resolution OpenGL windows.
Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941
are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added.

The documentation explains in more detail how to write cross-platform
FLTK code supporting high resolution OpenGL windows on retina displays.

The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02 09:59:37 +00:00
Manolo Gouy
30e572985b Make clear in the doc that methods Fl_Gl_Window::pixel_w() and pixel_h()
dynamically adjust to windows moved between high and low resolution displays.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10944 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01 18:40:51 +00:00
Manolo Gouy
597ac17bda Mac OS: added Fl::event_x_pixel() and Fl::event_y_pixel() that return the mouse event position
in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display.
On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y().
The example/OpenGL3test demo program is modified to call these new functions.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01 16:17:37 +00:00
Manolo Gouy
689d19cda3 Added necessary forward type declaration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-26 17:28:55 +00:00
Manolo Gouy
ff65dbb5ae Mac OS only: added the Fl_Mac_App_Menu::custom_application_menu_items() method
that allows customization of the application menu on the Mac platform.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10932 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-26 16:34:58 +00:00
Manolo Gouy
b0696db39a Added new method Fl_Copy_Surface::draw_decorated_window()
that copies a window to the clipboard together with its title bar and borders.
This requires very little new code because the capture of window decorations
is shared with the Fl_Paged_Device::print window() method.
The device test program is changed to call the new method.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-24 14:26:52 +00:00
Manolo Gouy
511ec0bb3d Mac OS: have Fl_Paged_Device::print_widget() print top-level windows with
rounded bottom corners as they appear on screen.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10916 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-19 16:33:44 +00:00
Manolo Gouy
0d2517331c Mac OS only: simpler definition of the pdfdata private member of the Fl_Copy_Surface class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-18 15:53:46 +00:00
Manolo Gouy
da6dff26fc Changed Fl_Multi_Browser behaviour on the Mac OS platform so multiple selection
is done by cmd-click rather than ctrl-click, as is expected on this platform.
Also, updated the documentation to describe the effects of ctrl-, shift- and cmd-clicks.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10882 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-05 17:54:16 +00:00
Manolo Gouy
1c16aaced2 The ATSU API (old API for text formatting) has been removed from SDK 10.11.
This fixes STR#3262

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-03 14:36:36 +00:00
Manolo Gouy
7e025aac22 Added support for OpenGL V3 and higher.
On the X11/MSWindows platforms, this requires external installation of the GLEW library.
This fixes STR#3198 and STR#3257.
Added two new examples programs.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-27 08:40:56 +00:00
Albrecht Schlosser
43e4f8a661 Fix doxygen comment of Fl::abi_check()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10875 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-24 09:55:18 +00:00
Manolo Gouy
04d0d5f6be Documentation: explicit what #include commands are needed to use
the Fl_Gl_Window::mode(int *) method.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10873 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-21 17:13:11 +00:00
Manolo Gouy
1095d4db41 Mac OS and SDK 10.3: #define's necessary for gl_draw.cxx are better in the library source
than in the public header file FL/gl.h

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10872 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-21 14:37:27 +00:00
Manolo Gouy
6fc9f11eb2 Doc: use plural with 'data'.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10871 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-21 06:12:32 +00:00
Manolo Gouy
a3b43d569c Documentation: added warning that Fl_Gl_Window::mode(const int * a), although public, is
subject to change, and that Fl_Gl_Window::mode(int a) is the adequate stable API.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10862 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-18 15:29:30 +00:00
Manolo Gouy
d7094249f0 Documentation: better descriptions of Fl_Gl_Window::mode() and Fl_Gl_Window::can_do().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10857 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07 15:48:55 +00:00
Manolo Gouy
dc01deda00 Mac OS platform: Allow compilation of user code with non-Apple compiler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10853 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-05 15:36:28 +00:00
Manolo Gouy
5ea322679c Moved Mac-specific type declaration to mac.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-28 14:04:21 +00:00
Manolo Gouy
16e08ce3a2 Programs compiled with pre-10.7 SDKs can now fully use retina displays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27 12:31:46 +00:00
Albrecht Schlosser
bb3f67ecf7 Avoid strange warnings/error messages from 'make depend'.
Warning was for instance:
"../FL/Fl_Spinner.H":53:  FLTK_ABI_VERSION >= 10301^--- expecting )

Maybe a g++ bug ?


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10839 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-24 15:47:08 +00:00
Manolo Gouy
cc296e50b0 Restore compilability with Mac OS 10.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10837 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-24 07:29:17 +00:00
Albrecht Schlosser
0650563c7b Document Fl_Text_Editor::global_key_bindings and related methods.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-13 10:07:17 +00:00
Manolo Gouy
1e6bc1c73a Improved Mac OS implementation of Fl_Window::wait_for_expose().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-11 11:47:21 +00:00
Manolo Gouy
e9888e09c5 Fixes descriptive comment of the mapped_to_retina_ class variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-09 12:56:24 +00:00
Manolo Gouy
cc36ab53b3 - Implement Fl_Window::wait_for_expose() for Mac OS:
The -[NSWindow makeKeyAndOrderFront:] message used to make the window appear on the screen,
but, starting with 10.10 (approximately), this changed, and it became necessary to query for events
for a new window to appear on the screen. With 10.11 two event messages are needed.
The solution is therefore to implement Fl_Window::wait_for_expose().

- Calling NSDisableScreenUpdates()()/NSEnableScreenUpdates() before and after window updates
greatly accelerates multi-window update operations.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-07 12:55:56 +00:00
Albrecht Schlosser
eb7d55e218 Document Fl_Window::show() calling Fl_Group::current(0).
Also fix indenting in src/Fl_win32.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10820 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-27 18:13:46 +00:00
Greg Ercolano
a165f1ca3c Fixes STR#3177; item_pathname() supports FL_SUBMENU_POINTER,
and small doc mods.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-26 21:10:18 +00:00
Albrecht Schlosser
ff1d783162 Add new event name FL_ZOOM_GESTURE to FL/names.h.
I also added some placeholders for yet to be defined events, just in
case they are forgotten to add in FL/names.h. This appears to be better
than to reference a non-existing array element (string pointer).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 23:34:32 +00:00
Manolo Gouy
1f487ece5d It's possible to transmit an Fl_Shared_Image to Fl_Window::shape(const Fl_Image*) at no cost.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 11:26:27 +00:00
Albrecht Schlosser
1b0e984a8f Documentation updates (part of STR #2751).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-21 13:55:13 +00:00
Albrecht Schlosser
98ef8d52c9 Fix and improve Fl_Table docs, fix some other typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-18 23:59:54 +00:00
Manolo Gouy
1cf24ff074 Restore compilability with Mac OS SDK 10.3 and above
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-18 07:18:15 +00:00
Albrecht Schlosser
9adb181156 Make FL_ABI_VERSION configurable (STR #3161).
This commit adds the configure option --with-abiversion and the CMake option
OPTION_ABI_VERSION. Both options can be set e.g. to 10304 to build with
FL_ABI_VERSION = 10304 (FLTK 1.3.4).

For IDE builds there are new files ide/<IDE-NAME>/FL/abi-version.h that
can be edited to change the ABI version before the FLTK lib is built.
Note that this file MUST be copied to the include/FL directory if the
IDE-built library is to be installed.

The default is FL_ABI_VERSION = FL_MAJOR*10000 + FL_MINOR*100 + 0, i.e.
10300 for all FLTK 1.3.x versions to keep binary compatibility (ABI).

Todo: more tests and more documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12 19:23:55 +00:00