00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EDELIB_ANIMATEBOX_H__
00022 #define __EDELIB_ANIMATEBOX_H__
00023
00024 #include "edelib-global.h"
00025 #include <FL/Fl_Box.H>
00026 #include <FL/Fl_Image.H>
00027 #include "List.h"
00028
00029 EDELIB_NS_BEGIN
00030
00041 class AnimateBox : public Fl_Box {
00042 private:
00043 float draw_rate;
00044 int flags;
00045 list<Fl_Image*> images;
00046 list<Fl_Image*>::iterator curr_image;
00047
00048 public:
00050 AnimateBox(int X, int Y, int W, int H, const char* l = 0) : Fl_Box(X, Y, W, H, l), draw_rate(0.2), flags(0)
00051 { align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP); }
00052
00054 ~AnimateBox();
00055
00057 bool append(Fl_Image *img);
00058
00060 bool append(const char *path);
00061
00063 void rate(float r) { draw_rate = r; }
00064
00066 float rate(void) { return draw_rate; }
00067
00069 void next_image(void);
00070
00072 void start_animation(void);
00073
00075 void stop_animation(void);
00076
00078 void rollover(void);
00079
00081 void animate_on_show(void);
00082
00084 int handle(int e);
00085 };
00086
00087 EDELIB_NS_END
00088 #endif