🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24099

(none)

#24099
From: Qing Zhang
Date: Wed, 26 Jun 1991 08:13
68 lines
2185 bytes
Newsgroups: window
Subject: WHY  ONLY POPUP ONE menu with three buttons in MOTIF???
Summary: 
Followup-To: 
Distribution: 
Organization: University of Hawaii at Manoa
Keywords: 

Hello,

I am working a graphic editor. I have been trying to use three buttons by
DEPRESSING ONE OF THEM to popup different popup editing menu within the 
drawingarea. But I only can get one popuped, no second one showed.

What I did is sketched as follows (using the XtAddEventHandler() similar 
approaches like action table can be the same.).
 
main(){
   ...
   create_popupmenu1(drawingarea);
   create_popupmenu2(...);
   create_popupmenu3(...);
   ...
}

create_popupmenu1(){
   popup1 = XmCreatePopupMenu(drawingarea, "popup1", al, ac);
   ... here create title, separator and buttons as children of popup1.
   XtAddEventHandler(drawingarea, ..., PostPupup, popup1);
   ... and XtManageChildren.
}


create_popupmenu2(){
   popup2 = XmCreatePopupMenu(drawingarea, "popup2", al, ac);
   ... here create title, separator and buttons as children of popup1.
   XtAddEventHandler(drawingarea, ..., PostPupup, popup2);
   ... and XtManageChildren.
}

   
PostPopup(w, popup, event)
...
{
    switch(event->button){
         case Button3: 
             case Button3:
             XmMenuPosition(popup3, event);
             XtManageChild (popup3);
             break;
        case Button2:
             XmMenuPosition(popup2, event);
             XtManageChild (popup2);
             break;
        default:
            not available
    }
}

Can any one help me what the problem is? The fuuny thing is if I press the 
MIDDLE BUTTON, no response. When I press button1, the noavailabel message
was printed.

WhY That? Thanks.

---Thomas Y, Huang

 
Technical Details
Message-ID: <9106260813.AA27831@uhunix.uhcc.Hawaii.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines
From: qzhang@uhunix.uhcc.hawaii.EDU (Qing Zhang)
Newsgroups: comp.windows.x
Subject: (none)
Message-ID: <9106260813.AA27831@uhunix.uhcc.Hawaii.Edu>
Date: 26 Jun 91 08:13:46 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 68