JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
juce::MarkerList Class Reference

Holds a set of named marker points along a one-dimensional axis. More...

#include "juce_MarkerList.h"

Classes

class  Listener
 A class for receiving events when changes are made to a MarkerList. More...
 
class  Marker
 Represents a marker in a MarkerList. More...
 
struct  MarkerListHolder
 A base class for objects that want to provide a MarkerList. More...
 
class  ValueTreeWrapper
 Forms a wrapper around a ValueTree that can be used for storing a MarkerList. More...
 

Public Member Functions

 MarkerList ()
 Creates an empty marker list.
 
 MarkerList (const MarkerList &)
 Creates a copy of another marker list.
 
MarkerListoperator= (const MarkerList &)
 Copies another marker list to this one.
 
 ~MarkerList ()
 Destructor.
 
int getNumMarkers () const noexcept
 Returns the number of markers in the list.
 
const MarkergetMarker (int index) const noexcept
 Returns one of the markers in the list, by its index.
 
const MarkergetMarker (const String &name) const noexcept
 Returns a named marker, or nullptr if no such name is found.
 
double getMarkerPosition (const Marker &marker, Component *parentComponent) const
 Evaluates the given marker and returns its absolute position.
 
void setMarker (const String &name, const RelativeCoordinate &position)
 Sets the position of a marker.
 
void removeMarker (int index)
 Deletes the marker at the given list index.
 
void removeMarker (const String &name)
 Deletes the marker with the given name.
 
bool operator== (const MarkerList &) const noexcept
 Returns true if all the markers in these two lists match exactly.
 
bool operator!= (const MarkerList &) const noexcept
 Returns true if not all the markers in these two lists match exactly.
 
void addListener (Listener *listener)
 Registers a listener that will be called when the markers are changed.
 
void removeListener (Listener *listener)
 Deregisters a previously-registered listener.
 
void markersHaveChanged ()
 Synchronously calls markersChanged() on all the registered listeners.
 

Detailed Description

Holds a set of named marker points along a one-dimensional axis.

This class is used to store sets of X and Y marker points in components.

See also
Component::getMarkers().

@tags{GUI}

Definition at line 38 of file juce_MarkerList.h.

Constructor & Destructor Documentation

◆ MarkerList() [1/2]

juce::MarkerList::MarkerList ( )

Creates an empty marker list.

Definition at line 29 of file juce_MarkerList.cpp.

◆ MarkerList() [2/2]

juce::MarkerList::MarkerList ( const MarkerList other)

Creates a copy of another marker list.

Definition at line 33 of file juce_MarkerList.cpp.

◆ ~MarkerList()

juce::MarkerList::~MarkerList ( )

Destructor.

Definition at line 50 of file juce_MarkerList.cpp.

Member Function Documentation

◆ addListener()

void juce::MarkerList::addListener ( Listener listener)

Registers a listener that will be called when the markers are changed.

Definition at line 157 of file juce_MarkerList.cpp.

◆ getMarker() [1/2]

const MarkerList::Marker * juce::MarkerList::getMarker ( const String name) const
noexcept

Returns a named marker, or nullptr if no such name is found.

Note that name comparisons are case-sensitive.

Definition at line 90 of file juce_MarkerList.cpp.

◆ getMarker() [2/2]

const MarkerList::Marker * juce::MarkerList::getMarker ( int  index) const
noexcept

Returns one of the markers in the list, by its index.

Definition at line 85 of file juce_MarkerList.cpp.

◆ getMarkerPosition()

double juce::MarkerList::getMarkerPosition ( const Marker marker,
Component parentComponent 
) const

Evaluates the given marker and returns its absolute position.

The parent component must be supplied in case the marker's expression refers to the size of its parent component.

Definition at line 247 of file juce_MarkerList.cpp.

◆ getNumMarkers()

int juce::MarkerList::getNumMarkers ( ) const
noexcept

Returns the number of markers in the list.

Definition at line 80 of file juce_MarkerList.cpp.

◆ markersHaveChanged()

void juce::MarkerList::markersHaveChanged ( )

Synchronously calls markersChanged() on all the registered listeners.

Definition at line 148 of file juce_MarkerList.cpp.

◆ operator!=()

bool juce::MarkerList::operator!= ( const MarkerList other) const
noexcept

Returns true if not all the markers in these two lists match exactly.

Definition at line 74 of file juce_MarkerList.cpp.

◆ operator=()

MarkerList & juce::MarkerList::operator= ( const MarkerList other)

Copies another marker list to this one.

Definition at line 38 of file juce_MarkerList.cpp.

◆ operator==()

bool juce::MarkerList::operator== ( const MarkerList other) const
noexcept

Returns true if all the markers in these two lists match exactly.

Definition at line 55 of file juce_MarkerList.cpp.

◆ removeListener()

void juce::MarkerList::removeListener ( Listener listener)

Deregisters a previously-registered listener.

Definition at line 162 of file juce_MarkerList.cpp.

◆ removeMarker() [1/2]

void juce::MarkerList::removeMarker ( const String name)

Deletes the marker with the given name.

Definition at line 134 of file juce_MarkerList.cpp.

◆ removeMarker() [2/2]

void juce::MarkerList::removeMarker ( int  index)

Deletes the marker at the given list index.

Definition at line 125 of file juce_MarkerList.cpp.

◆ setMarker()

void juce::MarkerList::setMarker ( const String name,
const RelativeCoordinate position 
)

Sets the position of a marker.

If the name already exists, then the existing marker is moved; if it doesn't exist, then a new marker is added.

Definition at line 108 of file juce_MarkerList.cpp.


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