I ask about this because I am in the process of writing two such editors for my Mega Man engine, one table editor and another level editor.
When I say a document editor, I mean the type of supernet application for things like image editors and text editors. They all share things like toolbars, menu options, and in the case of image editors and my applications, toolbars. We all know that there are tons of tips for designing the interface in these applications, but I'm interested in learning about programming tips.
In particular, I doubt my code projects with the following things:
- Many menu options toggle between different types of behavior. What is the proper way to reliably associate the checked state of an option with the behavior status? This is sometimes more difficult, since the options are disabled when there is no document loaded.
- More and more consensus seems to contradict the use of MDI, but how do I manage toolbars? For example, I cannot figure out how to make panels minimize and maximize along with the main window, such as Photoshop.
- When toolbars are responsible for a specific part of a document, who actually owns it? Main window or panel class?
- How do you communicate between toolbars and the main window? At present, everything depends on events, but it seems that there may be a better way.
This seems to be a common class of GUI application, but I have never seen specific pointers to code design for them. Could you offer any advice or experience that you have for writing them?
source share