Changed Fl_Multi_Browser behaviour on the Mac OS platform so multiple selection

is done by cmd-click rather than ctrl-click, as is expected on this platform.
Also, updated the documentation to describe the effects of ctrl-, shift- and cmd-clicks.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10882 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-11-05 17:54:16 +00:00
parent d7d57f9113
commit da6dff26fc
2 changed files with 5 additions and 3 deletions

View File

@ -29,8 +29,10 @@
which lets the user select any set of the lines. The user interface which lets the user select any set of the lines. The user interface
is Macintosh style: clicking an item turns off all the others and is Macintosh style: clicking an item turns off all the others and
selects that one, dragging selects all the items the mouse moves over, selects that one, dragging selects all the items the mouse moves over,
and shift + click toggles the items. This is different then how forms and ctrl + click (Cmd+click on the Mac OS platform) toggles the items.
did it. Normally the callback is done when the user releases the Shift + click extends the selection until the clicked item.
This is different from how forms did it.
Normally the callback is done when the user releases the
mouse, but you can change this with when(). mouse, but you can change this with when().
<P>See Fl_Browser for methods to add and remove lines from the browser. <P>See Fl_Browser for methods to add and remove lines from the browser.
*/ */

View File

@ -813,7 +813,7 @@ J1:
} else { } else {
void* l = find_item(my); void* l = find_item(my);
whichway = 1; whichway = 1;
if (Fl::event_state(FL_CTRL)) { // toggle selection: if (Fl::event_state(FL_COMMAND)) { // toggle selection:
TOGGLE: TOGGLE:
if (l) { if (l) {
whichway = !item_selected(l); whichway = !item_selected(l);