mity/mctrl — pull request #10 by ArmstrongJ (2013-10-25 14:35:23+00:00)
Title: Support for sensible Treelist multiselect

This revision of multiselection is far more sensible for the tree paradigm. Users can use *Control* and *Shift* to select multiple entries as long as the entries all share the same immediate parent node. If an item that has a different immediate parent than the current selection(s) is clicked while holding *Control* and/or *Shift*, the click will actually just behave like a single click without the key modifiers, unselecting the old selections.

Collapsing a parent with selections will now appropriately select the parent node.

Selection changing notifications will report the last selected node as the old selection in cases where multiple nodes are already selected.

A new message, *MC_TLM_GETSELECTEDCOUNT* is provided to get the number of elements selected (meant to mirror *LVM_GETSELECTEDCOUNT*'s name.

To retrieve a list of selections, the user should use MC_TLM_GETNEXTITEM with MC_TLGN_CARET. The first selection can be retrieved with lParam set to null, and subsequent selected items can be retrieved by passing the last selected item returned as lParam in subsquent calls.

A minor fix for some flickering caused by mouse movements when no theme is present has been fixed by checking if a theme is present before invalidating hot items on mouse move.

To test all this, I would suggest simply setting *MC_TLS_MULTISEL* as a style in ex_treelist.c.