Commit Graph

1813 Commits

Author SHA1 Message Date
Manolo Gouy
5e6bf76b0a Fl_SVG_Image class: add support for compressed .svgz image files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04 11:46:33 +00:00
Greg Ercolano
6434d5d602 Added missing accessor for Fl_Text_Display's cursor_style()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-03 05:15:10 +00:00
Albrecht Schlosser
64052828ca Add public accessor Fl_Shared_Image::original().
This public, inline, and read-only accessor is intended for debugging
purposes but can be useful for user code as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-02 11:18:41 +00:00
Greg Ercolano
37a8ef98f0 Small doc simplification/shortening
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12471 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-27 03:30:13 +00:00
Manolo Gouy
da2d4a8ee5 Convert the initialisation of global variables fl_local_shift, fl_local_meta, etc... using the driver approach.
This avoids repeating the default values "Shift", "Meta", etc... for several platforms.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19 19:33:54 +00:00
Greg Ercolano
e483ee8885 Reverting to previous; apparently this was a bug in doxygen 1.7.4's support of header markdown.
The following is valid, documented, "standard markdown" for headers in doxygen:

    This is a level 1 header
    ========================

    This is a level 2 header
    ------------------------

Upgrading doxygen from 1.7.4 to 1.8.13 fixed the problem.
So beware of 1.7.4 wrt to these kinds of header markdown;
the result in the docs was no header, the header text + underbars
were appearing inline with the text, crlfs removed.

Not sure exactly what version of doxygen this was fixed in;
a search in their bugzilla for 'headers' seemed to show no
directly relevant matches, other than maybe bug #681898.
https://bugzilla.gnome.org/show_bug.cgi?id=681898



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-14 00:50:36 +00:00
Greg Ercolano
b2c94264d9 Doxygen fix: The trick of using a line of dashes under a section heading no longer works.
This has been working fine for years, not sure what version of doxygen dropped this.
I'm running 1.7.4 here, and that trick isn't working for the Fl_Browser_.H docs.

Changed to using <B> and </B> and <BR> which seems to work OK in both HTML and PDF
generation.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12458 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 23:25:59 +00:00
Manolo Gouy
435d135825 SVG support: draw images at full screen resolution also when there are several pixels per graphical unit, as with Apple retina displays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12456 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-13 16:15:34 +00:00
Greg Ercolano
6779015697 Add reference to image in docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:12:21 +00:00
Albrecht Schlosser
900314d4f4 Documentation and copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 15:26:36 +00:00
Albrecht Schlosser
a6803d71c6 Remove leading underscore from labeltyps as far as possible.
Removed obsolete '\todo' item from docs (done with recent commits).

Removed redundant code from label assignment (e.g. use FL_IMAGE_LABEL
instead of label type assignment + use of _FL_IMAGE_LABEL).

See recent commits.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 13:05:48 +00:00
Greg Ercolano
3fe7b8c396 Doxygen Fl_Multi_Label example code added. (STR #3400)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12445 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 21:27:53 +00:00
Albrecht Schlosser
322208b855 Add missing Fl_Labeltype and Fl_Boxtype definitions.
Some labeltypes and boxtypes were missing a #define for the enum
without a leading underscore and the corresponding setup function
to initialize the internal table of boxtypes and labeltypes, for
instance _FL_MULTI_LABEL. This is now fixed so (hopefully) all boxtypes
and labeltypes can and _should_ be used w/o leading underscore.

Note: if there are still boxtypes or labeltypes that can't be used w/o
leading underscore this should be considered a bug and is to be fixed ASAP.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:54:10 +00:00
Manolo Gouy
8e558595e6 Make virtual member function Fl_Image::draw_scaled(int X, int Y, int W, int H) protected rather than private.
Consequently, remove the trailing _ from its name reserved for private class members.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12433 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 12:35:06 +00:00
Manolo Gouy
dd9f32c3f5 Fix typo in documentation of Fl_SVG_Image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:30:19 +00:00
Manolo Gouy
d6349e180a Set svn:keywords
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:20:52 +00:00
Manolo Gouy
1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Manolo Gouy
df8c9ba80c Add missing default values for virtual member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12411 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 17:44:09 +00:00
Manolo Gouy
eae09e7fa0 Create virtual Fl_Image::draw_scaled_(int X, int Y, int W, int H) and its implementations for image classes.
This allows to use the virtual function mechanism to adapt scaled image drawing both to the
image type and the graphics driver type.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12410 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 15:49:58 +00:00
Manolo Gouy
9fc2d43102 Improve Doxygen comments related to image drawing
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12407 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 08:59:50 +00:00
Manolo Gouy
c7405a22a8 X11 platform: cleaner implementation of changing the active drawing surface and maintaining clip regions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12396 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-24 12:40:29 +00:00
Manolo Gouy
c2d5cf4067 Simplify using Fl_XXX_Graphics_Driver::copy_offscreen() instead of Fl_Scalable_Graphics_Driver::copy_offscreen_unscaled()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-20 20:18:15 +00:00
Albrecht Schlosser
b4e434774f Remove unnecessary #include files from Fl_Help_View.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12392 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:46:20 +00:00
Albrecht Schlosser
2828cbde2c Avoid #include's of unrelated system headers in Fl_Table*.H.
Possible side effect: programs that relied upon inclusion of unrelated
system headers by FL/Fl_Table.H or FL/Fl_Table_Row.H may fail to compile.

Removed include files (some only on certain platforms, list may be incomplete):

#include <FL/Fl.H>             // moved to implementation (.cxx)
#include <FL/Fl_Box.H>         // moved to implementation (.cxx)
#include <FL/Fl_Scrollbar.H>   // moved to implementation (.cxx)

#include <sys/types.h>
#include <string.h>            // memcpy
#include <malloc.h>            // WINDOWS only: malloc/realloc
#include <stdlib.h>            // UNIX: malloc/realloc


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:16:08 +00:00
Manolo Gouy
c88466928d Replace static protected bool Fl_Window_Driver::is_a_rescale by a private static variable and a public getter.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28 15:51:05 +00:00
Manolo Gouy
3f572e327f Rename Fl_Window_Driver::in_resize_after_scale_change to 'is_a_rescale' which is more expressive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27 14:38:35 +00:00
Albrecht Schlosser
6b24b20966 Fix confusing behavior of class Fl_Text_Selection.
Fl_Text_Selection got a new method length() and returns 0 in length()
and in all offsets (start(), end(), position()) if no text is selected
(selected() == false).

The behavior in FLTK 1.3 and earlier versions (returning undefined
values if !selected()) was confusing.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-26 12:32:13 +00:00
Manolo Gouy
5a8a2e1ee5 Remove virtual Fl_Window_Driver::reuse_icons() no longer useful after r.12349.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 15:28:43 +00:00
Manolo Gouy
9c47bc322c Remove Fl_Window_Driver::reuse_cursor() that is no longer used since commit r12349.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 11:31:19 +00:00
Manolo Gouy
225c3d6da3 Rewrite Fl_Window_Driver::resize_after_scale_change() removing calls to Fl_Window::hide() and Fl_Window::show().
Windows are now rescaled with a call to Fl_Window::resize() which has been slightly modified.
Static member variable bool Fl_Window_Driver::in_resize_after_scale_change is created,
and is true if and only if Fl_Window::resize() is called by Fl_Window_Driver::resize_after_scale_change().
This new flag allows Fl_Window::resize() to perform correctly the rescaling of the window.
Fl_Gl_Window::resize() and Fl_Double_Window::resize() also consult the value of
the Fl_Window_Driver::in_resize_after_scale_change flag.
The platform-specific Fl_WinAPI_Window_Driver::resize() and Fl_X11_Window_Driver::resize()
also use  the Fl_Window_Driver::in_resize_after_scale_change flag.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 10:57:24 +00:00
Albrecht Schlosser
a8c4f77d50 Improve docs of Fl_Widget::callback() and do_callback().
Clarify that all variants of do_callback() call clear_changed() after
the callback and that 'long Fl_Widget::argument()' may truncate the
user_data value on some (particularly Windows 64-bit) platforms.

Some code has been reformatted and refactored with better variable names,
but there are no effective code changes.

Obsolete, inactive code was removed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 15:16:37 +00:00
Albrecht Schlosser
db1f29fdb5 Update Fl_Widget_Tracker docs with better example code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 15:06:11 +00:00
Manolo Gouy
4764b9bc2e Fl_Window_Driver::flush_single() needs not be a virtual member function.
It is really an accessor to protected method Fl_Window::flush().
Rename it to Fl_Window_Driver::flush_Fl_Window to reflect that.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 08:10:45 +00:00
Albrecht Schlosser
c92fee897b Fix Visual Studio shared library build (STR #3389).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-12 21:51:42 +00:00
Manolo Gouy
b601e9558d Add missing definition of the 'uchar' type in FL/x.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-11 13:22:56 +00:00
Matthias Melcher
a8f4fbc2ef STR #2823.2/2: Improved Fl_Preferences "dirty" flag handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12305 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 21:00:17 +00:00
Albrecht Schlosser
0c210ae867 Introduce Fl_Group::bounds(), deprecate Fl_Group::sizes().
The new method Fl_Group::bounds() replaces Fl_Group::sizes() whose
internal array structure was not documented.

Fl_Group::bounds() uses the new and documented class Fl_Rect for its
internal structure.

src/Fl_Tile.cxx now uses bounds() instead of sizes().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12302 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 19:16:40 +00:00
Manolo Gouy
8dccfc8838 HiDPI support under WIN32 platform: completed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-03 17:31:57 +00:00
Manolo Gouy
582701ba07 HiDPI support: keep window's icons after rescaling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28 15:15:34 +00:00
Manolo Gouy
322b62a9f1 HiDPI support: keep window's cursor after rescaling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12275 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28 13:33:53 +00:00
Manolo Gouy
7f15c3010c WIN32 platform: more progress for full HiDPI support
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12273 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-27 12:17:29 +00:00
Albrecht Schlosser
51ed4e2162 Code formatting only. No significant changes.
In preparation of adding Fl_Scroll_Tabs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-21 20:00:28 +00:00
Manolo Gouy
93a99431ed Move line_width_ protected member variable from Fl_Xlib_Graphics_Driver to Fl_Scalable_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12269 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-21 16:08:32 +00:00
Manolo Gouy
2cda5a4fa6 Make Fl_Screen_Driver::get_mouse(int&, int&) return the number of the mouse-containing screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12264 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-17 06:53:44 +00:00
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
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
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
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
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