Example #1
0
File: main.c Project: yksz/samples
int main(void)
{
    onPlay();
    onPause();
    onPlay();
    onPlay();
    onStop();
    onPause();
    return 0;
}
Example #2
0
void SimpleQt::onFirstStartup()
{
    int retVal = ap_DeviceProbe(NULL);
    if (retVal == AP_CAMERA_SUCCESS)
    {
        m_hApBase = ap_Create(0);
        if (m_hApBase == NULL)
        {
             QMessageBox msgBox;
             msgBox.setText("Camera initialization error! SimpleQT will close.");
             msgBox.setIcon(QMessageBox::Critical);
             msgBox.exec();
             this->close();
             return;
        }
        ap_SetCallback_MultipleChoice(m_hApBase, MultipleChoice_Callback, this);
        ap_SetCallback_ErrorMessage(m_hApBase, ErrorMessage_Callback, this);
        ap_LoadIniPreset(m_hApBase, NULL, NULL);
        CreateInfoDlg();
        onPlay();
        return;
    } else
    {
         QMessageBox msgBox;
         msgBox.setText("Unable to either detect a sensor or find a matching SDAT file.\nSimpleQT will close.");
         msgBox.setIcon(QMessageBox::Critical);
         msgBox.exec();
         this->close();
    }
}
void VoiceRecorder::Stop()
{
	if(isPlaying)
		onPlay(false);
	else if(isRecording)
		onRec(false);
}
Example #4
0
fileList::fileList(QWidget *parent) : QWidget(parent)
{
	ui.setupUi(this);

	pReader = new WavReader;
	pIqReader = new WavReader;
	pIqWriter = new WavWriter;

	connect(pIqReader, SIGNAL(isStart(bool)), this, SLOT(onStart(bool)));

	ui.twList->horizontalHeader()->setStretchLastSection(true);
	ui.twList->setSelectionMode(QAbstractItemView::SingleSelection);
	connect(ui.twList, SIGNAL(cellDoubleClicked (int, int)), this, SLOT(onTwDoubleClick(int, int)));
	lastRow = 1;
	loopMode = 0;
	isPlayed = false;
	isRecorded = false;
	isPause = false;

	connect(ui.pbAddFile, SIGNAL(clicked()), this, SLOT(onAddFile()));
	connect(ui.pbDelFile, SIGNAL(clicked()), this, SLOT(onDelFile()));
	connect(ui.pbRec, SIGNAL(clicked()), this, SLOT(onRec()));
	connect(ui.pbPlay, SIGNAL(clicked()), this, SLOT(onPlay()));
	connect(ui.pbPause, SIGNAL(clicked()), this, SLOT(onPause()));
	connect(ui.pbStop, SIGNAL(clicked()), this, SLOT(onStop()));
	connect(ui.pbBack, SIGNAL(clicked()), this, SLOT(onBack()));
	connect(ui.pbLoop, SIGNAL(clicked(bool)), this, SLOT(onLoop(bool)));

	ui.pbPause->setEnabled(false);
}
Example #5
0
void SimpleQt::createActions()
{
    m_playAct = new QAction(QIcon(":/SimpleQt/Resources/media_play.ico"), tr("&Play"), this);
    m_playAct->setStatusTip(tr("Turn on image streaming"));
    m_playAct->setCheckable(true);
    connect(m_playAct, SIGNAL(triggered()), this, SLOT(onPlay()));

    m_stopAct = new QAction(QIcon(":/SimpleQt/Resources/media_stop.ico"), tr("&Stop"), this);
    m_stopAct->setStatusTip(tr("Turn off image streaming"));
    m_stopAct->setCheckable(true);
    connect(m_stopAct, SIGNAL(triggered()), this, SLOT(onStop()));

    m_exitAct = new QAction(QIcon(":/SimpleQt/Resources/exit.ico"), tr("E&xit"), this);
    m_exitAct->setShortcuts(QKeySequence::Quit);
    m_exitAct->setStatusTip(tr("Exit the application"));
    connect(m_exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));

    m_viewToolbarAct = new QAction(tr("Toolbar"), this);
    m_viewToolbarAct->setStatusTip(tr("Show or hide the toolbar"));
    m_viewToolbarAct->setCheckable(true);
    m_viewToolbarAct->setChecked(true);
    connect(m_viewToolbarAct, SIGNAL(triggered()), this, SLOT(toggleToolbar()));

    m_viewCtrlbarAct = new QAction(QIcon(":/SimpleQt/Resources/gear.ico"), tr("Control Bar"), this);
    m_viewCtrlbarAct->setStatusTip(tr("Show or hide the register control bar"));
    m_viewCtrlbarAct->setCheckable(true);
    m_viewCtrlbarAct->setChecked(true);
    connect(m_viewCtrlbarAct, SIGNAL(triggered()), this, SLOT(toggleCtrlbar()));

    m_aboutAct = new QAction(QIcon(":/SimpleQt/Resources/about.ico"), tr("&About"), this);
    m_aboutAct->setStatusTip(tr("Show the application's About box"));
    connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about()));
}
Example #6
0
DetailView::DetailView(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DetailView)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_DeleteOnClose);
    connect(ui->playPushButton, SIGNAL(clicked()), this, SLOT(onPlay()));
    connect(ui->downloadPushButton, SIGNAL(clicked()), this, SLOT(onDownload()));
}
Example #7
0
File: ding.cpp Project: galoou/Ding
void Ding::play()
{
    elapsedTime = 0;
    emit elapsedTimeChanged(elapsedTime);

    timer->start(1000);
    emit onPlay(interval);

    bell();
}
Example #8
0
ControlPanelWidget::ControlPanelWidget(Context& ctx, QWidget *parent) :
	QDockWidget(parent), ui(new Ui::ControlPanelWidget), ctx(ctx) {

	ui->setupUi(this);

	connect(ui->btnStop, SIGNAL(clicked()), this, SLOT(onStop()));
	connect(ui->btnPlay, SIGNAL(clicked()), this, SLOT(onPlay()));
	connect(ui->btnRec, SIGNAL(clicked()), this, SLOT(onRec()));
	connect(ui->spnBPM, SIGNAL(valueChanged(int)), this, SLOT(onBPM()));

	ctx.getSequencer()->addStatusListener(this);
	ctx.getSequencer()->addBeatListener(this);

}
Example #9
0
void fileList::onTwDoubleClick(int row, int colum)
{
    if(lastRow < ui.twList->rowCount())
    {
        reinterpret_cast<wavSample*>(ui.twList->cellWidget(lastRow ,0))->setActive(false);
        reinterpret_cast<wavSample*>(ui.twList->cellWidget(lastRow ,0))->setStyleSheet("QLabel{background-color: transparent; color: rgb(220, 220, 220);}");
    }
	reinterpret_cast<wavSample*>(ui.twList->cellWidget(row ,0))->setActive(true);
	reinterpret_cast<wavSample*>(ui.twList->cellWidget(row ,0))->setStyleSheet("QLabel{background-color: transparent; color: rgb(255, 106, 0);}");
	lastRow = row;

	onStop();
	onPlay();
}
Example #10
0
	/**
	 * On command events (string parse)
	 */
	void onCommand(CString &cmd) {
		if (cmd == "right") {
			onRight();
		} else if (cmd == "left") {
			onLeft();
		} else if (cmd == "up") {
			onUp();
		} else if (cmd == "down") {
			onDown();
		} else if (cmd == "play") {
			onPlay();
		} else if (cmd == "stop") {
			onStop();
		}
	}
LifeControlsWidget::LifeControlsWidget(SimOptions *opts, SimController *ctrlr, LifeScrollWidget &scroll) : displayWidget(scroll)  {
	options = opts;
	controller = ctrlr;
	delay = 100;
	play = false;

	QLabel *gridLabel = new QLabel("Grid Size:");
	QLabel *delayLabel = new QLabel("Delay:");
	genLabel = new QLabel("Generation:\t 1");
	refreshGenLabel();

	QSpinBox *gridSizeSpin = new QSpinBox();
	gridSizeSpin->setMinimum(1);
	gridSizeSpin->setMaximum(1000);
	gridSizeSpin->setValue(opts->getBlockSize());

	QSpinBox *delaySpin = new QSpinBox();
	delaySpin->setMinimum(10);
	delaySpin->setMaximum(10000);
	delaySpin->setValue(delay);
	
	QPushButton *quitBtn = new QPushButton("Quit");
	QPushButton *restartBtn = new QPushButton("Restart");
	playBtn = new QPushButton("Play");
	QPushButton *stepBtn = new QPushButton("Step");
	
	QBoxLayout *box = new QBoxLayout(QBoxLayout::TopToBottom, this);
	
	box->addWidget(gridLabel);
	box->addWidget(gridSizeSpin);
	box->addWidget(delayLabel);
	box->addWidget(delaySpin);
	box->addWidget(genLabel);
	box->addWidget(quitBtn);
	box->addWidget(restartBtn);
	box->addWidget(playBtn);
	box->addWidget(stepBtn);
	box->addStretch(1);
	box->addSpacing(12);
	setLayout(box);

	connect(quitBtn, SIGNAL(clicked()), this, SLOT(onQuit()));
	connect(restartBtn, SIGNAL(clicked()), this, SLOT(onRestart()));
	connect(playBtn, SIGNAL(clicked()), this, SLOT(onPlay()));
	connect(stepBtn, SIGNAL(clicked()), this, SLOT(onStep()));
	connect(gridSizeSpin, SIGNAL(valueChanged(int)), this, SLOT(onSizeChange(int)));
	connect(delaySpin, SIGNAL(valueChanged(int)), this, SLOT(onDelayChange(int)));
}
Example #12
0
TelemetrySimulator::TelemetrySimulator(QWidget * parent, SimulatorInterface * simulator):
  QDialog(parent),
  ui(new Ui::TelemetrySimulator),
  simulator(simulator)
{
  ui->setupUi(this);

  QPoint dialogCenter = mapToGlobal(rect().center());
  QPoint parentWindowCenter = parent->window()->mapToGlobal(
    parent->window()->rect().center());
  move(parentWindowCenter - dialogCenter);

  timer = new QTimer(this);
  connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent()));

  logTimer = new QTimer(this);
  connect(logTimer, SIGNAL(timeout()), this, SLOT(onLogTimerEvent()));

  connect(ui->Simulate, SIGNAL(clicked(bool)), this, SLOT(onSimulateToggled(bool)));
  connect(ui->loadLogFile, SIGNAL(released()), this, SLOT(onLoadLogFile()));
  connect(ui->play, SIGNAL(released()), this, SLOT(onPlay()));
  connect(ui->rewind, SIGNAL(clicked()), this, SLOT(onRewind()));
  connect(ui->stepForward, SIGNAL(clicked()), this, SLOT(onStepForward()));
  connect(ui->stepBack, SIGNAL(clicked()), this, SLOT(onStepBack()));
  connect(ui->stop, SIGNAL(clicked()), this, SLOT(onStop()));
  connect(ui->positionIndicator, SIGNAL(valueChanged(int)), this, SLOT(onPositionIndicatorChanged(int)));
  connect(ui->replayRate, SIGNAL(valueChanged(int)), this, SLOT(onReplayRateChanged(int)));

  ui->A1->setSpecialValueText(" ");
  ui->A2->setSpecialValueText(" ");
  ui->A3->setSpecialValueText(" ");
  ui->A4->setSpecialValueText(" ");
  ui->rpm->setSpecialValueText(" ");
  ui->fuel->setSpecialValueText(" ");

  ui->rxbt_ratio->setEnabled(false);
  ui->A1_ratio->setEnabled(false);
  ui->A2_ratio->setEnabled(false);

  logPlayback = new LogPlaybackController(ui);
}
TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
    : QSystemTrayIcon( parent )
    , m_currentAnimationFrame( 0 )
    , m_showWindowAction( 0 )
    , m_stopContinueAfterTrackAction( 0 )
    , m_loveTrackAction( 0 )
{
#ifdef Q_OS_MAC
    QIcon icon( RESPATH "icons/tomahawk-grayscale-icon-128x128.png" );
#else
    QIcon icon( RESPATH "icons/tomahawk-icon-128x128.png" );
#endif

    setIcon( icon );

    refreshToolTip();

    m_contextMenu = new QMenu();
    m_contextMenu->setFont( TomahawkUtils::systemFont() );
    setContextMenu( m_contextMenu );

    m_loveTrackAction = new QAction( this );
    m_stopContinueAfterTrackAction = new QAction( this );

    ActionCollection *ac = ActionCollection::instance();
    m_contextMenu->addAction( ac->getAction( "playPause" ) );
    m_contextMenu->addAction( ac->getAction( "stop" ) );
    m_contextMenu->addSeparator();
    m_contextMenu->addAction( m_loveTrackAction );
    m_contextMenu->addAction( m_stopContinueAfterTrackAction );
    m_contextMenu->addSeparator();
    m_contextMenu->addAction( ac->getAction( "previousTrack" ) );
    m_contextMenu->addAction( ac->getAction( "nextTrack" ) );
    m_contextMenu->addSeparator();
    m_contextMenu->addAction( ActionCollection::instance()->getAction( "togglePrivacy" ) );

#ifdef Q_OS_MAC
    // On mac you can close the windows while leaving the app open. We then need a way to show the main window again
    m_contextMenu->addSeparator();
    m_showWindowAction = m_contextMenu->addAction( tr( "Hide Tomahawk Window" ) );
    m_showWindowAction->setData( true );
    connect( m_showWindowAction, SIGNAL( triggered() ), this, SLOT( showWindow() ) );

    connect( m_contextMenu, SIGNAL( aboutToShow() ), this, SLOT( menuAboutToShow() ) );
#endif

    m_contextMenu->addSeparator();
    m_contextMenu->addAction( ac->getAction( "quit" ) );

    connect( m_loveTrackAction, SIGNAL( triggered() ), SLOT( loveTrackTriggered() ) );
    connect( m_stopContinueAfterTrackAction, SIGNAL( triggered() ), SLOT( stopContinueAfterTrackActionTriggered() ) );

    connect( AudioEngine::instance(), SIGNAL( loading( Tomahawk::result_ptr ) ), SLOT( setResult( Tomahawk::result_ptr ) ) );
    connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlay() ) );
    connect( AudioEngine::instance(), SIGNAL( resumed() ), SLOT( onResume() ) );
    connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onStop() ) );
    connect( AudioEngine::instance(), SIGNAL( paused() ),  SLOT( onPause() ) );
    connect( AudioEngine::instance(), SIGNAL( stopAfterTrackChanged() ), SLOT( onStopContinueAfterTrackChanged() ) );

    connect( &m_animationTimer, SIGNAL( timeout() ), SLOT( onAnimationTimer() ) );
    connect( this, SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ), SLOT( onActivated( QSystemTrayIcon::ActivationReason ) ) );

    onStop();
    show();
}
Example #14
0
void PhMidiInput::onMessage(std::vector<unsigned char> *message)
{
	if ( message->size() > 0 ) {
		QString messageStr = "";
		foreach(unsigned char data, *message)
			messageStr += QString::number(data, 16) + " ";

		PHDBG(21) << messageStr;

		unsigned char status = message->at(0);
		switch (status) {
		// A SysEx message
		case 0xf0:
			if(message->size() < 4)
				PHDEBUG << "Bad SysEx message size:" << message->size() << "/" << messageStr;
			else {
				unsigned char manufactorId = message->at(1);
#warning /// @todo Handle midi channel
//				unsigned char channel = message->at(2);
				unsigned char type = message->at(3);
				if(manufactorId == 0x7F) {
					switch (type) {
					// Timecode message type
					case 0x01:
						if(message->size() != 10)
							PHDEBUG << "Bad TC message size:" << message->size();
						else switch(message->at(4)) {
							case 0x01:
								_mtcType = computeTimeCodeType(message->at(5) >> 5);
								_hh = message->at(5) & 0x1F;
								_mm = message->at(6);
								_ss = message->at(7);
								_ff = message->at(8);
								if(message->at(9) != 0xF7)
									PHDEBUG << "End of SysEx expected:" << QString::number(0xF7);
								PHDEBUG << "Full TC:" << _hh << _mm << _ss << _ff;
								onTimeCode(_hh, _mm, _ss, _ff, _mtcType);
								break;
							default:
								PHDEBUG << "Unknown TC type:" << message->at(4) << "/" << messageStr;
								break;
							}
						break;
					// Midi machine control message type
					case 0x06:
						switch(message->at(4)) {
						case 0x01:
							PHDEBUG << "MMC Stop" << messageStr;
							onStop();
							break;
						case 0x02:
							PHDEBUG << "MMC Play" << messageStr;
							onPlay();
							break;
						case 0x44:
							_mtcType = computeTimeCodeType(message->at(7) >> 5);
							_hh = message->at(7) & 0x1F;
							_mm = message->at(8);
							_ss = message->at(9);
							// It seems that the some information is sent to the frame byte too (not timecode type)...
							_ff = message->at(10) & 0x1F;
							PHDEBUG << "Go To" << _hh << _mm << _ss << _ff;
							onTimeCode(_hh, _mm, _ss, _ff, _mtcType);
							break;
						default:
							PHDEBUG << "Unknown MMC message:" << messageStr;
							break;
						}

						break;
					default:
						PHDEBUG << "Unknown SysEx type:" << QString::number(type, 16) << "/" << messageStr;
						break;
					}
				}
//				else
//					PHDEBUG << "Not a MMC message:" << messageStr;
			}
			break;
		// A quarter frame midi timecode message
		case 0xf1:
			if(message->size() != 2)
				PHDEBUG << "Bad QF MTC message size:" << message->size() << "/" << messageStr;
			else {
				unsigned char data = message->at(1);
				switch (data >> 4) {
				case 0:
					_ff = (_ff & 0xf0) | (data & 0x0f);
//					onTimeCode(_hh, _mm, _ss, _ff, _tcType);
					break;
				case 1:
					_ff = (_ff & 0x0f) | ((data & 0x0f) << 4);
					break;
				case 2:
					_ss = (_ss & 0xf0) | (data & 0x0f);
					break;
				case 3:
					_ss = (_ss & 0x0f) | ((data & 0x0f) << 4);
					// Because of the way MTC is structured,
					// the minutes place won't be updated on the frame
					// where it changes over.
					// Dumb? Yes. But this fixes it.
					// From https://github.com/Figure53/TimecodeDisplay/blob/master/MIDIReceiver.m#L197
					//				if((_ss == 0) && (_ff == 0))
					//					_mm++;
					//onTimeCode(_hh, _mm, _ss, _ff, _tcType);
					break;
				case 4:
					_mm = (_mm & 0xf0) | (data & 0x0f);
					break;
				case 5:
					_mm = (_mm & 0x0f) | ((data & 0x0f) << 4);
					break;
				case 6:
					_hh = (_hh & 0xf0) | (data & 0x0f);
					break;
				case 7:
					_hh = (_hh & 0x0f) | ((data & 0x01) << 4);
					_mtcType = computeTimeCodeType((data & 0x06) >> 1);
					break;
				}

				PHDBG(20) << QString("QF MTC (%1): %2:%3:%4:%5").arg(QString::number(data, 16)).arg(_hh).arg(_mm).arg(_ss).arg(_ff);
				onQuarterFrame(data);
			}
			break;
		default:
			PHDEBUG << "Unknown midi message:" << messageStr;
			break;
		}
	}
Example #15
0
void HomeScreen::mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ){
	//QGraphicsItem::mouseReleaseEvent(event);
	cout << "Home Screen Released" << endl;
	emit onPlay();
}
Example #16
0
TiltNRoll::TiltNRoll(QWidget *parent)
        : QStackedWidget(parent), m_channel(0), m_embedded(true)
{
    // call TrickManager::instance for initialization
    TrickManager::instance();
    // call SoundPlayer::instance for initialization
    SoundPlayer::instance();

    // start screen (tab 0)
    StartScreen *s0 = new StartScreen();
    addWidget(s0);
    connect(s0, SIGNAL(playPressed()), this, SLOT(onPlay()));
    connect(s0, SIGNAL(trainingPressed()), this, SLOT(onTraining()));
    connect(s0, SIGNAL(quitPressed()), this, SLOT(onQuit()));
    connect(s0, SIGNAL(simulPressed()), this, SLOT(onSimul()));

    // play screen (tab 1)
    PlayScreen *s1 = new PlayScreen();
    connect(s1, SIGNAL(backPressed()), this, SLOT(onStart()));
    connect(s1, SIGNAL(singlePlayerPressed()), this, SLOT(onSingleplayer()));
    addWidget(s1);

    // training screen (tab 2)
    //SettingsScreen *s2 = new SettingsScreen();
    //TrainPage *s2 = new TrainPage;
    SettingsPage *s2 = new SettingsPage;
    connect(s2, SIGNAL(backPressed()), this, SLOT(onStart()));
    addWidget(s2);

    // DEBUG
    //addWidget(createGraph());

    // single player screen (tab 3)
    SingleplayerScreen *s3 = new SingleplayerScreen();
    connect(s3, SIGNAL(backPressed()), this, SLOT(onPlay()));
    connect(s3, SIGNAL(freestylePressed()), this, SLOT(onFreestyle()));
    connect(s3, SIGNAL(highscorePressed()), this, SLOT(onHighscore()));
    addWidget(s3);

    // freestyle screen (tab 4)
    freestyle_screen = new FreestyleScreen();
    connect(freestyle_screen, SIGNAL(showPauseScreen()), this, SLOT(onPause()));
    connect(s3, SIGNAL(freestylePressed()), freestyle_screen, SLOT(reset()));
    addWidget(freestyle_screen);

    // pause screen (tab 5)
    PauseScreen *s5 = new PauseScreen();
    qDebug("added!");
    connect(s5, SIGNAL(resumePressed()), this, SLOT(onFreestyle()));
    connect(s5, SIGNAL(endGamePressed()), this, SLOT(checkHighscore()));
    addWidget(s5);

    // enter name screen (tab 6)
    EnterNameScreen *s6 = new EnterNameScreen();
    qDebug("added!");
    connect(s6, SIGNAL(nameEntered(QString)), this, SLOT(addToHighscore(QString)));
    addWidget(s6);

    // highscore screen (tab 7)
    HighscoreScreen *s7 = new HighscoreScreen(&hs);
    connect(s7, SIGNAL(backPressed()), this, SLOT(onStart()));
    addWidget(s7);

    // TrickSimulator (tab 8)
    //TrickSimulator* sim = TrickSimulator::instance();
//    BTCapture* sim = BTCapture::instance();
//    connect(sim, SIGNAL(backPressed()), this, SLOT(onStart()));
//    addWidget(sim->widget());

    QSize s(640,360);
    resize(s);
    setMinimumSize(s);
    setMaximumSize(s);
   //setStyle(new QPlastiqueStyle());
    //qApp->setOverrideCursor(Qt::BlankCursor);
    setWindowState(Qt::WindowFullScreen);



    onStart();
}
Example #17
0
void Editor_menuEvent(int menuItem)
{
	int highlightRowStep = getTrackData()->highlightRowStep; 

	switch (menuItem)
	{
		case EDITOR_MENU_ENTER_CURRENT_V : 
		case EDITOR_MENU_ROWS_UP :
		case EDITOR_MENU_ROWS_DOWN :
		case EDITOR_MENU_PREV_BOOKMARK :
		case EDITOR_MENU_NEXT_BOOKMARK :
		case EDITOR_MENU_PREV_KEY :
		case EDITOR_MENU_NEXT_KEY :
		case EDITOR_MENU_PLAY : 
		{
			endEditing();
		}
	}

	cancelEditing();

	// If some internal control has focus we let it do its thing

	if (Emgui_hasKeyboardFocus())
	{
		Editor_update();
		return;
	}

	switch (menuItem)
	{
		// File

		case EDITOR_MENU_OPEN: onOpen(); break;
		case EDITOR_MENU_SAVE: onSave(); break;
		case EDITOR_MENU_SAVE_AS: onSaveAs(); break;
		case EDITOR_MENU_REMOTE_EXPORT : RemoteConnection_sendSaveCommand(); break;

		case EDITOR_MENU_RECENT_FILE_0:
		case EDITOR_MENU_RECENT_FILE_1:
		case EDITOR_MENU_RECENT_FILE_2:
		case EDITOR_MENU_RECENT_FILE_3:
		{

			Editor_loadRecentFile(menuItem - EDITOR_MENU_RECENT_FILE_0);
			break;
		}

		// Edit
		
		case EDITOR_MENU_UNDO : onUndo(); break;
		case EDITOR_MENU_REDO : onRedo(); break;

		case EDITOR_MENU_CANCEL_EDIT :  onCancelEdit(); break;
		case EDITOR_MENU_DELETE_KEY  :  onDeleteKey(); break;
		case EDITOR_MENU_CUT :          onCutAndCopy(true); break;
		case EDITOR_MENU_COPY :         onCutAndCopy(false); break;
		case EDITOR_MENU_PASTE :        onPaste(); break;
		case EDITOR_MENU_SELECT_TRACK : onSelectTrack(); break;

		case EDITOR_MENU_BIAS_P_001 : biasSelection(0.01f); break;
		case EDITOR_MENU_BIAS_P_01 :  biasSelection(0.1f); break;
		case EDITOR_MENU_BIAS_P_1:    biasSelection(1.0f); break;
		case EDITOR_MENU_BIAS_P_10:   biasSelection(10.0f); break;
		case EDITOR_MENU_BIAS_P_100:  biasSelection(100.0f); break;
		case EDITOR_MENU_BIAS_P_1000: biasSelection(1000.0f); break;
		case EDITOR_MENU_BIAS_N_001:  biasSelection(-0.01f); break;
		case EDITOR_MENU_BIAS_N_01:   biasSelection(-0.1f); break;
		case EDITOR_MENU_BIAS_N_1:    biasSelection(-1.0f); break;
		case EDITOR_MENU_BIAS_N_10:   biasSelection(-10.0f); break;
		case EDITOR_MENU_BIAS_N_100 : biasSelection(-100.0f); break;
		case EDITOR_MENU_BIAS_N_1000: biasSelection(-1000.0f); break;
		
		case EDITOR_MENU_INTERPOLATION : onInterpolation(); break;
		case EDITOR_MENU_ENTER_CURRENT_V : onEnterCurrentValue(); break;

		// View

		case EDITOR_MENU_PLAY : onPlay(); break;
		case EDITOR_MENU_ROWS_UP : onRowStep(-highlightRowStep , NO_SELECTION); break;
		case EDITOR_MENU_ROWS_DOWN : onRowStep(highlightRowStep , NO_SELECTION); break;
		case EDITOR_MENU_ROWS_2X_UP : onRowStep(-highlightRowStep * 2 , NO_SELECTION); break;
		case EDITOR_MENU_ROWS_2X_DOWN : onRowStep(highlightRowStep * 2 , NO_SELECTION); break;
		case EDITOR_MENU_PREV_BOOKMARK : onBookmarkDir(ARROW_UP, NO_SELECTION); break;
		case EDITOR_MENU_NEXT_BOOKMARK : onBookmarkDir(ARROW_DOWN, NO_SELECTION); break;
		case EDITOR_MENU_FIRST_TRACK : onTrackSide(ARROW_LEFT, true, NO_SELECTION); break;
		case EDITOR_MENU_LAST_TRACK : onTrackSide(ARROW_RIGHT, true, NO_SELECTION); break;
		case EDITOR_MENU_PREV_KEY : onPrevNextKey(true, NO_SELECTION); break;
		case EDITOR_MENU_NEXT_KEY : onPrevNextKey(false, NO_SELECTION); break;
		case EDITOR_MENU_FOLD_TRACK : onFoldTrack(true); break;
		case EDITOR_MENU_UNFOLD_TRACK : onFoldTrack(false); break;
		case EDITOR_MENU_FOLD_GROUP : onFoldGroup(true); break;
		case EDITOR_MENU_UNFOLD_GROUP : onFoldGroup(false); break;
		case EDITOR_MENU_TOGGLE_BOOKMARK : onToggleBookmark(); break;
		case EDITOR_MENU_CLEAR_BOOKMARKS : onClearBookmarks(); break;
		case EDITOR_MENU_TAB : onTab(); break;
	}

	Editor_update();
}