Commit Graph

1367 Commits

Author SHA1 Message Date
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
Albrecht Schlosser
c9d8e0feaa Update fluid .fl files and generated code - remove trailing white space.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-09 02:09:33 +00:00
Albrecht Schlosser
4cea3aee0c Fix box background drawing for deactivated widgets (STR #2907).
Two new static methods have been introduced:

  - Fl::box_color(Fl_Color c) returns the bg color dependent on the
    widget's state (inactive_r()).
  - Fl::set_box_color(Fl_Color c) sets the correct bg color dependent
    on the widget's state by calling fl_color(Fl::box_color(c)).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-09 00:10:44 +00:00
Manolo Gouy
634ede015d Define NSInteger in FL/mac.H when needed, so it's available to all source files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-30 02:23:26 +00:00
Albrecht Schlosser
2778ac6e45 Add documentation of Fl_Scroll::resize(...), fix some more Fl_Scroll docs.
As noticed in fltk.general, documentation of Fl_Scroll::resize() did not
exist, hence the documentation shown was that of the parent class Fl_Group,
which was definitely wrong.

Some more minor documentation fixes have also been applied. No code changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-28 13:05:29 +00:00
Albrecht Schlosser
c4c7767fd8 Remove more superfuous comments, fix one typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-16 13:42:25 +00:00
Albrecht Schlosser
5573c35ff1 Fix spelling errors and improve documentation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-15 20:24:41 +00:00
Manolo Gouy
d408133397 Mac OS: make Fl_Display_Device::high_resolution() private because it is not
intended to be part of the FLTK public API.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10746 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-10 10:32:09 +00:00
Manolo Gouy
2987b6a02b Added void Fl_Sys_Menu_Bar::setonly(Fl_Menu_Item*) member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10738 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-25 05:46:04 +00:00
Greg Ercolano
42b4db0801 Moved docs for fail() from prototype in Fl_Image.H -> implementation in Fl_Image.cxx.
Also added coded example to assist app programmers in usage. (Matt: feel free to modify
the example code as needed)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-24 18:19:24 +00:00
Greg Ercolano
9632e422d3 Fixes these errors on Linux:
../FL/Fl_Image.H:58: error: ISO C++ forbids initialization of member 'ERR_NO_IMAGE'
../FL/Fl_Image.H:58: error: making 'ERR_NO_IMAGE' static



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10733 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-24 17:19:57 +00:00