IBrushPresetParams Class Reference

IBrushPresetParams Class Referenceabstract

#include <IBrushPresets.h>

Class Description

Interface to a set of brush preset parameter values, associated with a particular Brush Preset context.

Implemented by the plug-in.

+ Inheritance diagram for IBrushPresetParams:

Public Member Functions

virtual ~IBrushPresetParams ()
 Destructor. More...
 
virtual Class_ID ContextID ()=0
 Returns the ID of the brush preset context associated with this parameter set. More...
 
virtual void ApplyParams ()=0
 Applies the values from the parameter set into the UI of the corresponding context. More...
 
virtual void FetchParams ()=0
 Fetches the values from the UI of the corresponding context into the parameter set. More...
 
virtual int GetNumParams ()=0
 Returns the number of individual parameters in the parameter set. More...
 
virtual int GetParamID (int paramIndex)=0
 Translates the index number of a parameter value into the corresponding parameter ID. More...
 
virtual int GetParamIndex (int paramID)=0
 Translates the ID of a parameter value into the corresponding parameter index number. More...
 
virtual FPValue GetParamValue (int paramID)=0
 Returns a parameter value by ID. More...
 
virtual void SetParamValue (int paramID, FPValue val)=0
 Sets a parameter value by ID. More...
 
virtual FPValue GetDisplayParamValue (int paramID)
 Returns the value of a parameter as it should be displayed in the UI. More...
 
virtual void SetParent (IBrushPreset *parent)=0
 Informs the parameter set of the brush preset holding it. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

virtual ~IBrushPresetParams ( )
inlinevirtual

Destructor.

86 {;}

Member Function Documentation

virtual Class_ID ContextID ( )
pure virtual

Returns the ID of the brush preset context associated with this parameter set.

virtual void ApplyParams ( )
pure virtual

Applies the values from the parameter set into the UI of the corresponding context.

The parameter object is assumed to be part of the same plug-in as its context object, and to have knowledge of its state. The parameter object should apply its values into the UI as appropriate.

virtual void FetchParams ( )
pure virtual

Fetches the values from the UI of the corresponding context into the parameter set.

The parameter object is assumed to be part of the same plug-in as its context object, and to have knowledge of its state. The parameter object should fetch its values from the UI as appropriate.

virtual int GetNumParams ( )
pure virtual

Returns the number of individual parameters in the parameter set.

virtual int GetParamID ( int  paramIndex)
pure virtual

Translates the index number of a parameter value into the corresponding parameter ID.

Parameters
[in]paramIndexThe index of the parameter value
Returns
The parameter ID for the value, or zero if the index is out of range
virtual int GetParamIndex ( int  paramID)
pure virtual

Translates the ID of a parameter value into the corresponding parameter index number.

Parameters
[in]paramIDThe ID of the parameter value
Returns
The index of the parameter value, or -1 if there is no parameter with the given ID
virtual FPValue GetParamValue ( int  paramID)
pure virtual

Returns a parameter value by ID.

Parameters
[in]paramIDThe ID of the parameter value
Returns
The value of the parameter
virtual void SetParamValue ( int  paramID,
FPValue  val 
)
pure virtual

Sets a parameter value by ID.

Parameters
[in]paramIDThe ID of the parameter value
[in]valThe value to set
virtual FPValue GetDisplayParamValue ( int  paramID)
inlinevirtual

Returns the value of a parameter as it should be displayed in the UI.

This is used to display values with a user-friendly format in the brush preset manager dialog. For example, a minimum and maximum value of 0 and 100 might be displayed together as one entry with the string value "0-100". In this case, the parameter set should return TYPE_VOID for the minimum and maximum display values, but provide a third, display-only parameter, with the string value.

Parameters
[in]paramIDThe ID of the parameter value
Returns
The value of the parameter to display in the UI
131 {return GetParamValue(paramID);}
virtual FPValue GetParamValue(int paramID)=0
Returns a parameter value by ID.
virtual void SetParent ( IBrushPreset parent)
pure virtual

Informs the parameter set of the brush preset holding it.

This is called by the system when parameter sets are created, to make them aware of the preset they are held by. No specific action is required by the parameter set.

Parameters
[in]parentThe brush preset parent which holds this parameter set.