add new boxblur plugin, mods to videoscope, fix segv for menu btns kfrm-tweak/kfrm...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / zwindowgui.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef __ZWINDOWGUI_H__
23 #define __ZWINDOWGUI_H__
24
25 #include "bcwindow.h"
26 #include "canvas.h"
27 #include "mwindow.h"
28 #include "playbackengine.inc"
29 #include "zwindow.inc"
30 #include "zwindowgui.inc"
31
32 class ZWindowGUI;
33 class ZWindowCanvas;
34
35 class ZWindowGUI : public BC_Window
36 {
37 public:
38         ZWindowGUI(MWindow *mwindow, ZWindow *vwindow, Mixer *mixer);
39         ~ZWindowGUI();
40
41         void create_objects();
42         int resize_event(int w, int h);
43         int translation_event();
44         int close_event();
45         int keypress_event();
46         int button_press_event();
47         int cursor_leave_event();
48         int cursor_enter_event();
49         int button_release_event();
50         int cursor_motion_event();
51         int select_window(int n);
52         int draw_overlays();
53         void set_highlighted(int v);
54         void set_playable(int v);
55
56         MWindow *mwindow;
57         ZWindow *zwindow;
58         ZWindowCanvas *canvas;
59
60         PlaybackEngine *playback_engine;
61         int highlighted, playable;
62 };
63
64 class ZWindowCanvasTileMixers : public BC_MenuItem
65 {
66 public:
67         ZWindowCanvasTileMixers(ZWindowCanvas *canvas);
68         int handle_event();
69         ZWindowCanvas *canvas;
70 };
71
72 class ZWindowCanvasPlayable : public BC_MenuItem
73 {
74 public:
75         ZWindowCanvasPlayable(ZWindowCanvas *canvas);
76         int handle_event();
77         ZWindowCanvas *canvas;
78 };
79
80
81 class ZWindowCanvas : public Canvas
82 {
83 public:
84         ZWindowCanvas(MWindow *mwindow, ZWindowGUI *gui,
85                 int x, int y, int w, int h);
86
87         void create_objects(EDL *edl);
88         void close_source();
89         void draw_refresh(int flush = 1);
90         float get_auto_zoom();
91         float get_zoom();
92         void update_zoom(int x, int y, float zoom);
93         void zoom_auto();
94         void zoom_resize_window(float percentage);
95
96         MWindow *mwindow;
97         ZWindowGUI *gui;
98 };
99
100 #endif