Commit Graph

1095 Commits

Author SHA1 Message Date
Greg Ercolano 34716f86a0 Added three methods and dox to Fl_Tooltip:
margin_width()	-- controls margins around tooltip's text
	margin_height()	-- controls margins above and below tooltip's text
	wrap_width()	-- controls maximum width of text before wordwrapping is enforced

These are read-only for the current release, 
and read/write as an ABI feature.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9510 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-16 23:19:37 +00:00
Greg Ercolano f9d8abbf7b o Added color() methods to get/set color of input field.
o ABI feature: change input and up/down buttons from 'private' to 'protected'



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-16 07:25:11 +00:00
Greg Ercolano 7e66b6ee3c Added screenshot for Fl_Spinner docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9480 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-11 12:12:00 +00:00
Greg Ercolano 31f320e2c6 o Added new 0xffffffff 'transparent' color behavior for the item's bg color;
with this as the default color, Fl_Tree::color() can control the tree's background.
  Tests added to the test/tree application.

o test/tree.fl modified:
    o Added a 'Test Suggestions' button to document various tests
    o Added tests for new 'transparent' color behavior
    o Added test for STR#2832 to check if items can be drawn to the /right/ of child widgets

o Added new methods to Fl_Tree_Prefs:
    item_labelfont()     -- obsoletes labelfont()
    item_labelsize()     -- obsoletes labelsize()
    item_labelfgcolor()  -- obsoletes labelfgcolor()
    item_labelbgcolor()  -- obsoletes labelbgcolor()

o Added 'Fonts and Colors' section to Fl_Tree docs

o Fl_Tree_Item ABI feature added: using bitflags instead of chars
  to keep the class small, as it gets instanced a lot. (fast + LIGHT)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-09 21:26:32 +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
Manolo Gouy 547fc0a3f0 Added Fl_Graphics_Driver::vertex_no(), vertices() and vextex_kind() accessor functions useful
to implement some virtual functions of new graphics drivers.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-02 13:44:52 +00:00
Manolo Gouy 1229ac8808 Fix STR#2831: regression in Fl_Pixmap drawing under X11.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-05-01 14:33:30 +00:00
Greg Ercolano 165cd2b63b Fixes STR#2832; support labels on tree child widget()s.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9411 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-30 17:14:15 +00:00
Greg Ercolano 474feee1db o Added FL_TREE_ITEM_HEIGHT_FROM_WIDGET option to item_draw_mode()
to allow widgets to control the size of items in the tree
  (instead of vice versa).

o Added item_draw_mode(int) to allow for easier bitflag maintenance,
  since enums don't seem to be typesafe yet.

o Tree demo modified to demonstrate this feature.
  An important feature for adding large widgets to tree items.
  Will probably add an example, 'tree-of-tables' to demo this usage.

o Small doc fixes.

o Had to rename FL_TREE_ITEM_DRAW_WIDGET_ONLY to FL_TREE_ITEM_DRAW_DEFAULT.
  Its meaning for the bit fields changed when new bit fields were added.
  (The prev name just didn't make sense in the new context. Since it was
  just a few svn commits old and an unreleased ABI feature, it shouldn't
  affect anyone not in R&D)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9404 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-27 02:03:48 +00:00
Greg Ercolano bb8f51ea1a Fixes STR #2796
Prevent situations where user finds themselves scrolled past bottom of tree.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9400 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-24 04:45:03 +00:00
Fabien Costantini d90b170c8d Fixed more warnings in VC2010 32+64 bits builds
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-24 03:34:26 +00:00
Matthias Melcher e2d3d400cd Reverted flags in Fl_Widget to protected.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 20:12:06 +00:00
Greg Ercolano d07ef80207 Various Fl_Tree enhancements:
o Added keyboard navigation table
    o Added Shift-Click to extend selection, Ctrl-Space to toggle selection, Enter key toggle
    o Added protected extend_selection(from_item,to_item)
    o Cleanup of Fl_Tree::handle()
    o Limit ^A to multi-select mode only
    o Disable focus box in SELECT_NONE mode
    o test/tree: changed default mode to 'multiselect' (most often needs testing)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9385 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 16:31:51 +00:00
Albrecht Schlosser fd9f4e6132 Fix STR #2819 (include dirent.h on Windows/MinGW).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9382 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 09:47:04 +00:00
Greg Ercolano 2ae607e8ba o doc fixes
o new calc_item_height() -> const
o Added a needed ABI ifdef



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9380 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 14:21:08 +00:00
Greg Ercolano f58cd169c0 Various mods for Fl_Tree
o Fix STR#2828 (E): {Vertical|Widget} Gap
    o Moved Fabien's reselected methods to Fl_Tree_Prefs,
      return method made const, doxygen, removed underbars from methods
      (to follow general API)
    o Widgets can now appear to the right of labels.
      This can be controlled with item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)
    o Cleaned up Fl_Tree_Item::draw(), Fl_Tree::draw()
    o New methods:
            marginbottom()       -- [ABI feature] extra space below last tree element when scrolling
            widgetmarginleft()   -- [ABI feature] space to left of widget
            usericonmarginleft() -- space to left of usericon
            labelmarginleft()    -- space to left of label
            item_draw_mode()     -- control how items, widget() are drawn
    o Updated Fl_Tree docs, tree-elements.png
    o test/tree: added sliders to test the above new features,
      added "open all" and "close all" buttons
    o Probably other stuff..


TODO: Fix "scroll-beyond-bottom" (STR#2796)
TODO: Fix other items in STR#2828



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 13:40:02 +00:00
Fabien Costantini 822bc272fc Fixed linux 64 gcc 4.6.1 compilation problems
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9373 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 02:45:09 +00:00
Matthias Melcher 4f7f902a00 Updated PNG library to current version 1.5.10
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9370 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 00:06:25 +00:00
Fabien Costantini 157a96aa4b STR2783: make potential null string substituted to an empty string, still achieve internal cleanup in Fl_Text_Buffer::text(s)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 15:05:00 +00:00
Greg Ercolano d741da4317 indent fixes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-18 08:23:35 +00:00
Fabien Costantini 1d3f79bc23 Made homogen the scope of the new fl_tree enum with previous Fl_Tree_Reason enum.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-16 03:29:56 +00:00
Fabien Costantini 0f493a9739 Fixed comment was misplaced in new tree api
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-15 20:47:02 +00:00
Fabien Costantini b31264e473 STR 2827 implementation. Implemented Reselect code and related API all within ABI controlled preprocessor blocks because of new attribute defintion would break ABI anyway. Because the code is already ABI controlled, I took the opportunity to keep keep the REASON enum sorted. Added test code in Tree.fl adequately.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-15 20:11:36 +00:00
Greg Ercolano efe0b2b939 Removed old TODO items that have been addressed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9346 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-14 20:37:55 +00:00
Greg Ercolano 3cf006f5c3 Solves STR #2681.
Added ABI-breaking Fl_Table::scrollbar_size() with new ABI #ifdefs.
tests/unittests program modified to test this feature if enabled.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-14 20:35:56 +00:00
Manolo Gouy e0fca85c74 Added missing initialization in Fl_Paged_Device constructor
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9343 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-13 16:57:14 +00:00
Greg Ercolano 418dd143f0 ABI modifications to Fl_Tree: deprecate mouse selection hotfix with proper solution.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-13 02:51:15 +00:00
Albrecht Schlosser c28adce903 Fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9338 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-10 21:18:35 +00:00
Manolo Gouy 60d448d150 Removed Fl_Widget::is_fullscreen() that is just another name for Fl_Window::fullscreen_active()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9331 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-09 09:12:34 +00:00
Albrecht Schlosser abbd9839bf Fix MS VC++ (2008/2010) compiler error, as discussed in fltk.general in
thread "Compilation error on windows VS 2010 (r9300)" of Mar 24, 2012.
Only the "static" attribute had to be fixed now, since the enum access
problem had been fixed before (r 9325).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9327 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 15:04:43 +00:00
Albrecht Schlosser 8ed93f0065 fix a typo and indenting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 14:30:19 +00:00
Fabien Costantini 8809c5d65d Fixed build error in msvs because Fl ref to FULLSCREEN enum was not accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 05:12:30 +00:00
Manolo Gouy ae4d6338b8 WIN32: Fl_Pixmap printing uses a global variable called win_pixmap_bg_color equal to the color
used for the pixmap background, and treats this color as transparent. FLTK assigns to this variable
a color unused by the processed pixmap. In theory this variable should be specific to each processed
pixmap. In practice, it's very unlikely that several values are needed. A new member variable is
added to the Fl_Pixmap object to hold this value. This member is made static if FLTK_ABI_VERSION
< 10302 for ABI compatibility. The correct thing, though, is for a non-static member.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-28 13:19:33 +00:00
Manolo Gouy 0b6f546b0f Added support for the additional key of ISO keyboards (aka 102-key keyboards) named FL_Iso_Key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-26 16:54:54 +00:00
Manolo Gouy 08ce2e07d3 Fix STR#2641: true fullscreen windows that cover all their screen including menu bar, task bar, dock.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23 16:47:53 +00:00
Manolo Gouy 32d4bc4099 Fix STR#2810: removed all uses of function Fl_Device::class_name().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9293 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-18 18:48:29 +00:00
Manolo Gouy f6cb583e27 Replaced fl_copy_offscreen_with_alpha() by Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha() and
fl_create_offscreen_with_alpha() by Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 11:55:50 +00:00
Greg Ercolano 40ece0489e Added commented out FLTK_ABI_VERSION macro definition
that users and devs can uncomment to enable ABI breaking features/fixes.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-05 23:42:07 +00:00
Manolo Gouy 4e3f9e2ab3 The Fl_Paged_Device destructor is made public instead of protected to ease the use of custom
Fl_Paged_Device subclasses at the application level. 
This is protected by #if FLTK_ABI_VERSION >= 10302

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-04 18:24:38 +00:00
Manolo Gouy 5237b2bc76 The virtual member functions of the Fl_Graphics_Driver abstract class that were set to 0 are now set to
do-nothing to ease the construction of specialized Fl_Graphics_Driver subclasses at the application level.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-04 18:18:03 +00:00
Manolo Gouy da5c3c2cbc Added missing #include <stdlib.h>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9237 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-17 09:19:15 +00:00
Manolo Gouy 477febec7b Added missing initialization/deallocation of member variables of class Fl_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-16 13:09:34 +00:00
Michael R Sweet e3f407427c Pass through menu() accessor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9234 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-13 22:09:14 +00:00
Greg Ercolano 9a4ef219de Fl_Tree optimizations for selecting large trees (100k items).
Added _next_sibling and _prev_sibling to Fl_Tree_Item class to make 
next_sibling() and prev_sibling() more efficient during item selection.
Used new FLTK_ABI_VERSION macro (as designed by Greg and Albrecht on fltk.dev) to protect the ABI breaking features.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-19 12:44:26 +00:00
Albrecht Schlosser 92d846caa4 Fixed Fl_Preferences documentation typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-18 11:39:57 +00:00
Manolo Gouy b8d34a254f Fixed the use of FL_SUBMENU_POINTER in Fl_Sys_Menu_Bar objects (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-12 16:00:07 +00:00
Greg Ercolano 94563a2d33 Improved docs, added example image
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9203 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-08 18:18:51 +00:00
Greg Ercolano 759794dbdb Added docs to show how to walk the menu array.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9202 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-08 17:10:11 +00:00
Manolo Gouy 900fe72b8a Fixed the Doxygen comments of the Fl_Overlay_Window class.
The description of Fl_Overlay_Window ::draw_overlay() didn't appear in Doxygen,
and Fl_Overlay_Window::can_do_overlay() wasn't commented.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-07 13:40:39 +00:00
Greg Ercolano 272475dde4 Fixing STR #2786; clipping problem with child FLTK widgets.
Replication: Run 'tree' demo, open '500 items' subtree, change 'connector width' to 100..
the "D2" and "ccc" buttons would overdraw the scrollbar. (Not the regular tree items)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-06 21:08:07 +00:00