public interface WLXPluginInterface
| Modifier and Type | Field and Description |
|---|---|
static int |
LC_COPY
listSendCommand: Copy current selection to the clipboard.
|
static int |
LC_NEWPARAMS
listSendCommand: New parameters passed to plugin, see LCP_* constants.
|
static int |
LC_SELECT_ALL
listSendCommand: Select the whole contents.
|
static int |
LC_SETPERCENT
listSendCommand: Go to new position in document (in percent).
|
static int |
LCP_ANSI
listSendCommand: Ansi charset is checked.
|
static int |
LCP_ASCII
listSendCommand: Ascii(DOS) charset is checked.
|
static int |
LCP_CENTER
listSendCommand: the image needs to be centered.
|
static int |
LCP_FITLARGERONLY
listSendCommand: in addition to LCP_FITTOWINDOW.
|
static int |
LCP_FITTOWINDOW
listSendCommand: Images: Fit image to window is checked.
|
static int |
LCP_FORCESHOW
listSendCommand: force show lister window.
|
static int |
LCP_VARIABLE
listSendCommand: Variable width charset is checked.
|
static int |
LCP_WRAPTEXT
listSendCommand: Text: Word wrap mode is checked.
|
static int |
LCS_BACKWARDS
listSearchText: Search backwards towards the beginning of the file.
|
static int |
LCS_FINDFIRST
listSearchText: String to be searched.
|
static int |
LCS_MATCHCASE
listSearchText: Search from the beginning of the first displayed line
(not set: find next).
|
static int |
LCS_WHOLEWORDS
listSearchText: The search string is to be treated case-sensitively.
|
static int |
LISTPLUGIN_ERROR
something is wrong.
|
static int |
LISTPLUGIN_OK
everything is ok.
|
| Modifier and Type | Method and Description |
|---|---|
void |
listCloseWindow(int listWin)
ListCloseWindow is called when a user closes lister, or loads a different
file.
|
void |
listDefaultGetParams(DefaultParam dps)
ListSetDefaultParams is called immediately after loading the DLL, before
ListLoad.
|
java.lang.String |
listGetDetectString(int maxLen)
ListGetDetectString is called when the plugin is loaded for the first
time.
|
java.lang.Object |
listGetPreviewBitmap(java.lang.String fileToLoad,
int width,
int height,
java.lang.String contentBuf,
int contentBufLen,
java.lang.StringBuffer filename)
ListGetPreviewBitmap is called to retrieve a bitmap for the thumbnails
view.
|
int |
listLoad(int parentWin,
java.lang.String input,
int showFlags)
ListLoad is called when a user opens lister with F3 or the Quick View
Panel with Ctrl+Q, and when the definition string either doesn't exist,
or its evaluation returns true.
|
int |
listLoadNext(int parentWin,
int listWin,
java.lang.String fileToLoad,
int showFlags)
New in Total Commander 7: ListLoadNext is called when a user switches to
the next or previous file in lister with 'n' or 'p' keys, or goes to the
next/previous file in the Quick View Panel, and when the definition
string either doesn't exist, or its evaluation returns true.
|
int |
listNotificationReceived(int listWin,
int message,
int wParam,
int lParam)
ListNotificationReceived is called when the parent window receives a
notification message from the child window: WM_COMMAND, WM_NOTIFY,
WM_MEASUREITEM or WM_DRAWITEM.
|
int |
listPrint(int listWin,
java.lang.String fileToPrint,
java.lang.String defPrinter,
int printFlags,
java.awt.Rectangle margins)
ListPrint is called when the user chooses the print function.
|
int |
listSearchDialog(int listWin,
int findNext)
ListSearchDialog is called when the user tries to find text in the
plugin.
|
int |
listSearchText(int handle,
java.lang.String searchString,
int searchParameter)
ListListSearchText is called when the user tries to find text in the
plugin.
|
int |
listSendCommand(int listWin,
int command,
int parameter)
ListSendCommand is called when the user changes some options in Lister's
menu.
|
static final int LISTPLUGIN_OK
static final int LISTPLUGIN_ERROR
static final int LCS_FINDFIRST
static final int LCS_MATCHCASE
static final int LCS_WHOLEWORDS
static final int LCS_BACKWARDS
static final int LC_COPY
static final int LC_NEWPARAMS
static final int LC_SELECT_ALL
static final int LC_SETPERCENT
static final int LCP_WRAPTEXT
static final int LCP_FITTOWINDOW
static final int LCP_ANSI
static final int LCP_ASCII
static final int LCP_VARIABLE
static final int LCP_FORCESHOW
static final int LCP_FITLARGERONLY
static final int LCP_CENTER
int listLoad(int parentWin,
java.lang.String input,
int showFlags)
parentWin - This is lister's window. Create your plugin window as a child
of this window.input - The name of the file which has to be loaded.showFlags - A combination of the following flags:
void listCloseWindow(int listWin)
listWin - This is the window handle which needs to be destroyed.java.lang.String listGetDetectString(int maxLen)
maxLen - Maximum length, in bytes, of the detection string (currently
2k).int listSearchText(int handle,
java.lang.String searchString,
int searchParameter)
handle - Handle to your list window created with ListLoadsearchString - String to be searched.searchParameter - A combination of the following search flags: LCS_FINDFIRST,
LCS_MATCHCASE, LCS_WHOLEWORDS, LCS_BACKWARDSint listSendCommand(int listWin,
int command,
int parameter)
listWin - hande to your list window created with ListLoadcommand - One of the following commands: LC_COPY, LC_NEWPARAMS,
LC_SELECT_ALL, LC_SETPERCENTparameter - Used for lc_newparams. May be a combination of:
LCP_FITTOWINDOW, LCP_ANSI, LCP_ASCII, LCP_VARIABLE,
LCP_WRAPTEXT, LCP_FORCESHOWint listPrint(int listWin,
java.lang.String fileToPrint,
java.lang.String defPrinter,
int printFlags,
java.awt.Rectangle margins)
listWin - Hande to your list window created with ListLoadfileToPrint - The full name of the file which needs to be printed. This is
the same file as loaded with ListLoad.defPrinter - Name of the printer currently chosen in Total Commander. May
be NULL (use default printer).printFlags - Currently not used (set to 0). May be used in a later version.margins - The left, top, right and bottom margins of the print area, in
MM_LOMETRIC measurement units (1/10 mm). May be ignored.int listNotificationReceived(int listWin,
int message,
int wParam,
int lParam)
listWin - Hande to your list window created with ListLoadmessage - The received message, one of the following: WM_COMMAND,
WM_NOTIFY, WM_MEASUREITEM or WM_DRAWITEM. (from winuser.h)wParam - The WPARAM parameter of the message.lParam - The LPARAM parameter of the message.java.lang.Object listGetPreviewBitmap(java.lang.String fileToLoad,
int width,
int height,
java.lang.String contentBuf,
int contentBufLen,
java.lang.StringBuffer filename)
fileToLoad - The name of the file for which to load the preview bitmap.width - Requested maximum width of the bitmap.height - Requested maximum height of the bitmapcontentBuf - The first 8 kBytes (8k) of the file. Often this is enough data
to show a reasonable preview, e.g. the first few lines of a
text file.contentBufLen - The length of the data passed in contentbuf. Please note that
contentbuf is not a 0 terminated string, it may contains 0
bytes in the middle! It's just the 1:1 contents of the first
8k of the file.filename - Here you need to return the bitmap handle. Three forms are
supported:
void listDefaultGetParams(DefaultParam dps)
dps - This structure of type ListDefaultParamStruct currently
contains the version number of the plugin interface, and the
suggested location for the settings file (ini file). It is
recommended to store any plugin-specific information either
directly in that file, or in that directory under a different
name. Make sure to use a unique header when storing data in
this file, because it is shared by other file system plugins!
If your plugin needs more than 1kbyte of data, you should use
your own ini file because ini files are limited to 64k.int listLoadNext(int parentWin,
int listWin,
java.lang.String fileToLoad,
int showFlags)
parentWin - This is lister's window. Your plugin window needs to be a
child of this windowlistWin - The plugin window returned by ListLoadfileToLoad - The name of the file which has to be loaded.showFlags - A combination of the following flags:
int listSearchDialog(int listWin,
int findNext)
listWin - Hande to your list window created with ListLoadfindNext - 0: FindFirst was chosen by the user