ActiveHelp.st
changeset 4401 d56d4954d73c
parent 4371 3524eff4c957
child 4407 6967e0f64e03
equal deleted inserted replaced
4400:23bfab5ccb55 4401:d56d4954d73c
   234     "Modified: / 19-06-2018 / 12:53:36 / Claus Gittinger"
   234     "Modified: / 19-06-2018 / 12:53:36 / Claus Gittinger"
   235 ! !
   235 ! !
   236 
   236 
   237 !ActiveHelp class methodsFor:'accessing'!
   237 !ActiveHelp class methodsFor:'accessing'!
   238 
   238 
       
   239 currentHelpListener
       
   240     "return the activeHelp listener if activeHelp is turned on, nil otherwise"
       
   241 
       
   242     ^ TheOneAndOnlyHelpListener
       
   243 
       
   244     "
       
   245      ActiveHelp currentHelpListener
       
   246      FlyByHelp currentHelpListener
       
   247     "
       
   248 
       
   249     "Created: 28.6.1997 / 13:59:44 / cg"
       
   250 !
       
   251 
   239 debugging
   252 debugging
   240     ^ Debugging ? false
   253     ^ Debugging ? false
   241 
   254 
   242     "Modified: / 22-12-2011 / 10:46:30 / cg"
   255     "Modified: / 22-12-2011 / 10:46:30 / cg"
   243     "Modified: / 11-06-2018 / 10:27:40 / Claus Gittinger"
   256     "Modified: / 11-06-2018 / 10:27:40 / Claus Gittinger"
   270     "
   283     "
   271 
   284 
   272     "Created: / 11-06-2018 / 10:30:24 / Claus Gittinger"
   285     "Created: / 11-06-2018 / 10:30:24 / Claus Gittinger"
   273 !
   286 !
   274 
   287 
       
   288 delayTime
       
   289     ^ DelayTime ? 0.4
       
   290 !
       
   291 
       
   292 delayTime:numberOfSeconds
       
   293     "set the delay (the time, the cursor has to be in the view
       
   294      before help is shown). The default is 2 seconds."
       
   295 
       
   296     DelayTime := numberOfSeconds
       
   297 
       
   298     "
       
   299      ActiveHelp delayTime:0.5
       
   300      ActiveHelp delayTime:2
       
   301      ActiveHelp delayTime:10
       
   302     "
       
   303 !
       
   304 
       
   305 showTime
       
   306     "set the number of seconds, a help messages is to be shown.
       
   307      The default is 15 seconds.
       
   308      0 means: show forever (i.e. until mouse is moved)"
       
   309 
       
   310     ^ ShowTime ? 15
       
   311 
       
   312     "
       
   313      self showTime
       
   314     "
       
   315 
       
   316     "Modified: / 10-11-2010 / 12:29:44 / cg"
       
   317 !
       
   318 
       
   319 showTime:numberOfSeconds
       
   320     "set the number of seconds, a help messages is to be shown.
       
   321      The default is defined in the getter.
       
   322      0 means: show forever (i.e. until mouse is moved)"
       
   323 
       
   324     ShowTime := numberOfSeconds
       
   325 
       
   326     "
       
   327      ActiveHelp showTime:10
       
   328      ActiveHelp showTime:99999 
       
   329      ActiveHelp showTime:30
       
   330     "
       
   331 
       
   332     "Modified: / 10-11-2010 / 12:29:40 / cg"
       
   333 !
       
   334 
   275 singleton
   335 singleton
   276     ^ TheOneAndOnlyHelpListener
   336     ^ TheOneAndOnlyHelpListener
   277 
   337 
   278     "Created: / 27-02-2019 / 11:06:32 / Claus Gittinger"
   338     "Created: / 27-02-2019 / 11:06:32 / Claus Gittinger"
   279 ! !
   339 ! !
   280 
   340 
   281 !ActiveHelp class methodsFor:'queries'!
   341 !ActiveHelp class methodsFor:'queries'!
   282 
       
   283 currentHelpListener
       
   284     "return the activeHelp listener if activeHelp is turned on, nil otherwise"
       
   285 
       
   286     ^ TheOneAndOnlyHelpListener
       
   287 
       
   288     "
       
   289      ActiveHelp currentHelpListener
       
   290      FlyByHelp currentHelpListener
       
   291     "
       
   292 
       
   293     "Created: 28.6.1997 / 13:59:44 / cg"
       
   294 !
       
   295 
       
   296 delayTime
       
   297     ^ DelayTime ? 0.4
       
   298 !
       
   299 
   342 
   300 isActive
   343 isActive
   301     "return true, if activeHelp is turned on"
   344     "return true, if activeHelp is turned on"
   302 
   345 
   303     TheOneAndOnlyHelpListener notNil ifTrue:[
   346     TheOneAndOnlyHelpListener notNil ifTrue:[
   311     "
   354     "
   312      FlyByHelp isActive
   355      FlyByHelp isActive
   313     "
   356     "
   314 
   357 
   315     "Modified: 27.4.1996 / 15:07:57 / cg"
   358     "Modified: 27.4.1996 / 15:07:57 / cg"
   316 !
       
   317 
       
   318 showTime
       
   319     "set the number of seconds, a help messages is to be shown.
       
   320      The default is 45 seconds.
       
   321      0 means: show forever (i.e. until mouse is moved)"
       
   322 
       
   323     ^ ShowTime ? 45
       
   324 
       
   325     "Modified: / 10-11-2010 / 12:29:44 / cg"
       
   326 ! !
   359 ! !
   327 
   360 
   328 !ActiveHelp class methodsFor:'start & stop'!
   361 !ActiveHelp class methodsFor:'start & stop'!
   329 
   362 
   330 initiateHelp
   363 initiateHelp
   428 
   461 
   429     "
   462     "
   430      ActiveHelp suspend
   463      ActiveHelp suspend
   431      FlyByHelp suspend
   464      FlyByHelp suspend
   432     "
   465     "
   433 ! !
       
   434 
       
   435 !ActiveHelp class methodsFor:'times'!
       
   436 
       
   437 delayTime:numberOfSeconds
       
   438     "set the delay (the time, the cursor has to be in the view
       
   439      before help is shown). The default is 2 seconds."
       
   440 
       
   441     DelayTime := numberOfSeconds
       
   442 
       
   443     "
       
   444      ActiveHelp delayTime:0.5
       
   445      ActiveHelp delayTime:2
       
   446      ActiveHelp delayTime:10
       
   447     "
       
   448 !
       
   449 
       
   450 showTime:numberOfSeconds
       
   451     "set the number of seconds, a help messages is to be shown.
       
   452      The default is 30 seconds.
       
   453      0 means: show forever (i.e. until mouse is moved)"
       
   454 
       
   455     ShowTime := numberOfSeconds
       
   456 
       
   457     "
       
   458      ActiveHelp showTime:10
       
   459      ActiveHelp showTime:99999 
       
   460      ActiveHelp showTime:30
       
   461     "
       
   462 
       
   463     "Modified: / 10-11-2010 / 12:29:40 / cg"
       
   464 ! !
   466 ! !
   465 
   467 
   466 !ActiveHelp methodsFor:'event handling'!
   468 !ActiveHelp methodsFor:'event handling'!
   467 
   469 
   468 buttonMotion:buttonAndModifierState x:x y:y view:aView
   470 buttonMotion:buttonAndModifierState x:x y:y view:aView