Add methods 'set_selected_nodes' and 'set_selected_links' for setting selected items in node graph.
As name suggest, It would be great to have methods for selecting node editor items programmatically.
I tried to implement node duplication callback, and I would want to mark new duplicated nodes as selected. Unfortunately, I was unable to achieve this result.
Alternatively, we could add selected to the node or link config (and change it with configure_item). Then, use ImNodes::SelectNode() to change it, and ImNodes::IsNodeSelected() to update it from ImNodes...
However, at the moment, ImNodes::IsNodeSelected() is slow (it performs a linear search in std::vector), so it might be better to use dedicated functions (set/get_selected_nodes) rather than a per-node config field.