X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.h;h=acd11e3883502b866dcc279e831e0acb5bd892ec;hb=5616fa8528aa382cef440a88ffd0d87ed3bbfda2;hp=6ffe3b174de09e310241f71bed895a0b5e4c2bcc;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/vicon.h b/cinelerra-5.1/guicast/vicon.h index 6ffe3b17..acd11e38 100644 --- a/cinelerra-5.1/guicast/vicon.h +++ b/cinelerra-5.1/guicast/vicon.h @@ -12,16 +12,18 @@ class ViewPopup : public BC_Popup { public: VIconThread *vt; - int keypress_event(); - void draw_vframe(VFrame *frame); + virtual int keypress_event(); + virtual int button_press_event() { return 0; } + virtual int button_release_event() { return 0; } + virtual int cursor_motion_event() { return 0; } + virtual void draw_vframe(VFrame *frame); - ViewPopup(VIconThread *vt, VFrame *frame, int x, int y, int w, int h); + ViewPopup(VIconThread *vt, int x, int y, int w, int h); ~ViewPopup(); }; class VIFrame { unsigned char *img_data; - VFrame *vfrm; public: VIFrame(int ww, int hh, int vcmdl) { int size = BC_CModels::calculate_datasize(ww, hh, -1, vcmdl); @@ -29,14 +31,13 @@ public: vfrm = new VFrame(img_data, -1, ww, hh, vcmdl, -1); } ~VIFrame() { delete vfrm; delete [] img_data; } - - operator VFrame *() { return vfrm; } + VFrame *vfrm; }; class VIcon { public: - int vw, vh, in_use, hidden; + int w, h, in_use, hidden; ArrayList images; int64_t seq_no; double cycle_start, age, frame_rate; @@ -50,7 +51,7 @@ public: void init_audio(int audio_size); virtual int64_t set_seq_no(int64_t no) { return seq_no = no; } - virtual VFrame *frame() { return *images[seq_no]; } + virtual VFrame *frame() { return images[seq_no]->vfrm; } virtual int get_vx() { return 0; } virtual int get_vy() { return 0; } virtual void load_audio() {} @@ -73,38 +74,48 @@ public: Timer *timer; Condition *draw_lock; ViewPopup *view_win; - VIcon *viewing, *vicon; - int view_w, view_h; + VIcon *viewing, *vicon, *solo; + int vw, vh, view_w, view_h; int draw_x0, draw_y0; int draw_x1, draw_y1; int img_dirty, win_dirty; double refresh_rate; + int64_t now; + int64_t draw_flash; int64_t stop_age; + int64_t seq_no; ArrayListt_heap; VIcon *low_vicon(); void add_vicon(VIcon *vicon); - int del_vicon(VIcon *&vicon); + int del_vicon(VIcon *vicon); void run(); void flash(); int draw(VIcon *vicon); - int update_view(); + int update_view(int do_audio); void draw_images(); void start_drawing(); void stop_drawing(); + void stop_viewing(); void reset_images(); void remove_vicon(int i); int keypress_event(int key); + int cursor_inside(int x, int y); void set_drawing_area(int x0, int y0, int x1, int y1); void set_view_popup(VIcon *vicon); + int zoom_scale(int dir); + void close_view_popup(); void hide_vicons(int v=1); + int show_vicon(VIcon *next); + virtual ViewPopup *new_view_window(ViewPopup *vpopup); - ViewPopup *new_view_window(VFrame *frame); virtual bool visible(VIcon *vicon, int x, int y); virtual void drawing_started() {} virtual void drawing_stopped() {} - VIconThread(BC_WindowBase *wdw, int vw=4*VICON_WIDTH, int vh=4*VICON_HEIGHT); + VIconThread(BC_WindowBase *wdw, + int vw=VICON_WIDTH, int vh=VICON_HEIGHT, + int view_w=4*VICON_WIDTH, int view_h=4*VICON_HEIGHT); ~VIconThread(); };