+// ----------------------------------------------------------------------------
+// private functions
+// ----------------------------------------------------------------------------
+
+// translate the key or mouse event flags to the type of selection we're
+// dealing with
+static void EventFlagsToSelType(long style,
+ bool shiftDown,
+ bool ctrlDown,
+ bool *is_multiple,
+ bool *extended_select,
+ bool *unselect_others)
+{
+ *is_multiple = (style & wxTR_MULTIPLE) != 0;
+ *extended_select = shiftDown && is_multiple;
+ *unselect_others = !(extended_select || (ctrlDown && is_multiple));
+}