MCPcopy Create free account
hub / github.com/VCVRack/Rack / MenuBar

Method MenuBar

src/app/MenuBar.cpp:1114–1151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112 InfoLabel* infoLabel;
1113
1114 MenuBar() {
1115 const float margin = 5;
1116 box.size.y = BND_WIDGET_HEIGHT + 2 * margin;
1117
1118 ui::SequentialLayout* layout = new ui::SequentialLayout;
1119 layout->margin = math::Vec(margin, margin);
1120 layout->spacing = math::Vec(0, 0);
1121 addChild(layout);
1122
1123 FileButton* fileButton = new FileButton;
1124 fileButton->text = string::translate("MenuBar.file");
1125 layout->addChild(fileButton);
1126
1127 EditButton* editButton = new EditButton;
1128 editButton->text = string::translate("MenuBar.edit");
1129 layout->addChild(editButton);
1130
1131 ViewButton* viewButton = new ViewButton;
1132 viewButton->text = string::translate("MenuBar.view");
1133 layout->addChild(viewButton);
1134
1135 EngineButton* engineButton = new EngineButton;
1136 engineButton->text = string::translate("MenuBar.engine");
1137 layout->addChild(engineButton);
1138
1139 LibraryButton* libraryButton = new LibraryButton;
1140 libraryButton->text = string::translate("MenuBar.library");
1141 layout->addChild(libraryButton);
1142
1143 HelpButton* helpButton = new HelpButton;
1144 helpButton->text = string::translate("MenuBar.help");
1145 layout->addChild(helpButton);
1146
1147 infoLabel = new InfoLabel;
1148 infoLabel->box.size.x = 600;
1149 infoLabel->alignment = ui::Label::RIGHT_ALIGNMENT;
1150 layout->addChild(infoLabel);
1151 }
1152
1153 void draw(const DrawArgs& args) override {
1154 bndMenuBackground(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_ALL);

Callers

nothing calls this directly

Calls 3

VecClass · 0.85
translateFunction · 0.85
addChildMethod · 0.80

Tested by

no test coverage detected