Many thanks for putting-in those pop-up menu changes.
Two requests please that have come from experimenting with your changes:
Can you please a method so that we can query if the pop-up is visible (e.g. const bool getPopupVislble() )? The reason for this is that one of my apps needs (in two separate sub-classes of TextEditor, that do different things) to check this when handling loss-of-focus events. I’d handled this in previous Juce builds by modifying the class to look at an exposed menuVisible member variable, but that has now disappeared.
Could you please add a new method to PopupMenu to allow a menu to be added/merged-in at a specific index location at the “top level” of the menu, rather than only in a sub-menu? That will enable me to reposition the default copy/cut etc. menu items provided by addPopupMenuItems, at whatever location I want (e.g. by adding some menu items above them in the list). I want my menu items to appear earlier, but at the same level. I know that I could alternatively copy the supplied PopupMenu to a local PopUpMenu, then clear the supplied PopUpMenu, then add-back the local copy of the original menu as a sub menu, but that isn’t quite the effect I want.
Hoping that makes sense.