#include <lib_prefs.h>
Allows to register a new preference category in the Cinema 4D preference dialog.
Just derive a class and override the virtual functions as necessary. Then create an instance of the class and call Register().
Static Public Member Functions | |
static BasePlugin * | Register (Int32 id, DataAllocator *allocfunc, const String &name, const String &description, Int32 parentid, Int32 sortid) |
Protected Member Functions | |
void | SetPrefsValue (Int32 id, const GeData &data, DESCFLAGS_SET &flags, Bool refresh=false) |
void | SetPrefsValue (Int32 id, Int32 data, DESCFLAGS_SET &flags, const PrefsMapTable *table) |
void | GetPrefsValue (Int32 id, GeData &data, DESCFLAGS_GET &flags) const |
void | GetPrefsValue (Int32 id, GeData &data, DESCFLAGS_GET &flags, const PrefsMapTable *table) const |
void | InitPrefsValue (Int32 id, const GeData &data, Description *desc, const DescID &descid, BaseContainer *pBC=nullptr) |
virtual Bool | InitValues (const DescID &id, Description *description=nullptr) |
IDPREFS | |
enum | { IDPREFS_SORTID , IDPREFS_PARENTID } |
Additional Inherited Members | |
![]() | |
GeListNode * | private_link |
Constructor.
|
protected |
Private.
|
protected |
Private.
|
protected |
Private.
|
protected |
Private.
|
protected |
Initializes preference values in pBC.
[in] | id | The world container ID of the preference parameter. |
[in] | data | The value used for the initialization. |
[in] | desc | The description of the preference hook. If nullptr id is used instead of descid. |
[in] | descid | The description ID of the preference parameter. |
[in,out] | pBC | The preference world container. Plugins should always store their parameter in a sub-container in the world-container. |
|
protectedvirtual |
Called to initialize preference parameters.
[in] | id | The description ID of the preference parameter. |
[in,out] | description | The description of the preference hook. Can be nullptr. |
|
static |
Registers a hook in the Cinema 4D preference dialog.
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | allocfunc | The allocator for the preference hook plugin. This is a pointer to a function that creates a new instance of PrefsDialogObject with NewObj(). |
[in] | name | The name of the preference hook. |
[in] | description | The name of the description resource file to use for your plugin without .res extension, for example "Prefsnavigation". The name has to be unique, i.e. "Prefsnavigation" cannot be used for two different descriptions. See Description Resource for more information. |
[in] | parentid | The hook ID of the parent category in the preferences tree or 0 to create a top-level category. The internal categories are: PREFS |
[in] | sortid | A priority value to sort the category in the preferences tree. The higher the value, the higher the entry will be displayed in the preferences tree. The internal priority values are: PREFS_PRI |
|
virtual |
Private.