Public Member Functions | Protected Member Functions | List of all members
ViewManager Class Reference

A ViewManager handles all logic for restorable view configurations. More...

Public Member Functions

void addViewInfo (ViewInfo *newInfo)
 Adds a new ViewInfo to the list and sets it as current ViewInfo. More...
 
ViewInfo * getCurrentViewInfo ()
 Returns the view that is currently selected or nullptr if nothing is selected. More...
 
int getNumViewInfos () const
 Returns the amount of available views. More...
 
ViewInfo * getViewInfo (int index)
 returns the ViewInfo at the specified index. More...
 
void removeCurrentViewInfo ()
 Deletes the current view info. More...
 
void replaceCurrentViewInfo (ViewInfo *newInfo)
 This replaces the current ViewInfo with the given ViewInfo. More...
 
void restoreViewsFromValueTree (const ValueTree &v)
 Restores the views from a previously encoded ValueTree. More...
 
void saveViewsToValueTree (ValueTree &v) const
 Saves the views as encoded string into a existing ValueTree. More...
 
void setCurrentViewChanged ()
 This marks the current view as changed. More...
 
void setCurrentViewInfo (int newViewIndex)
 Changes the current view index. More...
 

Protected Member Functions

 ViewManager (ModulatorSynthChain *chain_, UndoManager *undoManager)
 Creates a new ViewManager. More...
 

Detailed Description

A ViewManager handles all logic for restorable view configurations.

Normally, a ModulatorSynthChain automatically uses the features of the class by inheritance, but you can subclass it if you want to.

It stores views in a list and has some handy features for managing them using a "current" slot.

Constructor & Destructor Documentation

ViewManager ( ModulatorSynthChain *  chain_,
UndoManager *  undoManager 
)
protected

Creates a new ViewManager.

Member Function Documentation

void addViewInfo ( ViewInfo *  newInfo)
inline

Adds a new ViewInfo to the list and sets it as current ViewInfo.

ViewInfo* getCurrentViewInfo ( )
inline

Returns the view that is currently selected or nullptr if nothing is selected.

int getNumViewInfos ( ) const
inline

Returns the amount of available views.

ViewInfo* getViewInfo ( int  index)
inline

returns the ViewInfo at the specified index.

void removeCurrentViewInfo ( )
inline

Deletes the current view info.

void replaceCurrentViewInfo ( ViewInfo *  newInfo)
inline

This replaces the current ViewInfo with the given ViewInfo.

void restoreViewsFromValueTree ( const ValueTree &  v)
inline

Restores the views from a previously encoded ValueTree.

void saveViewsToValueTree ( ValueTree &  v) const
inline

Saves the views as encoded string into a existing ValueTree.

void setCurrentViewChanged ( )
inline

This marks the current view as changed.

void setCurrentViewInfo ( int  newViewIndex)
inline

Changes the current view index.

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