Plugin-writing question - HookPopupMenu
Posted: Tue Aug 23, 2011 7:13 pm
In a plugin that I'm writing, I want the File View / File context menu to add an option based on the type of file that was clicked. I'm trying to use the wxformbuilder plugin's source as guidance for how to do this, but there's one thing I'm stuck on.
In the method wxFormBuilder::HookPopupMenu, the "Open with wxFormBuilder..." menu item is added to the FileView_File menu, and that's simple and clear. What I can't find, however, is where this item is enabled and disabled. It is only enabled when the clicked item was a .fbp file, which is similar to the behavior I'll want from my plugin, and I don't see where this is defined in the program.
I would greatly appreciate a nudge in the right direction
OS: Ubuntu 11.04 x64
CodeLite: Revision 5011 (self-compliled with the addition of the plugin I'm in the middle of writing)
In the method wxFormBuilder::HookPopupMenu, the "Open with wxFormBuilder..." menu item is added to the FileView_File menu, and that's simple and clear. What I can't find, however, is where this item is enabled and disabled. It is only enabled when the clicked item was a .fbp file, which is similar to the behavior I'll want from my plugin, and I don't see where this is defined in the program.
I would greatly appreciate a nudge in the right direction
OS: Ubuntu 11.04 x64
CodeLite: Revision 5011 (self-compliled with the addition of the plugin I'm in the middle of writing)