int WINAPI Viewer ( const char *FileName, const char *Title, int X1, int Y1, int X2, int Y2, DWORD Flags );
NULL, the file name will be used as the title.Y1 is less than zero it is considered as zero.
| Flag | Desciption |
|---|---|
| VF_DELETEONCLOSE | Instructs FAR to delete the viewed file after closing the viewer. If the directory containing the viewed file contains no other files, it will also be deleted. If only the file needs to be deleted use VF_DELETEONLYFILEONCLOSE. The file will not be deleted if the user pressed F6 to switch between viewing and editing, or if the same file is open in a different editor or viewer instance. |
| VF_DELETEONLYFILEONCLOSE | Similar to VF_DELETEONCLOSE, but only the file will be deleted. This flag has a lower priority than VF_DELETEONCLOSE. |
| VF_DISABLEHISTORY | Disables adding the file name to the viewer history (Alt-F11). By default, the file name is added to the history. |
| VF_ENABLE_F6 | Enables switching from viewer to editor by pressing F6. |
| VF_IMMEDIATERETURN | Allows the plugin to receive control immediately after the viewer is opened. The newly opened viewer becomes the active window. This flag makes sense only if combined with the VF_NONMODAL flag. |
| VF_NONMODAL | Creates a non-modal viewer 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 viewer is closed, or after the user switches to a different window (by pressing Ctrl-Tab). If you need to regain control immediately after the viewer has been opened, use the VF_IMMEDIATERETURN flag. |
TRUE if
successful or FALSE if the file cannot be opened. If the flag is specified, the
function always returns TRUE.