ViewerInfo

Far Manager

ViewerInfo

The ViewerInfo structure is used to get information about the current state of the internal viewer.
struct ViewerInfo
{
  int  StructSize;
  int  ViewerID;
  const char *FileName;
  FARINT64 FileSize;
  FARINT64 FilePos;
  int  WindowSizeX;
  int  WindowSizeY;
  DWORD Options;
  int  TabSize;
  struct ViewerMode CurMode;
  int  LeftPos;
  DWORD Reserved3;
};

Elements

StructSize
Size of the ViewerInfo structure. You must set this field.
ViewerID
Identifier of the viewer instance. Each viewer instance has a unique identifier that cannot be repeated during a FAR session.
FileName
Full path and name of the file beeing viewed.
FileSize
File size. Veriable of FARINT64 type.
FilePos
Current file position (absolute offset in bytes). Variable of FARINT64 type.
WindowSizeX, WindowSizeY
Width and height of the viewer window.
Options
Describes viewer options state. Can be a combination of the following flags (VIEWER_OPTIONS enum):
FlagDescription
VOPT_SAVEFILEPOSITION "Save file position"
VOPT_AUTODETECTTABLE "Autodetect character table"
TabSize
Tabulation size.
CurMode
A variable of ViewerMode type - additional information about the view mode.
LeftPos
Position of the left border of the viewer window in the viewed text.
Reserved3
Reserved for future use.
See also: