Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ScriptCreatedComponentWrapper Class Referenceabstract

A baseclass for the wrappers of script created components. More...

Inheritance diagram for ScriptCreatedComponentWrapper:
AsyncValueTreePropertyListener

Public Member Functions

void changed (var newValue)
 Call this in your listener callback with the new value. More...
 
virtual void updateComponent ()=0
 Overwrite this method and update the component. More...
 
virtual void updateComponent (int index, var newValue)
 Overwrite this method and update the component for the property that has changed. More...
 
virtual void updateValue (var newValue)
 Overwrite this method and update the value of the component. More...
 
virtual ~ScriptCreatedComponentWrapper ()
 Don't forget to deregister the listener here. More...
 

Protected Member Functions

 ScriptCreatedComponentWrapper (ScriptContentComponent *content, int index_)
 You need to do this tasks in your constructor: More...
 

Protected Attributes

ScopedPointer< Component > component
 the component that will be owned by this wrapper. More...
 
ScriptContentComponentcontentComponent
 the parent component. More...
 

Detailed Description

A baseclass for the wrappers of script created components.

They usually contain the component and are subclassed from their listener. In their listener callback you simply call changed() with whatever new value comes in.

Constructor & Destructor Documentation

Don't forget to deregister the listener here.

ScriptCreatedComponentWrapper ( ScriptContentComponent content,
int  index_ 
)
protected

You need to do this tasks in your constructor:

  1. Create the component and setup the component with every property you need.
  2. Add the wrapper itself as listener to the component (if you want the control callback).

Member Function Documentation

void changed ( var  newValue)

Call this in your listener callback with the new value.

virtual void updateComponent ( )
pure virtual

Overwrite this method and update the component.

void updateComponent ( int  index,
var  newValue 
)
virtual

Overwrite this method and update the component for the property that has changed.

virtual void updateValue ( var  newValue)
inlinevirtual

Overwrite this method and update the value of the component.

Member Data Documentation

ScopedPointer<Component> component
protected

the component that will be owned by this wrapper.

ScriptContentComponent* contentComponent
protected

the parent component.

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