Request: can showMenuAsync() return the created Component*?


#1

Hi,

I am working on a search component in the style of MacOS SpotLight / Windows search. I thus have a TextEditor with a dropped menu as illustrated in the attached image.

The thing is that I want to be able to manipulate both components with the keyboard at the same time: up and down keys to navigate in the menu and left / right / other keys to edit the content of the TextEditor.
In order to implement this behaviour, the TextEditor always keeps the keyboard focus and the up and down (and enter) keys are forwarded to the menu.
To be able to implement this forwarding, I had to change PopupMenu::showMenuAsync() so as to recover the popup menu internal windows.

So my request is as following: can we change the return type of PopupMenu::showMenuAsync() to the Component* corresponding to the result of “createWindow()” in showWithOptionalCallback() ?
A priori, this should not raise any compatibility issue.

Thanks in advance !

Francis.