472 {
473
474
475 MovableControl::SetBackgroundStyle(wxBG_STYLE_PAINT);
477
481
482 auto sizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
483
484
486 enableButton->SetTranslatableLabel(
XO(
"Power"));
487 enableButton->SetImageIndices(0, bmpEffectOff, bmpEffectOff, bmpEffectOn, bmpEffectOn, bmpEffectOff);
488 enableButton->SetButtonToggles(true);
489 enableButton->SetBackgroundColorIndex(clrEffectListItemBackground);
491
492 enableButton->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
494 {
497 {
500 }
501 }
502 });
503
504
506 optionsButton->SetImageIndices(0,
507 bmpHButtonNormal,
508 bmpHButtonHover,
509 bmpHButtonDown,
510 bmpHButtonHover,
511 bmpHButtonDisabled);
512 optionsButton->SetBackgroundColorIndex(clrEffectListItemBackground);
513 optionsButton->SetForegroundColorIndex(clrTrackPanelText);
516
517
519 changeButton->SetImageIndices(0, bmpMoreNormal, bmpMoreHover, bmpMoreDown, bmpMoreHover, bmpMoreDisabled);
520 changeButton->SetBackgroundColorIndex(clrEffectListItemBackground);
521 changeButton->SetTranslatableLabel(
XO(
"Replace effect"));
523
525 dragArea->Disable();
526 sizer->Add(dragArea, 0, wxLEFT | wxCENTER, 5);
527 sizer->Add(enableButton, 0, wxLEFT | wxCENTER, 5);
528 sizer->Add(optionsButton, 1, wxLEFT | wxCENTER, 5);
529 sizer->Add(changeButton, 0, wxLEFT | wxRIGHT | wxCENTER, 5);
532
533 auto vSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
534 vSizer->Add(sizer.release(), 0, wxUP | wxDOWN | wxEXPAND, 10);
535
536 SetSizer(vSizer.release());
537
539
540#if wxUSE_ACCESSIBILITY
541 SetAccessible(
safenew RealtimeEffectControlAx(
this));
542#endif
543 }
void SetInTabOrder(bool inTabOrder)
void Create(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
wxBitmap & Bitmap(int iIndex)
static UndoManager & Get(AudacityProject &project)
ThemedAButtonWrapper< AButton > * mChangeButton
void OnOptionsClicked(wxCommandEvent &event)
ThemedAButtonWrapper< AButton > * mOptionsButton
std::shared_ptr< RealtimeEffectState > mEffectState
void OnFocusChange(wxFocusEvent &evt)
void OnPaint(wxPaintEvent &)
std::shared_ptr< EffectListUIDelegate > mDelegate
void OnChangeButtonClicked(wxCommandEvent &event)
wxWeakRef< AudacityProject > mProject