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

A draggable magnification control for the envelope editor. More...

#include <envelope_section.h>

Inheritance diagram for DragMagnifyingGlass:
OpenGlShapeButton

Classes

class  Listener
 Interface for objects that need to respond to magnification changes. More...
 

Public Member Functions

 DragMagnifyingGlass ()
 Constructor.
 
void mouseDown (const MouseEvent &e) override
 
void mouseUp (const MouseEvent &e) override
 
void mouseDrag (const MouseEvent &e) override
 
void mouseDoubleClick (const MouseEvent &e) override
 
void addListener (Listener *listener)
 
- Public Member Functions inherited from OpenGlShapeButton
 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 draggable magnification control for the envelope editor.

The DragMagnifyingGlass is an OpenGlShapeButton shaped like a magnifying glass. Dragging it allows the user to zoom in or out on the envelope editor area. Double-clicking resets the zoom.

Constructor & Destructor Documentation

◆ DragMagnifyingGlass()

DragMagnifyingGlass::DragMagnifyingGlass ( )

Constructor.

Member Function Documentation

◆ addListener()

void DragMagnifyingGlass::addListener ( Listener * listener)
inline

Adds a listener to respond to drag and double-click events.

Parameters
listenerThe listener to add.

◆ mouseDoubleClick()

void DragMagnifyingGlass::mouseDoubleClick ( const MouseEvent & e)
override

Called when the magnifying glass is double-clicked. Notifies listeners to reset zoom.

Parameters
eThe mouse event.

◆ mouseDown()

void DragMagnifyingGlass::mouseDown ( const MouseEvent & e)
override

Called when the mouse button is pressed down. Hides the cursor and enters unbounded movement if possible.

Parameters
eThe mouse event.

◆ mouseDrag()

void DragMagnifyingGlass::mouseDrag ( const MouseEvent & e)
override

Called while the mouse is dragged. Notifies listeners with the movement delta.

Parameters
eThe mouse event.

◆ mouseUp()

void DragMagnifyingGlass::mouseUp ( const MouseEvent & e)
override

Called when the mouse button is released. Restores the cursor and disables unbounded movement if it was enabled.

Parameters
eThe mouse event.

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