Declaration:
int InsertMode;
This is the insert mode for the current Source . Assigning a value to InsertMode toggles the insert mode for the window.
Also, see Text Editor Functions.