Commit Graph

7977 Commits

Author SHA1 Message Date
Manolo Gouy
2bae646a3c Only fix correct indenting of function fl_convert_pixmap()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-17 06:53:28 +00:00
Manolo Gouy
c5ab11bbec Comments only: extend "Implementation note about image drawing" to describe the mask_bitmap virtual member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:21:54 +00:00
Matthias Melcher
447e33c607 Getting rid of warning in Xcode 9.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:06:31 +00:00
Manolo Gouy
26aabc91e1 Remove virtual member Fl_GraphicsDriver::mask_bitmap(char **) and its re-implementations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:00:29 +00:00
Manolo Gouy
9b01ff63e7 Remove Fl_PostScript_Graphics_Driver::mask_bitmap(char **) that is useless.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 10:43:28 +00:00
Manolo Gouy
e85fd31f54 Comments only: complete "Implementation note about image drawing" about how to destroy cached images.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 08:03:16 +00:00
Manolo Gouy
a70846730b Add Fl_Android_Graphics_Driver::delete_bitmask() needed to uncache a cached Fl_Bitmap image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 07:59:49 +00:00
Manolo Gouy
f089bd6445 Remove useless re-implementation of this virtual member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12839 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 07:56:52 +00:00
Manolo Gouy
ecc1f90506 Comments only: extend the description of how Fl_Graphics_Driver derived classes support image classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12838 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-15 06:44:50 +00:00
Manolo Gouy
dbc37a29c0 Restore building for X11 with HAVE_XRENDER = 0
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12837 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-15 05:53:01 +00:00
Manolo Gouy
25d39c1b57 Remove useless 'friend' statements from class Fl_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 15:26:42 +00:00
Manolo Gouy
82e70fae04 Comments only: more extensive explanation of how virtual member functions of Fl_Graphics_Driver can support image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 15:10:59 +00:00
Manolo Gouy
bfac5462be Remove Fl_Pixmap::prepare() and Fl_Bitmap::prepare() that were used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 13:37:47 +00:00
Manolo Gouy
2abe8bd413 Homogenise and simplify the API of Fl_Graphics_Driver::cache(image-type *) virtual member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13 13:22:15 +00:00
Manolo Gouy
e440b8859f Simplify code for image drawing by PostScript graphics driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12832 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13 11:50:20 +00:00
Albrecht Schlosser
4a0c13ac34 Update 'examples' (test) documentation, add images.
Add missing documentation of demo programs in the 'test' directory.
Some images were added as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12831 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 19:56:34 +00:00
Manolo Gouy
dcaf201239 SVG support: improve printed SVG images by increasing the resolution when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 15:51:50 +00:00
Manolo Gouy
178343b2ee Image drawing: simplify the code organisation to better support Fl_Image::scale() - continued
This completes changes introduced at r.12828.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 14:54:53 +00:00
Manolo Gouy
16705ef734 Image drawing: simplify the code organisation to better support Fl_Image::scale().
Graphics drivers now use up to 6 virtual member functions to support Fl_Image
drawing in the context of GUI and image rescaling :
  virtual void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_bitmap(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy)
and
  virtual void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_fixed(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy)
  virtual void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 13:07:00 +00:00
Albrecht Schlosser
efc3ec1b7b Remove unnecessary dependency on FL/Fl_Rect.H.
Fl_Rect.H is no longer included by Fl_Group.H to avoid unnecessary
dependencies on Fl_Rect.H. Currently it is only needed to access the
array returned by the protected method bounds().

Also clarified documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 12:58:10 +00:00
Albrecht Schlosser
5e98a9e292 Remove unused variable, update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 21:10:53 +00:00
Albrecht Schlosser
e71fc7e4c3 Document Fl_Rect::r() and b() to be outside the rectangle.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 18:41:34 +00:00
Greg Ercolano
c7080e826e General description: mention how to move items around
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12824 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 18:37:18 +00:00
Manolo Gouy
798823f7dc X11: Fix drawing of sliders with gtk+ scheme and GUI scaling >= 2 -- continued
Other places where line_delta_ is to be used.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 21:05:08 +00:00
Greg Ercolano
bf0c9d4c6a Added global Fl::visible_focus() checkbox.
Also fixed tab navigation order of some widgets, and +/1 heights with a few checkboxes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 19:52:37 +00:00
Manolo Gouy
43000a228c X11: Fix drawing of sliders with gtk+ scheme and GUI scaling >= 2 that left footprints when moved.
The fix is to use the X11 graphics driver's line_delta_ private member variable also when drawing complex
shapes with fl_begin_loop(). The gtk+ scheme does use fl_begin_loop() to draw its frames.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12821 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 12:23:07 +00:00
Greg Ercolano
fe6499790a Fixes STR #3459.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12820 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-02 18:28:42 +00:00
Matthias Melcher
532099da23 Android: Drawing RGB and monochrome image data on the fly from a buffer. Untested.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-01 16:16:12 +00:00
Matthias Melcher
f49267e85b Android: Drawing RGB image data on the fly via callback
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-01 16:06:12 +00:00
Matthias Melcher
936fbd096f Android: Drawing RGB image data (and probaly rgba and grayscale as well). Testing unsing test/color_chooser.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 21:29:33 +00:00
Greg Ercolano
e4916d617e Added mention of the new Fl::menu_linespacing() in the Fl_Menu_ docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 17:29:23 +00:00
Greg Ercolano
309d9a61b9 Added Fl::menu_linespacing() to solve STR# 2927.
Method name follows Fl_Tree::linespacing().
Implemented similarly to Fl::scrollbar_size(), since its use crosses Fl_Menu_Item and 'menuwindow' classes.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 17:17:37 +00:00
Albrecht Schlosser
69584dda96 Minimal code edit, no functional change.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12814 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-30 10:11:24 +00:00
Albrecht Schlosser
59af6563db Refactor and simplify Fl_Group::resize().
I renamed variables (more consistent names), fixed code formatting, and
refactored the code around the resizing of widgets. I put common code
before and after the conditional '#if 1' that separated old code from
new "much simpler code from Francois Ostiguy" as a comment in the existing
code mentioned. Then I deactivated the old code and activated the new
"much simpler" code. Tested, works well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12813 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-29 15:09:32 +00:00
Albrecht Schlosser
ef0f00d357 Add more display scaling factors for testing.
These scaling factors can be activated by defining the preprocessor
macro TEST_SCALING.

Note: this feature may be changed or removed in the future.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-28 16:27:43 +00:00
Manolo Gouy
458d063643 Image classes: memorise the width and the height of the cached form of the image to support GUI scaling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-28 13:00:12 +00:00
Matthias Melcher
29bda776bb Android: Implemented Pixmap drawing, also much cleanup in Fl_Android_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-27 21:54:04 +00:00
Matthias Melcher
e52b55c09d Android: Fl_Android_Graphics_Driver now derives from Fl_Graphics_Driver and no longer from the dpi-aware scaling version. I may add this level of complexity later, but for now, unscaled drivers are difficult enough. Also, the new setup lets me easily find unimplemented methods of the driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-27 15:31:26 +00:00
Matthias Melcher
daca2a95cf Android: New version of the IDE Android Studio 3.1 . All still working fine.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 21:39:02 +00:00
Matthias Melcher
3b7e1a5ec6 Android: Draws Fl_Bitmap.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 21:28:18 +00:00
Manolo Gouy
5040bbff1f Fix for STR#3457: Fl_SVG_Image handling of invalid width/height
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 16:17:00 +00:00
Matthias Melcher
4df5c6d0b0 Android: Avoids hiding and showing keyboard when focus changes from text input to text input
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 15:42:08 +00:00
Matthias Melcher
e8818e968c Android: Widgets can now request the on-screen keyboard when they get focus. This may fail if visible_focus is disabled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 15:33:22 +00:00
Matthias Melcher
20ed92fca4 Android: Keyboard handles modifiers like Shift and Alt... .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12803 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 14:48:13 +00:00
Manolo Gouy
77cc7b147a Documentation: give more detail for Fl_Image::w(int W) and Fl_Image::h(int H)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12802 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 08:20:17 +00:00
Matthias Melcher
ca8f680000 Android: Added keycodes to make arrow keys, delete, return, and other non text-keys work. ALso added a Java helper class to make Java call easier. We may need more Java/JNI in the future.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 22:27:21 +00:00
Matthias Melcher
eb09ab161a Android: Separating keyboard stuff into a new file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 16:48:44 +00:00
Matthias Melcher
832377fc21 Android: Improved event handling to handle all pending events before redrawing the interface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 16:34:40 +00:00
Manolo Gouy
0e765c6cd8 Documentation: explain how images are best handled in the context of GUI rescaling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 06:15:50 +00:00
Matthias Melcher
d7520d5a71 Android: Tried to fix flaws in the Android Native interface. Only
solution I found involves Java, so, no.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12797 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 21:36:55 +00:00