Commit Graph

1406 Commits

Author SHA1 Message Date
Matthias Melcher 6e16d033ae Add fl_focus_rect function to driver.
Focus rectangles are dotted lines. The default implementation uses the dotted line style, However, for systems without line stye, we draw many dots instead.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-01 23:06:14 +00:00
Matthias Melcher 7440ea209a Moved fl_create_bitmask and fl_delete_bitmask functions into driver structure. Tested on OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11100 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 13:51:01 +00:00
Albrecht Schlosser 0a6be0a83f Fix compiler warnings (STR 2988), porting from branch-1.3.
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 04:33:54 +00:00
Albrecht Schlosser 00dd296ff2 Bump version numbers for next minor release: FLTK 1.4.0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-30 00:56:42 +00:00
Matthias Melcher f5a6b10f46 Updated OpenGL Display Device
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-29 15:56:29 +00:00
Ian MacArthur 5aefd057d1 Non-changing changes... Attempting to keep the porting branch somehwat in-sync with doc changes in main 1.3.x
None of these changes alter the actual code.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28 17:16:32 +00:00
Manolo Gouy 1c3c544edf Added Fl_Window::capture_titlebar_and_borders a new private member function
that triggers a warning when FL_PORTING is ON and with a default platform-neutral
implementation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28 11:51:07 +00:00
Ian MacArthur e2cc1a80f0 Some trivial adjustments to support building
under Win32/mingw with the configure/make
on Win7 with Msys.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28 11:18:01 +00:00
Matthias Melcher 780f43a4f1 Removed all references to Quartz driver files from library headers in Xcode. Works in Xcode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-27 22:35:58 +00:00
Manolo Gouy 8e3f66073f 1) Added a new way to detect whether the drawing operation is using the platform's native driver
and whether we are printing:  virtual int Fl_Graphics_Driver::has_feature(driver_feature feature)
This is also because it is not convenient to derive a printer-specific driver with its own
implementation of virtual functions when this implementation differs only in one line of code.

2) Solved the problem of inclusion of non public header by the public header FL/Fl_Device.H:
bracket this with #if FL_LIBRARY / #endif so this non public header is included only when building
FLTK itself.

3) Removed several (but not all) of the FLTK_ABI_VERSION guards that are no longer
useful for code targeting FLTK 1.4.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-27 18:11:20 +00:00
Matthias Melcher 1c4661c481 Fixed a few comments
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11062 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-26 22:39:47 +00:00
Matthias Melcher 6694780c2d Moving GDI/WIN32 files to new directroy structure
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11058 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-26 21:10:49 +00:00
Matthias Melcher ac275b89bc Moved Quartz graphics driver to the new naming scheme
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-26 21:01:09 +00:00
Matthias Melcher 222538baad Hacky version of font_x and font_xft, compiles on Fedora Linux
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11054 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-26 20:31:43 +00:00
Matthias Melcher 12e85b882a Fixed for Linux
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 21:06:21 +00:00
Matthias Melcher 6a12d16750 Extracting OpenGL text calls. This is a minimum implementation for testing. Don;t worry. I have a cunning plan for rendering perfect antialiased text into OpenGL contexts quickly on all platforms.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 20:58:12 +00:00
Matthias Melcher 60ec452d04 Reorganizing color drawing code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11045 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-24 16:22:50 +00:00
Matthias Melcher be66d89def Added OpenGL support for dotted lines. Active widget now renders focus rectangle correctly.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11039 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-23 21:54:30 +00:00
Matthias Melcher 474de78ac1 OpenGL arc and pie drawing (Mmmmh, pie!)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-23 21:02:49 +00:00
Matthias Melcher de12eddb59 Added OpenGL implementation of fl_vertex calls. Compiling and linking, but functionality untested.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-23 20:22:50 +00:00
Matthias Melcher d1d136fa1b Fixing vertex implementation
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-23 00:39:33 +00:00
Matthias Melcher 28b94ce5e7 Hiding fl_vertex form public view
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11031 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-23 00:24:29 +00:00
Matthias Melcher e5e956b86c Removing Xlib rect calls from public view.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11028 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-22 12:03:01 +00:00
Matthias Melcher 5231785cdd Fixed two typos to make things run under MSWindows again.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-21 17:03:16 +00:00
Matthias Melcher 4d37623dbb Removed MSWindows GDI graphics driver from public view.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11023 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-21 16:47:42 +00:00
Matthias Melcher 84e9be966d Remove Quartz graphics driver from public view.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11020 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-21 16:14:01 +00:00
Matthias Melcher 3b3ed8d79c Moving already cleaned up methods within class to make it easier to see methods that were not cleaned yet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11019 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-21 15:49:03 +00:00
Matthias Melcher 7d0cf9299a Wrapping up fl_rect.cxx implementation. Introducing 3 moer virtual functions to Fl_Graphics_Device - will that break binary compatibility?
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11017 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20 21:40:12 +00:00
Matthias Melcher d34974ace7 Reorganized all integer line and polygon drawing functions
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11016 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-20 15:21:11 +00:00
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