Actions of FrmMain
The actions in FrmMain take use much of class DocumentPane. They call some of the functions for files and documents available in this class. Also other functions are wrapped into actions.
In this section it is explained, how to make existing functions available to the user. The functions of stage 1 themselves are explained in 'Creating and storing documents' and in ' Documenting the application'.
Actions for the file menu
In the file menu, the basic actions on documents and files are selectable. Create new documents, open documents from file, save changes to documents, save new documents or save exisiting documents under a new name and finally exiting the application can be done by the user through this menu.
Actions for the help menu
The help menu makes all kinds of documentation available to the user. With stage 1 of application SimplyHTML the help menu has links to the help file (this tutorial), the API documentation and an 'About this application' dialog.
Action list and short description
SHTMLFileNewAction - create a new document and show it
SHTMLFileOpenAction - open an existing document and show it
SHTMLFileCloseAction - close a currently open document and take care of saving the document before closing if necessary
SHTMLFileCloseAllAction - close all currently open documents and take care of saving the documents before closing if necessary
SHTMLFileExitAction - exit the application and take care of saving open documents before closing if necessary
SHTMLFileSaveAction - save a document
SHTMLFileSaveAsAction- save a document under a new name
SHTMLHelpAppInfoAction - shows SimplyHTML's about dialog
SHTMLHelpShowContentsAction - brings up online help
Dynamic interaction
There is a certain dependability between some of the actions which requires to aviod redundancy of code in the design therefore. Using actions bears an advantage for this because it allows to build a more complex process by combining actions individually.
Especially see 'Avoiding loss of data in the close process' in the Spotlights section partly dealing with this issue too.