Overview
 
This help file is about writing lister plugins for Total Commander. Lister system plugins will be loaded in lister (F3 or Ctrl+Q in Total Commander) to show special file contents.
 
The minimum function needed for a Lister plugin is:
ListLoad Tells the plugin to load a file and create a child window for it
 
The following are optional functions:
 
ListLoadNext Load next file with same plugin
ListCloseWindow Tells the plugin that the user switches to a different file or plugin
ListGetDetectString Allows Total Commander to detect the file types supported by the plugin without actually loading the plugin
ListSearchText The user tries to find text
ListSendCommand Passes various commands to the plugin
ListPrint Tells the plugin to print the displayed file
ListNotificationReceived The parent window of the plugin receives a notification message
ListSetDefaultParams Tells the plugin the interface version and default settings file
ListGetPreviewBitmap Can be used for thumbnail view to display a preview
ListSearchDialog Allows the plugin to show its own search dialog instead of the default dialog
 
How it works:
 
When a user opens lister with F3 or the Quick View Panel with Ctrl+Q, Total Commander checks the section [ListerPlugins] in wincmd.ini. For all plugins found, it checks for the nr_detect key (with nr the plugin number). If present, the string is used as a parse function for the file. This allows to load only the plugin which is responsible for a specific file type. If nr_detect isn't found, the plugin is loaded and ListGetDetectString is called (if present). If ListGetDetectString exists, its return value is stored in nr_detect.
 
If nr_detect isn't present, or parsing of nr_detect returns true, the ListLoad function is called. If ListLoad returns a window handle, the load process is complete. Otherwise the next plugin is checked (as above).
 
ListPrint is called if the user chooses the 'print' command from the menu.
 
ListSendCommand is called when the user chooses some other menu command, like select all, or copy to clipboard.
 
ListSearchText is called when the user uses the find or find next function.
 
ListCloseWindow will be called when a different file is loaded, or lister is closed. If ListCloseWindow isn't implemented, the window will simply be closed with DestroyWindow.
 
ListGetPreviewBitmap will be called to show a preview bitmap in thumbnail view. Please only implement this function if it makes sense for your type of images!
 
Note: It's extremely important to create a good detection string, especially if loading of your plugin is slow! With a good detection string, your plugin will only be loaded when needed. If you cannot make a good detection string, then make sure that your plugin doesn't have any static objects defined as global variables! These would be loaded with the DLL! Only create such objects in the ListLoad function!