Commit Graph

7679 Commits

Author SHA1 Message Date
Manolo Gouy
24b40a2e47 Allow calling Fl_Window::decorated_w() with const Fl_Window object and also for decorated_h.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-16 09:29:54 +00:00
Albrecht Schlosser
e14c387e8e Limit initial scaling factor to sensible values.
FLTK_SCALING_FACTOR=0 or negative values would issue unexpected
X11 warnings or crash immediately.

Also commented out scaling factor output statements (printf).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12261 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-15 15:39:55 +00:00
Albrecht Schlosser
a10eae7443 Remove copy constructor from Fl_Rect.
As suggested by Manolo in STR #3385, comment #7.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-13 10:35:18 +00:00
Albrecht Schlosser
60d7c41742 Add first version of FL/Fl_Rect.H.
This version is not yet used in existing code. It may be extended with
more methods if we find we need them.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-12 12:35:22 +00:00
Manolo Gouy
ac4b59abf5 Scaling for WIN32 platform: avoid undrawn right and bottom window margins when manually resizing windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-11 06:12:20 +00:00
Manolo Gouy
fe4f37519d Remove temporary code used for development of the scaling support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12257 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-10 06:28:12 +00:00
Manolo Gouy
741c2970fc Remove warning when compiled with -Wmisleading-indentation
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12256 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-10 06:20:01 +00:00
Manolo Gouy
8de22cfa42 Scaling for X11 platform: avoid undrawn right and bottom window margins when manually resizing windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-10 06:10:37 +00:00
Manolo Gouy
6b2c5fcd09 X11 platform: Accurate box graphics at wide range of scaling factor values.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12254 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-06 19:09:02 +00:00
Manolo Gouy
a6e2c33ffd MacOS system menus: replace 'rank' by 'index' to denote a number identifying a menu item.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12253 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-06 07:38:39 +00:00
Albrecht Schlosser
9ee09b1f90 Fix Fl_Browser background and text color parsing (STR #3376).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12252 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-04 14:39:05 +00:00
Manolo Gouy
822f14c77a Fix problem introduced at r.12247
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12251 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-02 14:04:31 +00:00
Manolo Gouy
c6cb25aa1b Fix typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12250 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-02 09:18:59 +00:00
Manolo Gouy
7b52aafcec Document new HiDPI support under the X11 platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-02 09:13:47 +00:00
Manolo Gouy
37bcc744c8 Make sure the scaling factor has been initialised when setting a font.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12248 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-02 07:16:43 +00:00
Manolo Gouy
12fd93485f Remove the 'defined(WIN32)' and 'defined(__APPLE__)' preprocessor directives introduced at r.12239
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12247 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-01 17:41:42 +00:00
Manolo Gouy
0960d07315 Additional check in Fl_Xlib_Graphics_Driver::font_unscaled(Fl_Font, Fl_Fontsize) to recognize if current font is unchanged.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12246 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-01 15:23:26 +00:00
Manolo Gouy
90efebb97e Divide virtual Fl_Screen_Driver::open_display() in a platform-specific part followed by a platform-independent part.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12245 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-01 14:05:47 +00:00
Manolo Gouy
3a390bfb5f X11 + Pango platform: improve text drawing with angle.
Make sure that text length computed without angle is equal to text length drawn with angle.
This property is essential so that rotated text appears at controlled location at both ends.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12244 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-22 14:42:06 +00:00
Albrecht Schlosser
c364bb73f6 Make some methods of Fl_Tabs protected and/or virtual (STR #3211).
Patch proposed by Teklad (STR #3211, file #7):
  http://www.fltk.org/strfiles/3211/Fl_Tabs.H.patch
with minor modifications and adjustments for FLTK 1.4.0.

Method which() is now also virtual, as suggested by guyben in comment #24.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12243 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-22 14:34:38 +00:00
Manolo Gouy
0489d79085 Fix warnings: 'Fl_Xlib_Graphics_Driver::scale' hides overloaded virtual function [-Woverloaded-virtual]
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12242 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-22 13:59:22 +00:00
Albrecht Schlosser
58c21c0bc6 Fix Visual Studio build with HiDPI support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-21 14:48: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
Albrecht Schlosser
22a5dd4fcf Fix typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12238 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-15 15:35:30 +00:00
Albrecht Schlosser
a1d3936554 Allow to disable shadows in Fl_Clock and derived widgets.
As discussed on 2017-05-15 in fltk.general, thread "Fl_clock".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12237 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-15 15:30:52 +00:00
Albrecht Schlosser
034148b289 Improve and clarify Fl_Clock documentation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12236 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-15 14:26:02 +00:00
Greg Ercolano
039beaf26a Added some example code to Fl_Gl_Window::draw() docs..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-11 11:44:06 +00:00
Manolo Gouy
39b2976f88 De-duplicate code to load pointer to the TransparentBlt() system function at run-time.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12234 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-06 07:36:40 +00:00
Manolo Gouy
0794cc0ceb Fix erroneously cased include file names
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12233 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-05 16:27:59 +00:00
Greg Ercolano
5769ac6210 Added Fl_Table docs for how to deselect.
Issue raised by Mich Paw today on fltk.general.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-04 22:24:01 +00:00
Manolo Gouy
139c5d9c2d Add Doxygen documentation for fl_create_bitmask() and fl_delete_bitmask().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-02 12:44:54 +00:00
Greg Ercolano
501b4f7a52 Document Fl_Table's protected member variables.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12230 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-27 16:29:30 +00:00
Greg Ercolano
1bb2ef7b0b Small doc clarifications for the Fl_Table::TableContext enum.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12229 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-27 01:40:21 +00:00
Greg Ercolano
afd118047b Fl_Table was missing doxygen docs for several public + protected members.
Solves STR# 3381.

Also: standardized doxygen comment style in both files; 
      > /** */ doxygen commenting
      > 2 space indent

Removed some confusing non-doxygen comments, and rewrote some confusing ones.

Removed old license info Matt had imported from my original 2002 widget..
there was no reason for it to be in there; the Fl_Table code inside FLTK
is licensed under the FLTK GPL license, no need for the extra noise in the docs.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-26 20:12:34 +00:00
Manolo Gouy
18a84d073d Remove Fl_Translated_GDI_Graphics_Driver and have its functions performed by Fl_GDI_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-25 17:05:17 +00:00
Manolo Gouy
2ddc89fb61 Add an argument to the private, virtual member function void Fl_Surface_Device::end_current_().
The X11 platform uses this argument to restore the correct clipping state after
drawing to an Fl_Image_Surface object.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12226 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-25 12:42:22 +00:00
Albrecht Schlosser
f15f477243 Remove unused variable from class Fl_Xlib_Image_Surface_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12225 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-24 21:19:20 +00:00
Manolo Gouy
cd8909f903 Slight improvement of Fl_Image_Surface::image()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12224 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-24 19:58:07 +00:00
Manolo Gouy
05b9f2bc98 Undo change at r.12221 because it's done at r.12222 in a cross-platform fashion.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-24 10:43:24 +00:00
Manolo Gouy
d91b3d80e5 Allow the use of Fl_Image_Surface::image() also when the Fl_Image_Surface object is not the current drawing surface.
This fixes an issue uncovered in a thread of fltk.general entitled
fl_pop_clip: clip stack underflow! warning on X11

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12222 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-24 09:23:33 +00:00
Albrecht Schlosser
da31ffd952 Fix Fl_Image_Surface::image() as discussed in fltk.general
See thread "fl_pop_clip: clip stack underflow! warning on X11"
started on Thu, 20 Apr 2017.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12221 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-23 10:43:48 +00:00
Albrecht Schlosser
3ec23df83a Fl_Help_View: fix table header in help_dialog.html (STR #3227).
The html code in the example (test/help_dialog.html) was broken.
Fixing the example html code was enough, no code changes needed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-21 21:10:12 +00:00
Manolo Gouy
660a65ed01 Mention fix for STR#3374
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12219 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-12 16:16:42 +00:00
Manolo Gouy
ed807788ff Fix for STR#3374: Crash with pango enabled when changing default font
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12218 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-12 12:41:47 +00:00
Albrecht Schlosser
cd10796251 Fix Windows CreateDC/DeleteDC mismatch (STR #3373).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-11 21:53:50 +00:00
Manolo Gouy
81ffbd2bf7 Document the new OPTION_USE_PANGO platform-specific option.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-08 06:26:23 +00:00
Manolo Gouy
1c0b4d9b60 Fixed typo in warning message.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12215 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-07 16:42:23 +00:00
Albrecht Schlosser
04339b8d05 Fix doxygen/latex warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12214 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-02 09:31:05 +00:00
Greg Ercolano
4bff1e5e98 Suggestion for cmake docs for building FLTK with Visual Studio (e.g. VS7 shown)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12213 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-30 01:52:39 +00:00