TStyledAnimatedTaskDialog - Technical Reference
Overview
TStyledAnimatedTaskDialog is a TStyledTaskDialog delivered with the Skia4Delphi animated form: the icons of the dialog are Lottie animations. See the TStyledAnimatedTaskDialog page for the description and the examples.
Class Hierarchy
TComponent
└─ TCustomTaskDialog
└─ TTaskDialog
└─ TStyledTaskDialog
└─ TStyledAnimatedTaskDialogUnits
| Unit | Content |
|---|---|
Vcl.StyledAnimatedTaskDialog | TStyledAnimatedTaskDialog. Its implementation uses Skia.Vcl.StyledTaskDialogAnimatedUnit, so the animated form is linked and registered |
Skia.Vcl.StyledTaskDialogAnimatedUnit | TStyledTaskDialogAnimatedForm, the resources Animations.RES ({$R Animations.RES}), registration in initialization |
Packages: StyledAnimatedComponents (runtime, requires StyledComponents, Skia.Package.VCL, Skia.Package.RTL) and dclStyledAnimatedComponents (design-time). Palette page: Styled Animated Components.
Members of TStyledAnimatedTaskDialog
The class declares no new properties, methods or events (empty body). Everything comes from TStyledTaskDialog; the ones that control the animations are:
| Property | Type | Default | Description |
|---|---|---|---|
UseAnimations | Boolean | False | Shows the dialog with the animated form. Raises EStyledTaskDialogException if no animated form is registered (the unit Skia.Vcl.StyledTaskDialogAnimatedUnit is not in the project) |
UseAnimationLoop | Boolean | False | Loops the animation of the icon (turning it on sets UseAnimations) |
UseAnimationInverse | Boolean | False | Plays the animation in reverse (turning it on sets UseAnimations) |
MainIcon | TTaskDialogIcon | tdiInformation | Selects the animation: tdiNone (Custom), tdiWarning, tdiError, tdiInformation, tdiShield, tdiQuestion |
FooterIcon | TTaskDialogIcon | tdiNone | Selects the animation of the footer |
MainIconSize | Integer | 64 | Size of the animated icon |
For all the other members (buttons, texts, AutoClick, DialogButtonsFamily, events...) see the TStyledTaskDialog Reference.
TStyledTaskDialogAnimatedForm (unit Skia.Vcl.StyledTaskDialogAnimatedUnit)
Descendant of TStyledTaskDialogForm.
| Member | Visibility | Description |
|---|---|---|
SkAnimatedImage: TSkAnimatedImage | published field | Animation of the main icon |
SkFooterAnimatedImage: TSkAnimatedImage | published field | Animation of the footer icon |
class function CanUseAnimations: Boolean | protected, override | Returns True: the class is registered as the animated form |
procedure LoadImage(AImageIndex; AImageName) | protected, override | Loads the Lottie resource of the main icon |
procedure LoadCustomMainIcon(AIcon; ATaskDialogIcon) | protected, override | A custom icon is ignored: the animation of ATaskDialogIcon is loaded |
procedure LoadCustomFooterIcon(AIcon; ATaskDialogIcon) | protected, override | Loads the animation of the footer icon (a custom icon is not animated) |
AnimationLoop, AnimationInverse | public (inherited) | Copied from UseAnimationLoop / UseAnimationInverse of the dialog |
Lottie resources
Linked from Animations.RES (source source\Animations.rc, built with source\BuildResFileOfAnimations.cmd), type RCDATA, name STYLEDTASKLOTTIE_ + icon name:
| Resource | Used for |
|---|---|
STYLEDTASKLOTTIE_INFORMATION | tdiInformation |
STYLEDTASKLOTTIE_WARNING | tdiWarning |
STYLEDTASKLOTTIE_ERROR | tdiError |
STYLEDTASKLOTTIE_QUESTION | tdiQuestion (and mtConfirmation dialogs) |
STYLEDTASKLOTTIE_SHIELD | tdiShield |
STYLEDTASKLOTTIE_CUSTOM | tdiNone |
STYLEDTASKLOTTIE_NOTIFY | not mapped to an icon; used by the demo animated buttons |
Registration routines (unit Vcl.StyledTaskDialogFormUnit)
RegisterTaskDialogFormClass(TStyledTaskDialogAnimatedForm) (done by the unit initialization), UnRegisterTaskDialogFormClass, AnimatedTaskDialogFormRegistered: Boolean, and the global InitializeStyledTaskDialogs(AUseAnimations: Boolean) that switches the animated dialogs on or off for the message routines. See the TStyledTaskDialog Reference.
