All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Types | Public Member Functions | List of all members
TableEditor Class Reference
Inheritance diagram for TableEditor:
SafeChangeListener CopyPasteTarget

Public Types

enum  DomainType

Public Member Functions

 TableEditor (Table *tableToBeEdited=nullptr)
void resized () override
void setDomain (DomainType newDomainType, Range< int > newRange=Range< int >())
void setReadOnlyEdge (float constantLeftEdge, float constantRightEdge)
void mouseDown (const MouseEvent &e) override
void mouseUp (const MouseEvent &e) override
void mouseDrag (const MouseEvent &e) override
void mouseWheelMove (const MouseEvent &e, const MouseWheelDetails &wheel) override
void setDisplayedIndex (float newIndex)
void setEdge (float f, bool setLeftEdge=true)

Detailed Description

A component that can edit a Table.

Constructor & Destructor Documentation

TableEditor ( Table tableToBeEdited = nullptr)

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)

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)

Updates the graph and the points. If the table size is smaller than 5000, it also refreshes the look up table.

void mouseUp ( const MouseEvent &  e)

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 

If you move the mouse wheel over a point, you can adjust the curve to the left of the point

void resized ( )

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

void setDisplayedIndex ( float  newIndex)

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.

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

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.