1 #ifndef MAINWINDOWGUI_H
2 #define MAINWINDOWGUI_H
4 #include "editpopup.inc"
6 #include "mbuttons.inc"
7 #include "mainclock.inc"
8 #include "maincursor.h"
9 #include "mainmenu.inc"
10 #include "mtimebar.inc"
11 #include "mwindow.inc"
12 #include "patchbay.inc"
13 #include "pluginpopup.inc"
14 #include "zoombar.inc"
15 #include "samplescroll.inc"
16 #include "statusbar.inc"
17 #include "trackcanvas.inc"
18 #include "trackscroll.inc"
19 #include "transitionpopup.inc"
22 class MWindowGUI
: public BC_Window
25 MWindowGUI(MWindow
*mwindow
);
29 void get_scrollbars();
31 // ======================== event handlers
33 // Replace with update
34 void redraw_time_dependancies();
37 int focus_out_event();
39 void update(int scrollbars
,
40 int canvas
, // 1 for incremental drawing. 2 for full refresh
47 void update_title(char *path
);
48 int translation_event();
49 int resize_event(int w
, int h
); // handle a resize event
53 int save_defaults(Defaults
*defaults
);
55 // Draw on the status bar only.
56 int show_message(char *message
, int color
= BLACK
);
57 // Pop up a box if the statusbar is taken and show an error.
58 void show_error(char *message
, int color
= BLACK
);
59 int repeat_event(int64_t duration
);
60 // Entry point for drag events in all windows
63 void default_positions();
65 // Return if the area bounded by x1 and x2 is visible between view_x1 and view_x2
66 static int visible(int64_t x1
, int64_t x2
, int64_t view_x1
, int64_t view_x2
);
72 PluginPopup
*plugin_menu
;
73 TransitionPopup
*transition_menu
;
81 SampleScroll
*samplescroll
;
83 TrackScroll
*trackscroll
;
85 // Cursor used to select regions
87 // Dimensions of canvas minus scrollbars