29 Sample(
const String& otherName,
const String& otherPath,
int otherIndex,
const Value& otherMuted,
30 const Value& otherSolo);
51 SampleBrowser(
int width,
int height,
int itemHeight, OwnedArray<Sample> samplesToShow);
118 bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown)
override{};
120 void drawButtonText(Graphics&, TextButton&,
bool shouldDrawButtonAsHighlighted,
121 bool shouldDrawButtonAsDown)
override;
A scrollable list of samples with mute/solo, play and remove buttons. As it is a subclass of PopupMen...
Definition SampleBrowser.h:10
void resized() override
Definition SampleBrowser.cpp:121
OwnedArray< SampleItem > m_sampleItems
Definition SampleBrowser.h:110
Viewport m_scrollableArea
Definition SampleBrowser.h:108
std::function< void(int sampleIndex)> onSampleDeleted
Definition SampleBrowser.h:93
std::function< void(int sampleIndex)> onSampleSelected
Assign this callback to do something when a sample has been selected in the browser....
Definition SampleBrowser.h:91
Component m_itemsParent
Definition SampleBrowser.h:109
OwnedArray< Sample > m_samples
Definition SampleBrowser.h:111
int m_itemHeight
Definition SampleBrowser.h:113
~SampleBrowser()
Definition SampleBrowser.cpp:95
SampleBrowser(int width, int height, int itemHeight, OwnedArray< Sample > samplesToShow)
Creates a sample browser showing a list of given samples. It uses a viewport to allow scrolling throu...
Definition SampleBrowser.cpp:5
int m_idealHeight
Definition SampleBrowser.h:106
void getIdealSize(int &width, int &height) override
Returns the ideal size of the browser that has been set.
Definition SampleBrowser.cpp:115
std::function< void(int sampleIndex, bool muteState)> onSampleMuted
Assign this callback to do something when a sample has been muted in the browser.
Definition SampleBrowser.h:78
int m_idealWidth
Definition SampleBrowser.h:105
ButtonLAF m_textButtonLAF
Definition SampleBrowser.h:124
void setCuedSample(int sampleIndex, bool isCued)
Set the sample at the given index to display as cued.
Definition SampleBrowser.cpp:136
bool allMuteButtonsOn()
Definition SampleBrowser.cpp:103
void setSampleFunctionButtonsVisibility(bool isVisible)
Change the visibility of the functions buttons on the individual sample list items i....
Definition SampleBrowser.cpp:198
std::function< void(int sampleIndex, bool soloState)> onSampleSolo
Assign this callback to do something when a sample has been soloed in the browser.
Definition SampleBrowser.h:84
Definition AirAbsorptionFilter.cpp:2
Definition SampleBrowser.h:55
static const String VerticalViewportScrollbar
Definition SampleBrowser.h:57
Wrapper object for sample data used by the browser. The Value objects are shared reference objects wh...
Definition SampleBrowser.h:18
int index
Definition SampleBrowser.h:21
Value muted
Definition SampleBrowser.h:22
Sample & operator=(const Sample &other)
Definition SampleBrowser.cpp:165
String path
Definition SampleBrowser.h:20
String name
Definition SampleBrowser.h:19
Value solo
Definition SampleBrowser.h:23
Sample(const String &otherName, const String &otherPath, int otherIndex, const Value &otherMuted, const Value &otherSolo)
Create a sample data object to be used in the browser. Values are reference shared allowing attachmen...
Definition SampleBrowser.cpp:151