Edit->Add->program
menu. This will open an editor in
a new level.
The editor has its own menu, you can open or import an existing (program) file inside the current text, save or export the current program. You can also use the editor menu to insert programming structure. There are buttons to find the next occurence of a search string, to parse the current program (errors are displayed in the messages area) and to save the program (the current filename is displayed at the right of the save button).
The keywords of the language are highlighted. In Xcas programming mode, the tabulation key may be used for indentation (experimental feature).
Tip: before pressing the OK button, make sure the programming syntax is the right one (look in the status area, if you need to change the syntax, hit the red cas button at the bottom left).