monomer-1.6.0.1: A GUI library for writing native Haskell applications.
Copyright(c) 2023 Ruslan Gadeev Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Monomer.Widgets.Animation.Shake

Description

Shake animation widget. Wraps a child widget whose content will be animated.

Messages:

  • Accepts a AnimationMsg, used to control the state of the animation.
Synopsis

Configuration

data ShakeCfg s e Source #

Configuration options for shake:

Instances

Instances details
Monoid (ShakeCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

Methods

mempty :: ShakeCfg s e #

mappend :: ShakeCfg s e -> ShakeCfg s e -> ShakeCfg s e #

mconcat :: [ShakeCfg s e] -> ShakeCfg s e #

Semigroup (ShakeCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

Methods

(<>) :: ShakeCfg s e -> ShakeCfg s e -> ShakeCfg s e #

sconcat :: NonEmpty (ShakeCfg s e) -> ShakeCfg s e #

stimes :: Integral b => b -> ShakeCfg s e -> ShakeCfg s e #

Show (ShakeCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

Methods

showsPrec :: Int -> ShakeCfg s e -> ShowS #

show :: ShakeCfg s e -> String #

showList :: [ShakeCfg s e] -> ShowS #

Default (ShakeCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

Methods

def :: ShakeCfg s e #

Eq e => Eq (ShakeCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

Methods

(==) :: ShakeCfg s e -> ShakeCfg s e -> Bool #

(/=) :: ShakeCfg s e -> ShakeCfg s e -> Bool #

CmbAutoStart (ShakeCfg s e) Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

CmbDuration (ShakeCfg s e) Millisecond Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

WidgetEvent e => CmbOnFinished (ShakeCfg s e) e Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

Methods

onFinished :: e -> ShakeCfg s e Source #

CmbOnFinishedReq (ShakeCfg s e) s e Source # 
Instance details

Defined in Monomer.Widgets.Animation.Shake

shakeH :: ShakeCfg s e Source #

Shake horizontally.

shakeV :: ShakeCfg s e Source #

Shake vertically.

shakeR :: ShakeCfg s e Source #

Shake by rotating.

shakeS :: ShakeCfg s e Source #

Shake by scaling.

shakeAmplitude :: Double -> ShakeCfg s e Source #

Amplitude of the animation. Defaults to 1.

shakeFrequency :: Int -> ShakeCfg s e Source #

Frequency of the animation. Defaults to 2.

Constructors

animShake Source #

Arguments

:: WidgetEvent e 
=> WidgetNode s e

The child node.

-> WidgetNode s e

The created animation container.

Shakes a widget.

animShake_ Source #

Arguments

:: WidgetEvent e 
=> [ShakeCfg s e]

The config options.

-> WidgetNode s e

The child node.

-> WidgetNode s e

The created animation container.

Shakes a widget. Accepts config.