Krotos Modules 3
Loading...
Searching...
No Matches
krotos::SampleItem Class Reference

An individual sample item component shown in the SampleBrowser. A parent component for the various buttons and labels for the browser functionality. More...

#include <SampleItem.h>

Inheritance diagram for krotos::SampleItem:

Classes

struct  ComponentIds
 
struct  Layout
 
class  MuteSoloButtonLAF
 

Public Member Functions

 SampleItem (const String &sampleLabel)
 Creates a SampleItem component.
 
 ~SampleItem ()
 
void resized () override
 
void paint (Graphics &g) override
 
void buttonClicked (Button *buttonThatWasClicked) override
 
void setCued (bool isCued)
 Call this to enable or disable the "cued" state for this component. This will draw a marker icon and highlight the sample butotn text.
 

Public Attributes

TextButton muteButton
 The Mute/Solo buttons visible in the SampleItem.
 
TextButton soloButton
 
TextButton sampleSelectButton
 The sample name text button.
 
DrawableButton playButton
 
DrawableButton deleteButton
 

Static Public Attributes

static const Identifier CuedId {"Cued"}
 Identifier used for the boolean LAF property to draw this item as cued or not.
 

Private Attributes

struct krotos::SampleItem::Layout m_layout
 
std::unique_ptr< Drawable > m_playIcon
 
std::unique_ptr< Drawable > m_playIconHover
 
std::unique_ptr< Drawable > m_playIconClick
 
std::unique_ptr< Drawable > m_deleteIcon
 
std::unique_ptr< Drawable > m_deleteIconHover
 
std::unique_ptr< Drawable > m_deleteIconClick
 
MuteSoloButtonLAF m_muteSoloButtonLAF
 
Value m_muteValue
 
Value m_soloValue
 
bool m_isCued {false}
 

Detailed Description

An individual sample item component shown in the SampleBrowser. A parent component for the various buttons and labels for the browser functionality.

Constructor & Destructor Documentation

◆ SampleItem()

krotos::SampleItem::SampleItem ( const String & sampleLabel)

Creates a SampleItem component.

Parameters
sampleLabelThe name / label to show in the browser.

◆ ~SampleItem()

krotos::SampleItem::~SampleItem ( )

Member Function Documentation

◆ buttonClicked()

void krotos::SampleItem::buttonClicked ( Button * buttonThatWasClicked)
override

◆ paint()

void krotos::SampleItem::paint ( Graphics & g)
override

◆ resized()

void krotos::SampleItem::resized ( )
override

◆ setCued()

void krotos::SampleItem::setCued ( bool isCued)

Call this to enable or disable the "cued" state for this component. This will draw a marker icon and highlight the sample butotn text.

Parameters
isCuedThe sample is cued or not.

Member Data Documentation

◆ CuedId

const Identifier krotos::SampleItem::CuedId {"Cued"}
static

Identifier used for the boolean LAF property to draw this item as cued or not.

◆ deleteButton

DrawableButton krotos::SampleItem::deleteButton

◆ m_deleteIcon

std::unique_ptr<Drawable> krotos::SampleItem::m_deleteIcon
private

◆ m_deleteIconClick

std::unique_ptr<Drawable> krotos::SampleItem::m_deleteIconClick
private

◆ m_deleteIconHover

std::unique_ptr<Drawable> krotos::SampleItem::m_deleteIconHover
private

◆ m_isCued

bool krotos::SampleItem::m_isCued {false}
private

◆ m_layout

struct krotos::SampleItem::Layout krotos::SampleItem::m_layout
private

◆ m_muteSoloButtonLAF

MuteSoloButtonLAF krotos::SampleItem::m_muteSoloButtonLAF
private

◆ m_muteValue

Value krotos::SampleItem::m_muteValue
private

◆ m_playIcon

std::unique_ptr<Drawable> krotos::SampleItem::m_playIcon
private

◆ m_playIconClick

std::unique_ptr<Drawable> krotos::SampleItem::m_playIconClick
private

◆ m_playIconHover

std::unique_ptr<Drawable> krotos::SampleItem::m_playIconHover
private

◆ m_soloValue

Value krotos::SampleItem::m_soloValue
private

◆ muteButton

TextButton krotos::SampleItem::muteButton

The Mute/Solo buttons visible in the SampleItem.

◆ playButton

DrawableButton krotos::SampleItem::playButton

◆ sampleSelectButton

TextButton krotos::SampleItem::sampleSelectButton

The sample name text button.

◆ soloButton

TextButton krotos::SampleItem::soloButton

The documentation for this class was generated from the following files: