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

#include <KwidgetGUI_TriggerButton.h>

Inheritance diagram for krotos::KwidgetGUI_TriggerButton:
krotos::KwidgetGUI

Classes

struct  Constants
 

Public Types

using Parameters = Kwidget_TriggerButton::Parameters
 
- Public Types inherited from krotos::KwidgetGUI
enum class  RenderStyle {
  normal = 0 , borderless , borderless_with_buttons , minimised ,
  NUM_STYLES
}
 

Public Member Functions

 KwidgetGUI_TriggerButton (Kwidget &owner)
 
 ~KwidgetGUI_TriggerButton ()
 
void paint (Graphics &g) override
 
void resized () override
 
void setPerformMode (bool performMode)
 
- Public Member Functions inherited from krotos::KwidgetGUI
 KwidgetGUI (Kwidget &owner)
 
 ~KwidgetGUI () override=default
 
void moved () override
 
void paint (Graphics &g) override
 
void resized () override
 
void mouseDown (const MouseEvent &event) override
 
const String & getKwidgetType () const
 
const String & getKwidgetID () const
 
void setRenderStyle (RenderStyle newStyle)
 
int divideIntByFloat (int dividend, float divisor)
 
int multiplyIntByFloat (int mult, float factor)
 
virtual void finalSetup ()
 
void ignorePadding (bool ignore)
 
TopBarComponent & getTopBarComponent ()
 
Kwidget & getOwner ()
 

Private Member Functions

void showContextMenu ()
 

Private Attributes

struct krotos::KwidgetGUI_TriggerButton::Constants constants
 
bool m_performMode {false}
 
TriggerButton m_onClickButton
 
std::unique_ptr< TriggerButtonParameterAttachment > m_triggerButtonAttachment
 
ContextMenuButton m_contextMenu
 
const int m_padding {5}
 
std::unique_ptr< AttachedLabel > m_editableLabel {nullptr}
 

Additional Inherited Members

- Public Attributes inherited from krotos::KwidgetGUI
std::function< void(const String &)> onDelete
 
- Protected Member Functions inherited from krotos::KwidgetGUI
std::unique_ptr< SliderParameterAttachment > createParameterAttachment (const String &paramID, Slider &slider)
 
std::unique_ptr< ButtonParameterAttachment > createParameterAttachment (const String &paramID, Button &button)
 
std::unique_ptr< ComboBoxParameterAttachment > createParameterAttachment (const String &paramID, ComboBox &comboBox)
 
std::unique_ptr< ParameterAttachment > createParameterAttachment (const String &paramID, std::function< void(float)> callback)
 
std::unique_ptr< LabelCustomParameterAttachment > createCustomParameterAttachment (const String &paramID, Label &label)
 
template<typename AttachedComponentType >
void addAttachedComponent (AttachedComponentType &component, const String &paramID, bool isDraggable=true)
 
template<typename AttachedComponentType >
void addAttachedComponent (Component &parent, AttachedComponentType &component, const String &paramID, bool isDraggable=true)
 
void addParameterCallback (const String &paramID, std::function< void(float)> callback)
 
- Protected Attributes inherited from krotos::KwidgetGUI
bool m_ignorePadding {false}
 
Rectangle< int > m_currentBounds
 
TextButton m_selectButton
 
TextButton m_deleteButton
 
Colour m_borderColour {Colours::fuchsia}
 
TopBarComponent m_topBarComponent
 
RenderStyle m_renderStyle {RenderStyle::normal}
 

Member Typedef Documentation

◆ Parameters

Constructor & Destructor Documentation

◆ KwidgetGUI_TriggerButton()

krotos::KwidgetGUI_TriggerButton::KwidgetGUI_TriggerButton ( Kwidget & owner)

◆ ~KwidgetGUI_TriggerButton()

krotos::KwidgetGUI_TriggerButton::~KwidgetGUI_TriggerButton ( )

Member Function Documentation

◆ paint()

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

◆ resized()

void krotos::KwidgetGUI_TriggerButton::resized ( )
override

◆ setPerformMode()

void krotos::KwidgetGUI_TriggerButton::setPerformMode ( bool performMode)
inline

◆ showContextMenu()

void krotos::KwidgetGUI_TriggerButton::showContextMenu ( )
private

Member Data Documentation

◆ constants

struct krotos::KwidgetGUI_TriggerButton::Constants krotos::KwidgetGUI_TriggerButton::constants
private

◆ m_contextMenu

ContextMenuButton krotos::KwidgetGUI_TriggerButton::m_contextMenu
private

◆ m_editableLabel

std::unique_ptr<AttachedLabel> krotos::KwidgetGUI_TriggerButton::m_editableLabel {nullptr}
private

◆ m_onClickButton

TriggerButton krotos::KwidgetGUI_TriggerButton::m_onClickButton
private

◆ m_padding

const int krotos::KwidgetGUI_TriggerButton::m_padding {5}
private

◆ m_performMode

bool krotos::KwidgetGUI_TriggerButton::m_performMode {false}
private

◆ m_triggerButtonAttachment

std::unique_ptr<TriggerButtonParameterAttachment> krotos::KwidgetGUI_TriggerButton::m_triggerButtonAttachment
private

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