[comp.lang.smalltalk] Closing TopPanes explicitly ?

MUHRTH@DB0TUI11.BITNET (Thomas Muhr) (01/17/90)

Engineering software for people who are not artists in handling mouses I
would like to have the option of having a TopPane open AND on top until
and only until the close-icon is clicked, NOT by (mistakenly) clicking in
a window which is partly overlapped by the top window. This would be a
nice feature - think of help-windows, special displays etc.
Where and how can I supply changes to have a TopPane (not ALL!)behave this way?
We are using ST V/286.
Thank you very much in advance.
Thomas
-------
Thomas Muhr, Technical University of Berlin, BITNET: muhrth@db0tui11
   Project ATLAS - Computer Based Tools for Qualitative Research
         "Computers, like every technology, are a vehicle
      for the transformation of tradition." (WINOGRAD/FLORES)

fchan@vlsi.waterloo.edu (Francis Chan) (01/20/90)

In article <485@DB0TUI11.BITNET> MUHRTH@DB0TUI11.BITNET (Thomas Muhr) writes:
> .. <stuff deleted>
>I would like to have the option of having a TopPane open AND on top until
>and only until the close-icon is clicked, NOT by (mistakenly) clicking in
>a window which is partly overlapped by the top window.
> ..<stuff deleted>
>Thomas

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.

Hope this helps.

Francis Chan

fchan@vlsi.waterloo.edu (Francis Chan) (01/20/90)

>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