A plugin template for making plugin development as easy and simple as possible.
Only 4 steps to make a simple plugin, by editing 2 files (PluginDefinition.h and PluginDefinition.cpp) :
1. Define your plugin name in "PluginDefinition.h"
2. Define your plugin commands number in "PluginDefinition.h"
3. Customize plugin commands names and associated function name (and the other stuff) in "PluginDefinition.cpp".
4. Define the associated functions.
As shown on (http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Development), any language can be used to write a plugin, as long as:
* it enables building a dll;
* the dll exposes an interface as expected by the plugin loader, which consists in a few functions with very basic paameter and return types;
* it is able to call C functions, since all of the Windows API, including SendMessageW(), is made of them.
There are plugins written in Delphi, Oberon, PureBasic and C#. Ok, perhaps APL or some functional languages are not suitable, but I'm saying this because I don't know them at all and they are a bit different.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That depends on the size of the project :)
Did you look at a few plugins the code of which is available for both ANSI and Unicode versions of N++? I usually recommend XBrackets Lite by dv__ , but there ae others. They will provide you many exampls of what needs (and does not need) converted, and how.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Someone told me that developing a Notepad++ plugin is like a mission to Mars, so here it is :
http://notepad-plus.sourceforge.net/commun/pluginDemoTemplate/NppPluginTemplate.zip
A plugin template for making plugin development as easy and simple as possible.
Only 4 steps to make a simple plugin, by editing 2 files (PluginDefinition.h and PluginDefinition.cpp) :
1. Define your plugin name in "PluginDefinition.h"
2. Define your plugin commands number in "PluginDefinition.h"
3. Customize plugin commands names and associated function name (and the other stuff) in "PluginDefinition.cpp".
4. Define the associated functions.
A plugin demo is available here, it allows plugin developers to do a plugin more sophisticated :
http://notepad-plus.sourceforge.net/commun/pluginDemoTemplate/NppPluginDemo.zip
Any question/suggestion? Post them here.
Happy coding
Don
My gra'ma is dead, so it's not that easy...
McLoo
> My gra'ma is dead, so it's not that easy...
Ok, she can not do it anymore... but you can.
Don
Don,
Kudos DonHo,
Looks nice and easy. Hopefully that will help improve people's confidence at being able to write plugins.
Perhaps some people will even tackle some of the items on the ideaTorrent.
Can I create a plugin or macro using Lua? I ask because it seems that Lua is supported by Scintilla/SciTE.
As shown on (http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Development), any language can be used to write a plugin, as long as:
* it enables building a dll;
* the dll exposes an interface as expected by the plugin loader, which consists in a few functions with very basic paameter and return types;
* it is able to call C functions, since all of the Windows API, including SendMessageW(), is made of them.
There are plugins written in Delphi, Oberon, PureBasic and C#. Ok, perhaps APL or some functional languages are not suitable, but I'm saying this because I don't know them at all and they are a bit different.
CChris
The project is compiled as ANSI. Can you convert to Unicode?
That depends on the size of the project :)
Did you look at a few plugins the code of which is available for both ANSI and Unicode versions of N++? I usually recommend XBrackets Lite by dv__ , but there ae others. They will provide you many exampls of what needs (and does not need) converted, and how.
CChris