PrefsDialogObject Class Reference Library » 首选项

#include <lib_prefs.h>

Inheritance diagram for PrefsDialogObject:

详细描述

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() .

公共成员函数

  PrefsDialogObject ()
virtual GeListNode GetMappedObject ()
-  Public Member Functions inherited from NodeData
  NodeData ()
GeListNode Get (void) const
virtual Bool   消息 ( GeListNode *node, Int32 type, void *data)
virtual void  GetBubbleHelp ( GeListNode *node, maxon::String &str)
virtual BaseDocument GetDocument ( GeListNode *node)
virtual Int32   GetBranchInfo ( GeListNode *node, BranchInfo *info, Int32 max, GETBRANCHINFO flags)
virtual Bool   IsInstanceOf (const GeListNode *node, Int32 type) const
virtual Bool   IsDocumentRelated (const GeListNode *node, Bool &docrelated) const
virtual Bool   Init ( GeListNode *node)
virtual void  Free ( GeListNode *node)
virtual Bool   读取 ( GeListNode *node, HyperFile *hf, Int32 level)
virtual Bool   Write ( GeListNode *node, HyperFile *hf)
virtual Bool   CopyTo ( NodeData *dest, GeListNode *snode, GeListNode *dnode, COPYFLAGS flags, AliasTrans *trn)
virtual Bool   GetDDescription ( GeListNode *node, 描述 *description, DESCFLAGS_DESC &flags)
virtual Bool   GetDParameter ( GeListNode *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags)
virtual Bool   SetDParameter ( GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
virtual Bool   GetDEnabling ( GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc)
virtual Bool   TranslateDescID ( GeListNode *node, const DescID &id, DescID &res_id, C4DAtom *&res_at)
-  Public Member Functions inherited from BaseData
  BaseData ()
virtual  ~BaseData (void)
void  Destructor (void)

静态公共成员函数

static BasePlugin 注册 ( 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)
void  GetPrefsValue ( Int32 id, GeData &data, DESCFLAGS_GET &flags, const PrefsMapTable *table)
void  InitPrefsValue ( Int32 id, const GeData &data, 描述 *desc, const DescID &descid, BaseContainer *pBC=nullptr)
virtual Bool   InitValues (const DescID &id, 描述 *description=nullptr)

IDPREFS

enum   {
   IDPREFS_SORTID ,
   IDPREFS_PARENTID
}

Additional Inherited Members

-  Protected Attributes inherited from NodeData
GeListNode private_link

Member Enumeration Documentation

◆  anonymous enum

anonymous enum
Enumerator
IDPREFS_SORTID 
IDPREFS_PARENTID 

构造函数 & 析构函数文档编制

◆  PrefsDialogObject()

PrefsDialogObject ( )

Constructor.

成员函数文档编制

◆  SetPrefsValue() [1/2]

void SetPrefsValue ( Int32   id ,
const GeData data ,
DESCFLAGS_SET flags ,
Bool   refresh = false  
)
protected

Private .

◆  SetPrefsValue() [2/2]

void SetPrefsValue ( Int32   id ,
Int32   data ,
DESCFLAGS_SET flags ,
const PrefsMapTable table  
)
protected

Private .

◆  GetPrefsValue() [1/2]

void GetPrefsValue ( Int32   id ,
GeData data ,
DESCFLAGS_GET flags  
)
protected

Private .

◆  GetPrefsValue() [2/2]

void GetPrefsValue ( Int32   id ,
GeData data ,
DESCFLAGS_GET flags ,
const PrefsMapTable table  
)
protected

Private .

◆  InitPrefsValue()

void InitPrefsValue ( Int32   id ,
const GeData data ,
描述 desc ,
const DescID descid ,
BaseContainer pBC = nullptr  
)
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.

◆  InitValues()

virtual Bool InitValues ( const DescID id ,
描述 description = nullptr  
)
protected virtual

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 .
返回
true if successful, otherwise false .

◆  Register()

static BasePlugin * Register ( Int32   id ,
DataAllocator allocfunc ,
const String name ,
const String description ,
Int32   parentid ,
Int32   sortid  
)
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 描述 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
返回
The registered plugin.

◆  GetMappedObject()

virtual GeListNode * GetMappedObject ( )
virtual

Private .