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

This class combines a ComboBox and a ComboboxParameterAttachment to simplify the process of adding toggle buttons to a GUI element. More...

#include <AttachedComboBox.h>

Inheritance diagram for krotos::AttachedComboBox:

Public Member Functions

 AttachedComboBox (StringArray items)
 
void resized () override
 
ComboBox & getControlComponent ()
 
std::unique_ptr< ComboBoxParameterAttachment > & getAttachment ()
 
void setDragAndDropDescription (const var &description)
 

Public Attributes

std::function< void()> onStateChange
 

Private Attributes

ComboBox m_comboBox
 
std::unique_ptr< ComboBoxParameterAttachment > m_attachment
 

Detailed Description

This class combines a ComboBox and a ComboboxParameterAttachment to simplify the process of adding toggle buttons to a GUI element.

Constructor & Destructor Documentation

◆ AttachedComboBox()

krotos::AttachedComboBox::AttachedComboBox ( StringArray items)

Constructs a new slider with specified text for the label.

Member Function Documentation

◆ getAttachment()

std::unique_ptr< ComboBoxParameterAttachment > & krotos::AttachedComboBox::getAttachment ( )

Returns reference to the attachment Object.

◆ getControlComponent()

ComboBox & krotos::AttachedComboBox::getControlComponent ( )

Generic function name for getButton()

◆ resized()

void krotos::AttachedComboBox::resized ( )
override

◆ setDragAndDropDescription()

void krotos::AttachedComboBox::setDragAndDropDescription ( const var & description)

Set the descriptor for the Label which will be passed to a dragAndDropTarget. Setting this will enable the Label to become draggable

Member Data Documentation

◆ m_attachment

std::unique_ptr<ComboBoxParameterAttachment> krotos::AttachedComboBox::m_attachment
private

◆ m_comboBox

ComboBox krotos::AttachedComboBox::m_comboBox
private

◆ onStateChange

std::function<void()> krotos::AttachedComboBox::onStateChange

You can assign a lambda to this callback object to have it called when the button's state changes.


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