eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ToggleController':

Home

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

Class: ToggleController


Inheritance:

   Object
   |
   +--Controller
      |
      +--ButtonController
         |
         +--ToggleController
            |
            +--RadioButtonController

Package:
stx:libwidg
Category:
Interface-Support-Controllers
Version:
rev: 1.18 date: 2021/01/20 15:55:38
user: cg
file: ToggleController.st directory: libwidg
module: stx stc-classLibrary: libwidg

Description:


ToggleControllers redefine some of ButtonControllers behavior;
user interaction: they always triggerOnDown, and ignore buttonrelease.
Finally, every buttonPress leads to a toggle action.

ToggleController adds another actionBlock, since it inherits press-
and releaseActions, while we want one actionBlock to be used for both
on- and off. The actionBlock (if any) is evaluated with the current
toggles state if it expects an argument, or without argument if it's a no-arg
block.

Other than that, all model relations are inherited - i.e. if the view has a model,
that one gets change-messages and the toggle updates on aspect changes.

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.

Instance protocol:

accessing
o  action: aBlock
set the action to be performed. This is called
with the toggles state as argument.

events
o  keyPress: key x: x y: y
toggle on space

o  performAction
the toggle changed its state; first tell the model and
channels, then evaluate any (optional) press/release actions,
finally evaluate my real action, the toggle action.
Individual press/release actions are usually nil for toggles.

initialization
o  initialize
must be called if redefined



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:33:07 GMT