First cut at a refactoring to provide a style menu that sits on top of the existing popup menu code. The aim is to have the caller provide less code and for that code not to use quink internals.
This check point needs a lot of tidying, but more or less works. The state functions don't seem to work in all cases, but that may be an existing bug (or it may not...!).
Tidy and comment.
Make all 3 style menus use the new style menu code.
Tidy.
Reduce redundancy in the supplied style menu functions.
Refactor again to move more code into the editor which means that the client now needs to provide only the rule filter in order to create and use style menus.
Menu state function still not working correctly in all cases (mainly collapsed selection inside an applied style).
Tidy.