To implement the Edit menu, the LosingFocusCallback is used to verify if a selection is done so the Cut and Copy item menus are sensitives. As soon as the text is unselected, the options Cut and Copy are inhibited and only the option Paste can be executed. The function XmTextCut, XmTextCopy and XmTextPaste were used to implement these options. For almost each option from the menus HTML , Styles and Lists the sequence is to select a text, a dialog window verify if the information is right and the correspondent HTML are inserted in the text. Mainly the option Title , Header , Header and Link are implemented different.
Title always verify for existing title in the documents to replace it.
It also updates the Title window to show the current title of the Document. A dialog prompt widget is used to enter the text of the title. The user also can select a text and this can be copy as a title of the document. Header uses a radio box widget to set the size of the header between 1 to 6. Link uses a SelectionBoxDialog to set two text fields, one for the URL name and the other for the reference name.