MCPcopy Create free account
hub / github.com/audacity/audacity / MakeToolsToolBarButton

Function MakeToolsToolBarButton

src/toolbars/ToolsToolBar.cpp:75–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73{
74
75AButton* MakeToolsToolBarButton(wxWindow* parent,
76 wxWindowID id,
77 const TranslatableString& label,
78 const wxImage& toolIcon)
79{
80 auto button = safenew AButton(parent, FirstToolID + id);
81 button->SetButtonType(AButton::FrameButton);
82 button->SetButtonToggles(true);
83 button->SetImages(
84 theTheme.Image(bmpRecoloredUpSmall),
85 theTheme.Image(bmpRecoloredUpHiliteSmall),
86 theTheme.Image(bmpRecoloredDownSmall),
87 theTheme.Image(bmpRecoloredHiliteSmall),
88 theTheme.Image(bmpRecoloredUpSmall));
89 button->SetIcon(toolIcon);
90 button->SetFrameMid(3);
91 button->SetLabel(label);
92 button->SetMinSize(wxSize { 25, 25 });
93 button->SetMaxSize(wxSize { 25, 25 });
94 return button;
95}
96
97}
98

Callers 1

PopulateMethod · 0.85

Calls 6

SetButtonTypeMethod · 0.80
SetImagesMethod · 0.80
SetIconMethod · 0.80
SetFrameMidMethod · 0.80
AButtonClass · 0.70
SetLabelMethod · 0.45

Tested by

no test coverage detected