Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
What's in wxCommandEvent?
(1/1)
DrewBoo:
The wxCommandEvent objects that the CB SDK passes to menu handlers seem pretty opaque to me.
I'm creating handlers for new menu items when the user right-clicks on things like the Project Manager or Open Files List. Is there any data hidden in the wxCommandEvent object to report what specifically was right-clicked? E.g., the file or folder or project?
DrewBoo:
Maybe this question should be rephrased.
I'm working on a plugin that implements BuildModuleMenu( const ModuleType type, wxMenu* menu, const FileTreeData* data )
When type is mtProjectManager, meaning that the user is right-clicking something in the Project manager, how can my handler know specifically what was clicked?
mandrav:
--- Quote from: DrewBoo on March 11, 2008, 11:21:31 pm ---When type is mtProjectManager, meaning that the user is right-clicking something in the Project manager, how can my handler know specifically what was clicked?
--- End quote ---
If you want to know the tree item's id, you can access the tree through project manager and get its selected item.
But the FileTreeData object contains much more info regarding the clicked item. See top of cbproject.h to see what info it contains.
Navigation
[0] Message Index
Go to full version