|
Class: PopUpView
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
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
defaults
-
defaultExtent
-
return the default extent of my instances.
The value returned here is usually ignored, and
the value from preferredExtent taken instead.
-
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.
-
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.
-
shadowsOnDevice: aDevice
-
return true, if shadows should be shown on aDevice
-
updateStyleCache
-
extract values from the styleSheet and cache them in class variables
accessing
-
exclusivePointer: aBoolean
-
set/clear the exclusive pointer flag;
DANGER: if set, no interaction with other views is possible,
while the popUp is active
-
haveControl: aBoolean
-
set the flag which tells me that I have control (focus)
-
noShadow
-
turn off the shadow
activation & deactivation
-
open
-
default for popUpViews is to come up modal
-
show
-
realize the view at its last position
-
showAt: aPoint
-
realize the view at aPoint
-
showAt: aPoint resizing: aBoolean
-
realize the view at aPoint
-
showAtPointer
-
realize the view at the current pointer position
-
showCenteredIn: aView
-
make myself visible at the screen center.
defaults
-
defaultShadow
-
obsoleted by PopUpView defaultShadowOn:aDevice
** This is an obsolete interface - do not use it (it may vanish in future versions) **
grabbing
-
grabKeyboard
-
Transcript show:'k-ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.
-
grabPointerWithCursor: aCursorOrNil
-
Transcript show:'ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousPointerGrab printString.
-
ungrabKeyboard
-
Transcript show:'k-uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.
-
ungrabPointer
-
Transcript show:'uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousPointerGrab printString.
initialization & release
-
create
-
-
destroy
-
-
initStyle
-
setup viewStyle specifics
-
initialize
-
-
releaseDeviceResources
-
-
releasePointer
-
release the mouse pointer
-
releasePointerAndKeyboard
-
release the pointer and keyboard
private
-
regainControl
-
get exclusive access to pointer and keyboard
queries
-
grabWhenMapped
-
return true, if I should perform a grab when mapped.
Redefinable for subclasses.
-
isPopUpView
-
return true, since I want to come up without decoration
and popUp to top immediately.
realize & unrealize
-
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.
|
-
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.
-
realize
-
device zoom:(device pointerPosition extent:1@1)to:(self bounds) duration:10.
-
unmap
-
(comment from inherited method)
unmap the view - the view stays created (but invisible),
and can be remapped again later.
|