Getting _recursive_ panel filelist

A place where plug-in developers can share their knowledge and experience.
Post Reply
pepak
Posts: 312
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 1 time
Been thanked: 9 times

Getting _recursive_ panel filelist

Post by pepak » Tue 19 Aug, 2008 13:51

I need to read all files and directories in a panel and all of its subdirectories. Which is quite easy to do with regular panels (it's just a matter of reading CurDir from the Panel and then using that to recursively call GetDirList). I am not so sure how to do it with plugin-based panels. I expect the code will be pretty much the same, except that I need to use GetPluginDirList instead of GetDirList. But I just can't figure out what parameters to use:

Code: Select all

int WINAPI GetPluginDirList(
  int PluginNumber,
  HANDLE hPlugin,
  const char *Dir,
  struct PluginPanelItem **pPanelItem,
  int *pItemsNumber
);
Dir, pPanelItem and pItemsNumber are the same as GetDirList and pretty obvious. I need to know how to get PluginNumber and hPlugin from PanelInfo. There just doesn't seem to be any way to find these values. PanelInfo does have a Plugin member, but that's just a boolean value according to the docs - and in any case, even if it did contain a handle, I would need the PluginNumber, too. What am I overlooking?

User avatar
Centaur
Posts: 1083
Joined: Tue 05 Apr, 2005 20:09
Location: Novosibirsk, Russia

Re: Getting _recursive_ panel filelist

Post by Centaur » Tue 19 Aug, 2008 14:06

As far as I understand, there is no provision for plugin interoperation in FAR. That is, FAR can talk to plugins and plugins can talk to FAR, but, generally, plugins cannot talk to other plugins.

User avatar
t-rex
Страшный и ужасный
Posts: 4871
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Contact:

Re: Getting _recursive_ panel filelist

Post by t-rex » Wed 20 Aug, 2008 05:19

pepak
You should read the Plugin API help for GetPluginDirList:

Code: Select all

hPlugin
Current plugin instance handle. If the plugin handle is equal to INVALID_HANDLE_VALUE, the value of PluginNumber is ignored and the function works with the plugin that controls the active panel.

pepak
Posts: 312
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 1 time
Been thanked: 9 times

Re: Getting _recursive_ panel filelist

Post by pepak » Wed 20 Aug, 2008 05:24

I have read that, but it only works with the active panel's plugin. I need the passive panel, too.

User avatar
t-rex
Страшный и ужасный
Posts: 4871
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Contact:

Re: Getting _recursive_ panel filelist

Post by t-rex » Wed 20 Aug, 2008 21:03

pepak
Unfortunately it is impossible in 1.7

Post Reply

Return to “Plug-In Developers”

Who is online

Users browsing this forum: No registered users and 1 guest