|
Class: ActiveHelpView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--ActiveHelpView
- Package:
- stx:libview2
- Category:
- Interface-Help
- Version:
- rev:
1.66
date: 2023/11/11 15:21:10
- user: stefan
- file: ActiveHelpView.st directory: libview2
- module: stx stc-classLibrary: libview2
a bubbleHelp view.
Instances of myself show up either as a comics-like talking
view, or as a simple square popup. This is configured via the
styleSheet. The default is simple-square.
To get the fancy comics style, add a resource 'activeHelpStyle' with
a symbol-value of #cartoon to the stylesheet, or set the overwrite
in the userPrefs with:
UserPreferences current toolTipShapeStyle:#cartoon.
However, be aware that some servers have performance problems with
these view-shapes (or do not support shapes at all, like XQuartz on OSX).
Therefore, the default style is a rectangular popupView.
If the prefs were changed, you can return back to the stylesheet's default with:
UserPreferences current toolTipShapeStyle:nil.
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
instance creation
-
for: someText
-
create a bubble-view for some text
Usage example(s):
|v|
v := (ActiveHelpView for:'hello world\this is an ActiveHelpView' withCRs) shapeStyle:nil.
v realize.
Delay waitForSeconds:2.
v destroy
|
Usage example(s):
|v|
v := (ActiveHelpView for:'hello world\this is an ActiveHelpView' withCRs) shapeStyle:#cartoon.
v realize.
Delay waitForSeconds:2.
v destroy
|
-
for: someText onDevice: aDevice
-
create a bubble-view for some text
Usage example(s):
|v|
v := (ActiveHelpView for:'hello world\this is an ActiveHelpView' withCRs) shapeStyle:nil.
v realize.
Delay waitForSeconds:2.
v destroy
|
Usage example(s):
|v|
v := (ActiveHelpView for:'hello world\this is an ActiveHelpView' withCRs) shapeStyle:#cartoon.
v realize.
Delay waitForSeconds:2.
v destroy
|
-
with: aView
-
create a talking-view wrapping some other view
Usage example(s):
(ActiveHelpView with:(TextView new)) realize
(ActiveHelpView with:(TextView new)) open
(ActiveHelpView with:(Button label:'ok')) open
|
updateStyleCache
-
updateStyleCache
-
(comment from inherited method)
this method gets some heavily used style stuff and keeps
it in class-variables for faster access.
Subclasses should redefine this to load any cached style-values
into faster class variables as well. These should NOT do a
super updateStyleCache, since this method is called for all view-classes
anyway.
accessing
-
contents: someText
-
set the text
-
controllingHelpListener: something
-
-
shapeStyle: aStyleSymbol
-
set the shapeStyle.
Currently, only nil and #cartoon are supported
-
withView: aView
-
set the component view
event handling
-
keyPress: key x: x y: y
-
(comment from inherited method)
a key has been pressed. If there are components,
pass it to the corresponding one.
Otherwise, forward it to the superview, if there is any.
initialization
-
initStyle
-
setup viewStyle specifics
-
realize
-
(comment from inherited method)
realize - make visible;
realizing is done very late (after layout is fixed) to avoid
visible rearranging of windows on the screen
private
-
computeShape
-
compute the shape, based upon the size of my component view
-
resizeToFit
-
resize myself to make the component view fit
queries
-
isPopUpView
-
return true - I am a popUp type of view (no decoration, raise-to-top)
-
wantsFocusWithButtonPress
-
|