app: add persistent handle selection to GimpToolLine
En route to on-canvas gradient editing, add support for persistent handle selection to GimpToolLine (a handle being either an endpoint or a slider). Handles are selected through clicking, however, unlike before, the selection persists after the mouse is released. A new "selection" property specifies the currently-selected handle (who knows, maybe in the future we'll add multi-selection), and a new "selection-changed" signal is emitted when the selection changes. The visual feedback has been changed to better suit the new behavior, and the behaviors yet to be added: The selected handle is marked using highlighting; the highlighting doesn't change while hovering over other handles. Only the hit-test circle is used as hover indication, however, we use a fixed-size circle, and only show the circle for the currently hovered-over handle -- no more trippy expanding circles :) A few minor changes along the way: - The selected handle is now the (first) one that's closest to the cursor, instead of the first one to pass hit-testing. - We don't move the selectd handle upon button-press, only upon motion, so that handles can be selected without moving them. - Show a MOVE cursor modifier when hovering over a handle.
Showing with 370 additions and 252 deletions