Path: utzoo!utgpu!watmath!att!ucbvax!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU (Donna Converse) Newsgroups: comp.windows.x Subject: Re: A MAC dialog implementation Message-ID: <8908071538.AA13416@expo.lcs.mit.edu> Date: 7 Aug 89 15:38:33 GMT References: <8908031514.AA05636@metropolis.super.org> Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 37 > I am trying to > imitate the Mac look-and-feel for a dialog box. When the box pops up I want > the users input focused to the text widget of the dialog widget. If your mouse pointer is within the bounds of the dialog box, the keyboard input will be directed to the text value widget in the dialog box. If you want user input to the rest of your application to be ignored while the dialog box is up, you can use XtGrabExclusive in the popup call, instead of XtGrabNone. If you want still stronger medicine, you must be intending that your application will prevent user input to other applications on the screen. In that case, refer to the Inter-Client Communications Conventions Manual. > Well how do I obtain the text > widget of the dialog widget without dipping into the Private stuff???? The instance name of the Dialog's text widget is given on page 39 of the Athena widget documentation. You can use XtNameToWidget to get what you need. > Another nice featrue that I would like to implement is when the > return key is pressed it will invoke the "confirm" button attached to the > dialog widget. > That is when return is pressed > I will call a routine that will then invoke the callback associated with the > "confirm" button. Write an action routine which calls your confirm callback routine, declare an action table and register it with the translation manager. Create an application defaults file for your application, if you don't already have one, and put your event translation in it. Suppose Demo is your app class. Demo*Dialog.value.translations: #override\n\ Return: confirm-action()\n Donna Converse converse@expo.lcs.mit.edu