<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>untidy blog</title>
	<atom:link href="http://untidy.net/blog/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://untidy.net/blog</link>
	<description>simon steele writes about stuff...</description>
	<pubDate>Wed, 13 May 2009 09:08:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PyPN Script Repository</title>
		<link>http://untidy.net/blog/2009/05/13/pypn-script-repository/</link>
		<comments>http://untidy.net/blog/2009/05/13/pypn-script-repository/#comments</comments>
		<pubDate>Wed, 13 May 2009 09:07:00 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<category><![CDATA[PyPN]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/?p=343</guid>
		<description><![CDATA[Like the idea of using Python scripts to enhance Programmer&#8217;s Notepad but not sure where to start? James Yoneda has created the awesome ScriptShare website for exactly this purpose:
There are a bunch of scripts already there, and hopefully you will add yours too! We&#8217;re working on getting this moved over to pnotepad.org eventually.
My thanks to [...]]]></description>
			<content:encoded><![CDATA[<p>Like the idea of using Python scripts to enhance <a href="http://pnotepad.org/">Programmer&#8217;s Notepad</a> but not sure where to start? <a href="http://rocketmonkeys.com/">James Yoneda</a> has created the awesome <a href="http://scriptshare.rocketmonkeys.com/">ScriptShare</a> website for exactly this purpose:<br />
<div id="attachment_344" class="wp-caption alignnone" style="width: 445px"><a href="http://scriptshare.rocketmonkeys.com/"><img src="http://untidy.net/blog/wp-content/uploads/2009/05/scriptshare-google-chrome-3.png" alt="Scriptshare in Google Chrome" title="Scriptshare" width="435" height="344" class="size-medium wp-image-344" /></a><p class="wp-caption-text">Scriptshare in Google Chrome</p></div></p>
<p>There are a bunch of scripts already there, and hopefully you will add yours too! We&#8217;re working on getting this moved over to pnotepad.org eventually.</p>
<p>My thanks to James for putting this effort in and creating such a useful site in such short time!</p>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/05/13/pypn-script-repository/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PyPN 0.10.973 Released</title>
		<link>http://untidy.net/blog/2009/05/13/pypn-010973-released/</link>
		<comments>http://untidy.net/blog/2009/05/13/pypn-010973-released/#comments</comments>
		<pubDate>Wed, 13 May 2009 08:58:42 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<category><![CDATA[PyPN]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/?p=340</guid>
		<description><![CDATA[I&#8217;m happy to announce a minor bug fix release for PyPN, the Python extension for Programmer&#8217;s Notepad. This release fixes a PN crash if you tried to create a Scintilla object with no active document, and also the exception syntax problem preventing PyPN from working in Python 2.4-2.5.
Downloads

PyPN 0.10.973 for Python 2.6
PyPN 0.10.973 for Python [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to announce a minor bug fix release for PyPN, the <a href="http://python.org/">Python</a> extension for <a href="http://pnotepad.org/">Programmer&#8217;s Notepad</a>. This release fixes a PN crash if you tried to create a Scintilla object with no active document, and also the exception syntax problem preventing PyPN from working in Python 2.4-2.5.</p>
<p><b>Downloads</b></p>
<ul>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.10.973-py26.zip">PyPN 0.10.973 for Python 2.6</a></li>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.10.973-py25.zip">PyPN 0.10.973 for Python 2.5</a></li>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.10.973-py24.zip">PyPN 0.10.973 for Python 2.4</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/05/13/pypn-010973-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programmer&#8217;s Notepad 2 0.9.970 Released</title>
		<link>http://untidy.net/blog/2009/05/12/programmers-notepad-2-09970-released/</link>
		<comments>http://untidy.net/blog/2009/05/12/programmers-notepad-2-09970-released/#comments</comments>
		<pubDate>Tue, 12 May 2009 20:57:50 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/?p=338</guid>
		<description><![CDATA[The latest testing release of Programmer&#8217;s Notepad is out. This is a minor release with a few important bug fixes, including Unicode file handling, Windows 7 RC quirks, and a couple of toolbar appearance issues. All testing release users should upgrade to this new build.
Downloads

0.9.970 Installer
0.9.970 Portable

Thanks to all the users who have put time [...]]]></description>
			<content:encoded><![CDATA[<p>The latest testing release of Programmer&#8217;s Notepad is out. This is a minor release with a few important bug fixes, including Unicode file handling, Windows 7 RC quirks, and a couple of toolbar appearance issues. All testing release users should upgrade to this new build.</p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="http://pnotepad.googlecode.com/files/pn209970.exe">0.9.970 Installer</a></li>
<li><a href="http://pnotepad.googlecode.com/files/portable-pn209970.zip">0.9.970 Portable</a></li>
</ul>
<p>Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.</p>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/05/12/programmers-notepad-2-09970-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programmer&#8217;s Notepad 2 0.9.962 Released</title>
		<link>http://untidy.net/blog/2009/05/02/programmers-notepad-2-09962-released/</link>
		<comments>http://untidy.net/blog/2009/05/02/programmers-notepad-2-09962-released/#comments</comments>
		<pubDate>Sat, 02 May 2009 22:00:06 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<category><![CDATA[PyPN]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/?p=335</guid>
		<description><![CDATA[The latest testing release of Programmer&#8217;s Notepad is out. This release brings a whole bunch of great changes: Script (macro) recording when using PyPN, a customizable toolbar, firefox-style tab ordering and smart highlight. There are also a load of bug fixes too.
Downloads

0.9.962 Installer
0.9.962 Portable

There is also a new PyPN release fixing a couple of issues [...]]]></description>
			<content:encoded><![CDATA[<p>The latest testing release of Programmer&#8217;s Notepad is out. This release brings a whole bunch of great changes: Script (macro) recording when using PyPN, a customizable toolbar, firefox-style tab ordering and smart highlight. There are also a load of bug fixes too.</p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="http://pnotepad.googlecode.com/files/pn209962.exe">0.9.962 Installer</a></li>
<li><a href="http://pnotepad.googlecode.com/files/portable-pn209962.zip">0.9.962 Portable</a></li>
</ul>
<p>There is also a new PyPN release fixing a couple of issues with the included scripts from the last build:</p>
<ul>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.13.962-py26.zip">PyPN 0.13.962 for Python 2.6</a></li>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.13.962-py25.zip">PyPN 0.13.962 for Python 2.5</a></li>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.13.962-py24.zip">PyPN 0.13.962 for Python 2.4</a></li>
</ul>
<p>Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.</p>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/05/02/programmers-notepad-2-09962-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>links for 2009-04-15</title>
		<link>http://untidy.net/blog/2009/04/15/links-for-2009-04-15-3/</link>
		<comments>http://untidy.net/blog/2009/04/15/links-for-2009-04-15-3/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 15:10:25 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/2009/04/15/links-for-2009-04-15-3/</guid>
		<description><![CDATA[

Evil Walrus - Code Snippet Wiki
Code snippet repository where anyone can edit the snippets
(tags: programming web wiki)


omaha - Google Code
Google Updater Source Code
(tags: programming software windows opensource installer)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.evilwalrus.org/">Evil Walrus - Code Snippet Wiki</a></div>
<div class="delicious-extended">Code snippet repository where anyone can edit the snippets</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/web">web</a> <a href="http://delicious.com/simonsteele/wiki">wiki</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://code.google.com/p/omaha/">omaha - Google Code</a></div>
<div class="delicious-extended">Google Updater Source Code</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/software">software</a> <a href="http://delicious.com/simonsteele/windows">windows</a> <a href="http://delicious.com/simonsteele/opensource">opensource</a> <a href="http://delicious.com/simonsteele/installer">installer</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/04/15/links-for-2009-04-15-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>links for 2009-04-04</title>
		<link>http://untidy.net/blog/2009/04/04/links-for-2009-04-04/</link>
		<comments>http://untidy.net/blog/2009/04/04/links-for-2009-04-04/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 12:01:07 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/2009/04/04/links-for-2009-04-04/</guid>
		<description><![CDATA[

99designs » Leading Designer Marketplace for Logo Designs and More…
Pay for lots of designers to make you artwork
(tags: web graphics)


Pandoc
Document formatting tool supporting lots of different text markup formats
(tags: programming software opensource xml html text utilities library)


EQATEC Free .NET Profiler
(tags: programming software dotnet microsoft utilities)


Quickly Change Profiles in Visual Studio
(tags: programming utilities visualstudio)


Code Snippet With [...]]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://99designs.com/">99designs » Leading Designer Marketplace for Logo Designs and More…</a></div>
<div class="delicious-extended">Pay for lots of designers to make you artwork</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/web">web</a> <a href="http://delicious.com/simonsteele/graphics">graphics</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://johnmacfarlane.net/pandoc/">Pandoc</a></div>
<div class="delicious-extended">Document formatting tool supporting lots of different text markup formats</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/software">software</a> <a href="http://delicious.com/simonsteele/opensource">opensource</a> <a href="http://delicious.com/simonsteele/xml">xml</a> <a href="http://delicious.com/simonsteele/html">html</a> <a href="http://delicious.com/simonsteele/text">text</a> <a href="http://delicious.com/simonsteele/utilities">utilities</a> <a href="http://delicious.com/simonsteele/library">library</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://www.eqatec.com/tools/profiler">EQATEC Free .NET Profiler</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/software">software</a> <a href="http://delicious.com/simonsteele/dotnet">dotnet</a> <a href="http://delicious.com/simonsteele/microsoft">microsoft</a> <a href="http://delicious.com/simonsteele/utilities">utilities</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://blog.jeffhandley.com/archive/2009/03/31/vs-profiles.aspx">Quickly Change Profiles in Visual Studio</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/utilities">utilities</a> <a href="http://delicious.com/simonsteele/visualstudio">visualstudio</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://precode.codeplex.com/">Code Snippet With Syntaxhighlighter Support for Windows Live Writer - Home</a></div>
<div class="delicious-extended">SyntaxHighlighter friendly plugin for WLW</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/software">software</a> <a href="http://delicious.com/simonsteele/windows">windows</a> <a href="http://delicious.com/simonsteele/plugin">plugin</a> <a href="http://delicious.com/simonsteele/utilities">utilities</a> <a href="http://delicious.com/simonsteele/wordpress">wordpress</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/04/04/links-for-2009-04-04/feed/</wfw:commentRss>
		</item>
		<item>
		<title>First Poll Results</title>
		<link>http://untidy.net/blog/2009/03/10/first-poll-results/</link>
		<comments>http://untidy.net/blog/2009/03/10/first-poll-results/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 20:35:05 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/2009/03/10/first-poll-results/</guid>
		<description><![CDATA[A little while back I asked people a couple of questions to help guide future PN development.
The results ended up looking like this:
Is the fact that you can float PN document windows useful?
This question is concerned with whether the MDI window management system is helpful to people. I suspected that most users had windows maximised [...]]]></description>
			<content:encoded><![CDATA[<p>A little while back I asked people a couple of questions to <a href="http://untidy.net/blog/2009/01/20/pn-usage-polls-output-windows/">help guide future PN development</a>.</p>
<p>The results ended up looking like this:</p>
<p><strong>Is the fact that you can float PN document windows useful?</strong></p>
<p>This question is concerned with whether the MDI window management system is helpful to people. I suspected that most users had windows maximised all the time and used the tabs to switch – i.e. MDI wasn’t buying them much. Here are the results:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Results of MDI Poll" border="0" alt="Results of MDI Poll" src="http://untidy.net/blog/wp-content/uploads/2009/03/mdiresults.png" width="487" height="295" /> </p>
<p>18% of people were using the abilities of MDI windows and were very happy about them. Pretty much everyone else doesn’t care or would rather be able to split the view.</p>
<p>Don’t worry, this isn’t going to drive any instant knee-jerk changes, but I’m keeping it in mind for future design work. I am <em>definitely</em> going to address the lack of split views, I’m just trying to decide how.</p>
<p><strong>Do you use the individual output windows?</strong></p>
<p>Here I wondered whether the hidden away option to use individual output windows instead of the global one for each window was actually being used – I suspected not. I was wrong!</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Individual Output Poll Results" border="0" alt="Individual Output Poll Results" src="http://untidy.net/blog/wp-content/uploads/2009/03/individualoutput.png" width="487" height="295" /> </p>
<p>Lots of people use the individual output windows, and it appears lots of people have no idea what output windows are! I’m not sure whether this is because they have no need in their editing for tools and output, or are just unaware of the features.</p>
<p>I’ll be posting some more questions soon, and wanted to thank everyone who took the time to answer these polls or comment – it’s appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/03/10/first-poll-results/feed/</wfw:commentRss>
		</item>
		<item>
		<title>links for 2009-02-21</title>
		<link>http://untidy.net/blog/2009/02/21/links-for-2009-02-21/</link>
		<comments>http://untidy.net/blog/2009/02/21/links-for-2009-02-21/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 12:01:20 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/2009/02/21/links-for-2009-02-21/</guid>
		<description><![CDATA[

SVN-Monitor
Free software to monitor and work with a subversion repository
(tags: programming software subversion freeware opensource windows utilities)


Free C++ Refactoring Add-in for Visual Studio Developers
(tags: programming software c++ visualstudio plugin)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.svnmonitor.com/default.shtml">SVN-Monitor</a></div>
<div class="delicious-extended">Free software to monitor and work with a subversion repository</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/software">software</a> <a href="http://delicious.com/simonsteele/subversion">subversion</a> <a href="http://delicious.com/simonsteele/freeware">freeware</a> <a href="http://delicious.com/simonsteele/opensource">opensource</a> <a href="http://delicious.com/simonsteele/windows">windows</a> <a href="http://delicious.com/simonsteele/utilities">utilities</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/RefactorCPP/index.xml">Free C++ Refactoring Add-in for Visual Studio Developers</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/simonsteele/programming">programming</a> <a href="http://delicious.com/simonsteele/software">software</a> <a href="http://delicious.com/simonsteele/c%2B%2B">c++</a> <a href="http://delicious.com/simonsteele/visualstudio">visualstudio</a> <a href="http://delicious.com/simonsteele/plugin">plugin</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/02/21/links-for-2009-02-21/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programmer&#8217;s Notepad 2 0.9.926 Released</title>
		<link>http://untidy.net/blog/2009/02/19/programmers-notepad-2-09926-released/</link>
		<comments>http://untidy.net/blog/2009/02/19/programmers-notepad-2-09926-released/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 22:05:50 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/?p=322</guid>
		<description><![CDATA[This is a minor bugfix testing release for Programmer&#8217;s Notepad, fixing a few niggles with the last release.
Downloads

0.9.926 Installer
0.9.926 Portable

There is also a new PyPN release fixing a couple of issues with the included scripts from the last build:

PyPN 0.11.926 for Python 2.4
PyPN 0.11.926 for Python 2.5
PyPN 0.11.926 for Python 2.6

Thanks to all the users [...]]]></description>
			<content:encoded><![CDATA[<p>This is a minor bugfix testing release for Programmer&#8217;s Notepad, fixing a few niggles with the last release.</p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="http://pnotepad.googlecode.com/files/pn209926.exe">0.9.926 Installer</a></li>
<li><a href="http://pnotepad.googlecode.com/files/portable-pn209926.zip">0.9.926 Portable</a></li>
</ul>
<p>There is also a new PyPN release fixing a couple of issues with the included scripts from the last build:</p>
<ul>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.11.926-py24.zip">PyPN 0.11.926 for Python 2.4</a></li>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.11.926-py25.zip">PyPN 0.11.926 for Python 2.5</a></li>
<li><a href="http://pnotepad.googlecode.com/files/pypn-0.11.926-py26.zip">PyPN 0.11.926 for Python 2.6</a></li>
</ul>
<p>Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.</p>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/02/19/programmers-notepad-2-09926-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding a Menu Item from Your Extension</title>
		<link>http://untidy.net/blog/2009/02/17/adding-a-menu-item-from-your-extension/</link>
		<comments>http://untidy.net/blog/2009/02/17/adding-a-menu-item-from-your-extension/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 12:00:00 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
		
		<category><![CDATA[PN]]></category>

		<guid isPermaLink="false">http://untidy.net/blog/2009/02/17/adding-a-menu-item-from-your-extension/</guid>
		<description><![CDATA[This is the second post in the Writing your First Extension series. You can see the full article here: Writing Your First Extension.
Menu items are added via the IPN object provided at extension load time. You add menu items by providing an implementation of IMenuItems. Here is a very simple implementation supporting a single item:

class [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second post in the Writing your First Extension series. You can see the full article here: <a href="http://pnotepad.org/docs/dev/writing_your_first_extension">Writing Your First Extension</a>.</p>
<p>Menu items are added via the IPN object provided at extension load time. You add menu items by providing an implementation of IMenuItems. Here is a very simple implementation supporting a single item:</p>
<pre class="brush: cpp">
class Menu : public extensions::IMenuItems
{
public:
    Menu()
    {
        memset(&amp;amp;item1, 0, sizeof(item1));
        item1.Handler = &amp;amp;MyExtensionFunc;
        item1.Title = L&amp;quot;Hello World&amp;quot;;
        // item1.Type = extensions::miItem;
        // item1.UserData = 0;
    }

    /**
     * Get the number of MenuItem instances that can be retrieved.
     */
    virtual int GetItemCount() const
    {
        return 1;
    }

    /**
     * Get an individual MenuItem instance by index.
     */
    virtual extensions::MenuItem&amp;amp; GetItem(int index) const
    {
        if (index == 0)
            return const_cast&lt;extensions ::menuitem&amp;&gt;(item1);
    }

private:
    extensions::MenuItem item1;
};
</pre>
<p>This very simple implementation adds a single menu item called &quot;Hello World&quot;. When the item is selected, the MyExtensionFunc method will be executed by PN.</p>
<p>It might seem like a fair bit of code to add a menu item, but in the next SDK version I&#8217;ll provide a general-purpose helper to make this easy. The reason for the interface is to make it easy for you to provide sub-menus. MenuItem instances can contain child items by changing Type to miSubItem and filling in the SubItems member with another instance implementing IMenuItems.</p>
<p>The handler method looks like this:</p>
<pre class="brush: cpp">
void MyExtensionFunc(extensions::cookie_t /*cookie*/)
{
    g_PN-&gt;GetGlobalOutputWindow()-&gt;AddToolOutput(&quot;Hello World!&quot;);
    g_PN-&gt;ShowOutput();
}
</pre>
<p>Once you have your handler and IMenuItems implementation, you just need to tell PN about your items. In your init function you need something like this:</p>
<pre class="brush: cpp">
bool __stdcall pn_init_extension(int iface_version, extensions::IPN* pn)
{
    if(iface_version != PN_EXT_IFACE_VERSION)
        return false;

    g_PN = pn;

    Menu menu;
    pn-&gt;AddPluginMenuItems(&amp;menu);

    return true;
}
</pre>
<p>Now you have Programmer&#8217;s Notepad presenting your commands in the menu and can handle their selection. Next time we&#8217;ll look at the other events PN lets you attach to.</p>
<p></extensions></p>
]]></content:encoded>
			<wfw:commentRss>http://untidy.net/blog/2009/02/17/adding-a-menu-item-from-your-extension/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
