Commit Graph

102 Commits

Author SHA1 Message Date
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 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
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
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
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 f2c27b5090 Add void fl_scale_offscreen(Fl_Offscreen &ctx) to support the rescaling of an offscreen buffer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12240 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-18 17:26:34 +00:00
Manolo Gouy f48750b0f4 Introduce HiDPI + rescaling support for the X11 platform (+ partial support for WIN32)
Corresponds to STR #3320
1) HiDPI support consists in detecting the adequate scaling factor for the screen on which
FLTK maps a window, and scaling all FLTK units by this factor. FLTK tries to detect the correct
value of this factor at startup (see more details below). Environment variable
FLTK_SCALING_FACTOR can also be used to set this value.
2) Rescaling support consists in changing the scaling factor of all FLTK windows
in reply to ctrl/+/-/0/ keystrokes.

More details for the various platforms :

- X11: Support is very advanced. Some details need still to be improved.
Automatic detection of the correct starting value of the scaling factor works well
with the gnome desktop. The present code contains no support for this on
other desktops.  FLTK_SCALING_FACTOR provides a workaround.

-WIN32: Support is incomplete at this point, although many test
applications have partial or complete HiDPI and scaling support.
The current value of the system's scaling factor is correctly detected
at application startup. Apps respond to changes of this value in real time.
Support needs to define the FLTK_HIDPI_SUPPORT preprocessor variable
at compile time. This way, standard builds produce a code with the
default WIN32 HiDPI support, that is, where all graphics goes to an internal
buffer that gets enlarged by the system and then mapped to the HiDPI
display. To experiment with (or develop) the new HiDPI support requires
a modified build procedure in which  FLTK_HIDPI_SUPPORT is defined
at compile time. When the support will be complete, the requirement for the
definition of this preprocessor variable will be removed. The present commit
contains support for a single scaling factor. Eventually, per-screen scaling
factors should be implemented, as done for X11.

- MacOS: this commit does not give new HiDPI for this platform.
Eventually, window rescaling in reply to command/+/-/0/ is desirable.
Per-screen scaling factor makes no sense on this platform because
the OS itself takes care of the difference between the resolutions of
traditional and retina displays.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-17 11:54:18 +00:00
Manolo Gouy c530cdeda6 Use Fl_Graphics_Driver::default_driver() when convenient.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-09 09:49:48 +00:00
Albrecht Schlosser 34f5e4f752 X11: More explicit warning when using rotated text w/o Xft.
The warning is issued to stderr only once (previously: every time rotated
text was used).



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11978 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-25 11:23:27 +00:00
Manolo Gouy f1ffe2f1fe Rewrite fl_read_image.cxx under the driver model.
Files fl_read_image_mac.cxx and fl_read_image_win32.cxx are no longer used;
their content is now in Fl_XXX_Screen_Driver.cxx

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11516 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-03 06:51:09 +00:00
Manolo Gouy 01e991840c Remove a bunch of useless #include <FL/x.H> directives.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11422 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-25 16:06:00 +00:00
Manolo Gouy d4768073fa Implement non-rectangular windows using the Window Driver mechanism.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-10 17:19:34 +00:00
Manolo Gouy 0b406baa0f Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 13:52:27 +00:00
Matthias Melcher 41e22f2f39 Move ifdef's in RGB_Image into driver system.
- change image caching variable types to uintptr_t
- added driver function to uncache image data
- cleaning up (Xlib and GDI will likely throw syntax errors. Trying to fix ASAP)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 18:25:02 +00:00
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
Greg Ercolano d5698e8ed9 Documentation: clarification of fl_width()'s dependence on the current font face/size.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10320 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-18 15:25:55 +00:00
Pierre Ossman 332dc1b7ac Add method to set any custom cursor, based on a Fl_RGB_Image object.
Also change our fallback cursors to use this method, so that fallback
cursors are handled in a platform independent manner. STR #2660.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-16 11:17:57 +00:00
Greg Ercolano 0aba84051a Include code examples for use of path form of fl_arc()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9937 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-06-22 12:01:11 +00:00
Greg Ercolano ebf71d633b Documentation improvements:
o Added fl_text_extents() to the 'Drawing things in FLTK' section
	o Added 'see also' sections to all the text measuring functions in that section
	o Added detail to fl_text_extents() docs regarding it not handling FLTK symbols,
	  as non-public comment for that method indicates.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-08 16:15:34 +00:00
Matthias Melcher c1caad3e62 STR 2714: remove lint (variables that have the same name as a function in the same scope).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-02 06:25:13 +00:00
Matthias Melcher 1231d41366 STR 2702: body of fl_draw_image_mone was missing for one case.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9066 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-27 21:18:54 +00:00
Manolo Gouy 76b50461ed Changed doc of fl_draw() functions to state that strings are UTF-8 encoded and lengths are in bytes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-22 09:01:14 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Manolo Gouy b87078e02d Fix STR #2656: removed compilation warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8772 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-02 08:06:09 +00:00
Albrecht Schlosser 06e17886ed Documentation fixes and a few indent corrections.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8621 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-23 15:46:30 +00:00
Manolo Gouy f5f0cf9908 Added scale(), translate(), and rotate() functions to the Fl_Graphics_Driver class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-18 17:22:43 +00:00
Manolo Gouy 199b32d921 Added virtual width(), height(), descent() and text_extents() functions to the Fl_Graphics_Driver
class to prepare for the future definition of graphics drivers that fully deal with text measurement.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-18 13:39:48 +00:00
Manolo Gouy 6a5feafe23 Replaced global variable fl_color_ by a private member of the Fl_Graphics_Driver class,
and a public getter to it: Fl_Graphics_Driver::color().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8384 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 12:32:23 +00:00
Manolo Gouy 777ee1b822 Removed global variables fl_font_ and fl_size_ that are now distinct for each graphics device.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 13:54:56 +00:00
Manolo Gouy 668dfd109f Fix STR #2535: clipping + coordinate transformations are now managed separately for each
surface device.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8368 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-04 23:32:53 +00:00
Manolo Gouy 9bca5472d5 Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8363 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-03 09:31:51 +00:00
Manolo Gouy 98e9042a53 Made sure FL/x.H is included only when necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-28 18:14:59 +00:00
Matthias Melcher e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher 1e26ada2c5 Fixed tab key navigation to inactive widgets (STR #2420), fixed a few pedantic warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-31 20:47:50 +00:00
Manolo Gouy 61eb9377c8 Renamed global variable from fl_device to fl_graphics_driver to better express its class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-01 13:21:32 +00:00
Manolo Gouy 449b99dd86 Fix STR 2339 by defining new member function rtl_draw of class Fl_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-21 15:49:45 +00:00
Manolo Gouy 4b32140457 Making fl_old_shortcut() seen by Doxygen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7499 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-14 08:07:53 +00:00
Matthias Melcher dcdc4439cc STR 2108: added warning to fl_rect documentation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7425 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 09:10:50 +00:00
Manolo Gouy d748d323b9 Reorganized code to allow compilation with Fl_Device, Fl_Display but without Fl_Abstract_Printer
(may be useful for embarked devices)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7330 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-25 13:59:00 +00:00
Manolo Gouy d305d7078b Fixed all Doxygen warnings triggered by new Fl_Device and Fl_Printer classes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-24 10:24:37 +00:00
Fabien Costantini e85ff24c22 Fixed another FL_EXPORT missing in fl_draw.H.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7315 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-22 06:17:47 +00:00
Fabien Costantini 4f7629a109 Fixed broken vs2005 ide project files and created table, tree, blocks vcproj projects for vs2005 solution.
Fixed missing FL_EXPORT statements would break dll gen in all visual studio projects.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7314 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-22 05:50:49 +00:00
Manolo Gouy c5d7f42a22 Completed Doxygen documentation of Fl_Device, Fl_Abstract_Printer, Fl_Printer classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7310 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-21 08:26:40 +00:00
Albrecht Schlosser 998cc6df52 Merge of branch-1.3-Fl_Printer, with the following main changes:
(1) adding Fl_Device class (and more) for device abstraction
 (2) adding Fl_Pinter class (and more) for printing support.

Todo: Code cleanup, update dependencies, remove/replace test print window.
I'm looking into converting the test window popup in a global shortcut
that would pop up the print dialog now...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-14 18:07:24 +00:00
Matthias Melcher 5bc48808b6 Removed typedef that simply renamed char* to Fl_String, as discussed in the mailing list.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6955 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-12-07 22:04:55 +00:00
Matthias Melcher bcff4ec8e0 International menu shortcuts working on Mac OS (and probably the other OS's)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-09-17 22:12:24 +00:00
Greg Ercolano 41cef82137 Applied patch from STR#2115.
This fix to fl_height(int,int) solves the "digital drit"
problem in Fl_Text_Editor, where doing insert/delete 
operations was leaving a trail of dead pixels. 

Also fixes problem with font display problem in fluid's
code editor. See the STR for screenshots of the problem.

NOTE: THIS IS A WORKAROUND FOR A DEEPER PROBLEM.
Somewhere during the port of UTF8, the actual pixel size
of the displayed font is a little off, causing FLTK to
miscalculate line height, causing 'digital drit'.

It used to be that when you specified a font size,
the font's actual displayed pixel size matched the
font size value.

This fix makes the fl_height(int,int) function more robust,
actually inquiring the font system for its font size, instead
of assuming the font size is the same as the 'size' argument.

Since Fl_Text_Editor makes use of this function, it helps
that widget calculate font sizes correctly.

The real fix will be restoring FLTK's old behavior where the 
font size specified is the actual pixel size of the displayed font.
Then this function can be reverted to just returning the 'size' argument.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-08-28 20:14:41 +00:00
yuri f13defde28 add fl_draw(int angle, const char* ... functions for rotated text drawing
STR#1840 closed, STR#207 not closed because non-xft functions not implemented 

drawing of N Utf8 characters need correction for rotated and not rotated fl_draw functions not solved!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-24 09:28:30 +00:00
Matthias Melcher b1ba38da60 Updated doxygen docs for Fl_Input_ to get a greater insight into the code. I'll try to get full Unicode support in soon. The current code uses some interesting solutions ;-).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-18 18:52:59 +00:00
Matthias Melcher ead9c2ce24 Avoiding crashes for recrsive common dialogs (this does not fix the issue at hand yet) (STR #1986, 2150) / Added menu shortcut alignment for OS X / Fixed bad system menu hadling in OS X (STR #2153) / Fixed File Input mouse pointer dragging (STR #2181)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-12 20:00:45 +00:00