void MWindowGUI::show_message(const char *message, int color)
{
- statusbar->set_message(message, color);
+ statusbar->show_message(message, color);
}
-void MWindowGUI::set_default_message(const char *message)
+
+void MWindowGUI::update_default_message()
{
- statusbar->set_default_message(message);
+ statusbar->update_default_message();
}
+
void MWindowGUI::reset_default_message()
{
statusbar->reset_default_message();
}
+
void MWindowGUI::default_message()
{
statusbar->default_message();
result = 1;
break;
+ case 'k': case 'K':
+ if( alt_down() ) break;
+ stop_transport("MWindowGUI::keypress_event 1");
+ mwindow->nearest_plugin_keyframe(shift_down(),
+ !ctrl_down() ? PLAY_FORWARD : PLAY_REVERSE);
+ result = 1;
+ break;
+
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8':
if( !alt_down() || shift_down() ) break;
case LEFT:
if( !ctrl_down() ) {
if( alt_down() ) {
- unlock_window();
- mbuttons->transport->handle_transport(STOP, 1, 0, 0);
- lock_window("MWindowGUI::keypress_event 1");
+ stop_transport("MWindowGUI::keypress_event 1");
mwindow->prev_edit_handle(shift_down());
}
else
}
break;
+ case ',':
+ if( !ctrl_down() && !alt_down() ) {
+ mwindow->move_left();
+ result = 1;
+ }
+ break;
+
case RIGHT:
if( !ctrl_down() ) {
if( alt_down() ) {
- unlock_window();
- mbuttons->transport->handle_transport(STOP, 1, 0, 0);
- lock_window("MWindowGUI::keypress_event 2");
+ stop_transport("MWindowGUI::keypress_event 2");
mwindow->next_edit_handle(shift_down());
}
else
}
break;
+ case '.':
+ if( !ctrl_down() && !alt_down() ) {
+ mwindow->move_right();
+ result = 1;
+ }
+ break;
+
case UP:
if( ctrl_down() && !alt_down() )
mwindow->expand_y();
}
+void MWindowGUI::update_mixers(Track *track, int v)
+{
+ for( int i=0; i<TOTAL_PANES; ++i ) {
+ if( !pane[i] ) continue;
+ PatchBay *patchbay = pane[i]->patchbay;
+ if( !patchbay ) continue;
+ for( int j=0; j<patchbay->patches.total; ++j ) {
+ PatchGUI *patchgui = patchbay->patches.values[j];
+ if( !patchgui->mix ) continue;
+ if( !track || patchgui->track == track ) {
+ patchgui->mix->update(v>=0 ? v :
+ mwindow->mixer_track_active(patchgui->track));
+ }
+ }
+ }
+}
+
+void MWindowGUI::stop_transport(const char *lock_msg)
+{
+ if( !mbuttons->transport->is_stopped() ) {
+ if( lock_msg ) unlock_window();
+ mbuttons->transport->handle_transport(STOP, 1, 0, 0);
+ if( lock_msg ) lock_window(lock_msg);
+ }
+}
+
PaneButton::PaneButton(MWindow *mwindow, int x, int y)
: BC_Button(x, y, mwindow->theme->get_image_set("pane"))
{