Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!maytag!vlsi!fchan From: fchan@vlsi.waterloo.edu (Francis Chan) Newsgroups: comp.lang.smalltalk Subject: Re: Closing TopPanes explicitly ? Message-ID: <264@vlsi.waterloo.edu> Date: 19 Jan 90 21:28:30 GMT References: <485@DB0TUI11.BITNET> <263@vlsi.waterloo.edu> Reply-To: fchan@vlsi.waterloo.edu (Francis Chan) Organization: U. of Waterloo, Ontario Lines: 44 >Pretty simple. Go to the TopPane method 'hasCursor'. Change the last >statement "^super hasCursor" to "^true". > >This means that anything outside the current topPane frame and the "active" >(i.e. belonging to the current topPane) subpanes will be considered part of the topPane itself. > I forgot to add the caveat -- you can't get the root (background) menu any more with this modification. 2 possible suggestions: (1) Define an area in the screen that is reserved for the root (i.e. instead of "^true" return with a boolean to indicate if cursor is in this special area or not). Personal opinion: Uggh! (2) Add an option in the TopPane menu to pop up the system menu. You can do this by modifying the following methods: For the TopDispatcher class methods: In the 'initialize' method: Add another label (e.g. 'SystemMenu') and another selector (e.g. activateSystemMenu) to the respective parts of TopPaneMenu, WorkSpaceMenu and TranscriptMenu. Do the initialization by executing 'TopDispatcher initialize' For the TopDispatcher methods: Add the method 'activateSystemMenu' as follows: activateSystemMenu | answer | answer := ScreenDispatcher systemMenu popUpAt: Cursor offset. answer isNil ifFalse: [Scheduler systemDispatcher perform: answer] That should then give you access to do system stuff. Just click outside the menu to return to the current topPane. Have fun experimenting! Francis Chan