|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplugins.wlx.WLXPluginAdapter
public abstract class WLXPluginAdapter
| Field Summary |
|---|
| Fields inherited from interface plugins.wlx.WLXPluginInterface |
|---|
LC_COPY, LC_NEWPARAMS, LC_SELECT_ALL, LC_SETPERCENT, LCP_ANSI, LCP_ASCII, LCP_CENTER, LCP_FITLARGERONLY, LCP_FITTOWINDOW, LCP_FORCESHOW, LCP_VARIABLE, LCP_WRAPTEXT, LCS_BACKWARDS, LCS_FINDFIRST, LCS_MATCHCASE, LCS_WHOLEWORDS, LISTPLUGIN_ERROR, LISTPLUGIN_OK |
| Constructor Summary | |
|---|---|
WLXPluginAdapter()
|
|
| Method Summary | |
|---|---|
int |
getHWND(java.lang.Object component)
getHWMD is a callback function, to get the window handle of an AWT component. |
int |
getHWND2(javax.swing.JFrame frame)
getHWMD2 is a callback function, to get the window handle of a JFrame. |
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. |
abstract 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. |
abstract 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. |
protected void |
setSize(int hwnd,
int width,
int height)
Set the size of the lister window client area. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WLXPluginAdapter()
| Method Detail |
|---|
public final int getHWND(java.lang.Object component)
component - the component to get the HWND for
public final int getHWND2(javax.swing.JFrame frame)
frame - the JFrame to get the HWND window handle for.
protected final void setSize(int hwnd,
int width,
int height)
hwnd - the window handle of the lister windowwidth - the width of the client areaheight - the height of the client area
public abstract int listLoad(int parentWin,
java.lang.String input,
int showFlags)
listLoad in interface WLXPluginInterfaceparentWin - 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:
public void listCloseWindow(int listWin)
listCloseWindow in interface WLXPluginInterfacelistWin - This is the window handle which needs to be destroyed.public abstract java.lang.String listGetDetectString(int maxLen)
listGetDetectString in interface WLXPluginInterfacemaxLen - Maximum length, in bytes, of the detection string (currently
2k).
public int listSearchText(int handle,
java.lang.String searchString,
int searchParameter)
listSearchText in interface WLXPluginInterfacehandle - 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_BACKWARDS
public int listSendCommand(int listWin,
int command,
int parameter)
listSendCommand in interface WLXPluginInterfacelistWin - 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_FORCESHOW
public int listPrint(int listWin,
java.lang.String fileToPrint,
java.lang.String defPrinter,
int printFlags,
java.awt.Rectangle margins)
listPrint in interface WLXPluginInterfacelistWin - 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.
public int listNotificationReceived(int listWin,
int message,
int wParam,
int lParam)
listNotificationReceived in interface WLXPluginInterfacelistWin - 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.
public java.lang.Object listGetPreviewBitmap(java.lang.String fileToLoad,
int width,
int height,
java.lang.String contentBuf,
int contentBufLen,
java.lang.StringBuffer filename)
listGetPreviewBitmap in interface WLXPluginInterfacefileToLoad - 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:
public void listDefaultGetParams(DefaultParam dps)
listDefaultGetParams in interface WLXPluginInterfacedps - 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.
public int listLoadNext(int parentWin,
int listWin,
java.lang.String fileToLoad,
int showFlags)
listLoadNext in interface WLXPluginInterfaceparentWin - 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:
public int listSearchDialog(int listWin,
int findNext)
listSearchDialog in interface WLXPluginInterfacelistWin - Hande to your list window created with ListLoadfindNext - 0: FindFirst was chosen by the user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||