All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Static Public Member Functions | List of all members
PresetHandler Class Reference

Static Public Member Functions

static void saveProcessorAsPreset (Processor *p, const String &directory=String())
static String getCustomName (const String &typeName, const String &message=String())
static bool showYesNoWindow (const String &title, const String &message, IconType icon=IconType::Question)
static void showMessageWindow (const String &title, const String &message, IconType icon=IconType::Info)
static void checkProcessorIdsForDuplicates (Processor *rootProcessor, bool silentMode=true)
static PopupMenu getAllSavedPresets (int minIndex, Processor *parentChain)
static void stripViewsFromPreset (ValueTree &preset)
static String getProcessorNameFromClipboard (const FactoryType *t)
static ProcessorcreateProcessorFromPreset (int menuIndexDelta, Processor *parent)
static ProcessorcreateProcessorFromClipBoard (Processor *parent)
static File getSampleFolder (const String &libraryName)
static File getSampleDataSettingsFile (const String &libraryName)

Detailed Description

A helper class which provides loading and saving Processors to files and clipboard.

Member Function Documentation

void checkProcessorIdsForDuplicates ( Processor rootProcessor,
bool  silentMode = true 

Checks if an child processor has a already taken name. If silentMode is false, it will display a message box at the end.

Processor * createProcessorFromClipBoard ( Processor parent)

Creates a processor from xml data in the clipboard.

The XML data must be parsed before this function, but it checks if a Processor can be created from the data.

Processor * createProcessorFromPreset ( int  menuIndexDelta,
Processor parent 

Creates a processor from the Popupmenu.

It will be connected to the MainController after creation.

menuIndexDelta- the menu index of the selected popupitem from the PopupMenu received with getAllSavedPresets. If the menu was added to another menu as submenu, you have to subtract the last item index before the submenu.
m- the main controller. This must not be a nullptr!
- a connected and restored Processor which can be added to a chain.
PopupMenu getAllSavedPresets ( int  minIndex,
Processor parentChain 

Returns a popupmenu with all suiting Processors for the supplied FactoryType.

String getCustomName ( const String &  typeName,
const String &  message = String() 

Opens a modal window that allow renaming of a Processor.

String getProcessorNameFromClipboard ( const FactoryType t)

Checks if the.

static File getSampleDataSettingsFile ( const String &  libraryName)

This looks in the application settings directory for a file called libraryName.library and creates it if it doesn't exist.

static File getSampleFolder ( const String &  libraryName)

Opens a file dialog and saves the new path into the library's setting file.

void saveProcessorAsPreset ( Processor p,
const String &  directory = String() 

Saves the Processor into a subfolder of the directory provided with getPresetFolder().

void showMessageWindow ( const String &  title,
const String &  message,
PresetHandler::IconType  type = IconType::Info 

Opens a message box (HI Style)

bool showYesNoWindow ( const String &  title,
const String &  message,
PresetHandler::IconType  type = IconType::Question 

Opens a Yes/No box (HI Style)

static void stripViewsFromPreset ( ValueTree &  preset)

Removes all view info from a ValueTree.

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