A ComboBox-like TextButton with some extra components used for the SampleBrowser UI/UX.
More...
#include <SampleBrowserButton.h>
|
| | SampleBrowserButton (const String &buttonText) |
| | Creates a SampleBrowserButton, which is a essentially just a TextButton with some extra components on top of it such as forward / next sample buttons, and a display of the current sample index.
|
| |
| void | paintButton (Graphics &g, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override |
| |
| void | resized () override |
| |
| void | setSampleIndex (int index) |
| | Sets the number of the sample counter indicator e.g. "<index> of 10".
|
| |
| void | setSampleCount (size_t count) |
| | Sets the number of samples loaded in the sampler to display in the sample counter e.g. "0 of <count>".
|
| |
| Label & | getSampleCounter () |
| |
| DrawableButton & | getPreviousButton () |
| |
| DrawableButton & | getNextButton () |
| |
|
| std::function< void()> | onNextButtonClick |
| | Callback for when the "next" sample button is clicked.
|
| |
| std::function< void()> | onPreviousButtonClick |
| | Callback for when the "previous" sample button is clicked.
|
| |
A ComboBox-like TextButton with some extra components used for the SampleBrowser UI/UX.
◆ SampleBrowserButton()
| krotos::SampleBrowserButton::SampleBrowserButton |
( |
const String & | buttonText | ) |
|
Creates a SampleBrowserButton, which is a essentially just a TextButton with some extra components on top of it such as forward / next sample buttons, and a display of the current sample index.
- Parameters
-
| buttonText | The initial text to display in the browser. |
◆ getNextButton()
| DrawableButton & krotos::SampleBrowserButton::getNextButton |
( |
| ) |
|
|
inline |
◆ getPreviousButton()
| DrawableButton & krotos::SampleBrowserButton::getPreviousButton |
( |
| ) |
|
|
inline |
◆ getSampleCounter()
| Label & krotos::SampleBrowserButton::getSampleCounter |
( |
| ) |
|
|
inline |
◆ paintButton()
| void krotos::SampleBrowserButton::paintButton |
( |
Graphics & | g, |
|
|
bool | shouldDrawButtonAsHighlighted, |
|
|
bool | shouldDrawButtonAsDown ) |
|
override |
◆ resized()
| void krotos::SampleBrowserButton::resized |
( |
| ) |
|
|
override |
◆ setSampleCount()
| void krotos::SampleBrowserButton::setSampleCount |
( |
size_t | count | ) |
|
Sets the number of samples loaded in the sampler to display in the sample counter e.g. "0 of <count>".
- Parameters
-
| count | The total number of samples in the sampler |
◆ setSampleIndex()
| void krotos::SampleBrowserButton::setSampleIndex |
( |
int | index | ) |
|
Sets the number of the sample counter indicator e.g. "<index> of 10".
- Parameters
-
| index | The index of the current sample |
◆ updateSampleCounter()
| void krotos::SampleBrowserButton::updateSampleCounter |
( |
| ) |
|
|
private |
◆ m_dropdownIcon
| std::unique_ptr<Drawable> krotos::SampleBrowserButton::m_dropdownIcon |
|
private |
◆ m_dropdownIconBounds
| Rectangle<int> krotos::SampleBrowserButton::m_dropdownIconBounds |
|
private |
◆ m_iconWidth
| const int krotos::SampleBrowserButton::m_iconWidth {12} |
|
private |
◆ m_leftArrow
| std::unique_ptr<Drawable> krotos::SampleBrowserButton::m_leftArrow |
|
private |
◆ m_margin
| const int krotos::SampleBrowserButton::m_margin {8} |
|
private |
◆ m_mouseBlocker
| Component krotos::SampleBrowserButton::m_mouseBlocker |
|
private |
◆ m_nextButton
| DrawableButton krotos::SampleBrowserButton::m_nextButton |
|
private |
◆ m_nextPrevButtonSize
| const int krotos::SampleBrowserButton::m_nextPrevButtonSize {16} |
|
private |
◆ m_previousButton
| DrawableButton krotos::SampleBrowserButton::m_previousButton |
|
private |
◆ m_rightArrow
| std::unique_ptr<Drawable> krotos::SampleBrowserButton::m_rightArrow |
|
private |
◆ m_sampleCount
| size_t krotos::SampleBrowserButton::m_sampleCount {0} |
|
private |
◆ m_sampleCounter
| Label krotos::SampleBrowserButton::m_sampleCounter |
|
private |
◆ m_sampleCounterLabelWidth
| const int krotos::SampleBrowserButton::m_sampleCounterLabelWidth {50} |
|
private |
◆ m_sampleIndex
| int krotos::SampleBrowserButton::m_sampleIndex {0} |
|
private |
◆ m_textXOffset
| const int krotos::SampleBrowserButton::m_textXOffset {23} |
|
private |
◆ onNextButtonClick
| std::function<void()> krotos::SampleBrowserButton::onNextButtonClick |
Callback for when the "next" sample button is clicked.
◆ onPreviousButtonClick
| std::function<void()> krotos::SampleBrowserButton::onPreviousButtonClick |
Callback for when the "previous" sample button is clicked.
The documentation for this class was generated from the following files: