static
| 907 | |
| 908 | //static |
| 909 | void ToolBar::MakeAlternateImages(AButton &button, int idx, |
| 910 | teBmps eUp, |
| 911 | teBmps eDown, |
| 912 | teBmps eHilite, |
| 913 | teBmps eDownHi, |
| 914 | teBmps eStandardUp, |
| 915 | teBmps eStandardDown, |
| 916 | teBmps eDisabled, |
| 917 | wxSize size) |
| 918 | { |
| 919 | // wxMax to cater for case of image being bigger than the button. |
| 920 | int xoff = wxMax( 0, (size.GetWidth() - theTheme.Image(eStandardUp).GetWidth())/2); |
| 921 | int yoff = wxMax( 0, (size.GetHeight() - theTheme.Image(eStandardUp).GetHeight())/2); |
| 922 | |
| 923 | typedef std::unique_ptr<wxImage> wxImagePtr; |
| 924 | wxImagePtr up (OverlayImage(eUp, eStandardUp, xoff, yoff)); |
| 925 | wxImagePtr hilite (OverlayImage(eHilite, eStandardUp, xoff, yoff)); |
| 926 | wxImagePtr down (OverlayImage(eDown, eStandardDown, xoff + 1, yoff + 1)); |
| 927 | wxImagePtr downHi (OverlayImage(eDownHi, eStandardDown, xoff + 1, yoff + 1)); |
| 928 | wxImagePtr disable (OverlayImage(eUp, eDisabled, xoff, yoff)); |
| 929 | |
| 930 | button.SetAlternateImages(idx, *up, *hilite, *down, *downHi, *disable); |
| 931 | } |
| 932 | |
| 933 | void ToolBar::SetButtonToolTip |
| 934 | (AudacityProject &theProject, |
nothing calls this directly
no test coverage detected