wxRuby3 icon indicating copy to clipboard operation
wxRuby3 copied to clipboard

Add support for Wx::GenericAnimationCtrl so that wxGTK can display .ANI files

Open Randalphwa opened this issue 1 year ago • 1 comments

Description

I don't have a way to verify with 100% certainty that it doesn't exist since I can't get wxRuby3 correctly installed on Windows or Fedora (see update in #275), but grepping doesn't indicate Wx::GenericAnimationCtrl exists, and it certainly didn't exist back in the 0.94 version.

The generic version is required when loading .ANI files on wxGTK as the native implementation of wxAnimationCtrl only supports .GIF files. Note that implementation might be a bit different depending on how wxRuby3 implemented wxAnimationCtrl. In particular, you cannot just create animation = Wx::Animation.new and pass animation to Wx::AnimationCtrl.new(self, Wx::ID_ANY, animation, ...) as this will crash on wxGTK. Instead, you have to create the ctrl, call CreateAnimation() from that control, use that to load the .ANI file and then call SetAnimation(). Sorry if you already knew that, or are doing that, just wanted to save you some time if you do decide to add the generic version.

Randalphwa avatar May 28 '24 13:05 Randalphwa

I'll put this on the list for a next update. This will not be very soon though as I do not have much time the coming 2-3 months.

mcorino avatar May 28 '24 15:05 mcorino

I have just released wxRuby3 v1.2.1 which includes Wx::GenericAnimationCtrl.

mcorino avatar Sep 29 '24 12:09 mcorino