319 {
321
322
323 MovableControl::SetBackgroundStyle(wxBG_STYLE_PAINT);
325
329
330 auto sizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
331
332
334 enableButton->SetTranslatableLabel(
XO(
"Power"));
335 enableButton->SetImageIndices(0, bmpEffectOff, bmpEffectOff, bmpEffectOn, bmpEffectOn, bmpEffectOff);
336 enableButton->SetButtonToggles(true);
337 enableButton->SetBackgroundColorIndex(clrEffectListItemBackground);
339
340 enableButton->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
341
345 });
346
347
349 optionsButton->SetImageIndices(0,
350 bmpHButtonNormal,
351 bmpHButtonHover,
352 bmpHButtonDown,
353 bmpHButtonHover,
354 bmpHButtonDisabled);
355 optionsButton->SetBackgroundColorIndex(clrEffectListItemBackground);
356 optionsButton->SetForegroundColorIndex(clrTrackPanelText);
359
360
362 changeButton->SetImageIndices(0, bmpMoreNormal, bmpMoreHover, bmpMoreDown, bmpMoreHover, bmpMoreDisabled);
363 changeButton->SetBackgroundColorIndex(clrEffectListItemBackground);
364 changeButton->SetTranslatableLabel(
XO(
"Replace effect"));
366
368 dragArea->Disable();
369 sizer->Add(dragArea, 0, wxLEFT | wxCENTER, 5);
370 sizer->Add(enableButton, 0, wxLEFT | wxCENTER, 5);
371 sizer->Add(optionsButton, 1, wxLEFT | wxCENTER, 5);
372 sizer->Add(changeButton, 0, wxLEFT | wxRIGHT | wxCENTER, 5);
375
376 auto vSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
377 vSizer->Add(sizer.release(), 0, wxUP | wxDOWN | wxEXPAND, 10);
378
379 SetSizer(vSizer.release());
380
381#if wxUSE_ACCESSIBILITY
382 SetAccessible(
safenew RealtimeEffectControlAx(
this));
383#endif
384 }
void Create(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
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 &)
void OnChangeButtonClicked(wxCommandEvent &event)
wxWeakRef< AudacityProject > mProject
RealtimeEffectPicker * mEffectPicker