I'm asking this because I'm in the process of writing two such editors for my Mega Man engine, one a tileset editor, and another a level editor.
When I say document editor, I mean the superset application type for things like image editors and text editors. All of these share things like toolbars, menu options, and in the case of image editors, and my apps, tool panes. We all know there's tons of advice out there for interface design in these apps, but I'm wondering about programming advice.
Specifically, I'm doubting my code designs with the following things:
Many menu options toggle various behaviors. What's the proper way to reliably tie the checked state of the option with the status of the behavior? Sometimes it's more complicated, like options being disabled when there's no document loaded.
More and more consensus seems to be against using MDI, but how should I control tool panes? For example, I can't figure out how to get the panels to minimize and maximize along with the main window, like Photoshop does.
When tool panels are responsible for a particular part of the document, who actually owns that thing? The main window, or the panel class?
How do you do communication between the tool panels and the main window? Currently mine is all event based but it seems like there could be a better way.
This seems to be a common class of gui application, but I've never seen specific pointers on code design for them. Could you please offer whatever advice or experience you have for writing them?