The interface to a brush preset object, holding parameters for the PainterInterface and other brush tools.
The interface to Brush Preset objects. A brush preset corresponds to a button on the brush preset toolbar, or a row listed in the brush preset manager dialog. A preset holds one set of parameters for each brush preset context registered with the manager. Applying or fetching a preset will apply or fetch parameters for each currently active context. The context and parameter objects are implemented by plug-ins, but the presets holding the parameter objects are implemented by the system.
#include <IBrushPresets.h>
Public Member Functions |
|
virtual | ~IBrushPreset () |
Destructor. |
|
virtual int | PresetID ()=0 |
Returns an ID which uniquely identifies this
preset. |
|
virtual void | Apply ()=0 |
Applies parameters from the preset into the
UI, as per activating its toolbar button. |
|
virtual void | Fetch ()=0 |
Fetches parameters from the UI into the
preset, as per deactivating its toolbar button. |
|
virtual IBrushPresetParams * | GetParams (Class_ID contextID)=0 |
Returns the parameter set held by the brush
preset for a given context. |
|
virtual int | GetNumContexts ()=0 |
Returns the number of contexts for which
this preset is holding parameters. |
|
virtual Class_ID | GetContextID (int contextIndex)=0 |
Translates the index number of a parameter
set into the corresponding context ID. |
|
virtual int | GetContextIndex (Class_ID contextID)=0 |
Translates the context ID for a parameter
set into the corresponding index number. |
virtual ~IBrushPreset | ( | ) | [inline, virtual] |
Destructor.
{;}
virtual int PresetID | ( | ) | [pure virtual] |
Returns an ID which uniquely identifies this preset.
Presets have an ID number unique from other presets at any given time; however if a preset is deleted, its ID number may be reassigned to other presets created later.
virtual void Apply | ( | ) | [pure virtual] |
Applies parameters from the preset into the UI, as per activating its toolbar button.
For each active brush preset context, the corresponding set of parameters held by the preset is applied via ApplyParams().
virtual void Fetch | ( | ) | [pure virtual] |
Fetches parameters from the UI into the preset, as per deactivating its toolbar button.
For each active brush preset context, the corresponding set of parameters held by the preset is fetched via FetchParams().
virtual IBrushPresetParams* GetParams | ( | Class_ID | contextID | ) | [pure virtual] |
Returns the parameter set held by the brush preset for a given context.
[in] | contextID | The ID of the context |
virtual int GetNumContexts | ( | ) | [pure virtual] |
Returns the number of contexts for which this preset is holding parameters.
virtual Class_ID GetContextID | ( | int | contextIndex | ) | [pure virtual] |
Translates the index number of a parameter set into the corresponding context ID.
[in] | contextIndex | The index of the parameter set |
virtual int GetContextIndex | ( | Class_ID | contextID | ) | [pure virtual] |
Translates the context ID for a parameter set into the corresponding index number.
[in] | contextID | The ID of the context |