You can create this application so simply because of the presenter class. The TDeimosPresenter class inherits from the TGUIPresenter class, which provides much of the basic functionality to the application. All you need to implement is a member function that creates a main view, a member function that creates an application-specific submain menu, and a member function that deactivates the submenu.
This uses a TStandardCanvasModel (a canvas representation) to store graphics and a TStandardCanvasView (a canvas view) to display them. It runs in a compound document and is ready to support undoable commands.
The following sections show the code for a simple GrafEdit application presenter.
NOTE The DeimosPresenter.h file, make file, and includes are not shown with this example.