Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!cs.rpi.edu!ramabads From: ramabads@cs.rpi.edu (Shiva ) Newsgroups: comp.windows.x Subject: Multiple Message-ID: Date: 21 Mar 91 18:55:46 GMT Reply-To: ramabads@cs.rpi.edu Followup-To: comp.windows.x Organization: Rennselaer Polytechnic Institute, CS Dept. Lines: 42 Nntp-Posting-Host: cs.rpi.edu I am building an X application using X11R4, with Athena Widgets on a Sun SPARC, SUNOS 4.1.1. The Application has a large canvas which displays certain objects, and a series of buttons and menus around it, which act on the objects displayed. I can pick, and move the objects around on the screen, or call upon CAllbacks attached to to the buttons or menus items. Most of the buttons, and menu items, are toggle in nature, i.e. they switch on or off. and are easy to implement. Some however, require additional input, in the form of a selection of an object from the canvas. I am using Button2 to move the objects, and Button1 to select the objects, so there is no clash there. In the cases where the additional input buttons are activated, I need to disable the actions of all the other buttons, (and the movement capability) till a selection has taken place. i.e. Say once I have clicked on button3 which is FillObject, I have to go into the canvas, and select an object to fill. Till this is done, I should not be able to move any objects, or toggle any of their attributes, or activate any other object selection procedures. This essentially involves, ignoring all events, till a specific event is recieved ( in this case, it would be a Button1PressEvent on my Canvas Widget. ) AND FINALLY THE QUESTION : IS there an elegant way of doing this. I have several such buttons, and keeping global flags, and checking in every callback is not my idea of fun. Thanks, -shiv -=- Shivkumar Ramabadran (shiva) ramabads@turing.cs.rpi.edu "I once wrote a Lisp program. It wrote back to me." -=-