How to detect change in active a2dView
The active a2dView is changed in all cases via a2dView::Activate( bool ). This function sends events around which you can intercept.
See a2dEventDistributer on how to register a class for the intercepting wxEVT_ACTIVATE_VIEW. The wxEVT_ACTIVATE_VIEW_SENT_FROM_CHILD is sent to the m_display up to the wxWindow contaning the a2dView, and propagates up to the a2dDocumentFrame (wxFrame derived). You can intercept it at each level of nested windows staring from a2dView::m_display up till the a2dDocumentFrame. This last event does not require to register a class to the a2dEventDistributer first.