eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ActiveHelpView':

Home

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

Class: ActiveHelpView


Inheritance:

   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

Description:


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.

copyright

COPYRIGHT (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.

Class protocol:

instance creation
o  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

o  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

o  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
o  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.


Instance protocol:

accessing
o  contents: someText
set the text

o  controllingHelpListener: something

o  shapeStyle: aStyleSymbol
set the shapeStyle.
Currently, only nil and #cartoon are supported

o  withView: aView
set the component view

event handling
o  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
o  initStyle
setup viewStyle specifics

o  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
o  computeShape
compute the shape, based upon the size of my component view

o  resizeToFit
resize myself to make the component view fit

queries
o  isPopUpView
return true - I am a popUp type of view (no decoration, raise-to-top)

o  wantsFocusWithButtonPress



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Thu, 10 Oct 2024 10:51:29 GMT