2009-04-05 03:44:45 UTC
Finally available! The Notepad++ Plugin Interface Library.
What is it?
A library to help other plugin makers by providing some commonly repeated
functions/methods and some not so common but helpful functions that allow the
plugin writer to concentrate more on writing the logic they want rather than
the functions required to get the plugin up and running in the first place.
Which isn't actually difficult, but can be tedious.
The library currently provides the following:
* The basic interface enhancement provides plugin registration and handle
* multiple common ways to access view handles.
* The ExtLexer extension provides styler (lexer) registration helper functions
* external lexers.
* - Both of those also allow for function registration. The basic difference
* two function registrations is the base functions display under a separator
in the order
* registered, and the ExtLexer registered functions get sorted and displayed
* The CmdMap extension allows plugins to use an internal enum value for a
cmdId when working
* with registered N++ funcItems. This allows the plugin writer to register
* with N++ in one order yet use the command values from an enum in an order
more useful to
* the code, as well as not needing to deal with the funcItem array, and instead
can use a
* call ( getCmdId( CMD_HIGHLIGHT ) ) to get the assigned N++ menu command
* The DocTabMap provides plugins some common helper functions that allows
plugins to get
* the Scintilla document id from a N++ bufferId, determine if a file is open
and ready, and
* get the Scintilla document id for the actively focused document in either
* The XmlConfig extension makes it easy for a plugin to read/write configuration
* the same way that N++ does. So, if the plugin provides styling, the plugins'
* xml can also be used for config params.
* The Markers extension provides plugins with functions to read and react
to the basic
* Notepad++/Scintilla margin and marker settings. For instance if the plugin
* a marker the defineMarker function will check for a valid and free marker
number to use,
* as well as set the mask information for the margins in both views.
* The ActionIndex extension provides an action counter for a given document
* with the users actions for inserte/delete/undo/redo actions.
* The ActionHistory extension provides a history container for a plugin to
* that it wants to have tied to the users insert/delete/undo/redo actions.
It uses the
* ActionIndex count for the 'major' index and allows multiple action item
entries per index
* ( or 'minor index' ). An example of this is the NppPlugin_ChangeMarker
plugin that shows
* lines that have changed since a document was opened and if those changes
are saved or not.
* Lastly, the msgs extension provides a common place to store inter plugin
The library NppPluginIface.lib to build your plugin against, or if you want
to build the library yourself then boost headers need to be installed ( you
don't need the boost binary install ).
Either way you'll need the source code which is downloadable as a full VS 2008
solution zip from the Windows Skydrive located at:
( it includes everything except the N++ source and boost headers ).
If you are going to build against the library without installing the boost headers
the NppPluginIface.lib is located in the vc_9_0_sln folder in both the Debug_Unicode
and Release_Unicode folders, which is what made the download just over 5MB.
If you use the provided solution it will find them there. Just be sure to make
a backup of the .lib files somewhere on your system in case you 'clean' and
accidently erase them.
Also included is the source code for several plugins.
NppPlugin_ExtLexer ( an update to the previously released NppExternalLexers
If there is anyone out there that wants to make additions to the library I'll
be setting up a repo in the near future and am considering either svn or git,
so make your voice heard. :) Right now it is in a svn repo, but I'd like to
see it be more available for one-off hacks as well as major additions.
I hope others find this to be a useful and helpful library!
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: