Example #1
0
// This method is used when something needs to find out the details about one of the commands
// that this object can perform..
void MainContentComponent::getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
{
    const String generalCategory ("General");

    switch (commandID)
    {
    case newProject:
        result.setInfo ("New Project", "Shows the new project wizard dialog", generalCategory, 0);
        result.setTicked (false);
        result.addDefaultKeypress ('n', ModifierKeys::ctrlModifier);
        break;
	case quickSave:
        result.setInfo ("Quick Design Save", "Save current design", generalCategory, 0);
        result.setTicked (false);
        result.addDefaultKeypress ('s', ModifierKeys::ctrlModifier);
        break;
	case quickLoad:
        result.setInfo ("Quick Design Load", "Load design from last quick save", generalCategory, 0);
        result.setTicked (false);
        result.addDefaultKeypress ('l', ModifierKeys::ctrlModifier);
        break;
	case openProject:
        result.setInfo ("Open Project", "Load project from last quick save", generalCategory, 0);
        result.setTicked (false);
        result.addDefaultKeypress ('o', ModifierKeys::ctrlModifier);
        break;

    default:
        break;
    };
}
Example #2
0
//-------------------------------------------------------------------------------
// This method is used when something needs to find out the details about one of the commands
// that this object can perform..
void GuidoViewer::getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
{
	const String generalCategory ("General");
	switch (commandID)
	{
		case kOpen:
			result.setInfo ("Open", "Open a GMN file", generalCategory, 0);
			result.setTicked (false);
			result.addDefaultKeypress ('o', ModifierKeys::commandModifier);
			break;

//		case kPrint:
//			result.setInfo ("Print", "Print the current score", generalCategory, 0);
//			result.setTicked (false);
//			result.addDefaultKeypress ('p', ModifierKeys::commandModifier);
//			break;

		case kExport:
			result.setInfo ("Export", "Export the current score", generalCategory, 0);
			result.setTicked (false);
			result.addDefaultKeypress ('e', ModifierKeys::commandModifier);
			break;

		case kReload:
			result.setInfo ("Reload", "Reload the current file", generalCategory, 0);
			result.setTicked (false);
			result.addDefaultKeypress ('r', ModifierKeys::commandModifier);
			break;

		default:
			break;
	};
}
Example #3
0
void MainHostWindow::getCommandInfo (const CommandID commandID, ApplicationCommandInfo& result)
{
    const String category ("General");

    switch (commandID)
    {
    case CommandIDs::open:
        result.setInfo ("Open...",
                        "Opens a filter graph file",
                        category, 0);
        result.defaultKeypresses.add (KeyPress ('o', ModifierKeys::commandModifier, 0));
        break;

    case CommandIDs::save:
        result.setInfo ("Save",
                        "Saves the current graph to a file",
                        category, 0);
        result.defaultKeypresses.add (KeyPress ('s', ModifierKeys::commandModifier, 0));
        break;

    case CommandIDs::saveAs:
        result.setInfo ("Save As...",
                        "Saves a copy of the current graph to a file",
                        category, 0);
        result.defaultKeypresses.add (KeyPress ('s', ModifierKeys::shiftModifier | ModifierKeys::commandModifier, 0));
        break;

    case CommandIDs::showPluginListEditor:
        result.setInfo ("Edit the list of available plug-Ins...", String::empty, category, 0);
        result.addDefaultKeypress ('p', ModifierKeys::commandModifier);
        break;

    case CommandIDs::showAudioSettings:
        result.setInfo ("Change the audio device settings", String::empty, category, 0);
        result.addDefaultKeypress ('a', ModifierKeys::commandModifier);
        break;

    case CommandIDs::aboutBox:
        result.setInfo ("About...", String::empty, category, 0);
        break;

    default:
        break;
    }
}
	void getCommandInfo(CommandID commandID, ApplicationCommandInfo &result)
	{
		const String menu("Menu");

		switch (commandID)
		{
		case CommandIDs::LOAD:
			result.setInfo("Load File", "Pick a file to load into DrumBooth", menu, 0);
			//result.addDefaultKeypress('L', ModifierKeys::commandModifier);
			break;

		case CommandIDs::QUIT:
			result.setInfo("Quit DrumBooth", "Exits DrumBooth", menu, 0);
			//result.addDefaultKeypress('Q', ModifierKeys::commandModifier);
			break;

		case CommandIDs::PLAY:
			result.setInfo("Play/Pause", "Starts/stops playback", menu, 0);
			result.addDefaultKeypress(KeyPress::spaceKey, ModifierKeys::noModifiers);
			break;

		case CommandIDs::STOP:
			result.setInfo("Stop", "Stops playback", menu, 0);
			//result.addDefaultKeypress(KeyPress::spaceKey, ModifierKeys::commandModifier);
			break;

		case CommandIDs::SETTINGS:
			result.setInfo("Audio Settings", "Open settings menu", menu, 0);
			//result.addDefaultKeypress('Q', ModifierKeys::commandModifier);
			break;

		case CommandIDs::RUDIMENTS:
			result.setInfo("Rudiment Browser", "Opens Rudiment Browser", menu, 0);
			result.addDefaultKeypress(KeyPress::F2Key, ModifierKeys::noModifiers);
			break;
		case CommandIDs::ABOUT:
			result.setInfo("About DrumBooth", "Information about this application", menu, 0);
		}
	}
Example #5
0
 void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) override
 {
     const String fileCategory ("File");
     
     switch (commandID)
     {
         case MainWindow::newProject:
             result.setInfo ("New", "Clears the current project for a new one", fileCategory, 0);
             result.addDefaultKeypress ('N', ModifierKeys::commandModifier);
             result.setActive (true);
             break;
             
         case MainWindow::openProject:
             result.setInfo ("Open", "Open a saved project file", fileCategory, 0);
             result.addDefaultKeypress ('O', ModifierKeys::commandModifier);
             result.setActive (true);
             break;
             
         case MainWindow::saveProject:
             result.setInfo ("Save", "Save a project or overwrite a current one", fileCategory, 0);
             result.addDefaultKeypress ('S', ModifierKeys::commandModifier);
             result.setActive (main->hasOpenProject());
             break;
             
         case MainWindow::saveAsProject:
             result.setInfo ("Save As", "Save a project in a new file", fileCategory, 0);
             result.setActive (true);
             break;
             
         case MainWindow::showPreferences:
             result.setInfo ("Preferences", "Open preferences video", fileCategory, 0);
             result.setActive (true);
             break;
             
         default:
             break;
     }
 }
//==============================================================================
void MainContentComponent::getCommandInfo(CommandID commandID, ApplicationCommandInfo &result)
{
    switch (commandID)
    {
    case MainWindow::fileOpen:
        result.setInfo("Open Image", "Open an image file to be showed", "Files", 0);
        result.addDefaultKeypress('o', ModifierKeys::ctrlModifier);
        break;
    case MainWindow::useLookAndFeelV1:
        result.setInfo("Use LookAndFeel_V1", String::empty, "LookAndFeel", 0);
        result.addDefaultKeypress('j', ModifierKeys::ctrlModifier);
        result.setTicked(isLookAndFeelSelected<LookAndFeel_V1>());
        break;
    case MainWindow::useLookAndFeelV2:
        result.setInfo("Use LookAndFeel_V2", String::empty, "LookAndFeel", 0);
        result.addDefaultKeypress('k', ModifierKeys::ctrlModifier);
        result.setTicked(isLookAndFeelSelected<LookAndFeel_V2>());
        break;
    case MainWindow::useLookAndFeelV3:
        result.setInfo("Use LookAndFeel_V3", String::empty, "LookAndFeel", 0);
        result.addDefaultKeypress('l', ModifierKeys::ctrlModifier);
        result.setTicked(isLookAndFeelSelected<LookAndFeel_V3>());
        break;
    case MainWindow::useNativeStyle:
    {
        result.setInfo("Use Native Style", String::empty, "LookAndFeel", 0);
        result.addDefaultKeypress('h', ModifierKeys::ctrlModifier);
        bool isNativeStyle = false;

        if (MainWindow *mw = MainWindow::getMainWindow())
        {
            isNativeStyle = mw->isUsingNativeTitleBar();
        }

        result.setTicked(isNativeStyle);
        break;
    }
    case MainWindow::showFileTreeView:
        result.setInfo("File Tree View", "Show File Tree View", "View", 0);
        result.addDefaultKeypress('m', ModifierKeys::ctrlModifier);
        result.setTicked(mFileTreeVisible);
        break;
    default:
        break;
    }
}
Example #7
0
    /*
     Gets the command info for a particular commandID 
     */
    void Engine::getCommandInfo(CommandID commandID, ApplicationCommandInfo& result) const {
        const String audio("Audio");
        int flags;

        switch (commandID) {
        case start:
            flags = _mixer->isPlaying() ? ApplicationCommandInfo::isDisabled : 0;
            result.setInfo("Play", "Play the project at the position on the timeline.", audio, flags);
            result.addDefaultKeypress(KeyPress::spaceKey, 0);
            break;

        case pause:
            flags = _mixer->isPlaying() ? 0 : ApplicationCommandInfo::isDisabled;
            result.setInfo("Pause", "Pause the player.", audio, flags);
            result.addDefaultKeypress(KeyPress::spaceKey, 0);
            break;

        case stop:
            flags = _mixer->isPlaying() ? 0 : ApplicationCommandInfo::isDisabled;
            result.setInfo("Stop", "Stop the player and reset the timeline.", audio, flags);
            result.addDefaultKeypress(KeyPress::escapeKey, 0);
            break;

        case rewind:
            result.setInfo("Rewind", "Rewind to the beginning of the timeline.", audio, 0);
            result.addDefaultKeypress('B', ModifierKeys::commandModifier);
            break;

        case forward:
            result.setInfo("Forward", "Forward to the end of the timeline.", audio, 0);
            result.addDefaultKeypress('F', ModifierKeys::commandModifier);
            break;
        
        case record:
            result.setInfo("Records", "Records to file and adds to timeline.", audio, 0);
            result.addDefaultKeypress('R', ModifierKeys::commandModifier);
            break;
        default:
            break;
        }
    }
Example #8
0
void UIComponent::getCommandInfo(CommandID commandID, ApplicationCommandInfo& result)
{

	bool acquisitionStarted = getAudioComponent()->callbacksAreActive();

	switch (commandID)
	{
		case openConfiguration:
			result.setInfo("Open...", "Load a saved processor graph.", "General", 0);
			result.addDefaultKeypress('O', ModifierKeys::commandModifier);
			result.setActive(!acquisitionStarted);
			break;

		case saveConfiguration:
			result.setInfo("Save", "Save the current processor graph.", "General", 0);
			result.addDefaultKeypress('S', ModifierKeys::commandModifier);
			break;

		case saveConfigurationAs:
			result.setInfo("Save as...", "Save the current processor graph with a new name.", "General", 0);
			result.addDefaultKeypress('S', ModifierKeys::commandModifier | ModifierKeys::shiftModifier);
			break;

		case reloadOnStartup:
			result.setInfo("Reload on startup", "Load the last used configuration on startup.", "General", 0);
			result.setActive(!acquisitionStarted);
			result.setTicked(mainWindow->shouldReloadOnStartup);
			break;

		case undo:
			result.setInfo("Undo", "Undo the last action.", "General", 0);
			result.addDefaultKeypress('Z', ModifierKeys::commandModifier);
			result.setActive(false);
			break;

		case redo:
			result.setInfo("Redo", "Undo the last action.", "General", 0);
			result.addDefaultKeypress('Y', ModifierKeys::commandModifier);
			result.setActive(false);
			break;

		case copySignalChain:
			result.setInfo("Copy", "Copy a portion of the signal chain.", "General", 0);
			result.addDefaultKeypress('C', ModifierKeys::commandModifier);
			result.setActive(false);
			break;

		case pasteSignalChain:
			result.setInfo("Paste", "Paste a portion of the signal chain.", "General", 0);
			result.addDefaultKeypress('V', ModifierKeys::commandModifier);
			result.setActive(false);
			break;

		case clearSignalChain:
			result.setInfo("Clear signal chain", "Clear the current signal chain.", "General", 0);
			result.addDefaultKeypress(KeyPress::backspaceKey, ModifierKeys::commandModifier);
			result.setActive(!getEditorViewport()->isSignalChainEmpty() && !acquisitionStarted);
			break;

		case toggleProcessorList:
			result.setInfo("Processor List", "Show/hide Processor List.", "General", 0);
			result.addDefaultKeypress('P', ModifierKeys::shiftModifier);
			result.setTicked(processorList->isOpen());
			break;

		case toggleSignalChain:
			result.setInfo("Signal Chain", "Show/hide Signal Chain.", "General", 0);
			result.addDefaultKeypress('S', ModifierKeys::shiftModifier);
			result.setTicked(editorViewportButton->isOpen());
			break;

		case toggleFileInfo:
			result.setInfo("File Info", "Show/hide File Info.", "General", 0);
			result.addDefaultKeypress('F', ModifierKeys::shiftModifier);
			result.setTicked(controlPanel->isOpen());
			break;

		case showHelp:
			result.setInfo("Show help...", "Take me to the GUI wiki.", "General", 0);
			result.setActive(true);
			break;

		case resizeWindow:
			result.setInfo("Reset window bounds", "Reset window bounds", "General", 0);
			break;

		default:
			break;
	};

}
Example #9
0
void CodeWindow::getCommandInfo (const CommandID commandID, ApplicationCommandInfo& result)
{	
	KeyboardShortcutKeys shortcuts(appProperties->getUserSettings()->getXmlValue("KeyboardShortcutXmlData"));

	switch (commandID)
	{
	
	//file commands
	case CommandIDs::fileNew:
		result.setInfo (String("New"), String("Create a new file"), CommandCategories::file, 0);
		result.addDefaultKeypress ('n', ModifierKeys::commandModifier);
		break;
	case CommandIDs::fileOpen:
		result.setInfo (String("Open"), String("Open a file"), CommandCategories::file, 0);
		result.addDefaultKeypress ('o', ModifierKeys::commandModifier);
		break;
	case CommandIDs::fileSave:
		result.setInfo (String("Save"), String("Save a file"), CommandCategories::file, 0);
		result.addDefaultKeypress ('s', ModifierKeys::commandModifier);
		break;
	case CommandIDs::fileSaveAs:
		result.setInfo (String("Save as"), String("Save file as.."), CommandCategories::file, 0);
		result.addDefaultKeypress ('s', ModifierKeys::shiftModifier | ModifierKeys::commandModifier);
		break;
	case CommandIDs::fileQuit:
		result.setInfo (String("Quit"), String("Quit"), CommandCategories::file, 0);
		result.addDefaultKeypress ('s', ModifierKeys::shiftModifier | ModifierKeys::commandModifier);
		break;
	case CommandIDs::fileUpdateGUI:
		result.setInfo (String("Update GUI"), String("Update GUI"), CommandCategories::file, 0);
		result.addDefaultKeypress ('#', ModifierKeys::commandModifier);
		break;		
	case CommandIDs::fileKeyboardShorts:
		result.setInfo (String("Keyboard Shortcuts"), String("Update GUI"), CommandCategories::file, 0);
		break;
	//edit commands
	case CommandIDs::editUndo:
		result.setInfo (String("Undo"), String("Undo last action"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('z', ModifierKeys::commandModifier);
		break;
	case CommandIDs::editRedo:
		result.setInfo (String("Redo"), String("Redo last action"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('z', ModifierKeys::shiftModifier | ModifierKeys::commandModifier);
		break;
	case CommandIDs::editCut:
		result.setInfo (String("Cut"), String("Cut selection"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('x', ModifierKeys::commandModifier);
		break;
	case CommandIDs::editCopy:
		result.setInfo (String("Copy"), String("Copy selection"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('c', ModifierKeys::commandModifier);
		break;
	case CommandIDs::editPaste:
		result.setInfo (String("Paste"), String("Paste selection"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('v', ModifierKeys::commandModifier);
		break;
	case CommandIDs::editToggleText:
		result.setInfo (String("Toggle output"), String("Toggle output"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('t', ModifierKeys::commandModifier);
		break;
	case CommandIDs::editZoomIn:
		result.setInfo (String("Zoom in"), String("Zoom in"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('=', ModifierKeys::commandModifier);
		break;
	case CommandIDs::editZoomOut:
		result.setInfo (String("Zoom out"), String("Zoom out"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('-', ModifierKeys::commandModifier);
		break;
	case CommandIDs::whiteBackground:
		result.setInfo (String("White background"), String("White scheme"), CommandCategories::edit, 0);
		break;
	case CommandIDs::blackBackground:
		result.setInfo (String("Dark background"), String("Dark scheme"), CommandCategories::edit, 0);
		break;
	case CommandIDs::insertFromRepo:
		result.setInfo (String("Insert from repo"), String("Insert from repo"), CommandCategories::edit, 0);
		//result.defaultKeypresses.add (KeyPress::createFromDescription(shortcuts.getKeyPress("InsertFromRepo")));
		//result.addDefaultKeypress (KeyPress::createFromDescription(shortcuts.getKeyPress("InsertFromRepo")));
		break;	
	case CommandIDs::addFromRepo:
		result.setInfo (String("Add from repo"), String("Add from repo"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('j', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::insertRecentEvent:
		result.setInfo (String("Insert recent event"), String("Insert recent event"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('e', ModifierKeys::commandModifier | ModifierKeys::altModifier);
		break;	
	case CommandIDs::openPythonEditor:
		result.setInfo (String("Insert Python code"), String("Insert Python code"), CommandCategories::edit, 0);
		result.addDefaultKeypress ('p', ModifierKeys::commandModifier | ModifierKeys::altModifier);
		break;	
	case CommandIDs::AudioSettings:
		result.setInfo (String("Audio Settings"), String("Edit audio settings"), CommandCategories::edit, 0);
		break;			
		
	//interactive commands	
	case CommandIDs::commOrchUpdateInstrument:
		result.setInfo (String("Update entire instr"), String("Update entire instr"), CommandCategories::command, 0);
		result.addDefaultKeypress ('u', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::startSession:
		result.setInfo (String("Restart Session"), String("Restart Session"), CommandCategories::command, 0);
		result.addDefaultKeypress ('r', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::commOrchUpdateMultiLine:
		result.setInfo (String("Update orc multi-line"), String("Update orch mutli-line"), CommandCategories::command, 0);
		result.addDefaultKeypress ('m', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::commOrchUpdateSingleLine:
		result.setInfo (String("Update orc single-line"), String("Update orch single-line"), CommandCategories::command, 0);
		result.addDefaultKeypress ('l', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::commScoUpdateMultiLine:
		result.setInfo (String("Update sco multi-line"), String("Update orch multi-line"), CommandCategories::command, 0);
		result.addDefaultKeypress ('p', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::commScoUpdateSingleLine:
		result.setInfo (String("Update sco single-line"), String("Update orch multi-line"), CommandCategories::command, 0);
		result.addDefaultKeypress ('e', ModifierKeys::commandModifier);
		break;	
	case CommandIDs::commOrcUpdateChannel:
		result.setInfo (String("Update channel"), String("Update channel"), CommandCategories::command, 0);
		result.addDefaultKeypress ('c', ModifierKeys::altModifier | ModifierKeys::commandModifier);
		break;	
		
	case CommandIDs::viewCsoundHelp:
#ifndef MACOSX
		result.setInfo (String("Toggle Csound Manual F1"), String("Toggle Csound Manual"), CommandCategories::help, 0);
		result.defaultKeypresses.add(KeyPress(KeyPress::F1Key));
#else
		result.setInfo (String("Toggle Csound Manual Ctrl+1"), String("Toggle Csound Manual"), CommandCategories::help, 0);
		result.addDefaultKeypress ('1', ModifierKeys::commandModifier);		
#endif
		break;

	case CommandIDs::viewCabbageHelp:
		result.setInfo (String("Toggle Cabbage Manual"), String("Toggle Cabbage Manual"), CommandCategories::help, 0);
		break;
	}
}
Example #10
0
    // This method is used when something needs to find out the details about one of the commands
    // that this object can perform..
    void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
    {
        const String generalCategory ("General");
        const String demosCategory ("Demos");

        switch (commandID)
        {
        case showRendering:
            result.setInfo ("Graphics Rendering", "Shows the graphics demo", demosCategory, 0);
            result.setTicked (currentDemoId == showRendering);
            result.addDefaultKeypress ('1', ModifierKeys::commandModifier);
            break;

        case showFontsAndText:
            result.setInfo ("Fonts and Text", "Shows the fonts & text demo", demosCategory, 0);
            result.setTicked (currentDemoId == showFontsAndText);
            result.addDefaultKeypress ('2', ModifierKeys::commandModifier);
            break;

        case showWidgets:
            result.setInfo ("Widgets", "Shows the widgets demo", demosCategory, 0);
            result.setTicked (currentDemoId == showWidgets);
            result.addDefaultKeypress ('3', ModifierKeys::commandModifier);
            break;

        case showThreading:
            result.setInfo ("Multithreading", "Shows the threading demo", demosCategory, 0);
            result.setTicked (currentDemoId == showThreading);
            result.addDefaultKeypress ('4', ModifierKeys::commandModifier);
            break;

        case showTreeView:
            result.setInfo ("Treeviews", "Shows the treeviews demo", demosCategory, 0);
            result.setTicked (currentDemoId == showTreeView);
            result.addDefaultKeypress ('5', ModifierKeys::commandModifier);
            break;

        case showTable:
            result.setInfo ("Table Components", "Shows the table component demo", demosCategory, 0);
            result.setTicked (currentDemoId == showTable);
            result.addDefaultKeypress ('6', ModifierKeys::commandModifier);
            break;

        case showAudio:
            result.setInfo ("Audio", "Shows the audio demo", demosCategory, 0);
            result.setTicked (currentDemoId == showAudio);
            result.addDefaultKeypress ('7', ModifierKeys::commandModifier);
            break;

        case showDragAndDrop:
            result.setInfo ("Drag-and-drop", "Shows the drag & drop demo", demosCategory, 0);
            result.setTicked (currentDemoId == showDragAndDrop);
            result.addDefaultKeypress ('8', ModifierKeys::commandModifier);
            break;

        case showOpenGL:
            result.setInfo ("OpenGL", "Shows the OpenGL demo", demosCategory, 0);
            result.addDefaultKeypress ('9', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showOpenGL);
           #if ! JUCE_OPENGL
            result.setActive (false);
           #endif
            break;

        case showQuicktime:
            result.setInfo ("Quicktime", "Shows the Quicktime demo", demosCategory, 0);
            result.addDefaultKeypress ('b', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showQuicktime);
           #if ! (JUCE_QUICKTIME && ! JUCE_LINUX)
            result.setActive (false);
           #endif
            break;

        case showDirectShow:
            result.setInfo ("DirectShow", "Shows the DirectShow demo", demosCategory, 0);
            result.addDefaultKeypress ('b', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showDirectShow);
           #if ! JUCE_DIRECTSHOW
            result.setActive (false);
           #endif
            break;

        case showCamera:
            result.setInfo ("Camera Capture", "Shows the camera demo", demosCategory, 0);
            result.addDefaultKeypress ('c', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showCamera);
           #if ! JUCE_USE_CAMERA
            result.setActive (false);
           #endif
            break;

        case showWebBrowser:
            result.setInfo ("Web Browser", "Shows the web browser demo", demosCategory, 0);
            result.addDefaultKeypress ('i', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showWebBrowser);
           #if (! JUCE_WEB_BROWSER) || JUCE_LINUX
            result.setActive (false);
           #endif
            break;

        case showCodeEditor:
            result.setInfo ("Code Editor", "Shows the code editor demo", demosCategory, 0);
            result.addDefaultKeypress ('e', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showCodeEditor);
            break;

        case showInterprocessComms:
            result.setInfo ("Interprocess Comms", "Shows the interprocess communications demo", demosCategory, 0);
            result.addDefaultKeypress ('0', ModifierKeys::commandModifier);
            result.setTicked (currentDemoId == showInterprocessComms);
            break;

        case setDefaultLookAndFeel:
            result.setInfo ("Use default look-and-feel", String::empty, generalCategory, 0);
            result.setTicked (dynamic_cast <OldSchoolLookAndFeel*> (&getLookAndFeel()) == 0);
            break;

        case setOldSchoolLookAndFeel:
            result.setInfo ("Use the old, original juce look-and-feel", String::empty, generalCategory, 0);
            result.setTicked (dynamic_cast <OldSchoolLookAndFeel*> (&getLookAndFeel()) != 0);
            break;

        case useNativeTitleBar:
            result.setInfo ("Use native window title bar", String::empty, generalCategory, 0);
            result.setTicked (mainWindow.isUsingNativeTitleBar());
            break;

       #if JUCE_MAC
        case useNativeMenus:
            result.setInfo ("Use the native OSX menu bar", String::empty, generalCategory, 0);
            result.setTicked (MenuBarModel::getMacMainMenu() != 0);
            break;
       #endif

       #if ! JUCE_LINUX
        case goToKioskMode:
            result.setInfo ("Show full-screen kiosk mode", String::empty, generalCategory, 0);
            result.setTicked (Desktop::getInstance().getKioskModeComponent() != 0);
            break;
       #endif

        default:
            break;
        };
    }
Example #11
0
    void GuiApp::getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
    {

        if (Commands::devicePadPress <= commandID && (Commands::devicePadPress + 13) > commandID)
        {
            result.setInfo (("Pad Press"), "Triggers sounds.", "Beat Thang Hardware", ApplicationCommandInfo::dontTriggerVisualFeedback);
            result.addDefaultKeypress ('A', ModifierKeys::noModifiers);
        }
        else if (Commands::devicePadRelease <= commandID && (Commands::devicePadRelease + 13) > commandID)
            result.setInfo (("Pad Release"), "Ends playing sounds.", "Beat Thang Hardware", 0);

        if (result.description.isNotEmpty())
                return;

        if (Commands::getDeviceTrackInfo (commandID, result))
            return;

        switch (commandID)
        {
            case Commands::exportAudio:
                result.setInfo ("Export Audio", "Export to an audio file", "Exporting", 0);
                break;
            case Commands::exportMidi:
                result.setInfo ("Exort MIDI", "Export to a MIDI file", "Exporting", 0);
                break;
            case Commands::mediaClose:
                result.setInfo ("Close Media", "Close the current media", "Application", 0);
                break;
            case Commands::sessionClose:
                result.addDefaultKeypress ('w', ModifierKeys::commandModifier);
                result.setInfo ("Close Session", "Close the current session", "Session", 0);
                break;
            case Commands::sessionNew:
                result.addDefaultKeypress ('n', ModifierKeys::commandModifier);
                result.setInfo ("New Session", "Create a new session", "Session", 0);
                break;
            case Commands::sessionOpen:
                result.addDefaultKeypress ('o', ModifierKeys::commandModifier);
                result.setInfo ("Open Session", "Open an existing session", "Session", 0);
                break;
            case Commands::sessionSave:
                //result.addDefaultKeypress ('s', ModifierKeys::commandModifier);
                result.setInfo ("Save Session", "Save the current session", "Session", 0);
                break;
            case Commands::sessionSaveAs:
                result.addDefaultKeypress ('s', ModifierKeys::commandModifier | ModifierKeys::shiftModifier);
                result.setInfo ("Save Session As", "Save the current session with a new name", "Session", 0);
                break;
            case Commands::showPreferences:
                result.addDefaultKeypress (',', ModifierKeys::commandModifier);
                result.setInfo ("Show Preferences", "BTV Preferences", "Application", 0);
                break;
            case Commands::showAbout:
                result.setInfo ("Show About", "About this program", "Application", 0);
                break;
            case Commands::showLegacyView:
                result.setInfo ("Legacy View", "Shows the legacy Beat Thang Virtual GUI", "Interfaces", 0);
                break;
            case Commands::showPluginManager:
                result.setInfo ("Plugin Manager", "Element Plugin Management", "Application", 0);
                break;
            case StandardApplicationCommandIDs::undo:
                result.setInfo ("Undo", "Element Plugin Management", "Application", 0);
                break;
             case StandardApplicationCommandIDs::redo:
                result.setInfo ("Redo", "Element Plugin Management", "Application", 0);
                break;
            case StandardApplicationCommandIDs::cut:
                result.setInfo ("Cut", "Element Plugin Management", "Application", 0);
                break;
             case StandardApplicationCommandIDs::copy:
                result.setInfo ("Copy", "Element Plugin Management", "Application", 0);
                break;
             case StandardApplicationCommandIDs::paste:
                result.setInfo ("Paste", "Element Plugin Management", "Application", 0);
                break;
             case StandardApplicationCommandIDs::selectAll:
                result.setInfo ("Select All", "Element Plugin Management", "Application", 0);
                break;
            case Commands::mediaSave:
                result.addDefaultKeypress ('s', ModifierKeys::commandModifier);
                result.setInfo ("Close Media", "Closes the currently edited object", "Session Media", 0);
                break;
            case Commands::transportRewind:
                result.setInfo ("Rewind", "Transport Rewind", "Playback", 0);
                result.addDefaultKeypress ('j', 0);
                break;
            case Commands::transportForward:
                result.setInfo ("Forward", "Transport Fast Forward", "Playback", 0);
                result.addDefaultKeypress ('l', 0);
                break;
            case Commands::transportPlay:
                result.setInfo ("Play", "Transport Play", "Playback", 0);
                result.addDefaultKeypress (KeyPress::spaceKey, 0);
                break;
            case Commands::transportRecord:
                result.setInfo ("Record", "Transport Record", "Playback", 0);
                break;
            case Commands::transportSeekZero:
                result.setInfo ("Seek Start", "Seek to Beginning", "Playback", 0);
                break;
            case Commands::transportStop:
                result.setInfo ("Stop", "Transport Stop", "Playback", 0);
                break;
        }
    }
Example #12
0
/*
Retrieves information about the commands
@param commandID The ID of the command to be retrieved
@param result Holds information describing a command
*/
void ProjectManager::getCommandInfo(CommandID commandID, ApplicationCommandInfo &result) const {
    const String projectManagement("Project Management");
    const String selection("Selection");
 
    switch (commandID) {
    case newProject:
        result.setInfo("New Project...", "Create a new project.", projectManagement, 0);
        result.addDefaultKeypress('N', ModifierKeys::commandModifier);
        break;

    case openProject:
        result.setInfo("Open Project...", "Open an existing project.", projectManagement, 0);
        result.addDefaultKeypress('O', ModifierKeys::commandModifier);
        break;

    case saveProject:
        result.setInfo("Save Project", "Save the current project.", projectManagement, 0);
        result.addDefaultKeypress('S', ModifierKeys::commandModifier);
        break;

    case saveProjectAs:
        result.setInfo("Save Project As...", "Save the current project as a new project.", projectManagement, 0);
        result.addDefaultKeypress('S', ModifierKeys::ctrlAltCommandModifiers);
        break;

	case closeProject:
		result.setInfo("Close Project", "Close the Current Project.", projectManagement, 0);
		result.addDefaultKeypress('C', ModifierKeys::ctrlAltCommandModifiers);
		break;

	case exportWav:
		result.setInfo("Export As Wav", "Export the Project as an Audio File.", projectManagement, 0);
		result.addDefaultKeypress('E', ModifierKeys::ctrlAltCommandModifiers);
		break;

    case StandardApplicationCommandIDs::cut:
        // Need to check whether isDisabled should be passed or not, regarding the selection
        result.setInfo("Cut", "Cut the selection.", selection, ApplicationCommandInfo::isDisabled);
        result.addDefaultKeypress('X', ModifierKeys::commandModifier);
        break;

    case StandardApplicationCommandIDs::copy:
        // Need to check whether isDisabled should be passed or not, regarding the selection
        result.setInfo("Copy", "Copy the selection.", selection, ApplicationCommandInfo::isDisabled);
        result.addDefaultKeypress('C', ModifierKeys::commandModifier);
        break;

    case StandardApplicationCommandIDs::paste:
        // Need to check whether isDisabled should be passed or not, regarding the selection
        result.setInfo("Paste", "Paste the previously copied selection.", selection, ApplicationCommandInfo::isDisabled);
        result.addDefaultKeypress('V', ModifierKeys::commandModifier);
        break;

    case addTrack:
        result.setInfo("Add track", "Add a track to the project.", projectManagement, 0);
        result.addDefaultKeypress('+', 0);
        break;

    case addRegion:
        result.setInfo("Add region", "Add a region to the selected track.", projectManagement, 0);
		break;

	case addRegionToTrack:
		result.setInfo("Add region to track", "Add region to a specific track", projectManagement, 0);
		break;

    default:
        break;
    }
}
Example #13
0
    void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) override
    {
        const String generalCategory ("General");
        const String demosCategory ("Demos");

        switch (commandID)
        {
            case MainAppWindow::showPreviousDemo:
                result.setInfo ("Previous Demo", "Shows the previous demo in the list", demosCategory, 0);
                result.addDefaultKeypress ('-', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::showNextDemo:
                result.setInfo ("Next Demo", "Shows the next demo in the list", demosCategory, 0);
                result.addDefaultKeypress ('=', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::welcome:
                result.setInfo ("Welcome Demo", "Shows the 'Welcome' demo", demosCategory, 0);
                result.addDefaultKeypress ('1', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsAnimation:
                result.setInfo ("Animation Demo", "Shows the 'Animation' demo", demosCategory, 0);
                result.addDefaultKeypress ('2', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsDialogBoxes:
                result.setInfo ("Dialog Boxes Demo", "Shows the 'Dialog Boxes' demo", demosCategory, 0);
                result.addDefaultKeypress ('3', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsKeyMappings:
                result.setInfo ("Key Mappings Demo", "Shows the 'Key Mappings' demo", demosCategory, 0);
                result.addDefaultKeypress ('4', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsMDI:
                result.setInfo ("Multi-Document Demo", "Shows the 'Multi-Document' demo", demosCategory, 0);
                result.addDefaultKeypress ('5', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsPropertyEditors:
                result.setInfo ("Property Editor Demo", "Shows the 'Property Editor' demo", demosCategory, 0);
                result.addDefaultKeypress ('6', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsTransforms:
                result.setInfo ("Component Transforms Demo", "Shows the 'Transforms' demo", demosCategory, 0);
                result.addDefaultKeypress ('7', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsWebBrowsers:
                result.setInfo ("Web Browser Demo", "Shows the 'Web Browser' demo", demosCategory, 0);
                result.addDefaultKeypress ('8', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::componentsWidgets:
                result.setInfo ("Widgets Demo", "Shows the 'Widgets' demo", demosCategory, 0);
                result.addDefaultKeypress ('9', ModifierKeys::commandModifier);
                break;

            case MainAppWindow::renderingEngineOne:
            case MainAppWindow::renderingEngineTwo:
            case MainAppWindow::renderingEngineThree:
            {
                MainAppWindow& mainWindow = *MainAppWindow::getMainAppWindow();
                const StringArray engines (mainWindow.getRenderingEngines());
                const int index = commandID - MainAppWindow::renderingEngineOne;

                result.setInfo ("Use " + engines[index], "Uses the " + engines[index] + " engine to render the UI", generalCategory, 0);
                result.setTicked (mainWindow.getActiveRenderingEngine() == index);

                result.addDefaultKeypress ('1' + index, ModifierKeys::noModifiers);
                break;
            }

            case MainAppWindow::useLookAndFeelV1:
                result.setInfo ("Use LookAndFeel_V1", String(), generalCategory, 0);
                result.addDefaultKeypress ('i', ModifierKeys::commandModifier);
                result.setTicked (isLookAndFeelSelected<LookAndFeel_V1>());
                break;

            case MainAppWindow::useLookAndFeelV2:
                result.setInfo ("Use LookAndFeel_V2", String(), generalCategory, 0);
                result.addDefaultKeypress ('o', ModifierKeys::commandModifier);
                result.setTicked (isLookAndFeelSelected<LookAndFeel_V2>());
                break;

            case MainAppWindow::useLookAndFeelV3:
                result.setInfo ("Use LookAndFeel_V3", String(), generalCategory, 0);
                result.addDefaultKeypress ('p', ModifierKeys::commandModifier);
                result.setTicked (isLookAndFeelSelected<LookAndFeel_V3>());
                break;

            case MainAppWindow::toggleRepaintDebugging:
                result.setInfo ("Toggle repaint display", String(), generalCategory, 0);
                result.addDefaultKeypress ('r', ModifierKeys());
                result.setTicked (juceDemoRepaintDebuggingActive);
                break;

            case MainAppWindow::useNativeTitleBar:
            {
                result.setInfo ("Use native window title bar", String(), generalCategory, 0);
                result.addDefaultKeypress ('n', ModifierKeys::commandModifier);
                bool nativeTitlebar = false;

                if (MainAppWindow* map = MainAppWindow::getMainAppWindow())
                    nativeTitlebar = map->isUsingNativeTitleBar();

                result.setTicked (nativeTitlebar);
                break;
            }

           #if ! JUCE_LINUX
            case MainAppWindow::goToKioskMode:
                result.setInfo ("Show full-screen kiosk mode", String(), generalCategory, 0);
                result.addDefaultKeypress ('f', ModifierKeys::commandModifier);
                result.setTicked (Desktop::getInstance().getKioskModeComponent() != 0);
                break;
           #endif

            default:
                break;
        }
    }
Example #14
0
//=================================================================================================
// 设置本类能识别并处理的命令信息
void MainWindow::getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
{
    switch (commandID)
    {
    case AppCommandIDs::newDoc:     // 新建文档
        result.setInfo(TRANS("New Project"), TRANS("New Project"), AppString::fileCategory, 0);
        result.addDefaultKeypress('n', ModifierKeys::commandModifier);
        result.setActive(appDoc->getTracksController()->getContainer(0)->subCompNums() > 0 || appDoc->getFile().exists());
        break;

    case AppCommandIDs::open:       // 打开文档
        result.setInfo(TRANS("Open Project..."), TRANS("Open Project"), AppString::fileCategory, 0);
        result.addDefaultKeypress('o', ModifierKeys::commandModifier); 
        break;

    case AppCommandIDs::close:      // 关闭已打开的文档
        result.setInfo(TRANS("Close Project"), TRANS("Close Project"), AppString::fileCategory, 0);
        result.addDefaultKeypress('w', ModifierKeys::commandModifier); 
        result.setActive(appDoc->getTracksController()->getContainer(0)->subCompNums() > 0 || appDoc->getFile().exists());
        break;

    case AppCommandIDs::save:       // 保存文档
        result.setInfo(TRANS("Save Project"), TRANS("Save Project"), AppString::fileCategory, 0);
        result.addDefaultKeypress('s', ModifierKeys::commandModifier); 
        result.setActive(appDoc->hasChangedSinceSaved());
        break;

    case AppCommandIDs::saveAs:     // 文档另存为
        result.setInfo(TRANS("Save Project As..."), TRANS("Save Project As"), AppString::fileCategory, 0);
        result.addDefaultKeypress('s', ModifierKeys::commandModifier | ModifierKeys::shiftModifier); 
        result.setActive(appDoc->getTracksController()->getContainer(0)->subCompNums() > 0 || appDoc->getFile().exists());
        break;

    case AppCommandIDs::systemPreferences:     // 系统设置
        result.setInfo(TRANS("System Preferences..."), TRANS("System Preferences..."), TRANS("Application"), 0);
        result.addDefaultKeypress(KeyPress::F2Key, 0);
        break;

    case AppCommandIDs::setupAudioDevice:     // 设置音频设备
        result.setInfo(TRANS("Sound Device..."), TRANS("Sound Device..."), TRANS("Application"), 0);
        result.addDefaultKeypress(KeyPress::F3Key, 0);
        break;

    case AppCommandIDs::keyboardShortcuts:     // 快捷键
        result.setInfo(TRANS("Shortcuts..."), TRANS("Shortcuts..."), TRANS("Application"), 0);
        result.addDefaultKeypress(KeyPress::F4Key, 0);
        break;

    case AppCommandIDs::aboutThisApp:     // 关于
        result.setInfo(TRANS("About..."), TRANS("About..."), TRANS("Application"), 0);
        result.addDefaultKeypress(KeyPress::F1Key, ModifierKeys::commandModifier);
        break;

    case AppCommandIDs::undoAction:     // 全局性的撤销
        result.setInfo(TRANS("Undo ") + undoManager->getUndoDescription(), TRANS("Undo"), AppString::editCategory, 0);
        result.addDefaultKeypress('z', ModifierKeys::commandModifier);
        result.setActive(undoManager->canUndo());
        break;

    case AppCommandIDs::redoAction:     // 全局性的重做
        result.setInfo(TRANS("Redo ") + undoManager->getRedoDescription(), TRANS("Redo"), AppString::editCategory, 0);
        result.addDefaultKeypress('y', ModifierKeys::commandModifier);
        result.addDefaultKeypress('z', ModifierKeys::commandModifier | ModifierKeys::shiftModifier);
        result.setActive(undoManager->canRedo());
        break;

    case AppCommandIDs::clearUndoHistory:     // 清除撤销记录
        result.setInfo(TRANS("Clear All Action History"), TRANS("Clear All Action History"), AppString::editCategory, 0);
        result.setActive(undoManager->canUndo() || undoManager->canRedo());
        break;
    }
}
void CtrlrEditor::getCommandInfo (CommandID commandID, ApplicationCommandInfo &result)
{
	const String globalCategory ("Global");
	const String panelCategory ("Panel");

	switch (commandID)
	{
		case doSaveState:
			result.setInfo ("Save CTRLR state", "Saves the CTRLR state to disk", globalCategory, 0);
			result.addDefaultKeypress ('s', ModifierKeys::commandModifier | ModifierKeys::altModifier);
			break;

		case doOpenPanel:
			result.setInfo ("Open Panel", "Open a panel from a file", globalCategory, 0);
			result.addDefaultKeypress ('o', ModifierKeys::commandModifier);
			break;

		case doNewPanel:
			result.setInfo ("New Panel", "Create a new empty panel", globalCategory, 0);
			result.addDefaultKeypress ('n', ModifierKeys::commandModifier);
			break;

		case showGlobalSettingsDialog:
			result.setInfo ("Preferences", "Show global CTRLR preferences", globalCategory, 0);
			result.addDefaultKeypress ('p', ModifierKeys::commandModifier);
			break;

		case showMidiMonitor:
			result.setInfo ("MIDI Monitor", "A small MIDI monitor that will display received and sent data", globalCategory, 0);
			result.addDefaultKeypress ('m', ModifierKeys::commandModifier);
			break;

		case showLogViewer:
			result.setInfo ("Log viewer", "You can view diagnostic messages here, useful when debugging problems", globalCategory, 0);
			result.addDefaultKeypress ('l', ModifierKeys::commandModifier);
			break;

		case showMidiCalculator:
			result.setInfo ("MIDI Calculator", "A useful tool to translate Heximal, Binary, Decimal values", globalCategory, 0);
			result.addDefaultKeypress ('j', ModifierKeys::commandModifier);
			break;

		case showAboutDialog:
			result.setInfo ("About", "About CTRLR", globalCategory, 0);
			result.addDefaultKeypress ('a', ModifierKeys::commandModifier);
			break;

		case showKeyboardMappingDialog:
			result.setInfo ("Keyboard mapping", "Change default keyboard mappings", globalCategory, 0);
			result.addDefaultKeypress ('k', ModifierKeys::commandModifier);
			break;

		case doViewPropertyDisplayIDs:
			result.setInfo ("Property IDs/Names", "View property names or property IDs", panelCategory, 0);
			result.setTicked (isPanelActive() ? (bool)getActivePanel()->getProperty(Ids::panelPropertyDisplayIDs) : false);
			result.setActive (isPanelActive());
			break;

		case doZoomIn:
			result.setInfo ("Zoom In", "Zoom in the panel", panelCategory, 0);
			result.addDefaultKeypress ('+', ModifierKeys::commandModifier);
			result.setActive (isPanelActive());
			break;

		case doZoomOut:
			result.setInfo ("Zoom Out", "Zoom out the panel", panelCategory, 0);
			result.addDefaultKeypress ('-', ModifierKeys::commandModifier);
			result.setActive (isPanelActive());
			break;

		case doCopy:
			result.setInfo ("Copy", "Copy selected components to clipboard", panelCategory, 0);
			result.addDefaultKeypress ('c', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doCut:
			result.setInfo ("Cut", "Cut selected components to clipboard", panelCategory, 0);
			result.addDefaultKeypress ('x', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doPaste:
			result.setInfo ("Paste", "Paste components from clipboard", panelCategory, 0);
			result.addDefaultKeypress ('v', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doUndo:
			result.setInfo ("Undo", "Undo last transaction", panelCategory, 0);
			result.addDefaultKeypress ('z', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doRedo:
			result.setInfo ("Redo", "Redo last transaction", panelCategory, 0);
			result.addDefaultKeypress ('y', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doSave:
			result.setInfo ("Save", "Save panel to a file", panelCategory, 0);
			result.addDefaultKeypress ('s', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doClose:
			result.setInfo ("Close", "Close the current panel", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doSaveAs:
			result.setInfo ("Save As", "Save panel as a new file", panelCategory, 0);
			result.addDefaultKeypress ('s', ModifierKeys::commandModifier | ModifierKeys::shiftModifier);
			result.setActive (isPanelActive(true));
			break;

		case doSaveVersioned:
			result.setInfo ("Save versioned", "Save panel to a new versioned file", panelCategory, 0);
			result.addDefaultKeypress ('s', ModifierKeys::altModifier | ModifierKeys::shiftModifier);
			result.setActive (isPanelActive(true));
			break;

		case doPanelMode:
			result.setInfo ("Panel mode", "Switches panel from and to EDIT mode", panelCategory, 0);
			result.addDefaultKeypress ('e', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doPanelLock:
			result.setInfo ("Panel lock", "Locks components in edit mode", panelCategory, 0);
			result.addDefaultKeypress ('l', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			if (isPanelActive(true))
			{
				result.setTicked ((bool)getActivePanelEditor()->getProperty(Ids::uiPanelLock));
			}
			break;

		case doPanelDisableCombosOnEdit:
			result.setInfo ("Disable combos on edit", "Combo boxes will not open when editing panel", panelCategory, 0);
			result.setActive (isPanelActive(true));
			if (isPanelActive(true))
			{
				result.setTicked ((bool)getActivePanelEditor()->getProperty(Ids::uiPanelDisableCombosOnEdit));
			}
			break;

		case showLuaEditor:
			result.setInfo ("LUA Editor", "Show/hide the LUA editor window", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doRefreshDeviceList:
			result.setInfo ("Refresh devices", "Refresh the list of devices available in the OS", panelCategory, 0);
			result.setActive (true);
			break;

		case showLuaConsole:
			result.setInfo ("LUA Console", "Show/hide the LUA console", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case showComparatorTables:
			result.setInfo ("Comparator tables", "Show/hide the dump for the comparator tables", panelCategory, 0);
			result.setActive (isPanelActive());
			break;

		case showMidiLibrary:
			result.setInfo ("MIDI Library", "Show/hide the MIDI LIbrary window", panelCategory, 0);
			result.setActive (isPanelActive());
			result.addDefaultKeypress ('l', ModifierKeys::altModifier | ModifierKeys::shiftModifier);
			break;

		case showLayers:
			result.setInfo ("Layer editor", "Show/hide the layer editor", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case showModulatorList:
			result.setInfo ("Modulator list", "Show/hide the modulator list window", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case showBufferEditor:
			result.setInfo ("Buffer Editor", "Show/hide the buffer editor", panelCategory, 0);
			result.addDefaultKeypress ('b', ModifierKeys::commandModifier);
			result.setActive (isPanelActive(true));
			break;

		case doSendSnapshot:
			result.setInfo ("Send Snapshot", "Send all values from the panel as their defines MIDI messages", panelCategory, 0);
			result.setActive (isPanelActive());
			break;

		case doSnapshotStore:
			result.setInfo ("Program snapshot", "Save the current panel state as a snapshot", panelCategory, 0);
			result.setActive (isPanelActive());
			break;

		case doRefreshPropertyLists:
			result.setInfo ("Refresh property lists", "Refreshes all dynamic lists that occur in the property pane", panelCategory, 0);
			result.setActive (isPanelActive());
			break;

		case doExportFileText:
			result.setInfo ("Export XML", "Export panel to a XML file with no compression, might be very large", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportFileZText:
			result.setInfo ("Export compressed XML", "Export panel to a zlib compressed XML file", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportFileBin:
			result.setInfo ("Export binary", "Export panel to a binary file, unlike XML is unreadable but loads faster", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportFileZBin:
			result.setInfo ("Export compressed binary", "Export panel to a zlib compressed binary file", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportFileZBinRes:
			result.setInfo ("Export compressed binary + resources", "Export panel to a zlib compressed binary file with resources included", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportFileInstance:
			result.setInfo ("Export instance", "Exports the panel as a standalone instance (executable/loadable file)", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportFileInstanceRestricted:
			result.setInfo ("Export restricted instance", "Exports the panel as a standalone restricted instance (executable/loadable file). It won't be editable.", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case doExportGenerateUID:
			result.setInfo ("Re-generate UID ["+getPanelProperty(Ids::panelUID).toString()+"]", "Each panel has a Unique ID that can be re-generated", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case optMidiInputFromHost:
			result.setInfo ("Input from plugin host", "Accept MIDI events from host and process them", panelCategory, 0);
			result.setActive (!JUCEApplication::isStandaloneApp());
			result.setTicked (isPanelActive() ? getActivePanel()->getMidiOptionBool((const CtrlrPanelMidiOption)optMidiInputFromHost) : false);
			break;

		case doShowMidiSettingsDialog:
			result.setInfo("Settings", "Show a more user friendly MIDI settings dialog", panelCategory, 0);
			result.setActive (isPanelActive(true));
			break;

		case optMidiInputFromHostCompare:
			result.setInfo ("Input from host to comparator", "This option tells Ctrlr to route all incomming MIDI events from the MIDI host to the Comparator engine, messages that will match modulators in the panel will be treated as comming from a MIDI device", panelCategory, 0);
			result.setActive (!JUCEApplication::isStandaloneApp());
			result.setTicked (isPanelActive() ? getActivePanel()->getMidiOptionBool((const CtrlrPanelMidiOption)optMidiInputFromHostCompare) : false);
			break;

		case optMidiOutuptToHost:
			result.setInfo ("Output to plugin host", "All MIDI output goes to the MIDI host (if supported by the plugin format and the host)", panelCategory, 0);
			result.setActive (!JUCEApplication::isStandaloneApp());
			result.setTicked (isPanelActive() ? getActivePanel()->getMidiOptionBool((const CtrlrPanelMidiOption)optMidiOutuptToHost) : false);
			break;

		case optMidiSnapshotOnLoad:
			result.setInfo ("Snapshot on load", "After the panel is loaded a Snapshot will be sent", panelCategory, 0);
			result.setActive (isPanelActive());
			result.setTicked (getPanelProperty(Ids::panelMidiSnapshotAfterLoad));
			break;

		case optMidiSnapshotOnProgramChange:
			result.setInfo ("Snapshot on program change", "After each program change event on the panel a Snapshot will be sent", panelCategory, 0);
			result.setActive (isPanelActive());
			result.setTicked (getPanelProperty(Ids::panelMidiSnapshotAfterProgramChange));
			break;

		case optMidiThruD2D:
			result.setInfo ("Input device -> Output device", "Send all MIDI messages comming from the MIDI input device via the MIDI output device", panelCategory, 0);
			result.setActive (isPanelActive());
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruD2D));
			break;

		case optMidiThruD2H:
			result.setInfo ("Input device -> Plugin host", "Send all MIDI messages from the MIDI input device to the plugin host (if supported by the plugin format and the host)", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruD2H));

			break;

		case optMidiThruH2D:
			result.setInfo ("Plugin host -> Output device", "Send all MIDI messages comming from the plugin host the MIDI output device", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruH2D));
			break;

		case optMidiThruH2H:
			result.setInfo ("Plugin host -> Plugin host", "Send all MIDI messages comming from the plugin host back to it (if supported by the plugin format and the host)", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruH2H));
			break;

		case optMidiThruD2DChannelize:
			result.setInfo ("Change channel: Input device -> Output device", "Change the channel of MIDI messages comming in on the MIDI input device to the MIDI channel set for the output device", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruD2DChannelize));
			break;

		case optMidiThruD2HChannelize:
			result.setInfo ("Change channel: Input device -> Plugin host", "Change the channel of MIDI messages comming in on the MIDI input device to the MIDI channel set for the output to plugin host", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruD2HChannelize));
			break;

		case optMidiThruH2DChannelize:
			result.setInfo ("Change channel: Plugin host -> Output device", "Change the channel of MIDI messages comming in from the plugin host to the MIDI channel set for the output device", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruH2DChannelize));
			break;

		case optMidiThruH2HChannelize:
			result.setInfo ("Change channel: Plugin host -> Plugin host", "Change the channel of MIDI messages comming in from the plugin host to the MIDI channel set for the output to plugin host", panelCategory, 0);
			result.setActive (isPanelActive() && (JUCEApplication::isStandaloneApp() == false));
			if (isPanelActive())
				result.setTicked (getActivePanel()->getMidiOptionBool (panelMidiThruH2HChannelize));
			break;

		case doCrash:
			result.setInfo ("Crash Ctrlr", "Simulate Ctrlr crashing to see what happens", globalCategory, 0);
			result.setActive (true);
			break;

		case doDumpVstTables:
			result.setInfo ("Dump Memory Info", "Dump information stored in memory in some readable format", globalCategory, 0);
			result.setActive (true);
			break;

		case doRegisterExtension:
			result.setInfo ("Register file extensions", "Register Ctrlr to hanle .panel file extension", globalCategory, 0);
			result.setActive (true);
			break;

        case doKeyGenerator:
            result.setInfo ("Key Generator", "Generate a private key for signing panels", globalCategory, 0);
            result.setActive (true);
            break;

        case doProgramWizard:
            result.setInfo ("Program wizard", "Wizard to generate program requests", globalCategory, 0);
            result.setActive (true);
            break;

		case doQuit:
			result.setInfo ("Quit", "Quit Ctrlr", globalCategory, 0);
			result.setActive (JUCEApplication::isStandaloneApp());
			break;
	}
}
// This method is used when something needs to find out the details about one of the commands
// that this object can perform..
void HostFilterComponent::getCommandInfo (const CommandID commandID, ApplicationCommandInfo& result)
{
    const int none = 0;
    const int cmd = ModifierKeys::commandModifier;
    // const int shift = ModifierKeys::shiftModifier;

    GraphComponent* graph = main->getGraph ();
    Transport* transport = getFilter()->getTransport();

    switch (commandID)
    {
    //----------------------------------------------------------------------------------------------
    case CommandIDs::pluginOpen:
        result.setInfo (T("Open Plugin..."), T("Open a plugin"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('l'), cmd);
        result.setActive (true);
        break;
    case CommandIDs::pluginClose:
        {
        result.setInfo (T("Close Plugins"), T("Close selected plugins"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('k'), cmd);
        // TODO - have to update this !
//        GraphComponent* track = tracks.getUnchecked (0);
//        result.setActive ((track ? (track->getSelectedPlugin () != -1) : false));
        result.setActive (false);
        break;
        }
    case CommandIDs::pluginClear:
        {
        result.setInfo (T("Clear Plugins"), T("Close all plugins"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('j'), cmd);
        result.setActive ((graph ? (graph->getPluginsCount () > 2) : false));
        break;
        }
    case CommandIDs::showPluginListEditor:
        {
        result.setInfo (T("Show Plugin List"), T("Show plugin list window"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('p'), cmd);
        result.setActive (true);
        break;
        }
    //----------------------------------------------------------------------------------------------
#ifndef JOST_VST_PLUGIN
    case CommandIDs::audioOptions:
        {
        result.setInfo (T("Audio & MIDI Settings..."), T("Show device manager"), CommandCategories::audio, 0);
        // result.addDefaultKeypress (KeyPress::backspaceKey, none);
        result.setActive (true);
        break;
        }
#endif
    case CommandIDs::audioPlay:
        {
        result.setInfo (T("Play"), T("Play sequencers"), CommandCategories::audio, 0);
        if (! transport->isPlaying())
            result.addDefaultKeypress (KeyPress::spaceKey, none);
        result.setActive (! transport->isPlaying());
        break;
        }
    case CommandIDs::audioPlayPause:
        {
        if (transport->isPlaying())
            result.setInfo (T("Pause"), T("Pause sequencers"), CommandCategories::audio, 0);
        else
            result.setInfo (T("Play"), T("Play sequencers"), CommandCategories::audio, 0);
         result.addDefaultKeypress (KeyPress::spaceKey, none);
        break;
        }
    case CommandIDs::audioStop:
        {
        result.setInfo (T("Stop"), T("Stop sequencers"), CommandCategories::audio, 0);
        if (transport->isPlaying())
            result.addDefaultKeypress (KeyPress::spaceKey, none);
        result.setActive (transport->isPlaying());
        break;
        }
    case CommandIDs::audioRecord:
        {
        result.setInfo (T("Record"), T("Activate recording"), CommandCategories::audio, 0);
        result.addDefaultKeypress (T('r'), cmd);
        result.setTicked (transport->isRecording());
        result.setActive (true);
        break;
        }
    case CommandIDs::audioRewind:
        {
        result.setInfo (T("Rewind"), T("Rewind sequencers"), CommandCategories::audio, 0);
        result.addDefaultKeypress (KeyPress::backspaceKey, none);
        result.setActive (transport->getPositionInFrames() != 0);
        break;
        }
    case CommandIDs::audioLoop:
        {
        result.setInfo (T("Looping"), T("Loop sequencers"), CommandCategories::audio, 0);
        result.addDefaultKeypress (T('l'), cmd);
        result.setTicked (transport->isLooping());
        result.setActive (true);
        break;
        }
    //----------------------------------------------------------------------------------------------
    case CommandIDs::audioStemsStartStop:
        {
        int renderNumber = 0;
        if (getHost()->isStemRenderingActive(renderNumber))
         result.setInfo (T("Stop rendering stems (" + String(renderNumber) + String(")")), T("Stop rendering stems"), CommandCategories::audio, 0);
        else
         result.setInfo (T("Start rendering stems (" + String(renderNumber) + String(")")), T("Start rendering stems"), CommandCategories::audio, 0);
   
        result.setActive (true);
        break;
        }
    case CommandIDs::audioStemsSetup:
        {
        result.setInfo (T("Setup stem render..."), T("Stem Setup"), CommandCategories::audio, 0);
        result.setActive (true);
        break;
        }
    //----------------------------------------------------------------------------------------------
    case CommandIDs::sessionNew:
        {
        result.setInfo (T("New Session"), T("New session"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('n'), cmd);
        result.setActive (true);
        break;
        }
    case CommandIDs::sessionLoad:
        result.setInfo (T("Open Session..."), T("Open a session"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('a'), cmd);
        result.setActive (true);
        break;
    case CommandIDs::sessionSave:
        {
        result.setInfo (T("Save Session As..."), T("Save a session to a specified file"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('s'), ModifierKeys::commandModifier | ModifierKeys::shiftModifier);
        result.setActive ((graph ? (graph->getPluginsCount () > 0) : false));
        break;
        }
    case CommandIDs::sessionSaveNoPrompt:
        {
        result.setInfo (T("Save Session"), T("Save session to existing file"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('s'), cmd);
        result.setActive ((graph ? (graph->getPluginsCount () > 0) : false));
        break;
        }
    //----------------------------------------------------------------------------------------------
    case CommandIDs::appToolbar:
        result.setInfo (T("Edit toolbar"), T("Edit toolbar items"), CommandCategories::about, 0);
        result.setActive (toolbar != 0);
        break;
    case CommandIDs::appBrowser:
        result.setInfo (T("Show/Hide browser"), T("Show or hide the file browser"), CommandCategories::about, 0);
        result.setActive (true);
        break;
    case CommandIDs::appFullScreen:
        result.setInfo (T("Full Screen"), T("Set main window full screen"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('t'), cmd);
        result.setActive (true);
        break;
    case CommandIDs::appExit:
        result.setInfo (T("Quit"), T("Quit Jive"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('q'), cmd);
        result.setActive (true);
        break;
    case CommandIDs::appAbout:
        result.setInfo (T("About..."), T("About Jive"), CommandCategories::about, 0);
        result.setActive (true);
        break;
    //----------------------------------------------------------------------------------------------
    default:
        break;
    }
}
Example #17
0
void SAMApplication::getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
{
    switch (commandID)
    {
    case CommandIDs::newFile:
        result.setInfo(TRANS("New"), TRANS("Create new *.mdl file."),
                       CommandCategories::general, 0);
        result.addDefaultKeypress('n', ModifierKeys::commandModifier);
        break;
    case CommandIDs::open:
        result.setInfo(TRANS("Open"), TRANS("Open *.mdl file."),
                       CommandCategories::general, 0);
        result.addDefaultKeypress ('o', ModifierKeys::commandModifier);
        break;
    case CommandIDs::showPrefs:
        result.setInfo(TRANS("Preferences..."),
                       TRANS("Open preferences window"),
                       CommandCategories::general, 0);
    	result.addDefaultKeypress(',', ModifierKeys::commandModifier);
    	break;
    case CommandIDs::clearOutputConsole:
        result.setInfo(TRANS("Clear Output Window"),
                       TRANS("Delete text in the output window"),
                       CommandCategories::tools, 0);
        result.addDefaultKeypress('k', ModifierKeys::commandModifier | ModifierKeys::shiftModifier);
    	break;
    case CommandIDs::openDataDir:
        result.setInfo(TRANS("Open Data Directory"),
                       TRANS("Open data directory in file manager"),
                       CommandCategories::tools, 0);
        result.addDefaultKeypress('l', ModifierKeys::commandModifier);
    	break;
    case CommandIDs::showHelp:
        result.setInfo(TRANS("Online Help"),
                       TRANS("Open online help in web browser."),
                       CommandCategories::help, 0);
        break;
    case CommandIDs::showPostWindow:
        result.setInfo(TRANS("Toggle Post Window"),
                       TRANS("Show/hide post window"),
                       CommandCategories::tools, 0);
    	result.addDefaultKeypress('k', ModifierKeys::commandModifier);
    	break;
    case CommandIDs::showPropertiesWindow:
        result.setInfo(TRANS("Show Properties Window"),
                       TRANS("Show properties window"),
                       CommandCategories::windows, 0);
    	result.addDefaultKeypress('i', ModifierKeys::commandModifier);
    	break;
    case CommandIDs::propertiesWindowOnTop:
        result.setInfo(TRANS("Properties Window Always On Top"),
                       TRANS("Toggle always on top"),
                       CommandCategories::windows, 0);
        result.setTicked(StoredSettings::getInstance()->getIsPropertiesWindowAlwaysOnTop());
        break;
    case CommandIDs::showPreviousWindow:
        result.setInfo(TRANS("Previous Window"),
                       TRANS("Display previous window"),
                       CommandCategories::windows, 0);
#ifdef JUCE_MAC
        result.addDefaultKeypress(KeyPress::leftKey, ModifierKeys::commandModifier | ModifierKeys::altModifier);
#else
        result.addDefaultKeypress(KeyPress::pageUpKey, ModifierKeys::commandModifier);
#endif
        break;
    case CommandIDs::showNextWindow:
        result.setInfo(TRANS("Next Window"),
                       TRANS("Display next window"),
                       CommandCategories::windows, 0);
#ifdef JUCE_MAC
        result.addDefaultKeypress(KeyPress::rightKey, ModifierKeys::commandModifier | ModifierKeys::altModifier);
#else
        result.addDefaultKeypress(KeyPress::pageDownKey, ModifierKeys::commandModifier);
#endif
        break;
    default:
        JUCEApplication::getCommandInfo (commandID, result);
        break;
    }
}