Vital
Loading...
Searching...
No Matches
OpenGlShapeButton Class Reference

A ToggleButton that uses an OpenGlShapeButtonComponent for its rendering. More...

#include <synth_button.h>

Inheritance diagram for OpenGlShapeButton:
DragMagnifyingGlass

Public Member Functions

 OpenGlShapeButton (String name)
 
OpenGlComponentgetGlComponent ()
 
void setShape (const Path &shape)
 
void useOnColors (bool use)
 
void resized () override
 Called when the button is resized. Updates the internal image.
 
void mouseEnter (const MouseEvent &e) override
 
void mouseExit (const MouseEvent &e) override
 
void mouseDown (const MouseEvent &e) override
 
void mouseUp (const MouseEvent &e) override
 

Detailed Description

A ToggleButton that uses an OpenGlShapeButtonComponent for its rendering.

This class acts as a JUCE ToggleButton but overrides its look with a custom OpenGL shape.

Constructor & Destructor Documentation

◆ OpenGlShapeButton()

OpenGlShapeButton::OpenGlShapeButton ( String name)
inline

Constructor.

Parameters
nameThe name of the button.

Member Function Documentation

◆ getGlComponent()

OpenGlComponent * OpenGlShapeButton::getGlComponent ( )
inline

Retrieves the underlying OpenGL component.

Returns
A pointer to the OpenGlComponent used for rendering.

◆ mouseDown()

void OpenGlShapeButton::mouseDown ( const MouseEvent & e)
inlineoverride

Called when the mouse is pressed down on the button.

Parameters
eThe mouse event.

◆ mouseEnter()

void OpenGlShapeButton::mouseEnter ( const MouseEvent & e)
inlineoverride

Called when the mouse enters the button area.

Parameters
eThe mouse event.

◆ mouseExit()

void OpenGlShapeButton::mouseExit ( const MouseEvent & e)
inlineoverride

Called when the mouse leaves the button area.

Parameters
eThe mouse event.

◆ mouseUp()

void OpenGlShapeButton::mouseUp ( const MouseEvent & e)
inlineoverride

Called when the mouse is released from the button.

Parameters
eThe mouse event.

◆ resized()

void OpenGlShapeButton::resized ( )
inlineoverride

Called when the button is resized. Updates the internal image.

◆ setShape()

void OpenGlShapeButton::setShape ( const Path & shape)
inline

Sets the shape to be rendered by the button.

Parameters
shapeThe new path representing the shape.

◆ useOnColors()

void OpenGlShapeButton::useOnColors ( bool use)
inline

Toggles whether to use on-colors.

Parameters
useIf true, use on-colors; otherwise off-colors.

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