update and check the gui state in event handlers
I'm currently adding a functionality to display the scene from above on ctrl (+mousemove) over the map
It appears necessary to have the current gui "mode" or "state" stored somewhere (eg: "moving sliding marker in scene", "moving existing marker in scene", etc), and checked in handlers so that unwanted actions do not take place in the middle of another action.
It should also be useful for fixing consistently issues like #1 where expected events are unnoticed (occuring outside of the element or window), leaving some unwanted event handlers enabled.