void EditToolBar::Populate() { MakeButtonBackgroundsSmall(); /* Buttons */ AddButton(bmpCut, bmpCutDisabled, ETBCutID, _("Cut")); AddButton(bmpCopy, bmpCopyDisabled, ETBCopyID, _("Copy")); AddButton(bmpPaste, bmpPasteDisabled, ETBPasteID, _("Paste")); AddButton(bmpTrim, bmpTrimDisabled, ETBTrimID, _("Trim outside selection")); AddButton(bmpSilence, bmpSilenceDisabled, ETBSilenceID, _("Silence selection")); AddSeparator(); AddButton(bmpUndo, bmpUndoDisabled, ETBUndoID, _("Undo")); AddButton(bmpRedo, bmpRedoDisabled, ETBRedoID, _("Redo")); AddSeparator(); #ifdef EXPERIMENTAL_LINKING AddButton(bmpLinkTracks, bmpLinkTracksDisabled, ETBLinkID, _("Link Tracks"), true); AddSeparator(); #endif AddButton(bmpZoomIn, bmpZoomInDisabled, ETBZoomInID, _("Zoom In")); AddButton(bmpZoomOut, bmpZoomOutDisabled, ETBZoomOutID, _("Zoom Out")); AddButton(bmpZoomSel, bmpZoomSelDisabled, ETBZoomSelID, _("Fit selection in window")); AddButton(bmpZoomFit, bmpZoomFitDisabled, ETBZoomFitID, _("Fit project in window")); mButtons[ETBZoomInID]->SetEnabled(false); mButtons[ETBZoomOutID]->SetEnabled(false); mButtons[ETBZoomSelID]->SetEnabled(false); mButtons[ETBZoomFitID]->SetEnabled(false); mButtons[ETBPasteID]->SetEnabled(false); #ifdef EXPERIMENTAL_LINKING mButtons[ETBLinkID]->PushDown(); #endif RegenerateTooltips(); }
void ScrubbingToolBar::Populate() { MakeButtonBackgroundsSmall(); /* Buttons */ AddButton(bmpScrub, bmpScrub, bmpScrubDisabled, STBScrubID, _("Scrub"), true); AddButton(bmpSeek, bmpSeek, bmpSeekDisabled, STBSeekID, _("Seek"), true); AddButton(bmpToggleScrubBar, bmpToggleScrubBar, bmpToggleScrubBar, STBBarID, _("Scrub bar"), true); RegenerateTooltips(); }
void ToolsToolBar::Populate() { MakeButtonBackgroundsSmall(); Add(mToolSizer = safenew wxGridSizer(2, 3, 1, 1)); /* Tools */ mTool[ selectTool ] = MakeTool( bmpIBeam, selectTool, _("Selection Tool") ); mTool[ envelopeTool ] = MakeTool( bmpEnvelope, envelopeTool, _("Envelope Tool") ); mTool[ drawTool ] = MakeTool( bmpDraw, drawTool, _("Draw Tool") ); mTool[ zoomTool ] = MakeTool( bmpZoom, zoomTool, _("Zoom Tool") ); mTool[ slideTool ] = MakeTool( bmpTimeShift, slideTool, _("Slide Tool") ); mTool[ multiTool ] = MakeTool( bmpMulti, multiTool, _("Multi Tool") ); mTool[mCurrentTool]->PushDown(); RegenerateTooltips(); }
void ScrubbingToolBar::Populate() { SetBackgroundColour( theTheme.Colour( clrMedium ) ); MakeButtonBackgroundsSmall(); /* Buttons */ AddButton(this, bmpScrub, bmpScrub, bmpScrubDisabled, STBScrubID, _("Scrub"), true); AddButton(this, bmpSeek, bmpSeek, bmpSeekDisabled, STBSeekID, _("Seek"), true); AddButton(this, bmpToggleScrubRuler, bmpToggleScrubRuler, bmpToggleScrubRuler, STBRulerID, _("Scrub Ruler"), true); RegenerateTooltips(); }
void EditToolBar::Populate() { SetBackgroundColour( theTheme.Colour( clrMedium ) ); MakeButtonBackgroundsSmall(); /* Buttons */ // Tooltips slightly more verbose than the menu entries are. AddButton(this, bmpCut, bmpCut, bmpCutDisabled, ETBCutID, _("Cut selection")); AddButton(this, bmpCopy, bmpCopy, bmpCopyDisabled, ETBCopyID, _("Copy selection")); AddButton(this, bmpPaste, bmpPaste, bmpPasteDisabled, ETBPasteID, _("Paste")); AddButton(this, bmpTrim, bmpTrim, bmpTrimDisabled, ETBTrimID, _("Trim audio outside selection")); AddButton(this, bmpSilence, bmpSilence, bmpSilenceDisabled, ETBSilenceID, _("Silence audio selection")); AddSeparator(); AddButton(this, bmpUndo, bmpUndo, bmpUndoDisabled, ETBUndoID, _("Undo")); AddButton(this, bmpRedo, bmpRedo, bmpRedoDisabled, ETBRedoID, _("Redo")); AddSeparator(); #ifdef OPTION_SYNC_LOCK_BUTTON AddButton(this, bmpSyncLockTracksUp, bmpSyncLockTracksDown, bmpSyncLockTracksUp, ETBSyncLockID, _("Sync-Lock Tracks"), true); AddSeparator(); #endif // Tooltips match menu entries. // We previously had longer tooltips which were not more clear. AddButton(this, bmpZoomIn, bmpZoomIn, bmpZoomInDisabled, ETBZoomInID, _("Zoom In")); AddButton(this, bmpZoomOut, bmpZoomOut, bmpZoomOutDisabled, ETBZoomOutID, _("Zoom Out")); AddButton(this, bmpZoomSel, bmpZoomSel, bmpZoomSelDisabled, ETBZoomSelID, _("Zoom to Selection")); AddButton(this, bmpZoomFit, bmpZoomFit, bmpZoomFitDisabled, ETBZoomFitID, _("Fit to Width")); #ifdef EXPERIMENTAL_ZOOM_TOGGLE_BUTTON AddButton(this, bmpZoomToggle, bmpZoomToggle, bmpZoomToggleDisabled, ETBZoomToggleID, _("Zoom Toggle")); #endif mButtons[ETBZoomInID]->SetEnabled(false); mButtons[ETBZoomOutID]->SetEnabled(false); #ifdef EXPERIMENTAL_ZOOM_TOGGLE_BUTTON mButtons[ETBZoomToggleID]->SetEnabled(false); #endif mButtons[ETBZoomSelID]->SetEnabled(false); mButtons[ETBZoomFitID]->SetEnabled(false); mButtons[ETBPasteID]->SetEnabled(false); #ifdef OPTION_SYNC_LOCK_BUTTON mButtons[ETBSyncLockID]->PushDown(); #endif #if defined(EXPERIMENTAL_EFFECTS_RACK) AddSeparator(); AddButton(this, bmpEditEffects, bmpEditEffects, bmpEditEffects, ETBEffectsID, _("Show Effects Rack"), true); #endif RegenerateTooltips(); }
void EditToolBar::Populate() { MakeButtonBackgroundsSmall(); /* Buttons */ AddButton(bmpCut, bmpCut, bmpCutDisabled, ETBCutID, _("Cut selection")); AddButton(bmpCopy, bmpCopy, bmpCopyDisabled, ETBCopyID, _("Copy selection")); AddButton(bmpPaste, bmpPaste, bmpPasteDisabled, ETBPasteID, _("Paste")); AddButton(bmpTrim, bmpTrim, bmpTrimDisabled, ETBTrimID, _("Trim audio outside selection")); AddButton(bmpSilence, bmpSilence, bmpSilenceDisabled, ETBSilenceID, _("Silence audio selection")); AddSeparator(); AddButton(bmpUndo, bmpUndo, bmpUndoDisabled, ETBUndoID, _("Undo")); AddButton(bmpRedo, bmpRedo, bmpRedoDisabled, ETBRedoID, _("Redo")); AddSeparator(); #ifdef EXPERIMENTAL_SYNC_LOCK AddButton(bmpSyncLockTracksUp, bmpSyncLockTracksDown, bmpSyncLockTracksDisabled, ETBSyncLockID, _("Sync-Lock Tracks"), true); AddSeparator(); #endif AddButton(bmpZoomIn, bmpZoomIn, bmpZoomInDisabled, ETBZoomInID, _("Zoom In")); AddButton(bmpZoomOut, bmpZoomOut, bmpZoomOutDisabled, ETBZoomOutID, _("Zoom Out")); AddButton(bmpZoomSel, bmpZoomSel, bmpZoomSelDisabled, ETBZoomSelID, _("Fit selection in window")); AddButton(bmpZoomFit, bmpZoomFit, bmpZoomFitDisabled, ETBZoomFitID, _("Fit project in window")); mButtons[ETBZoomInID]->SetEnabled(false); mButtons[ETBZoomOutID]->SetEnabled(false); mButtons[ETBZoomSelID]->SetEnabled(false); mButtons[ETBZoomFitID]->SetEnabled(false); mButtons[ETBPasteID]->SetEnabled(false); #ifdef EXPERIMENTAL_SYNC_LOCK mButtons[ETBSyncLockID]->PushDown(); #endif #if defined(EXPERIMENTAL_EFFECTS_RACK) AddSeparator(); AddButton(bmpEditEffects, bmpEditEffects, bmpEditEffects, ETBEffectsID, _("Show Effects Rack"), true); #endif RegenerateTooltips(); }
void TranscriptionToolBar::Populate() { // Very similar to code in ControlToolBar... // Very similar to code in EditToolBar MakeButtonBackgroundsSmall(); AddButton(bmpPlay, bmpPlayDisabled, TTB_PlaySpeed, _("Play at selected speed")); MakeAlternateImages(bmpLoop, bmpLoopDisabled, TTB_PlaySpeed, 1); MakeAlternateImages(bmpCutPreview, bmpCutPreviewDisabled, TTB_PlaySpeed, 2); mButtons[TTB_PlaySpeed]->FollowModifierKeys(); //Add a slider that controls the speed of playback. const int SliderWidth=100; mPlaySpeedSlider = safenew ASlider(this, TTB_PlaySpeedSlider, _("Playback Speed"), wxDefaultPosition, wxSize(SliderWidth,25), SPEED_SLIDER); mPlaySpeedSlider->Set(mPlaySpeed / 100.0); mPlaySpeedSlider->SetLabel(_("Playback Speed")); // 6 steps using page up/down, and 60 using arrow keys mPlaySpeedSlider->SetScroll(0.16667f, 1.6667f); Add( mPlaySpeedSlider, 0, wxALIGN_CENTER ); mPlaySpeedSlider->Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(TranscriptionToolBar::OnFocus), NULL, this); mPlaySpeedSlider->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(TranscriptionToolBar::OnFocus), NULL, this); #ifdef EXPERIMENTAL_VOICE_DETECTION // If we need these strings translated, then search and replace // TRANSLATBLE by _ and remove this #define. #define TRANSLATABLE( x ) wxT( x ) AddButton(bmpTnStartOn, bmpTnStartOnDisabled, TTB_StartOn, TRANSLATABLE("Adjust left selection to next onset")); AddButton(bmpTnEndOn, bmpTnEndOnDisabled, TTB_EndOn, TRANSLATABLE("Adjust right selection to previous offset")); AddButton(bmpTnStartOff, bmpTnStartOffDisabled, TTB_StartOff, TRANSLATABLE("Adjust left selection to next offset")); AddButton(bmpTnEndOff, bmpTnEndOffDisabled, TTB_EndOff, TRANSLATABLE("Adjust right selection to previous onset")); AddButton(bmpTnSelectSound, bmpTnSelectSoundDisabled, TTB_SelectSound, TRANSLATABLE("Select region of sound around cursor")); AddButton(bmpTnSelectSilence, bmpTnSelectSilenceDisabled, TTB_SelectSilence, TRANSLATABLE("Select region of silence around cursor")); AddButton(bmpTnAutomateSelection, bmpTnAutomateSelectionDisabled, TTB_AutomateSelection, TRANSLATABLE("Automatically make labels from words")); AddButton(bmpTnMakeTag, bmpTnMakeTagDisabled, TTB_MakeLabel, TRANSLATABLE("Add label at selection")); AddButton(bmpTnCalibrate, bmpTnCalibrateDisabled, TTB_Calibrate, TRANSLATABLE("Calibrate voicekey")); mSensitivitySlider = safenew ASlider(this, TTB_SensitivitySlider, TRANSLATABLE("Adjust Sensitivity"), wxDefaultPosition, wxSize(SliderWidth,25), SPEED_SLIDER); mSensitivitySlider->Set(.5); mSensitivitySlider->SetLabel(TRANSLATABLE("Sensitivity")); Add( mSensitivitySlider, 0, wxALIGN_CENTER ); wxString choices[] = { TRANSLATABLE("Energy"), TRANSLATABLE("Sign Changes (Low Threshold)"), TRANSLATABLE("Sign Changes (High Threshold)"), TRANSLATABLE("Direction Changes (Low Threshold)"), TRANSLATABLE("Direction Changes (High Threshold)") }; mKeyTypeChoice = safenew wxChoice(this, TTB_KeyType, wxDefaultPosition, wxDefaultSize, 5, choices ); mKeyTypeChoice->SetName(TRANSLATABLE("Key type")); mKeyTypeChoice->SetSelection(0); Add( mKeyTypeChoice, 0, wxALIGN_CENTER ); #endif // Add a little space Add(2, -1); UpdatePrefs(); }