Virtual filesystem - intercepting Edit

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

Virtual filesystem - intercepting Edit

Post by pepak »

Hi!

I wrote a plugin which implements a virtual filesystem and I would like to intercept the Edit function to edit items in a user-friendly dialog (much like Session Manager in NetBox). Which functions should I implement and export? I don't see any obvious candidate in the Panels API, except for ProcessPanelInputW, but that one would take a lot of resources and probably still fail in case the user selected Edit from menu. Which function am I overlooking? Thanks.
User avatar
DrKnS
Posts: 5673
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 9 times
Been thanked: 311 times

Re: Virtual filesystem - intercepting Edit

Post by DrKnS »

GetFilesW + OPM_EDIT
pepak
Posts: 474
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 12 times
Been thanked: 36 times

Re: Virtual filesystem - intercepting Edit

Post by pepak »

Ah. It seems that this way I could implement a special handler for OPM_EDIT, but generate regular temp files for other operating modes?

Which operating modes are used for creation of new files (SHIFT+F4) and for running a file (ENTER)?

Thanks.
User avatar
DrKnS
Posts: 5673
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 9 times
Been thanked: 311 times

Re: Virtual filesystem - intercepting Edit

Post by DrKnS »

i suggest you to take a look at the source code of existing filesystem plugins like FTP or NetBox, and the source code of Far itself.
pepak
Posts: 474
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 12 times
Been thanked: 36 times

Re: Virtual filesystem - intercepting Edit

Post by pepak »

I did. But it's rather difficult to separate the one function required for this task from all the rest. Once I know where to look, it's easy enough to discover what I need, but knowing where to look is the problem.
pepak
Posts: 474
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 12 times
Been thanked: 36 times

Re: Virtual filesystem - intercepting Edit

Post by pepak »

Never mind, implemented it using ProcessPanelInputW and it seems to work OK.
Post Reply

Return to “Plug-In Developers”