Classes | Public Types | Public Member Functions | List of all members
TableEditor Class Reference

A editor for the Table object, which represents a curve with different resolutions. More...

Inheritance diagram for TableEditor:
SafeChangeListener CopyPasteTarget

Classes

struct  Listener
 This listener can be used to react on user interaction to display stuff. More...
 

Public Types

enum  DomainType { originalSize = 0, normalized, scaled }
 This allows different domain types, eg. More...
 

Public Member Functions

void mouseDown (const MouseEvent &e) override
 A left mouse click creates a new DragPoint or selects the DragPoint under the mouse which can be dragged. More...
 
void mouseDrag (const MouseEvent &e) override
 Updates the graph and the points. More...
 
void mouseUp (const MouseEvent &e) override
 If the table size is bigger than 5000, it only recalculates the lookup table here to save some processing.
 
void mouseWheelMove (const MouseEvent &e, const MouseWheelDetails &wheel) override
 If you move the mouse wheel over a point, you can adjust the curve to the left of the point.
 
void resized () override
 If you resize the TableEditor, all internal DragPoints are deleted and new created. More...
 
void setDisplayedIndex (float newIndex)
 You can set a value which is displayed as input here. More...
 
void setDomain (DomainType newDomainType, Range< int > newRange=Range< int >())
 Set the display of the domain value to the desired type. More...
 
void setEdge (float f, bool setLeftEdge=true)
 Sets the point at the left or right edge to the new value. More...
 
void setReadOnlyEdge (float constantLeftEdge, float constantRightEdge)
 Sets the edges to read only. More...
 
 TableEditor (UndoManager *undoManager, Table *tableToBeEdited=nullptr)
 Creates a editor for an existing table. More...
 

Detailed Description

A editor for the Table object, which represents a curve with different resolutions.

Member Enumeration Documentation

enum DomainType

This allows different domain types, eg.

time

Enumerator
originalSize 

the original table size is used

normalized 

the table size is normalized to float between 0.0 and 1.0

scaled 

the domain is scaled with a given Range<int> object

Constructor & Destructor Documentation

TableEditor ( UndoManager *  undoManager,
Table tableToBeEdited = nullptr 
)
explicit

Creates a editor for an existing table.

The lifetime of the table must be longer than the editor's lifetime.

Member Function Documentation

void mouseDown ( const MouseEvent &  e)
override

A left mouse click creates a new DragPoint or selects the DragPoint under the mouse which can be dragged.

A right mouse click on a point deletes it.

void mouseDrag ( const MouseEvent &  e)
override

Updates the graph and the points.

If the table size is smaller than 5000, it also refreshes the look up table.

void resized ( )
override

If you resize the TableEditor, all internal DragPoints are deleted and new created.

void setDisplayedIndex ( float  newIndex)
inline

You can set a value which is displayed as input here.

If the value is changed, the table will be repainted.

The range of newIndex is 0.0 - 1.0.

void setDomain ( DomainType  newDomainType,
Range< int >  newRange = Range<int>() 
)

Set the display of the domain value to the desired type.

If you want a scaled value to be displayed, pass a Range<int> object

void setEdge ( float  f,
bool  setLeftEdge = true 
)

Sets the point at the left or right edge to the new value.

Parameters
fthe new value
setLeftEdgechange the left edge.
void setReadOnlyEdge ( float  constantLeftEdge,
float  constantRightEdge 
)
inline

Sets the edges to read only.

If you pass anything else than -1.0f here, the edge will be read only, so it can't be dragged around.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.