# wladid/anyiquack architecture

> Architecture diagram of the GitHub repository wladid/anyiquack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wladid/anyiquack
- Repository: https://github.com/wladid/anyiquack

## Overview

1. **What this repository is**
   - AnyiQuack is a Delphi library built around a fluent, chain-based API for batch processing objects over time.
   - The core use case is UI animation, but the architecture is broader: it can take an object, derive a working set, filter it, attach a plugin, and execute an action across that set.

2. **Core architectural style**
   - The system is organized as a **pipeline**:
     - start from a root object,
     - expand into related objects such as children,
     - narrow the set with filters,
     - attach a plugin that adds behavior,
     - execute an operation such as an animation.
   - The README’s example shows this clearly: object selection and transformation happen before the final plugin-driven action.

3. **Primary library entry points**
   - `AnyiQuack.pas` is the main public-facing unit and likely the import point for the chain API.
   - `AQPMessages.pas` appears to centralize message/notification types used internally by the framework.
   - `AQPSystemTypesAnimations.pas` likely contains shared animation-related types, enums, and system abstractions.
   - `Compile.inc` suggests conditional compilation and platform/compiler-specific configuration.

4. **Plugin boundary**
   - A major design boundary is the **plugin system**.
   - The core library defines the chain mechanics, while plugins provide domain-specific capabilities.
   - `AQPControlAnimations.pas` is the built-in plugin for `TControl` descendants, showing that UI animation is an add-on rather than hardcoded into the core.
   - `Examples/CustomPlugin/AQPCustomPlugin.pas` demonstrates that external developers can extend the framework with their own plugin units.

5. **Animation subsystem**
   - The animation layer is focused on **independent, distributed, parametric animations**.
   - The README mentions a “rationalized easing concept,” so easing is treated as a first-class part of the design rather than an incidental detail.
   - The control-animation plugin likely maps chain operations to animation primitives such as shake, pulsate, and alignment transitions.

6. **UI control integration**
   - `AQPControlAnimations.pas` is the bridge between the generic chain engine and VCL/FM X controls.
   - This is the key integration layer where generic batch processing turns into visual behavior on `TControl` instances.
   - The example call `ChildrenChain(True) -> FilterChain(TButton) -> FinishAnimations -> Plugin<TAQPControlAnimations> -> ShakeAnimation(...)` shows the flow from object graph traversal to control-specific animation execution.

7. **Notification-related subsystem**
   - `NotificationWindowsFramework/NotificationWindows.pas` and its DFM define a separate notification window framework.
   - The matching example under `Examples/NotificationWindows` shows this as a UI module that likely uses the framework to present transient windows or messages.
   - This appears to be a sibling feature area rather than part of the core animation engine.

8. **Example applications as architectural proof**
   - The `Examples` folder is not just demo code; it documents the supported usage patterns and runtime environments.
   - Examples cover:
     - animated alignment,
     - custom plugins,
     - easing suite and sandboxing,
     - method/chain behavior tests,
     - notification windows,
     - pulsating edits,
     - sliding buttons/forms,
     - sticky tools,
     - synchronized scrolling.
   - These examples indicate the framework is intended for reusable UI behavior orchestration, not a single application domain.

9. **VCL and FMX split**
   - The repository supports both **VCL** and **FMX** styles of Delphi development.
   - VCL examples use `.dfm` forms and desktop projects.
   - FMX examples include `.fmx`, mobile manifests, and platform-specific deployment files, showing cross-platform support is an important architectural constraint.

10. **Third-party support**
   - `ThirdPartyLibs/VCLFlickerReduce.pas` is a supporting utility for reducing repaint flicker in VCL.
   - This suggests the framework needs careful UI redraw behavior during animations and batch updates.

11. **Build and packaging structure**
   - `Examples/Examples.groupproj` groups multiple sample projects for IDE-driven building.
   - `_PackExamples.bat` and `_clean.bat` are repository-level maintenance scripts.
   - `Examples/AnyiQuack.Examples.zip` suggests packaged distribution of sample material, useful for adoption and documentation.

12. **Likely data flow to diagram**
   - A useful diagram would show:
     - application code calling the fluent API,
     - core chain objects managing selection and branching,
     - optional filtering and animation state handling,
     - plugin resolution,
     - plugin execution against selected Delphi objects or controls.
   - The core library should be drawn as framework logic, with plugins and examples as separate consumers/extensions.

13. **Key architectural takeaway**
   - This is a **framework + plugin ecosystem**, not a single monolithic app.
   - The stable core is the chain/pipeline engine; everything else—control animations, custom plugins, notification windows, and examples—hangs off that core through explicit extension points.

Main entry points: [`AnyiQuack.pas`](https://github.com/wladid/anyiquack/blob/master/AnyiQuack.pas) (AnyiQuack), [`AQPControlAnimations.pas`](https://github.com/wladid/anyiquack/blob/master/AQPControlAnimations.pas) (Control anims), [`Compile.inc`](https://github.com/wladid/anyiquack/blob/master/Compile.inc) (Compile cfg), [`Examples/CustomPlugin/AQPCustomPlugin.pas`](https://github.com/wladid/anyiquack/blob/master/Examples/CustomPlugin/AQPCustomPlugin.pas) (Custom plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core library"]
  node_anyiquack["AnyiQuack<br/>public API<br/>[AnyiQuack.pas]"]
  node_aqp_messages["Messages<br/>message model<br/>[AQPMessages.pas]"]
  node_aqp_types["Anim types<br/>type system"]
end

subgraph group_plugins["Plugins"]
  node_control_anim["Control anims<br/>plugin"]
  node_custom_plugin["Custom plugin<br/>example plugin"]
end

subgraph group_ui["UI modules"]
  node_notif_framework["Notify framework<br/>ui module"]
end

subgraph group_examples["Examples"]
  node_ex_animated_align_vcl["Animated Align<br/>VCL example<br/>[Main.pas]"]
  node_ex_animated_align_fmx["Animated Align FMX<br/>FMX example<br/>[Main.pas]"]
  node_ex_easing["Easing Suite<br/>example app<br/>[Main.pas]"]
  node_ex_method_tests["Method Tests<br/>chain example<br/>[SliceChain.pas]"]
  node_ex_notify["Notifications<br/>example app<br/>[Main.pas]"]
  node_ex_pulsate["Pulsate Edits<br/>VCL example<br/>[Main.pas]"]
  node_ex_sliding_fmx["Sliding Buttons<br/>FMX example<br/>[Main.pas]"]
  node_ex_sliding_form["Sliding Form<br/>VCL example<br/>[Main.pas]"]
  node_ex_sticky_tools["Sticky Tools<br/>VCL example<br/>[AQPStickyTools.pas]"]
  node_ex_sync_scroll["Sync Scroll<br/>VCL example<br/>[Main.pas]"]
end

subgraph group_support["Support"]
  node_compile_inc["Compile cfg<br/>build config<br/>[Compile.inc]"]
  node_vcl_flicker["Flicker reduce<br/>ui helper"]
end

node_compile_inc -->|"configures"| node_anyiquack
node_compile_inc -->|"configures"| node_control_anim
node_anyiquack -->|"uses"| node_aqp_messages
node_anyiquack -->|"uses"| node_aqp_types
node_anyiquack -->|"extends via"| node_control_anim
node_anyiquack -->|"supports"| node_custom_plugin
node_control_anim -->|"uses"| node_aqp_types
node_control_anim -.->|"assists"| node_vcl_flicker
node_custom_plugin -->|"implements"| node_anyiquack
node_notif_framework -->|"drives"| node_ex_notify
node_control_anim -->|"powers"| node_ex_animated_align_vcl
node_control_anim -->|"powers"| node_ex_animated_align_fmx
node_control_anim -->|"powers"| node_ex_pulsate
node_control_anim -->|"powers"| node_ex_sliding_fmx
node_control_anim -->|"powers"| node_ex_sliding_form
node_control_anim -->|"powers"| node_ex_sticky_tools
node_anyiquack -->|"validated by"| node_ex_method_tests
node_anyiquack -->|"demonstrated by"| node_ex_easing
node_anyiquack -->|"demonstrated by"| node_ex_sync_scroll
node_anyiquack -->|"demonstrated by"| node_ex_animated_align_vcl
node_anyiquack -->|"demonstrated by"| node_ex_animated_align_fmx

click node_anyiquack "https://github.com/wladid/anyiquack/blob/master/AnyiQuack.pas"
click node_aqp_messages "https://github.com/wladid/anyiquack/blob/master/AQPMessages.pas"
click node_aqp_types "https://github.com/wladid/anyiquack/blob/master/AQPSystemTypesAnimations.pas"
click node_compile_inc "https://github.com/wladid/anyiquack/blob/master/Compile.inc"
click node_control_anim "https://github.com/wladid/anyiquack/blob/master/AQPControlAnimations.pas"
click node_custom_plugin "https://github.com/wladid/anyiquack/blob/master/Examples/CustomPlugin/AQPCustomPlugin.pas"
click node_notif_framework "https://github.com/wladid/anyiquack/blob/master/NotificationWindowsFramework/NotificationWindows.pas"
click node_vcl_flicker "https://github.com/wladid/anyiquack/blob/master/ThirdPartyLibs/VCLFlickerReduce.pas"
click node_ex_animated_align_vcl "https://github.com/wladid/anyiquack/blob/master/Examples/AnimatedAlign/Main.pas"
click node_ex_animated_align_fmx "https://github.com/wladid/anyiquack/blob/master/Examples/AnimatedAlignFMX/Main.pas"
click node_ex_easing "https://github.com/wladid/anyiquack/blob/master/Examples/EasingSuite/Main.pas"
click node_ex_method_tests "https://github.com/wladid/anyiquack/blob/master/Examples/MethodTests/SliceChain.pas"
click node_ex_notify "https://github.com/wladid/anyiquack/blob/master/Examples/NotificationWindows/Main.pas"
click node_ex_pulsate "https://github.com/wladid/anyiquack/blob/master/Examples/PulsateEdits/Main.pas"
click node_ex_sliding_fmx "https://github.com/wladid/anyiquack/blob/master/Examples/SlidingButtonsFMX/Main.pas"
click node_ex_sliding_form "https://github.com/wladid/anyiquack/blob/master/Examples/SlidingForm/Main.pas"
click node_ex_sticky_tools "https://github.com/wladid/anyiquack/blob/master/Examples/StickyTools/AQPStickyTools.pas"
click node_ex_sync_scroll "https://github.com/wladid/anyiquack/blob/master/Examples/SyncScroll/Main.pas"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_anyiquack,node_aqp_messages,node_aqp_types toneBlue
class node_control_anim,node_custom_plugin toneAmber
class node_notif_framework toneMint
class node_ex_animated_align_vcl,node_ex_animated_align_fmx,node_ex_easing,node_ex_method_tests,node_ex_notify,node_ex_pulsate,node_ex_sliding_fmx,node_ex_sliding_form,node_ex_sticky_tools,node_ex_sync_scroll toneRose
class node_compile_inc,node_vcl_flicker toneIndigo
```

## Components

### Core library

Public API, shared types, and internal message/model units for the fluent batch-processing pipeline.

- [AnyiQuack](https://github.com/wladid/anyiquack/blob/master/AnyiQuack.pas): public API · Main entry point for the fluent chain/pipeline library. · `AnyiQuack.pas`
- [Messages](https://github.com/wladid/anyiquack/blob/master/AQPMessages.pas): message model · Shared notification and message types used by the framework. · `AQPMessages.pas`
- [Anim types](https://github.com/wladid/anyiquack/blob/master/AQPSystemTypesAnimations.pas): type system · Shared animation-related enums and abstractions. · `AQPSystemTypesAnimations.pas`

### Plugins

Extension points that turn the generic chain engine into domain-specific behavior.

- [Control anims](https://github.com/wladid/anyiquack/blob/master/AQPControlAnimations.pas): plugin · Built-in plugin that binds the chain engine to Delphi controls. · `AQPControlAnimations.pas`
- [Custom plugin](https://github.com/wladid/anyiquack/blob/master/Examples/CustomPlugin/AQPCustomPlugin.pas): example plugin · Sample external plugin showing how the framework can be extended. · `Examples/CustomPlugin/AQPCustomPlugin.pas`

### UI modules

Reusable UI-oriented feature modules built on top of the framework.

- [Notify framework](https://github.com/wladid/anyiquack/blob/master/NotificationWindowsFramework/NotificationWindows.pas): ui module · Standalone notification-window framework module. · `NotificationWindowsFramework/NotificationWindows.pas`

### Examples

Sample applications that demonstrate supported usage patterns and runtime targets.

- [Animated Align](https://github.com/wladid/anyiquack/blob/master/Examples/AnimatedAlign/Main.pas): VCL example · Demonstrates alignment-driven animations in a VCL app. · `Examples/AnimatedAlign/Main.pas`
- [Animated Align FMX](https://github.com/wladid/anyiquack/blob/master/Examples/AnimatedAlignFMX/Main.pas): FMX example · FMX variant of animated alignment and cross-platform UI behavior. · `Examples/AnimatedAlignFMX/Main.pas`
- [Easing Suite](https://github.com/wladid/anyiquack/blob/master/Examples/EasingSuite/Main.pas): example app · Explores easing behavior and animation tuning. · `Examples/EasingSuite/Main.pas`
- [Method Tests](https://github.com/wladid/anyiquack/blob/master/Examples/MethodTests/SliceChain.pas): chain example · Exercises chain slicing and method behavior. · `Examples/MethodTests/SliceChain.pas`
- [Notifications](https://github.com/wladid/anyiquack/blob/master/Examples/NotificationWindows/Main.pas): example app · Example application for the notification window subsystem. · `Examples/NotificationWindows/Main.pas`
- [Pulsate Edits](https://github.com/wladid/anyiquack/blob/master/Examples/PulsateEdits/Main.pas): VCL example · Shows animated edit controls and pulsating behavior. · `Examples/PulsateEdits/Main.pas`
- [Sliding Buttons](https://github.com/wladid/anyiquack/blob/master/Examples/SlidingButtonsFMX/Main.pas): FMX example · Demonstrates sliding animations in an FMX app. · `Examples/SlidingButtonsFMX/Main.pas`
- [Sliding Form](https://github.com/wladid/anyiquack/blob/master/Examples/SlidingForm/Main.pas): VCL example · Shows form-level sliding transitions. · `Examples/SlidingForm/Main.pas`
- [Sticky Tools](https://github.com/wladid/anyiquack/blob/master/Examples/StickyTools/AQPStickyTools.pas): VCL example · Example of tool-window behavior built on framework helpers. · `Examples/StickyTools/AQPStickyTools.pas`
- [Sync Scroll](https://github.com/wladid/anyiquack/blob/master/Examples/SyncScroll/Main.pas): VCL example · Demonstrates synchronized scrolling behavior. · `Examples/SyncScroll/Main.pas`

### Support

Compilation switches and third-party helpers used by the framework and examples.

- [Compile cfg](https://github.com/wladid/anyiquack/blob/master/Compile.inc): build config · Conditional compilation and platform/compiler configuration. · `Compile.inc`
- [Flicker reduce](https://github.com/wladid/anyiquack/blob/master/ThirdPartyLibs/VCLFlickerReduce.pas): ui helper · Third-party helper for reducing VCL repaint flicker during UI updates. · `ThirdPartyLibs/VCLFlickerReduce.pas`

## Connections

- Compile cfg → AnyiQuack: configures · Build switches shape the public library across Delphi targets.
- Compile cfg → Control anims: configures · Platform/compiler flags affect the control animation plugin.
- AnyiQuack → Messages: uses · The core API depends on shared message/notification types.
- AnyiQuack → Anim types: uses · The chain engine relies on shared animation abstractions.
- AnyiQuack → Control anims: extends via · The public fluent API reaches the built-in control plugin boundary.
- AnyiQuack → Custom plugin: supports · The core framework is designed for external plugin extension.
- Control anims → Anim types: uses · Control animations use the shared animation type system.
- Control anims → Flicker reduce: assists · UI updates may use flicker reduction during animation bursts.
- Custom plugin → AnyiQuack: implements · Sample plugin shows how third-party code plugs into the chain API.
- Notify framework → Notifications: drives · The framework is exercised by the notification example app.
- Control anims → Animated Align: powers · VCL alignment animation example is built on the control plugin.
- Control anims → Animated Align FMX: powers · FMX alignment animation example uses the same animation concepts.
- Control anims → Pulsate Edits: powers · Pulsating edits are implemented through control animations.
- Control anims → Sliding Buttons: powers · Sliding behavior is an FMX control-animation scenario.
- Control anims → Sliding Form: powers · Form sliding is a control-animation scenario.
- Control anims → Sticky Tools: powers · Sticky tools rely on the control animation plugin and UI helpers.
- AnyiQuack → Method Tests: validated by · Chain slicing and method behavior are exercised by the method tests example.
- AnyiQuack → Easing Suite: demonstrated by · Easing behavior is showcased as part of the animation pipeline.
- AnyiQuack → Sync Scroll: demonstrated by · Synchronized scrolling shows batch operations over related UI objects.
- AnyiQuack → Animated Align: demonstrated by · Example app documents fluent selection, filtering, and execution.
- AnyiQuack → Animated Align FMX: demonstrated by · FMX example documents cross-platform use of the chain API.
