The Editor Context Menu

The following Contenta choices have been appended to the standard editor Context menu:

  • Delete Contenta object <element name>
  • Select Contenta object <element name> for Moving or Copying
  • Move selected Contenta object <element name>
  • Copy selected Contenta object <element name>

Where <element name>, for:

  • The delete and select (first and second) options is the nearest object-mapped element to the cursor.
  • The move and copy (third and fourth) options are the currently selected object-mapped element; it is the name of the object-mapped element in the text buffer.

The move and copy options are only active when:

  • An element has previously been selected using the Contenta menu—there is data in the text buffer.
  • The cursor is in a location in the document where the element in the buffer can be placed according to the rules of structure (DTD)

If you insert a new object-mapped element then right-click in the element (but have not yet performed a Scan for New Objects) the items in the Context menu contain the element that is the nearest object-mapped element of the new element; it does not contain the name of the new object-mapped element. The document must be scanned (see Scan For New Objects) for the application to recognize the new object-mapped element to be valid elements for the options in the Context menu.

You can display the Context menu by:

  • Right-clicking the mouse over the document; the Context menu is automatically displayed and updated with the element name(s).
  • Pressing the Context menu key next to the Windows key on Windows-ready keyboards.
Assume the following DTD is being used for the document you are editing:
<!ELEMENT PLAY - - (TITLE, fm, PERSONAE, SCNDESCR, PLAYSUBT, INDUCT?><PROLOGUE?,
ACT+, EPILOGUE?)>
<!ELEMENT TITLE - - (#PCDATA)>
<!ELEMENT fm - - (p+)>
<!ELEMENT p - - (#PCDATA)>
<!ELEMENT PERSONAE - - (TITLE, (PERSONA | PGROUP)+)>
<!ELEMENT PGROUP - - (PERSONA+, GRPDESCR)>
<!ELEMENT PERSONA - - (#PCDATA)>
<!ELEMENT GRPDESCR - - (#PCDATA)>
<!ELEMENT SCNDESCR - - (#PCDATA)>
<!ELEMENT PLAYSUBT - - (#PCDATA)>
<!ELEMENT INDUCT - - (TITLE, SUBTITLE*, (SCENE+| (SPEECH|STAGEDIR|SUBHEAD)+))>
<!ELEMENT ACT - - (TITLE, SUBTITLE*, PROLOGUE?, SCENE+, EPILOGUE?)>
<!ELEMENT SCENE - - (TITLE, SUBTITLE*, (SPEECH | STAGEDIR | SUBHEAD)+)>
<!ELEMENT PROLOGUE - - (TITLE, SUBTITLE*, (STAGEDIR | SPEECH)+)>
<!ELEMENT EPILOGUE - - (TITLE, SUBTITLE*, (STAGEDIR | SPEECH)+)>
<!ELEMENT SPEECH - - (SPEAKER+, (LINE | STAGEDIR | SUBHEAD)+)>
<!ATTLIST SPEECH who CDATA #IMPLIED>
<!ELEMENT SPEAKER - - (#PCDATA)>
<!ELEMENT LINE - - (#PCDATA | STAGEDIR)*>
<!ELEMENT STAGEDIR - - (#PCDATA)>
<!ELEMENT SUBTITLE - - (#PCDATA)>
<!ELEMENT SUBHEAD - - (#PCDATA)>

Also assume the following object-mapped elements are defined for the document:

ElementContenta Object
PLAYCompoundDoc
FMDataModule
PGROUPCompoundDoc
PERSONAECompoundDoc
PERSONADataModule
ACTCompoundDoc
SCENECompoundDoc
SPEECHDataModule

If your cursor is inside the SPEECH element tag it is also inside the SCENE and ACT element tags. However SPEECH is the closest ancestor element tag that is mapped to a Contenta object so the Context menu items read:

  • Delete Contenta object SPEECH
  • Select Contenta object SPEECH for Moving or Copying

To find the nearest mapped element to where the mouse cursor is, right-click in the document and note the Delete Contenta... and Select Contenta...for Moving or Copying Context menu items; they contain the name of the nearest mapped element.