Search in sources :

Example 61 with ViewManager

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

the class ClipMode method onSecondRow.

/**
 * {@inheritDoc}
 */
@Override
public void onSecondRow(final int index, final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    if (index != 7)
        return;
    final ViewManager viewManager = this.surface.getViewManager();
    ((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(SelectMode.MODE_CLIP);
    viewManager.setActiveView(Views.VIEW_COLOR);
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Example 62 with ViewManager

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

the class LayerDetailsMode method onFirstRow.

/**
 * {@inheritDoc}
 */
@Override
public void onFirstRow(final int index, final ButtonEvent event) {
    if (event != ButtonEvent.UP)
        return;
    final IChannel deviceChain = this.model.getCursorDevice().getSelectedLayerOrDrumPad();
    if (deviceChain == null)
        return;
    switch(index) {
        case 0:
            this.model.getCursorDevice().toggleLayerOrDrumPadIsActivated(deviceChain.getIndex());
            break;
        case 2:
            this.model.getCursorDevice().toggleLayerOrDrumPadMute(deviceChain.getIndex());
            break;
        case 3:
            this.model.getCursorDevice().toggleLayerOrDrumPadSolo(deviceChain.getIndex());
            break;
        case 7:
            final ViewManager viewManager = this.surface.getViewManager();
            ((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_LAYER);
            viewManager.setActiveView(Views.VIEW_COLOR);
            break;
        default:
            // Not used
            break;
    }
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel) ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Example 63 with ViewManager

use of de.mossgrabers.framework.view.ViewManager 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.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_TRACK);
            viewManager.setActiveView(Views.VIEW_COLOR);
            break;
    }
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Example 64 with ViewManager

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

the class ViewSelectMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final Display d = this.surface.getDisplay();
    final ViewManager viewManager = this.surface.getViewManager();
    for (int i = 0; i < 2; i++) {
        d.clearRow(0 + i).setBlock(0 + i, 0, "Select mode:").done(0 + i);
        d.clearRow(2 + i);
        d.setCell(2 + i, 0, (viewManager.isActiveView(Views.VIEW_CONTROL) ? SLDisplay.RIGHT_ARROW : " ") + "Control");
        d.setCell(2 + i, 1, " " + (viewManager.isActiveView(Views.VIEW_PLAY) ? SLDisplay.RIGHT_ARROW : " ") + "Play");
        d.done(2 + i);
    }
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) Display(de.mossgrabers.framework.controller.display.Display) SLDisplay(de.mossgrabers.sl.controller.SLDisplay)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)64 ITrack (de.mossgrabers.framework.daw.data.ITrack)16 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)10 View (de.mossgrabers.framework.view.View)9 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)8 ModeManager (de.mossgrabers.framework.mode.ModeManager)7 DrumView (de.mossgrabers.launchpad.view.DrumView)7 PlayView (de.mossgrabers.launchpad.view.PlayView)7 RaindropsView (de.mossgrabers.launchpad.view.RaindropsView)7 SequencerView (de.mossgrabers.launchpad.view.SequencerView)7 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)6 ColorView (de.mossgrabers.push.view.ColorView)6 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)5 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)5 IBrowser (de.mossgrabers.framework.daw.IBrowser)4 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)4 MCUControlSurface (de.mossgrabers.mcu.controller.MCUControlSurface)4 ColorManager (de.mossgrabers.framework.controller.color.ColorManager)3 Scales (de.mossgrabers.framework.scale.Scales)3 SceneView (de.mossgrabers.framework.view.SceneView)3