[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] setting a call back for popup menu created by a layo
From: |
Alexander Pipelka |
Subject: |
Re: [paragui-users] setting a call back for popup menu created by a layout |
Date: |
29 May 2002 23:29:42 +0200 |
John,
You're right.
It's currently impossible to set event callbacks for XML layout
generated menuitems. :((
There's definitely need for some changes. And yes: I also dislike them
:))
As you are the first one having that trouble (and needing that feature)
could you please provide some diffs for a working solution ?
Your changes will go directly into the upcoming 1.0.2 version.
Thanks for your help
Alex
Am Mit, 2002-05-29 um 20.28 schrieb John Rainey:
> I can not find a function to set the call back for a popup menu on a menu
> bar when
> they have been created by the load layout routine. All other widgets can be
> retrieved by their id
> and have their call back set. The popup menu item can only be retrieved from
> the popup menu's list of items which is protected. I added the following
> function.
>
> bool PG_PopupMenu::setMenuItemHandler(int id,MSG_CALLBACK handler,void
> *data){
>
> MII it;
> PG_PopupMenu::MenuItem* item;
> int itid;
>
> it=items.begin();
> while(it!=items.end())
> {
> itid=(*it)->getId();
> if(id==itid)
> {
> item=*it;
> item->SetEventCallback(MSG_SELECTMENUITEM, handler,
> data);
> return true;
> }
> it++;
> }
> return false;
> }
>
> Is this necessary or am I missing something????
> I would prefer not to edit paragui but if this is needed then a
> SetEventObject function should also be added.
>
>
>
> _______________________________________________
> paragui-users mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users