" Module: XW-CTRL-DEFS.ST Date: 03-Apr-1991 Version: 1.00-00 Modified: This module provides the basic window controller for the X-Window interface. " " | Change Log |============================================================================== | Author Date Change | " Object subclass: #XWindowController instanceVariableNames: 'window isActive isQuit' classVariableNames:'' poolDictionaries:'' category: 'X-Windows'. ! !XWindowController class methodsFor: 'creation'! newControllerFor: aWindow |newController| newController := super new. newController setWindow: aWindow. newController setActive: false. newController setQuit: false. ^newController !! !XWindowController methodsFor: 'private'! setWindow: aWindow window := aWindow. ^self ! setActive: aValue isActive := aValue. ^self ! setQuit: aValue isQuit := aValue. ^self !! !XWindowController methodsFor: 'using'! window ^window ! isQuit ^isQuit ! activate ( self isControlWanted) ifTrue: [ self setActive: true. self startControl. ]. ^self ! isControlWanted ^ window hasFocus ! startControl self controlInitialize. self controlLoop. self controlTerminate. ^self ! controlInitialize ^self ! controlLoop [self controlIsActive] whileTrue: [self controlActivity]. ^self ! controlIsActive ^isActive ! controlActivity ^self subclassResponsibility ! controlTerminate ^self !!