int WINAPI Editor( const char *FileName, const char *Title, int X1, int Y1, int X2, int Y2, DWORD Flags, int StartLine, int StartChar );
NULL, the file name will be used.| Flag | Description |
|---|---|
| EF_NONMODAL | Creates a non-modal editor window. If this flag is present, the user will
be able to switch to other FAR windows.
The plugin will regain control only after the editor is closed, or after the user switches to a different window (e.g. by pressing Ctrl+Tab). If you need to regain control immediately after the editor has been opened, use the EF_IMMEDIATERETURN flag. |
| EF_IMMEDIATERETURN | If this flag is set, the Editor function returns immediately after the editor has been opened. The newly opened editor becomes the active window. This flag can be used only with EF_NONMODAL. |
| EF_DELETEONCLOSE | Instructs FAR to delete the file being edited after the editor is closed.
If the directory with the edited file contains no other files, it will also be deleted. If
only the file needs to be deleted use the EF_DELETEONLYFILEONCLOSE flag. The file will not be deleted:
|
| EF_DELETEONLYFILEONCLOSE | Similar to EF_DELETEONCLOSE, but only the file will be deleted. The directory will not be deleted even if it is empty. This flag has a lower priority than EF_DELETEONCLOSE. |
| EF_CREATENEW | Opens a new (non-existing) file in the editor, similar to pressing Shift-F4 in FAR. |
| EF_ENABLE_F6 | Enables switching from the editor to the viewer by pressing F6. |
| EF_DISABLEHISTORY | Disables adding the file name to the view/edit history (Alt-F11). If this flag is not specified, the name is added to the history. |
| Returned value | Description |
|---|---|
| EEC_OPEN_ERROR | File open error, occurs in the following cases:
|
| EEC_MODIFIED | Successful return. File was modified. This value is also returned if the EF_NONMODAL flag was used. |
| EEC_NOT_MODIFIED | Successful return. File was not modified. |
| EEC_LOADING_INTERRUPTED | File loading was stopped by user. |