Search in sources :

Example 1 with ColorView

use of de.mossgrabers.framework.view.ColorView in project DrivenByMoss by git-moss.

the class TrackDetailsMode method onFirstRowMasterTrack.

private void onFirstRowMasterTrack(final int index) {
    switch(index) {
        case 0:
            this.model.getMasterTrack().toggleIsActivated();
            break;
        case 1:
            this.model.getMasterTrack().toggleRecArm();
            break;
        case 2:
            this.model.getMasterTrack().toggleMute();
            break;
        case 3:
            this.model.getMasterTrack().toggleSolo();
            break;
        case 4:
            this.model.getMasterTrack().toggleMonitor();
            break;
        case 5:
            this.model.getMasterTrack().toggleAutoMonitor();
            break;
        case 6:
            // Not used
            break;
        case 7:
            final ViewManager viewManager = this.surface.getViewManager();
            ((ColorView<?, ?>) viewManager.get(Views.COLOR)).setMode(ColorSelectMode.MODE_TRACK);
            viewManager.setActive(Views.COLOR);
            break;
        default:
            // Not used
            break;
    }
}
Also used : ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) ColorView(de.mossgrabers.framework.view.ColorView)

Example 2 with ColorView

use of de.mossgrabers.framework.view.ColorView in project DrivenByMoss by git-moss.

the class TrackDetailsMode method onFirstRowTrack.

private void onFirstRowTrack(final int index) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final Optional<ITrack> track = tb.getSelectedItem();
    if (track.isEmpty())
        return;
    final ITrack t = track.get();
    switch(index) {
        case 0:
            t.toggleIsActivated();
            break;
        case 1:
            t.toggleRecArm();
            break;
        case 2:
            t.toggleMute();
            break;
        case 3:
            t.toggleSolo();
            break;
        case 4:
            t.toggleMonitor();
            break;
        case 5:
            t.toggleAutoMonitor();
            break;
        case 6:
            this.model.getCursorTrack().togglePinned();
            break;
        case 7:
            final ViewManager viewManager = this.surface.getViewManager();
            ((ColorView<?, ?>) viewManager.get(Views.COLOR)).setMode(ColorSelectMode.MODE_TRACK);
            viewManager.setActive(Views.COLOR);
            break;
        default:
            // Not used
            break;
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) ColorView(de.mossgrabers.framework.view.ColorView)

Aggregations

ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)2 ColorView (de.mossgrabers.framework.view.ColorView)2 ITrack (de.mossgrabers.framework.daw.data.ITrack)1 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)1