lego/src/TrillSwitchVBT.i3


Copyright (C) 1994, Digital Equipment Corp.
<* PRAGMA LL *>
<* PRAGMA SUBTYPE *>
A TrillSwitchVBT.T is a switch version of Trestle's TrillBtnVBT.

Actually, a TrillBtnVBT does not exist. If it existed, it would be a button that generates events repeatedly while the mouse is down and in its domain. When the mouse leaves the domain, events generation is suspended until the mouse returns.

The implementation uses the AutoRepeat interface for repeatedly generating events. That interface defines the parameters that control how frequently events are generated, and how long to wait before starting to auto-repeat.

INTERFACE TrillSwitchVBT;

IMPORT ButtonVBT, FeedbackVBT, VBT;

TYPE
  <* SUBTYPE T <: MultiFilter.T *>
  T <: Public;
  Public = ButtonVBT.T OBJECT
           METHODS
             <* LL.sup <= VBT.mu *>
             init (f: FeedbackVBT.T): T;
             <* LL.sup = VBT.mu *>
             callback (READONLY cd: VBT.MouseRec);
           END;

END TrillSwitchVBT.