Hello,
I was wondering which was the best method (a simple one if possible) to create a viewer plugin with syntax highlighting (being able to color different things in the file). It is important that that the file won't be read completly from disk at once (just the block you're viewing).
Any ideas?
Viewer with colors?
I've looked through the viewer APIs and I could not find one that I could use (hxxp://api.farmanager.com/en/viewerapi/index.html ). Please give me a link or something to search for.
Can I for example create a hex editor as a plugin (or anyway using existing functions from FAR) ? I don't want to manage the windows all by my self. It's important not to go with the editor if it doesn't support reading the file block by block.
Thanks
Can I for example create a hex editor as a plugin (or anyway using existing functions from FAR) ? I don't want to manage the windows all by my self. It's important not to go with the editor if it doesn't support reading the file block by block.
Thanks
acker
No such API exists. I can think of two ways to do it:
1. Using DialogAPI - DI_USERCONTROL - you can see something like that in the MailView plugin.
2. Using the Editor - this one is tricky - your plugin opens an empty editor and uses it only as a container to display the current screen. You read the file by your self and handle all the keystrokes in the editor and you use the editor only to display the current screen contents, this way you get highlighting, modality and some other stuff for free and you only need to handle the reading of the file and simulate the navigation.
No such API exists. I can think of two ways to do it:
1. Using DialogAPI - DI_USERCONTROL - you can see something like that in the MailView plugin.
2. Using the Editor - this one is tricky - your plugin opens an empty editor and uses it only as a container to display the current screen. You read the file by your self and handle all the keystrokes in the editor and you use the editor only to display the current screen contents, this way you get highlighting, modality and some other stuff for free and you only need to handle the reading of the file and simulate the navigation.