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();
38 void update(int scrollbars
,
39 int canvas
, // 1 for incremental drawing. 2 for full refresh
46 void update_title(char *path
);
47 int translation_event();
48 int resize_event(int w
, int h
); // handle a resize event
52 int save_defaults(Defaults
*defaults
);
54 // Draw on the status bar only.
55 int show_message(char *message
, int color
= BLACK
);
56 // Pop up a box if the statusbar is taken and show an error.
57 void show_error(char *message
, int color
= BLACK
);
58 int repeat_event(int64_t duration
);
59 // Entry point for drag events in all windows
62 void default_positions();
64 // Return if the area bounded by x1 and x2 is visible between view_x1 and view_x2
65 static int visible(int64_t x1
, int64_t x2
, int64_t view_x1
, int64_t view_x2
);
71 PluginPopup
*plugin_menu
;
72 TransitionPopup
*transition_menu
;
80 SampleScroll
*samplescroll
;
82 TrackScroll
*trackscroll
;
84 // Cursor used to select regions
86 // Dimensions of canvas minus scrollbars