Static Public Member Functions | List of all members
PresetHandler Class Reference

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

Static Public Member Functions

static void checkProcessorIdsForDuplicates (Processor *rootProcessor, bool silentMode=true)
 Checks if an child processor has a already taken name. More...
 
static ProcessorcreateProcessorFromClipBoard (Processor *parent)
 Creates a processor from xml data in the clipboard. More...
 
static ProcessorcreateProcessorFromPreset (int menuIndexDelta, Processor *parent)
 Creates a processor from the Popupmenu. More...
 
static PopupMenu getAllSavedPresets (int minIndex, Processor *parentChain)
 Returns a popupmenu with all suiting Processors for the supplied FactoryType. More...
 
static String getCustomName (const String &typeName, const String &message=String())
 Opens a modal window that allow renaming of a Processor. More...
 
static String getProcessorNameFromClipboard (const FactoryType *t)
 Checks if the. More...
 
static File getSampleFolder (const String &libraryName)
 Opens a file dialog and saves the new path into the library's setting file. More...
 
static void saveProcessorAsPreset (Processor *p, const String &directory=String())
 Saves the Processor into a subfolder of the directory provided with getPresetFolder(). More...
 
static void showMessageWindow (const String &title, const String &message, IconType icon=IconType::Info)
 Opens a message box (HI Style)
 
static bool showYesNoWindow (const String &title, const String &message, IconType icon=IconType::Question)
 Opens a Yes/No box (HI Style)
 

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 
)
static

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)
static

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 
)
static

Creates a processor from the Popupmenu.

It will be connected to the MainController after creation.

Parameters
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!
Returns
- a connected and restored Processor which can be added to a chain.
PopupMenu getAllSavedPresets ( int  minIndex,
Processor parentChain 
)
static

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

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

Opens a modal window that allow renaming of a Processor.

String getProcessorNameFromClipboard ( const FactoryType t)
static

Checks if the.

static File getSampleFolder ( const String &  libraryName)
inlinestatic

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

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

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

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