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
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
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
> A user click on the tree's background does a 'deselect all'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
> Prevent 'changed' flag from being set during reselect
> test/tree.fl: added chooser so user can test with item reselect enabled|disabled
(Chooser deactivated if the ABI option is not enabled)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
o Don't draw FLTK widgets outside tree's viewport.
o Added tree-as-container.cxx example program, demos tree
w/50k tree items each with 6 widgets (300k total)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
PLEASE check this is OK, I don't have access to test systems here...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
by compute_macKeyLookUp() in file src/Fl_get_key_mac.cx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
> Added docs to utf8_input_filter() function
> Documented its variables
> Added comments to its code so it can be better understood in the future.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
Modified the menubar demo program to exercise the Fl_Sys_Menu_Bar class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9218 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
(Adding 60k items took forever, and drawing them
caused wraparound drawing issues and scrolling slowness)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Regression was from svn r8630 (STR #2615), adding fl_line_style() settings
that turned out to cause side effects on fl_round_box drawing and others.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9211 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
have been re-using "borrowed" code with inappropriate licensing.
NOTE: It is not expected that this makes any real difference, it
is assumed that all modern hosts actually provice their own
scandir implementation and that the code (now excised) was orpahned
a long, long time ago...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9210 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
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
to honor maximum_size() as number of allowed characters (STR #2747).
This was a hangover from FLTK 1.1, where the number of bytes was equal
to the number of characters.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Thanks to Mathieu Peyrega for the patch in fltk.general [1] on Nov 14, 2011,
although I implemented it differently.
[1] http://www.fltk.org/newsgroups.php?gfltk.general+v:33946
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Removed some hardcoded arrays in favor of dynamic,
and created a new macro with 32768 and used it for remaining pathname arrays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
causing change in row/col selection of Fl_Table_Row.
As reported by David Lopez in fltk.general on 11/09/2011, Subject: Popup menu over Fl_Table.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fixed saving of the paper size preference for the "Print to File" printer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9158 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
"About ..." item of the application menu. This issue appeared with OS X 10.7.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
using the keyboard (space or shortcut) (STR #2748).
This regression was introduced in svn r7826 and released with FLTK 1.3.0 (!)
to add visual feedback for Fl_Button's using the keyboard (STR #2372).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
window failed under OS X 10.7. It's replaced by a simpler, OS version-independent procedure.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
A new event FL_SCREEN_CONFIGURATION_CHANGED is introduced.
Fl::add_handler() allows to register a callback for this event.
The unix/X11 implementation is still missing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This introduces 3 new functions
static void Fl::screen_work_area(X,Y,W,H)
static void Fl::screen_work_area(X,Y,W,H,mx,my)
static void Fl::screen_work_area(X,Y,W,H,screen_no)
that compute screen work areas and are used by FLTK to position menu windows.
The Fl::x(),y(),w(),h() functions are made consistent across platforms: they return
the origin/size of the work area of the main screen (as far as possible, see below).
On the Mac OS platform, all screen functions reflect changes in screen number and
positions without requiring the application to restart.
On the X11 platform, I did not find an API to compute the main screen work area
in all conditions. What's used does compute the correct work area when there's
a single screen, but not when there are several, because it returns an area that
encompasses all screens. The implemented workaround is that Fl::x(),y(),w(),h()
and Fl::screen_work_area(X,Y,W,H,0) return the exact work area when there's
a single screen, and return the full screen area when there are several.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
entire window area instead of the top left corner only to find the
screen to put the window on (Windows only).
Note that this *should* be changed to use the work area instead of
the screen area, as discussed in fltk.development.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This is not the whole story, but is better.
We were messing up the initialisation of num_screens on Win32 in that
it was being set to a non-zero value by a call to
GetSystemMetrics(SM_CMONITORS) but was then subsequently incremented
even higher by each iteration call to the screen_cb(...) function,
so what we were storing for the screen rectangles was a bit messed up.
Under fltk-1.1, the code used to explicitly reset num_screens to zero
before starting to iterate the screen_cb(...) function, so that worked OK.
I have sort-of restored that behaviour, and removed the (now redundant)
call to GetSystemMetrics(SM_CMONITORS) since we *always* enumerate the
monitors now to get the per-screen DPI values out.
I've also put in a commented out stub where we could store the per-screen
work-area, which it seems we do also need now, though I have not yet
contrived to actually implement that.
Volunteers welcomed...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
if any, hosts actually use this code now.
Will only trigger on hosts using gcc though, so may not help at all...
This is part of trying to remove this (possibly) not fltk license
compliant code from the codebase.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8913 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Setting some flags in a terminating Fl_Menu_Item (one with
a NULL label/text/name) caused an endless loop.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This had been previously done in r.8282 and r.8286 without accounting for
the existence of the Fl_File_Chooser.fl file. With this commit, files
Fl_File_Chooser.{cxx, H} are properly generated by Fl_File_Chooser.fl
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
when the window is iconized for all platforms.
Also, factorized some duplicated code in src/Fl_x.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
title bar-containing window, so we resign printing the window decoration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
converters to X image formats would access one more pixel per line
for images with odd widths.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8731 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fix array bounds error when Xinerama and Xlib disagree about number of screens.
Fix setting vertical resolution (dpi) of different monitors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8727 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Remove FL_EXPORT from fl_clip_region() since this is an inline function
on all platforms (and issued a warning when building fltkdll with MS VC++).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
main screen's work area (system-occupied space excluded); Fl::screen_xywh() functions
instead compute the full width and height of a screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
either deleting the corresponding FLTK window, or recreating the X11 window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
In particular, ensure that if we redefine WINVER we undef it first (if it is already set) and also ensure that it is set before we include windows.h (by any hidden nested path!) in Fl.cxx.
Previously, we were hitting issues with WINVER being redefined in some build cases, e.g. with --enable-cairo set on a win32 build.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
that sets the window name when it is iconized (or minimized).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The context removal on Fl_Gl_Window::handle() destroyed the GL colors when the window
is remapped.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
In summary, if you measured the string *before* the selected font had been used to actually fl_draw() anything, the measurement returned was invalid, as the new font was not "locked in" to the gc.
This change makes sure the selected font is set in the gc before making the measurement.
In tests, this appears to work correctly now...
More opinions welcomed!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This might not be correct (though I think it is) but should be no worse than the current mess I made...
Please test with as many different win32/64 compilers as possible and let me know!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
FL_ROUND_DOWN_BOX) on Linux (STR #2615). This was done by
(a) setting the line width in the box drawing function (was undefined, maybe 0)
(b) taking care of zero and negative line width in X11 clipping functions.
Both solutions would have solved the particular problem individually.
Additionally made local helper function fl_arc_i() in src/fl_round_box.cxx
static to avoid name clashes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The new code makes the STR #2598 changes unix-specific so it does not
interact with the WIN32 platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_Paged_Device::print_window() where the window didn't redraw well in some
cases after printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The win32 text-extents stuff now seems to be handling surrogate pairs correctly,
at least in my testing harness, and with a variety of supplementary plane fonts.
I really will leave this alone now - unless anyone finds bugs of course!
I have tested for regressions and it seems to be fine AFAICT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
if (winclass != kHelpWindowClass)
is now replaced in Fl_cocoa.mm by its exact equivalent:
if ( w->border() || (!w->modal() && !w->tooltip_window()) )
so that tooltip windows are handled as in carbon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8601 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
workaround for text_extents being measured on glyphs from
supplementary Unicode planes.
It has no effect on glyphs from the Basic plane, so should not
be visible at all to most code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8600 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
badly formed UTF8 strings.
This probably is not the best solution, but it
does work.
Note that the problem actually seems to be in
setting the window title, and indeed if you try to
label ANY window with a badly formed UTF8 string
(not just a tooltip) you get the same exception
thrown.
NOTE: I'm not even sure why we try to set the
window title in tooltips, as it is never used
and the tooltip label itlsef still works fine.
Anyway, we can do something better, but this will
work for now.
Aside: If you close an app on OSX whilst a tooltip
is visible, the app will not exit, as there is still
a window open (the tooltip) but no way to cancel
the tooltip.
Don't know if this is OSX specific or not though
but it is certainly a bug.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
I found some kind of weird interaction with some symbol fonts that
covered the supplementary planes that meant we could not measure
the width correctly (although we did measure the text extents correctly.)
This mod mirrors what we do for non-surrogate-pair glyphs more
closely and appears to do the Righ Thing now, at least for the test fonts that I have, and which were exhibiting the aberrant behaviour before.
I don't think I have broken anything else in the meantime!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8597 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
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