eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'PopUpView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: PopUpView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--TopView
                  |
                  +--PopUpView
                     |
                     +--CodeCompletionHelpMenuView::SimulatedMenuForHTMLView
                     |
                     +--ExtendedComboBox::MenuWrapper
                     |
                     +--PopUpBanner
                     |
                     +--PopUpMenu

Package:
stx:libview
Category:
Views-Basic
Version:
rev: 1.67 date: 2019/08/11 12:27:31
user: cg
file: PopUpView.st directory: libview
module: stx stc-classLibrary: libview
Author:
Claus Gittinger

Description:


this class implements an abstract superclass for all views which bypass the 
window manager and pop up on top of the screen. A typical example is
a PopUpMenu. PopUpView itself is abstract, providing basic mechanisms.
They are not decorated by window managers.

[styleSheet parameters:]

    popupShadow         <Boolean>           if true, popupViews show a shadow below
    popupLevel          <nil | Integer>     3D level
    popupBorderWidth    <nil | Integer>     borderWidth


Class protocol:

defaults
o  defaultExtent
return the default extent of my instances.
The value returned here is usually ignored, and
the value from preferredExtent taken instead.

o  shadows
return the shadows-flag. False means: turned off.
Notice, that even when set to true, a particular device might
want to suppress this feature.

o  shadows: aBoolean
turn on/off shadows under popUpViews.
Notice, that even when set to true, a particular device might
want to suppress this feature.
On slow displays, turning them off makes menus appear a bit snappier.
The default is set via the styleSheet and changes when the viewStyle
is changed.

o  shadowsOnDevice: aDevice
return true, if shadows should be shown on aDevice

o  updateStyleCache
extract values from the styleSheet and cache them in class variables


Instance protocol:

accessing
o  exclusivePointer: aBoolean
set/clear the exclusive pointer flag;
DANGER: if set, no interaction with other views is possible,
while the popUp is active

o  haveControl: aBoolean
set the flag which tells me that I have control (focus)

o  noShadow
turn off the shadow

activation & deactivation
o  open
default for popUpViews is to come up modal

o  show
realize the view at its last position

o  showAt: aPoint
realize the view at aPoint

o  showAt: aPoint resizing: aBoolean
realize the view at aPoint

o  showAtPointer
realize the view at the current pointer position

o  showCenteredIn: aView
make myself visible at the screen center.

defaults
o  defaultShadow
obsoleted by PopUpView defaultShadowOn:aDevice

** This is an obsolete interface - do not use it (it may vanish in future versions) **

grabbing
o  grabKeyboard
Transcript show:'k-ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.

o  grabPointerWithCursor: aCursorOrNil
Transcript show:'ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousPointerGrab printString.

o  ungrabKeyboard
Transcript show:'k-uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.

o  ungrabPointer
Transcript show:'uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousPointerGrab printString.

initialization & release
o  create

o  destroy

o  initStyle
setup viewStyle specifics

o  initialize

o  releaseDeviceResources

o  releasePointer
release the mouse pointer

o  releasePointerAndKeyboard
release the pointer and keyboard

private
o  regainControl
get exclusive access to pointer and keyboard

queries
o  grabWhenMapped
return true, if I should perform a grab when mapped.
Redefinable for subclasses.

o  isPopUpView
return true, since I want to come up without decoration
and popUp to top immediately.

realize & unrealize
o  hide
hide the view, leave its modal event loop

usage example(s):

         this is a kludge for IRIS and others which do not provide backingstore:
         when we hide a modalbox (such as a searchbox) which covered
         a scrollbar, the scrollbars bitblt-method will copy from the
         not-yet redrawn area - effectively clearing the scroller.
         We need a short delay here, since at this time, the expose event has
         not yet arrived.

o  mapped
grab the pointer here, when visible (but not control is already lost).
If the grab fails, try again and unmap myself if that fails too.

o  realize
device zoom:(device pointerPosition extent:1@1)to:(self bounds) duration:10.

o  unmap
(comment from inherited method)
unmap the view - the view stays created (but invisible),
and can be remapped again later.



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 24 Apr 2024 11:22:35 GMT