A table is a data structure that allows editing of a look up table with a TableEditor. More...
Classes | |
struct | GraphPoint |
A representation of a graph point. More... | |
Public Types | |
enum | DataType { Midi = 0, SampleLookupTable } |
A Table can use two data types. More... | |
Public Member Functions | |
void | createPath (Path &normalizedPath) const |
This generates a normalized path from the GraphPoint array. More... | |
virtual String | exportData () const |
Exports the data as base64 encoded String. More... | |
virtual void | fillLookUpTable () |
Fills the look up table with the graph points generated from calculateGraphPoints() More... | |
GraphPoint | getGraphPoint (int pointIndex) const |
Get a copy of the graph point at pointIndex. More... | |
int | getNumGraphPoints () const |
Returns the number of graph points. | |
virtual int | getTableSize () const =0 |
Overwrite this and return the table size. More... | |
virtual float * | getWritePointer ()=0 |
Overwrite this and return a pointer to the data array. More... | |
String | getXValueText (float value) |
This returns a String that can be used for displaying purposes. More... | |
virtual void | restoreData (const String &savedString) |
Restores the data from a base64 encoded String. More... | |
void | setGraphPoints (const Array< GraphPoint > &newGraphPoints, int numPoints) |
Sets the GraphPoints. More... | |
Table () | |
Creates a new table of the specified type. More... | |
![]() | |
void | addChangeListener (SafeChangeListener *listener) |
Registers a listener to receive change callbacks from this broadcaster. More... | |
void | removeAllChangeListeners () |
Removes all listeners from the list. More... | |
void | removeChangeListener (SafeChangeListener *listener) |
Unregisters a listener from the list. More... | |
void | sendAllocationFreeChangeMessage () |
This will send a message without allocating a message slot. More... | |
void | sendChangeMessage (const String &=String()) |
Causes an asynchronous change message to be sent to all the registered listeners. More... | |
void | sendSynchronousChangeMessage () |
Sends a synchronous change message to all the registered listeners. More... | |
A table is a data structure that allows editing of a look up table with a TableEditor.
It uses a list of graph points to create a path which is rendered to a float array of the desired size.
enum DataType |
A Table can use two data types.
Table | ( | ) |
Creates a new table of the specified type.
void createPath | ( | Path & | normalizedPath | ) | const |
This generates a normalized path from the GraphPoint array.
This is called by the editor to draw the path under the DragPoints.
|
inlinevirtual |
Exports the data as base64 encoded String.
This is not a ValueTree (so RestorableObject is no base class from Table), because it needs to be embedded in an XML attribute
|
virtual |
Fills the look up table with the graph points generated from calculateGraphPoints()
Don't call this too often as it is quite heavy!
|
inline |
Get a copy of the graph point at pointIndex.
|
pure virtual |
Overwrite this and return the table size.
|
pure virtual |
Overwrite this and return a pointer to the data array.
|
inline |
This returns a String that can be used for displaying purposes.
You can supply a lambda for the conversion using setTextConverter().
|
inlinevirtual |
Restores the data from a base64 encoded String.
void setGraphPoints | ( | const Array< GraphPoint > & | newGraphPoints, |
int | numPoints | ||
) |
Sets the GraphPoints.
If you need to refresh the internal table, you also have to call fillLookUpTable().