Public Member Functions

IBrushPresetParams Class Reference

Search for all occurrences

Detailed Description

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

Implemented by the plug-in.

#include <IBrushPresets.h>

Inheritance diagram for IBrushPresetParams:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Constructor & Destructor Documentation

virtual ~IBrushPresetParams ( ) [inline, virtual]

Destructor.

{;}

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] paramIndex The 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] paramID The 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] paramID The 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] paramID The ID of the parameter value
[in] val The value to set
virtual FPValue GetDisplayParamValue ( int  paramID ) [inline, virtual]

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] paramID The ID of the parameter value
Returns:
The value of the parameter to display in the UI
{return GetParamValue(paramID);}
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] parent The brush preset parent which holds this parameter set.

IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams
IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams IBrushPresetParams