6 #include "bcwindowbase.h"
11 class ViewPopup : public BC_Popup {
15 int button_press_event();
16 void draw_vframe(VFrame *frame);
18 ViewPopup(VIconThread *vt, VFrame *frame, int x, int y, int w, int h);
25 int vw, vh, vcmdl, in_use;
26 ArrayList<VFrame *> images;
30 double frame_rate() { return 1000/period; }
31 void frame_rate(double r) { period = 1000/r; }
32 int64_t vframes() { return images.size(); }
33 void clear_images() { images.remove_all_objects(); }
35 virtual VFrame *frame() { return images[seq_no]; }
36 virtual int64_t next_frame(int n) {
38 if( (seq_no+=n) >= images.size() ) seq_no = 0;
41 virtual int get_vx() { return 0; }
42 virtual int get_vy() { return 0; }
44 void add_image(VFrame *frm, int ww, int hh, int vcmdl);
45 void draw_vframe(BC_WindowBase *wdw, int x, int y);
46 void dump(const char *dir);
48 VIcon(int vw=VICON_WIDTH, int vh=VICON_HEIGHT, double rate=24);
52 class VIconThread : public Thread
55 int done, interrupted;
60 VIcon *viewing, *vicon;
62 int cur_view, new_view;
63 int img_dirty, win_dirty;
66 ArrayList<VIcon *>t_heap;
68 void add_vicon(VIcon *vicon, double age=0);
69 int del_vicon(VIcon *&vicon);
72 int draw(VIcon *vicon);
78 void remove_vicon(int i);
79 int keypress_event(int key);
80 void set_view_popup(VIcon *vicon);
82 ViewPopup *new_view_window(VFrame *frame);
83 virtual bool visible(VIcon *vicon, int x, int y);
84 virtual void drawing_started() {}
85 virtual void drawing_stopped() {}
87 VIconThread(BC_WindowBase *wdw, int vw=4*VICON_WIDTH, int vh=4*VICON_HEIGHT);