| 62 | } |
| 63 | |
| 64 | AButton* ToolBarButtons::CreateButton(teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int thisButtonId, const TranslatableString& label, bool toggle) |
| 65 | { |
| 66 | auto& button = mButtons[thisButtonId];// ; |
| 67 | button = safenew AButton(mParent, thisButtonId + mFirstButtonId); |
| 68 | button->SetButtonType(AButton::FrameButton); |
| 69 | button->SetButtonToggles(toggle); |
| 70 | button->SetImages( |
| 71 | theTheme.Image(bmpRecoloredUpSmall), |
| 72 | theTheme.Image(bmpRecoloredUpHiliteSmall), |
| 73 | theTheme.Image(bmpRecoloredDownSmall), |
| 74 | theTheme.Image(bmpRecoloredHiliteSmall), |
| 75 | theTheme.Image(bmpRecoloredUpSmall)); |
| 76 | button->SetIcons(theTheme.Image(eEnabledUp), theTheme.Image(eEnabledDown), theTheme.Image(eDisabled)); |
| 77 | button->SetFrameMid(3); |
| 78 | button->SetLabel(label); |
| 79 | button->SetMinSize(wxSize { 25, 25 }); |
| 80 | button->SetMaxSize(wxSize { 25, 25 }); |
| 81 | return button; |
| 82 | } |
| 83 | |
| 84 | void ToolBarButtons::SetEnabled(int id, bool state) |
| 85 | { |
no test coverage detected