336 {
338
339
340 MovableControl::SetBackgroundStyle(wxBG_STYLE_PAINT);
342
346
347 auto sizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
348
349
351 enableButton->SetTranslatableLabel(
XO(
"Power"));
352 enableButton->SetImageIndices(0, bmpEffectOff, bmpEffectOff, bmpEffectOn, bmpEffectOn, bmpEffectOff);
353 enableButton->SetButtonToggles(true);
354 enableButton->SetBackgroundColorIndex(clrEffectListItemBackground);
356
357 enableButton->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
358
360 });
361
362
364 optionsButton->SetImageIndices(0,
365 bmpHButtonNormal,
366 bmpHButtonHover,
367 bmpHButtonDown,
368 bmpHButtonHover,
369 bmpHButtonDisabled);
370 optionsButton->SetBackgroundColorIndex(clrEffectListItemBackground);
371 optionsButton->SetForegroundColorIndex(clrTrackPanelText);
374
375
377 changeButton->SetImageIndices(0, bmpMoreNormal, bmpMoreHover, bmpMoreDown, bmpMoreHover, bmpMoreDisabled);
378 changeButton->SetBackgroundColorIndex(clrEffectListItemBackground);
379 changeButton->SetTranslatableLabel(
XO(
"Replace effect"));
381
383 dragArea->Disable();
384 sizer->Add(dragArea, 0, wxLEFT | wxCENTER, 5);
385 sizer->Add(enableButton, 0, wxLEFT | wxCENTER, 5);
386 sizer->Add(optionsButton, 1, wxLEFT | wxCENTER, 5);
387 sizer->Add(changeButton, 0, wxLEFT | wxRIGHT | wxCENTER, 5);
390
391 auto vSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
392 vSizer->Add(sizer.release(), 0, wxUP | wxDOWN | wxEXPAND, 10);
393
394 SetSizer(vSizer.release());
395
396#if wxUSE_ACCESSIBILITY
397 SetAccessible(
safenew RealtimeEffectControlAx(
this));
398#endif
399 }
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)
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)
RealtimeEffectPicker * mEffectPicker