<* PRAGMA LL *> <* PRAGMA SUBTYPE *>A
ShadowedFeedbackVBT
is a multi-filter feedback that displays a
3-D border as visual feedback to another VBT.
INTERFACEThe callShadowedFeedbackVBT ; IMPORT FeedbackVBT, Shadow, VBT; TYPE <* SUBTYPE T <: MultiFilter.T *> T <: Public; Public = FeedbackVBT.T OBJECT METHODS <* LL <= VBT.mu *> init (ch : VBT.T; shadow : Shadow.T := NIL; onStyle := Shadow.Style.Lowered; onExcitedStyle := Shadow.Style.Raised; offStyle := Shadow.Style.Raised; offExcitedStyle := Shadow.Style.Lowered): T END;
v.init(ch, shadow, ...)
initializes v
as a
ShadowedFeedbackVBT
. The internal structure of v
includes a
ShadowedVBT
for displaying the shadow shadow
around ch
. The
default normal
and excited
methods change the style of the
shadow, taking into account the state of v
. For example, when
FeedbackVBT.GetState(v)
returns FALSE
, the excited
method
uses the value of offExcitedStyle
.
On a monochrome screen (whenever Shadow.IsSupport(v, shadow)
is
false), ch
is inverted by the default normal
method when the
state is ``on'' and by the excited
method when the state is
``off.''
The default parameters to the init
method generate a feedback
that is appropriate for buttons. The following procedure generates
a feedback that is appropriate for use by menu buttons:
PROCEDURE NewMenu (ch: VBT.T; shadow: Shadow.T := NIL): T; <* LL <= VBT.mu *>
Return aShadowedFeedbackVBT
appropriate for menu buttons. Thenormal
method always usesShadow.Style.Flat
; theexcited
method always usesShadow.Style.Lowered
.
END ShadowedFeedbackVBT.