r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / mwindowgui.h
blob840b52b2ccbaab30f430b28a3d075da0bdd9bd3b
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 // canvas - 1 for incremental drawing of resources
41 // 2 for delete and redraw of resources
42 // 3 to ignore picon thread
43 void update(int scrollbars,
44 int canvas,
45 int timebar,
46 int zoombar,
47 int patchbay,
48 int clock,
49 int buttonbar);
51 void update_title(char *path);
52 int translation_event();
53 int resize_event(int w, int h); // handle a resize event
54 int keypress_event();
55 int close_event();
56 int quit();
57 int save_defaults(BC_Hash *defaults);
58 int menu_h();
59 // Draw on the status bar only.
60 int show_message(char *message, int color = -1);
61 // Pop up a box if the statusbar is taken and show an error.
62 void show_error(char *message, int color = BLACK);
63 int repeat_event(int64_t duration);
64 // Entry point for drag events in all windows
65 int drag_motion();
66 int drag_stop();
67 void default_positions();
69 // Return if the area bounded by x1 and x2 is visible between view_x1 and view_x2
70 static int visible(int64_t x1, int64_t x2, int64_t view_x1, int64_t view_x2);
72 MWindow *mwindow;
74 // Popup menus
75 EditPopup *edit_menu;
76 PluginPopup *plugin_menu;
77 KeyframePopup *keyframe_menu;
78 TransitionPopup *transition_menu;
80 MainClock *mainclock;
81 MButtons *mbuttons;
82 MTimeBar *timebar;
83 PatchBay *patchbay;
84 MainMenu *mainmenu;
85 ZoomBar *zoombar;
86 SampleScroll *samplescroll;
87 StatusBar *statusbar;
88 TrackScroll *trackscroll;
89 TrackCanvas *canvas;
90 // Cursor used to select regions
91 MainCursor *cursor;
92 // Dimensions of canvas minus scrollbars
93 int view_w, view_h;
99 #endif