edelib
2.1.0
|
Animate list of images inside box. More...
#include <edelib/AnimateBox.h>
Public Member Functions | |
AnimateBox (int X, int Y, int W, int H, const char *l=0) | |
~AnimateBox () | |
bool | append (Fl_Image *img) |
bool | append (const char *path) |
void | rate (float r) |
float | rate (void) |
void | next_image (void) |
void | start_animation (void) |
void | stop_animation (void) |
void | rollover (void) |
void | animate_on_show (void) |
int | handle (int e) |
Animate list of images inside box.
Load a list of images (any type FLTK supports) and display animation in loaded order. The images will be shown as is, without any transition between the images, so for fluid animation, make sure to use larger number of images.
Inspired from Erco's animate example.
|
inline |
Constructor.
~AnimateBox | ( | ) |
Clean loaded images.
void animate_on_show | ( | void | ) |
Widget will perform animation as soon is shown.
bool append | ( | Fl_Image * | img | ) |
Append image.
bool append | ( | const char * | path | ) |
Load image from given path and add it. If path or image is unreadable, returns false.
int handle | ( | int | e | ) |
Event handler.
void next_image | ( | void | ) |
Draw next image. Should not be used directly, as AnimateBox uses it in internally.
|
inline |
Set draw rate (how long to show single image).
|
inline |
Get draw rate.
void rollover | ( | void | ) |
Force animation starts from first frame.
void start_animation | ( | void | ) |
Start animation.
void stop_animation | ( | void | ) |
Stop animation.