Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include "iFnPub.h"
00025 #include "iparamb2.h"
00026 #include "GetCOREInterface.h"
00027
00028 class CustAttrib;
00029
00031 #define IID_METADA_MANAGER Interface_ID(0xdcdd1738, 0x15ee4791)
00032
00034
00040 class IMetaDataManager : public FPStaticInterface
00041 {
00042 public:
00043
00044 typedef Class_ID MetaDataID;
00045
00046 enum ControlAlign
00047 {
00048 eAlignLeft,
00049 eAlignCenter,
00050 eAlignRight
00051 };
00052
00054
00063 struct ParamDescriptor
00064 {
00065 ParamDescriptor():
00066 m_name(NULL),
00067 m_ctrlLabel(NULL),
00068 m_dataType(TYPE_STRING),
00069 m_ctrlType(TYPE_EDITBOX),
00070 m_width(-1),
00071 m_height(-1),
00072 m_offset(0, 0),
00073 m_ctrlAlign(eAlignCenter),
00074 m_sliderHorizontal(true),
00075 m_sliderTicks(0),
00076 m_labelOnTop(false),
00077 m_highlightColor(0.99f, 0.86f, 0.03f)
00078 {
00079 }
00080
00081 MCHAR* m_name;
00082 ParamType2 m_dataType;
00083 PB2Value m_defValue;
00084
00085
00086 ULONGLONG m_flags;
00087
00088
00089 PB2Value m_rangeLow;
00090 PB2Value m_rangeHigh;
00091
00092
00093 ControlType2 m_ctrlType;
00094 MCHAR* m_ctrlLabel;
00095 int m_width;
00096 int m_height;
00097 IPoint2 m_offset;
00098 ControlAlign m_ctrlAlign;
00099
00100 bool m_sliderHorizontal;
00101 int m_sliderTicks;
00102 bool m_labelOnTop;
00103 Color m_highlightColor;
00104 };
00105
00107
00119 virtual MetaDataID CreateMetaDataDefinition
00120 (
00121 MCHAR* in_custAttribSetName,
00122 MCHAR* in_rollOutName,
00123 const Tab<ParamDescriptor>& in_paramDefs,
00124 MSTR* out_errMsg = NULL
00125 ) = 0;
00126
00128
00134 virtual CustAttrib* AddMetaDataToAnimatable
00135 (
00136 const MetaDataID& in_metaDataID,
00137 Animatable& in_animatable,
00138 int in_rank = -1
00139 ) = 0;
00140
00142
00149 virtual void AddMetaDataToAnimatables
00150 (
00151 const MetaDataID& in_metaDataID,
00152 const Tab<Animatable*>& in_animatables,
00153 Tab<CustAttrib*>& out_metaData,
00154 bool in_shared = false,
00155 int in_rank = -1
00156 ) = 0;
00157
00159
00164 virtual bool RemoveMetaDataFromAnimatable
00165 (
00166 const MetaDataID& in_metaDataID,
00167 Animatable& in_animatable
00168 ) = 0;
00169
00171 virtual int MetaDataCount() const = 0;
00172
00174
00178 virtual void GetAllMetaDataOwners(const MetaDataID& in_ID, Tab<Animatable*>& out_owners) = 0;
00179
00181
00185 virtual bool IsMetaDataDefined(const MetaDataID& in_ID) const = 0 ;
00186
00188
00193 virtual CustAttrib* GetMetaData(Animatable& in_animatable, const MetaDataID& in_ID) const = 0;
00194
00196
00200 virtual void GetAllMetaData(Animatable& in_animatable, Tab<CustAttrib*>& out_metaData) const = 0;
00201
00202 static IMetaDataManager* GetInstance() {
00203 return static_cast<IMetaDataManager*>(GetCOREInterface(IID_METADA_MANAGER));
00204 }
00205 };
00206
00207 static const IMetaDataManager::MetaDataID& EmptyMetaDataID = Class_ID(0x00000000, 0x00000000);
00208
00209
00210