Re: [Plib-users] menu processing question ?
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-03-25 00:22:19
|
Daniel T Konkle wrote: > > Menu callback: > > I'm setting up a menu and need to use the same callback for several of > the menu items and have the callback figure out which one was selected. > > Is there anyway to get the string and/or value that was selected in the > menu or submenu? Yes. All PUI widgets accept 'user data': puObject::setUserData ( void *data ) ; void *puObject::getUserData () ; ...or you can read the legend or the label: char *puObject::getLegend () ; char *puObject::getLabel () ; ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |