• Translate:

The viewer interface

Disclaimer: This article is a draft of the documentation. A more elaborated series of article is in progress.

The Viewer interface

When the internal Viewer is called to render a file, it’s in reality a separate process of FileVoyager that is launched.
By creating separate processes, the main FileVoyager process is safe from any crash or non-responsiveness of a Viewer instance.

In this chapter, we will see what are the parts that compose FileVoyager’s Viewer interface.
Here’s a typical window with its parts:

Doc02-Viewer_InterfaceDoc02-Viewer_Interface_MM

Legend

  1. The view modes toolbar
  2. The rendering area
  3. The main menu and the toolbar
  4. The file path
  5. The search panel
  6. The information bar
  7. The multimedia control panel
  8. The Playlist panel

 

The view modes toolbar

This toolbar contains the view modes supported. Usually, when a file is open in the Viewer, the view mode is automatically selected.
If the Viewer cannot identify the file format and the needed mode to render it, it falls back on the Binary mode by default.

Here are the 9 modes currently supported:

  • Text: This is the mode where any file can be rendered in flat mode, like a text file. But when the Viewer recognize a file extension as being a supported source code extension, it display the file with syntax highlighting thanks to Scintilla.
    It support CR+LF (carriage return + line feed) like for windows, CR like Apple and LF like Unix/Linux for determining the line breaks.
    The text mode displays a margin with the line numbers.
  • Binary: This mode is a kind of Text mode but it displays the non printable characters and has a fixed and limited column width (80 characters). It doesn’t take the CR and LF (carriage return and line feed) of the file into account to break the lines.
  • Hexa: This mode is similar to the Binary mode. It enriches the regular Binary mode by displaying an Offset column and the hexadecimal representation of the bytes in the file. The number of characters displayed per line is 16.
  • Unicode: This mode displays the text files encoded with a multibytes character set (MBCS). It support UTF-16 Little endian and UTF-16 Big endian.
  • U-Hex: This mode is similar to the Hexa mode but dedicated to Unicode files
  • MM: MM stands for multimedia. This is the mode where files of the categories Image, Audio and Video will be rendered.
    Supported images are rendered by FileVoyager’s internal engine.
    Supported audio and video files are those who are supported by the codecs installed on the host system. If no codecs are found, FileVoyager checks if the files are supported by the Windows Media Player engine. And if none of those support the file, FileVoyager try to render using the VLC codecs that comes with FileVoyager.
  • Windows: Windows has its own file preview system called “PreviewHandler”, this is the system used when activating the View Pane in the Windows Explorer. FileVoyager is also able to render those PreviewHandlers. Unfortunately, except some mainstream software like Acrobat Reader or MS Office, rare are the available PreviewHandlers.
  • Web: this is the mode where web pages (HTML, MHT,…) are displayed. It use the system’s Internet Explorer engine as rendering engine
  • SumatraPDF: FileVoyager comes with SumatraPDF embedded. SumatraPDF si one of the most powerful solution when it comes to display PDF, eBooks, ComicBooks and DJVU.
  • Info: This mode displays the NTFS summary of files. NTFS summary is a collection of metadata giving information on some files. Those metadata are nearly always present in Office documents.
    This mode also shows the PE infos. PE stands for “Portable Executable”. PE is the family of files with type EXE, DLL, ICL,…

The rendering area

This is the area where the viewed file is rendered according to the mode selected.

The main menu and the toolbar

This area contains the main menu and the main toolbar.

The main menu contains the following items:

  • File
    • Open: Displays a “Windows Open Dialog” allowing to choose a file that will be rendered
    • Save as…: Displays a “Windows Save As Dialog” allowing to define the path and the filename to save a copy of the file currently rendered
    • Save selection to file…: When rendering in a “Character modes” (Text, Binary, Hexa, Unicode, U-Hex or rtf), this action allows to save only the selected text into a new file that is defined thanks to a “Windows Save As Dialog”.
    • Export to HTML: When rendering in Text mode combined with syntax highlighting, this action allows to convert the file (usually a source code or param file) into an HTML file that can be rendered in a web browser. The filename and path are defined thanks to a “Windows Save As Dialog”.
    • Quit: Closes the Viewer. This action is not available when the Viewer is embedded in one of the panes
  • Edit (This menu entry is only available when the file is currently rendered in a “Character modes” (Text, Binary, Hexa, Unicode, U-Hex or rtf))
    • Select line: This action selects the whole line where the cursor is.
    • Select all: This action selects the whole file.
    • Save selection to file…: This action allows to save only the selected text into a new file that is defined thanks to a “Windows Save As Dialog”.
    • Copy: This action copies the selected text into the Windows Clipboard.
    • Find…: This action opens the Search panel. If the search panel is already open, it will act like Find Next (see below).
    • Find Next: When a text to find is set, this action searches the first occurrence of the text, after the cursor.
    • Find previous: When a text to find is set, this action searches the first occurrence of the text, before the cursor.
    • Go to: This action opens a small dialog box to enter a position value in the file to go to. The position value can be expressed in:
      • Line: The value represents the number of the line to go to
      • Percent: The value represents the position in the file expressed in percents
      • Offset: The value represent the position in the file expressed in bytes
      • Offset Hex: Same as Offset, but the value is expressed in Hexadecimal
    • Lexer – xxx: Allows to choose a language according which the syntax highlighting will be ruled. In real usage, the xxx will be replaced by the name of the current language chosen.
    • CodePage type – xxx: Allows to choose a code page to render the file. In real usage, the xxx will be replaced by the name of the current code page chosen. The list of the available code pages is provided by the Windows sub system and can vary between different installations of FileVoyager, even if those are from the same version.
      UTF-16 Big Endian and Little Endian are only available from the Unicode mode and are the only available code pages in that mode.

The file path

This is simply the path of the currently viewed file.

The search panel

The search panel is a panel that appears when the “Find” action is called. It contains several elements to help searching textual content in the currently rendered file. The Search panel can be invoked only when the current file is rendered in Text, Binary, Hexa, Unicode, U-Hex and RTF(UTF-8) modes.

  • The text content edit box: This edit box contains the text to be searched.
  • Find previous: When pressed, searches the occurrence of the text before the cursor.
  • Find next: When pressed, searches the occurrence of the text after the cursor.
  • Hexadecimal: On/off button. When pressed (on), indicates that the text in the edit box is an hexadecimal representation of the value to find.
  • Highlight all: On/off button. When pressed (on), indicates that all the matching occurrences to text in the edit box must be highlighted. For performance reasons, this option is set to “off” by default when the file is bigger than 50 MB.
  • Match case: On/off button. When pressed (on), indicates that the text in the edit box is to be found in the file with the exact same case.
  • Whole word: On/off button. When pressed (on), indicates that the text in the edit box is to be found as a complete word, and not as a subset of a word.
  • Close button: Simply displaying a red “X”, this button closes/hides the Search Panel.

Note that the Web mode and the SumatraPDF mode have their own internal Search capabilities.

The information bar

This bar is only visible when the current file is rendered in Text, Binary, Hexa, Unicode, U-Hex and RTF(UTF-8) modes. It contains several useful information about the currently open file and the navigation inside the file:

  • Row: Indicates the line number of the caret (cursor) position.
  • Column: Indicates the column number of the caret (cursor) position.
  • Offset: Indicates the global position of the caret (cursor) in the file.
  • Selection length: Indicates the number of characters currently selected.
  • File size: Displays the file size in bytes and, between parenthesis, in dynamic units (e.g. MB, KB, etc).
  • Lexer: Indicates the name of the lexer used for the syntax highlighting. If no lexer is used then the value is null. This field is also a drop down list where the user can choose the lexer to use.
  • Codepage type: Shows the current codepage used to render the file. This field is also a drop down list where the user can choose the codepage to use.

The multimedia control panel

This panel is only visible in MM (MultiMedia) mode. It contains all the controls that allow interaction with a multimedia file, plus some information about the file. The panel is divided in three parts

Doc02-Viewer_Multimedia_Controls 1. The track slider

The track slider is the cursor on top of the control panel. It shows the progress of the playback of the media file. You can drag the track slider left to rewind or right to forward the track being played.

2. The playback control panel

The panel contains the usual playback actions and some extra tools.

Doc02-Viewer_Multimedia_Controls_Playback

3. The multimedia info panel

This panel displays:

  • The cover of the track when it exists in the file (in the ID3 tags).
    If no cover is displayed, it means that the file doesn’t contain the cover, or that FileVoyager failed to extract or to render it.
  • The file name, the time position of the playback, the total duration of the track and some meta tags (title, artist and album).
    The meta tags are only displayed if available and supported by FileVoyager.
    Meta tags can be read from many audio formats including MP3, OGG (Ogg Vorbis), WAV, WMA (Windows Media Audio), FLAC, APE (Monkey’s Audio), MPC (Musepack), OFR (OptimFROG) and TTA (True Audio)
  • An audio representation, under the form of spectrums or bars, loosely interpreted from the audio track.
    This representation is only visible if FileVoyager is rendering the file using the DirectShow framework.
    By clicking on the spectrum, the rendering changes. There are 10 renderings available: 5 spectrums and 5 bars (see picture below)Doc02-Viewer_Multimedia_Controls_SpectrumBars

The Playlist panel

coming soon

The viewer interface was last modified: November 20th, 2016 by FileVoyager

Comments are closed.