This may be a stupid question, I’m a bit rusty on C++, but I’m looking at the source code for MidiDemo.h. There is a private variable for the two ListBoxes that display the MIDI Input and Output Lists.
std::unique_ptr<MidiDeviceListBox> midiInputSelector, midiOutputSelector;
The MidiDeviceListBox is declared as a struct, and not a class, inside the main Component:
private:
struct MidiDeviceListBox : public ListBox,
private ListBoxModel
{
MidiDeviceListBox (const String& name,
MidiDemo& contentComponent,
bool isInputDeviceList)
: ListBox (name, this),
parent (contentComponent),
isInput (isInputDeviceList)
{
setOutlineThickness (1);
setMultipleSelectionEnabled (true);
setClickingTogglesRowSelection (true);
}
…[snip]…
};