r793: Small API addon, so plugins can 'see' camera and projector automation
[cinelerra_cv/mob.git] / cinelerra / mwindowgui.h
blob6a80df65acff10c493c637318edffe2b87f5d6a6
1 #ifndef MAINWINDOWGUI_H
2 #define MAINWINDOWGUI_H
4 #include "editpopup.inc"
5 #include "guicast.h"
6 #include "keyframepopup.inc"
7 #include "mbuttons.inc"
8 #include "mainclock.inc"
9 #include "maincursor.inc"
10 #include "mainmenu.inc"
11 #include "mtimebar.inc"
12 #include "mwindow.inc"
13 #include "patchbay.inc"
14 #include "pluginpopup.inc"
15 #include "zoombar.inc"
16 #include "samplescroll.inc"
17 #include "statusbar.inc"
18 #include "trackcanvas.inc"
19 #include "trackscroll.inc"
20 #include "transitionpopup.inc"
23 class MWindowGUI : public BC_Window
25 public:
26 MWindowGUI(MWindow *mwindow);
27 ~MWindowGUI();
29 int create_objects();
30 void get_scrollbars();
32 // ======================== event handlers
34 // Replace with update
35 void redraw_time_dependancies();
37 int focus_in_event();
38 int focus_out_event();
40 void update(int scrollbars,
41 int canvas, // 1 for incremental drawing. 2 for full refresh
42 int timebar,
43 int zoombar,
44 int patchbay,
45 int clock,
46 int buttonbar);
48 void update_title(char *path);
49 int translation_event();
50 int resize_event(int w, int h); // handle a resize event
51 int keypress_event();
52 int close_event();
53 int quit();
54 int save_defaults(Defaults *defaults);
55 int menu_h();
56 // Draw on the status bar only.
57 int show_message(char *message, int color = -1);
58 // Pop up a box if the statusbar is taken and show an error.
59 void show_error(char *message, int color = BLACK);
60 int repeat_event(int64_t duration);
61 // Entry point for drag events in all windows
62 int drag_motion();
63 int drag_stop();
64 void default_positions();
66 // Return if the area bounded by x1 and x2 is visible between view_x1 and view_x2
67 static int visible(int64_t x1, int64_t x2, int64_t view_x1, int64_t view_x2);
69 MWindow *mwindow;
71 // Popup menus
72 EditPopup *edit_menu;
73 PluginPopup *plugin_menu;
74 KeyframePopup *keyframe_menu;
75 TransitionPopup *transition_menu;
77 MainClock *mainclock;
78 MButtons *mbuttons;
79 MTimeBar *timebar;
80 PatchBay *patchbay;
81 MainMenu *mainmenu;
82 ZoomBar *zoombar;
83 SampleScroll *samplescroll;
84 StatusBar *statusbar;
85 TrackScroll *trackscroll;
86 TrackCanvas *canvas;
87 // Cursor used to select regions
88 MainCursor *cursor;
89 // Dimensions of canvas minus scrollbars
90 int view_w, view_h;
96 #endif