[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/widgets pgpopupmenu.cpp,1.3,1.3.6.1
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/widgets pgpopupmenu.cpp,1.3,1.3.6.1 |
Date: |
Thu, 30 May 2002 09:54:51 -0400 |
Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv30393/src/widgets
Modified Files:
Tag: devel-1-0
pgpopupmenu.cpp
Log Message:
added functions to add callback handlers to existing menu items
Thanks John Rainey <address@hidden>
Index: pgpopupmenu.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgpopupmenu.cpp,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -C2 -r1.3 -r1.3.6.1
*** pgpopupmenu.cpp 15 Apr 2002 13:35:36 -0000 1.3
--- pgpopupmenu.cpp 30 May 2002 13:54:47 -0000 1.3.6.1
***************
*** 872,873 ****
--- 872,914 ----
PG_ThemeWidget::eventMouseLeave();
}
+
+ 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;
+ }
+
+ bool PG_PopupMenu::SetMenuItemEventObject(int id,PG_EventObject* calledobj,
MSG_CALLBACK_OBJ cbfunc, void *clientdata) {
+ MII it;
+ PG_PopupMenu::MenuItem* item;
+ int itid;
+
+ it=items.begin();
+ while(it!=items.end()) {
+
+ itid=(*it)->getId();
+
+ if(id==itid) {
+ item=*it;
+
item->SetEventObject(MSG_SELECTMENUITEM,calledobj,cbfunc,clientdata);
+ return true;
+ }
+ it++;
+ }
+ return false;
+ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/widgets pgpopupmenu.cpp,1.3,1.3.6.1,
Alexander Pipelka <address@hidden> <=