Viewer plugin

From TotalcmdWiki
Jump to: navigation, search

Viewer plugin (also known as filter in Lister) is a type of Lister extensions that provides additional images formats support for Lister, the quick view panel (Ctrl+Q) and thumbnails view of Total Commander file panels. Unlike WLX plugins, which are dynamic link libraries loaded by Lister, they are independent external applications.

The list of file types supported by Lister and Quick View with this method is defined with "Additional Irfanview/Xnview file types:" option on Multimedia tab of Lister Configuration dialog, or directly in wincmd.ini with IviewAdditionalTypes parameter of [Lister] section. List of file types for thumbnails generation with this method is defined with "Get from Irfan-/Xnview for:" option on Thumbnails page of Total Commander Configuration dialog or directly in wincmd.ini with ThumbIrfXnTypes parameter of [Configuration] section.

Viewer application has to be modified to be called from TC as a viewer plugin. Total Commander starts viewer instance hidden in background using the parameter /hidden. Then Total Commander sends the name of the image file to it via WM_COPYDATA Windows message, viewer converts the file to BMP format and then either sends the image back via clipboard (old method), or via another WM_COPYDATA call (new method). For thumbnails in file panels, Total Commander gets the whole image via WM_COPYDATA from the viewer, and then reduces it to the thumbnail size.

Following applications can be used with Lister as a viewer plugin: