Commit Graph

1006 Commits

Author SHA1 Message Date
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
65b9610a96 Mac OS: exact implementation of the Fl::screen_dpi() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-22 17:30:37 +00:00
Albrecht Schlosser
08b93ec972 Reverted changes done in svn r 7788 for STR #2420 ("Tab-Navigation focuses
non-active_r() widgets"). This must be investigated further, and if necessary,
solved differently. STR #2420 will be reopened...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-20 14:34:53 +00:00
Manolo Gouy
9ff9cf1230 Added Fl_Paged_Device::print_window() to print a window with its title bar and frame.
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15 21:38:05 +00:00
Manolo Gouy
3f984b0b86 Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8588 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-14 13:11:34 +00:00
Ian MacArthur
be6df55717 More attempts to clean up WIN32 handling of UTF16 surrogate pairs.
In particular, I have added a new function to src/fl_utf.c called fl_ucs_to_Utf16() which
converts a single 32-bit Unicode value into one (or more) UTF16 cells.

This is needed in the win32 char-by-char text width() logic, and I suspect may also be useful in the OSX code in some places.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8585 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-13 15:43:22 +00:00
Manolo Gouy
0c02f2dabd Added Fl_Printer::driver(void) function that can be useful.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-06 13:43:09 +00:00
Manolo Gouy
265f213d23 Added function Fl_Printer::set_current() that may be useful.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-06 12:11:26 +00:00
Albrecht Schlosser
281489f849 Documentation updates and typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-30 12:07:52 +00:00
Manolo Gouy
c6fb27e56d Mac OS: added field subwindow to Fl_X class that is true if this is a subwindow.
Useful when deleting a window because subwindows share their xid with their parent
window (unlike under MSWIn or Xlib), so subwindows should not delete their xid.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-28 09:28:05 +00:00
Albrecht Schlosser
385b40988d Fixed Fl_Device destructor (made it virtual). This eliminates the compiler
"warning: 'class Fl_Device' has virtual functions but non-virtual destructor"
on Mac OS X.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-23 12:49:30 +00:00
Manolo Gouy
1366cc68d3 PostScript support: simplified the Fl_PostScript_Graphics_Driver class by removing the
draw_scaled_image(_mono)() member functions.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8528 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-22 17:41:23 +00:00
Manolo Gouy
80fffdc369 Set member functions draw_scaled_image(_mono)() of class Fl_PostScript_Graphics_Driver
private.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8526 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-22 15:53:05 +00:00
Manolo Gouy
dfc067ecfc Fix STR #2587: under Xlib, the X input method must be reset by the Fl::compose_reset() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8522 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-21 16:32:37 +00:00
Manolo Gouy
7aa48e19b9 Fix STR #2575: use the screen that intersects most of the window when made fullscreen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8515 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-12 21:36:21 +00:00
Manolo Gouy
160a0ee461 Improved the Doxygen documentation of Enumerations.H. Not finished yet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8512 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-06 22:40:26 +00:00
Manolo Gouy
5185932f5b Mac OS: modified the Doxygen doc of the fl_mac_os_version global variable
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8505 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-04 17:04:43 +00:00
Manolo Gouy
f7d7eff7ad STR 2580: Fl::add_fd() now calls fl_open_display() because that is necessary for the fd event
to be recovered by the event loop. Before main() is called, only fl_mac_os_version is 
initialized.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8488 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-01 11:58:36 +00:00
Manolo Gouy
1a4fd8ecc3 The Mac OS Fl_Display_Device constructor now calls fl_open_display(). Thus, all
Mac-specific initializations will be done even before main() is started.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8487 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-28 17:57:19 +00:00
Manolo Gouy
10a07138b8 Fixed two doc typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-26 08:23:30 +00:00
Albrecht Schlosser
94e5f2e1fc Un-inlined Fl_Window::icon() methods to make them easier to extend w/o
breaking the ABI. See discussion in STR #2563.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-25 08:44:47 +00:00
Manolo Gouy
27987c6ee0 Made struct matrix a subclass of Fl_Graphics_Device class to avoid collision
with application-defined names.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8471 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-24 18:02:11 +00:00
Manolo Gouy
d8822aa74a Fl_Device: removed class_name(char *) member function and set class_name(void) virtual.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-23 14:36:18 +00:00
Fabien Costantini
c7fff91435 Fixed FL_EXPORT missing would fail MSVS builds.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8460 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-21 16:36:10 +00:00
Greg Ercolano
723fe666cf Document NULL item behavior, small code mods for same.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-19 22:40:31 +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
Albrecht Schlosser
2c129b4833 Added a default window title function for common dialogs (STR #2562).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-18 08:52:48 +00:00
Greg Ercolano
d0d159d17d Selection color fixes, widget screenshot added to top of docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8420 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-13 17:30:17 +00:00
Albrecht Schlosser
3bb11b9993 Common dialogs like fl_message() and fl_ask() can now have a window
title (STR #2562).
Added a test case for disabling the hotspot and using a window title
to test/ask.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-12 12:08:52 +00:00
Albrecht Schlosser
f8c0dd0110 Hotspot behavior of fl_message() and other common dialogs is now
optional (STR #2561).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-12 11:31:40 +00:00
Manolo Gouy
5dab14dafa Fix STR #2558: use more consistently FL_NORMAL_SIZE to define the default font size
of interface elements.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8405 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-08 20:59:46 +00:00
Ian MacArthur
33af4e4ba5 Attempt to fix STR #2550 to make fl_text_extents work in Xlib-only
(i.e. non-XFT) X11 builds.

This appears to be working now, though I can not test it fully, so we
need more feedback.
In particular the setting of the dx param is certainly wrong, but 
works fine in general cases. I think.
Also, I suspect it may behave badly in the face of RtoL text rendering
but I think we have other problems in that area anyway...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8399 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-07 22:22:16 +00:00
Manolo Gouy
cb902eebe3 Replaced global variable fl_fontsize by fl_graphics_driver->font_descriptor().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-07 13:49:34 +00:00
Manolo Gouy
dc8edfc216 Fix for STR #2543: Fl::lock() function now returns an int that allows to detect whether
threading is available on the platform.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8393 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 19:46:11 +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
e552ae319a Moved the Doxygen doc of class Fl_Mac_App_Menu from mac.H to x.H so Doxygen
displays correctly that #include <x.H> is needed for this class.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 10:24:23 +00:00
Manolo Gouy
d4007d5b06 Replaced /* \file by /** \file so Doxygen sees it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8380 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 10:07:28 +00:00
Matthias Melcher
b661be2778 Distille the Native File Chooser files down into a single file. I would like to avoid that the common API runs out of sync between platforms (no code doubling - there was already a mismatch with 'const'), and that the users may wonder which file to include. Please check this on WIN32 and Unix. It does work on OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 22:35:51 +00:00
Greg Ercolano
46518adf58 Fixes problem with doxygen docs showing incorrect #include reference
at top of docs that was confusing users into #include'ing the wrong file.
Problem described here: http://fltk.org/newsgroups.php?gfltk.development+v:11617



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 17:45:00 +00:00
Greg Ercolano
b4e27fb943 Prevent loading of unistd.h on WIN32 platforms.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8376 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 17:09:21 +00:00
Albrecht Schlosser
e567a23563 FL/Fl_Window.H must be included always (not only in the FL_INTERNALS part).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8375 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 16:55:04 +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
31bbbf7ae6 Removed the requirement of declaring class Fl_PostScript_Graphics_Driver friend of
class Fl_Graphics_Driver. This is undesirable because it obliges a user (e.g., Mingodad
and his PDF driver) who develops a new graphics driver to change the FLTK source code.
Just declaring font() public instead of private is enough.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-04 16:46:41 +00:00
Manolo Gouy
7c932c25d6 Added the possibility to call Fl_Paged_Device::scale(factor) with a single argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-04 09:17:45 +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
18156dfb30 Removed global variable fl_surface that was not very useful because equivalent
to Fl_Surface_Device::surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 12:42:47 +00:00
Manolo Gouy
bb29437427 Removed global variable fl_display_device that was not very useful because equivalent
to Fl_Display_Device::display_device().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 11:29:18 +00:00
Manolo Gouy
816fc3b971 Mac OS only: added class Fl_Mac_App_Menu to support localization
of the application menu. Added corresponding Doxygen doc.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-01 21:31:57 +00:00