A ToggleButton that uses an OpenGlButtonComponent for its rendering.
More...
#include <synth_button.h>
A ToggleButton that uses an OpenGlButtonComponent for its rendering.
It supports various styles and uses OpenGL for drawing, making it suitable for modern UIs.
◆ OpenGlToggleButton()
OpenGlToggleButton::OpenGlToggleButton |
( |
String | name | ) |
|
|
inline |
Constructor.
- Parameters
-
name | The name of the toggle button. |
◆ enablementChanged()
virtual void OpenGlToggleButton::enablementChanged |
( |
| ) |
|
|
inlineoverridevirtual |
Called when the button enablement changes.
◆ getGlComponent()
◆ isActive()
bool OpenGlToggleButton::isActive |
( |
| ) |
const |
|
inline |
Checks if the button is active.
- Returns
- True if active, otherwise false.
◆ mouseDown()
void OpenGlToggleButton::mouseDown |
( |
const MouseEvent & | e | ) |
|
|
inlineoverride |
Called when the mouse is pressed down on the button.
- Parameters
-
◆ mouseEnter()
void OpenGlToggleButton::mouseEnter |
( |
const MouseEvent & | e | ) |
|
|
inlineoverride |
Called when the mouse enters the button area.
- Parameters
-
◆ mouseExit()
void OpenGlToggleButton::mouseExit |
( |
const MouseEvent & | e | ) |
|
|
inlineoverride |
Called when the mouse leaves the button area.
- Parameters
-
◆ mouseUp()
void OpenGlToggleButton::mouseUp |
( |
const MouseEvent & | e | ) |
|
|
inlineoverride |
Called when the mouse is released from the button.
- Parameters
-
◆ resized()
void OpenGlToggleButton::resized |
( |
| ) |
|
|
override |
Called when the button is resized, adjusts text size and colors accordingly.
Called when the OpenGlToggleButton is resized, adjusts text size and updates colors.
◆ setActive()
void OpenGlToggleButton::setActive |
( |
bool | active = true | ) |
|
|
inline |
Sets the active state of the button.
- Parameters
-
active | True if active, false otherwise. |
◆ setJustification()
void OpenGlToggleButton::setJustification |
( |
Justification | justification | ) |
|
|
inline |
Sets the text justification mode.
- Parameters
-
justification | The JUCE Justification mode. |
◆ setLightenButton()
void OpenGlToggleButton::setLightenButton |
( |
| ) |
|
|
inline |
Configures the button as a lighten button.
◆ setNoBackground()
void OpenGlToggleButton::setNoBackground |
( |
| ) |
|
|
inline |
Removes the background, showing just text.
◆ setPowerButton()
void OpenGlToggleButton::setPowerButton |
( |
| ) |
|
|
inline |
Configures the button as a power button.
◆ setShowOnColors()
void OpenGlToggleButton::setShowOnColors |
( |
bool | show | ) |
|
|
inline |
Toggles showing on-colors when toggled on.
- Parameters
-
show | True to show on-colors, otherwise off-colors. |
◆ setText()
void OpenGlToggleButton::setText |
( |
String | text | ) |
|
|
inline |
Sets the text to be displayed on the button.
- Parameters
-
◆ setUiButton()
void OpenGlToggleButton::setUiButton |
( |
bool | primary | ) |
|
|
inline |
Configures the button as a UI button.
- Parameters
-
primary | True if this is a primary UI button. |
The documentation for this class was generated from the following files:
- /Users/davidvogel/repos/VitalHelp/src/interface/editor_components/synth_button.h
- /Users/davidvogel/repos/VitalHelp/src/interface/editor_components/synth_button.cpp