News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

What's in wxCommandEvent?

Started by DrewBoo, March 11, 2008, 09:34:56 PM

Previous topic - Next topic

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?

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.
Be patient!
This bug will be fixed soon...