[PR #228] [MERGED] Ctrl geometry animation functions and docs #248

Closed
opened 2026-05-05 03:43:53 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/228
Author: @ismail-yilmaz
Created: 1/30/2025
Status: Merged
Merged: 1/30/2025
Merged by: @mirek-fidler

Base: masterHead: ctrl_geometry_animation


📝 Commits (3)

  • e267f1c CtrlLib: Ctrl batch animation function is added and animation functions are documented.
  • 4f495b3 reference: AnimateCtrlGeometry example added.
  • 432109e CtrlCore: Ctrl animation docs are updated.

📊 Changes

5 files changed (+122 additions, -0 deletions)

View changed files

reference/AnimateCtrlGeometry/AnimateCtrlGeometry.upp (+11 -0)
reference/AnimateCtrlGeometry/main.cpp (+35 -0)
uppsrc/CtrlCore/src.tpp/Animation_en-us.tpp (+44 -0)
📝 uppsrc/CtrlLib/CtrlUtil.cpp (+31 -0)
📝 uppsrc/CtrlLib/CtrlUtil.h (+1 -0)

📄 Description

GUI animations, whether simple or complex, are now part of the modern UI frameworks.

In this regard, this set of patches introduces:

  1. A "batch" ctrl animation function: void Animate(Vector<Ptr<Ctrl>>& ctrls, const Vector<Rect>& targets, int duration = 100) This function animates the transition of multiple ctrls from their current positions to the target positions specified by the targets parameter, over a given duration.

  2. A reference example reference/AnimateCtrlGeometry, which demonstrates the batch animation function by animating ("spreading") eight color pushers evenly in a top window.

  3. Documentation of Animate function and its two overloads:

void Animate(Ctrl& c, const Rect& target, int type = -1);
void Animate(Ctrl& c, int x, int y, int cx, int cy, int type = -1);
void Animate(Vector<Ptr<Ctrl>>& ctrls, const Vector<Rect>& targets, int duration = 100);

Please review.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ultimatepp/ultimatepp/pull/228 **Author:** [@ismail-yilmaz](https://github.com/ismail-yilmaz) **Created:** 1/30/2025 **Status:** ✅ Merged **Merged:** 1/30/2025 **Merged by:** [@mirek-fidler](https://github.com/mirek-fidler) **Base:** `master` ← **Head:** `ctrl_geometry_animation` --- ### 📝 Commits (3) - [`e267f1c`](https://github.com/ultimatepp/ultimatepp/commit/e267f1c6f4698af0935cfefa7cec8f5ec8645916) CtrlLib: Ctrl batch animation function is added and animation functions are documented. - [`4f495b3`](https://github.com/ultimatepp/ultimatepp/commit/4f495b32686abf5915284e016ffba103725bb75c) reference: AnimateCtrlGeometry example added. - [`432109e`](https://github.com/ultimatepp/ultimatepp/commit/432109ea7fec4bd966f1d327988f2d11a1ea147e) CtrlCore: Ctrl animation docs are updated. ### 📊 Changes **5 files changed** (+122 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `reference/AnimateCtrlGeometry/AnimateCtrlGeometry.upp` (+11 -0) ➕ `reference/AnimateCtrlGeometry/main.cpp` (+35 -0) ➕ `uppsrc/CtrlCore/src.tpp/Animation_en-us.tpp` (+44 -0) 📝 `uppsrc/CtrlLib/CtrlUtil.cpp` (+31 -0) 📝 `uppsrc/CtrlLib/CtrlUtil.h` (+1 -0) </details> ### 📄 Description GUI animations, whether simple or complex, are now part of the modern UI frameworks. In this regard, this set of patches introduces: 1) A "batch" ctrl animation function: `void Animate(Vector<Ptr<Ctrl>>& ctrls, const Vector<Rect>& targets, int duration = 100)` This function animates the transition of multiple ctrls from their current positions to the target positions specified by the targets parameter, over a given duration. 2) A reference example `reference/AnimateCtrlGeometry`, which demonstrates the batch animation function by animating ("spreading") eight color pushers evenly in a top window. 3) Documentation of `Animate` function and its two overloads: ``` void Animate(Ctrl& c, const Rect& target, int type = -1); void Animate(Ctrl& c, int x, int y, int cx, int cy, int type = -1); void Animate(Vector<Ptr<Ctrl>>& ctrls, const Vector<Rect>& targets, int duration = 100); ``` Please review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:43:53 -06:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#248
No description provided.