- // invoking window
- void SetInvokingWindow(wxWindow *win) { m_invokingWindow = win; }
- wxWindow *GetInvokingWindow() const { return m_invokingWindow; }
+ // Invoking window: this is set by wxWindow::PopupMenu() before showing a
+ // popup menu and reset after it's hidden. Notice that GetInvokingWindow()
+ // recurses upwards and will return the invoking window for any submenu of
+ // a popup menu as well as the menu itself.
+ void SetInvokingWindow(wxWindow *win);
+ wxWindow *GetInvokingWindow() const;
+
+ // the window associated with this menu: this is the invoking window for
+ // popup menus or the top level window to which the menu bar is attached
+ // for menus which are part of a menu bar
+ wxWindow *GetWindow() const;