00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __PRM_Type__
00022 #define __PRM_Type__
00023
00024 #include <UT/UT_NTStreamUtil.h>
00025 #include <UT/UT_Spline.h>
00026 #include "PRM_API.h"
00027 #include "PRM_Callback.h"
00028
00029 class PRM_SpareData;
00030
00031 class PRM_API PRM_Type
00032 {
00033 public:
00034
00035
00036 enum PRM_BasicType {
00037 PRM_BASIC_NONE = 0x00000000,
00038 PRM_BASIC_ORDINAL = 0x00000001,
00039 PRM_BASIC_FLOAT = 0x00000002,
00040 PRM_BASIC_STRING = 0x00000004,
00041 PRM_BASIC_MASK = 0x00000007
00042 };
00043
00044
00045 enum PRM_FloatType {
00046 PRM_FLOAT_NONE = 0x00000000,
00047
00048
00049 PRM_FLOAT_INTEGER = 0x00000001,
00050
00051 PRM_FLOAT_POLAR = 0x00000004,
00052 PRM_FLOAT_POLARJACK = 0x00000008,
00053 PRM_FLOAT_ANGLEJACK = 0x00000010,
00054 PRM_FLOAT_SPINNER = 0x00000020,
00055 PRM_FLOAT_RANGE = 0x00000080,
00056 PRM_FLOAT_HUECIRCLE = 0x00000100,
00057 PRM_FLOAT_GREYRANGE = 0x00000200,
00058
00059 PRM_FLOAT_SLIDERFRAC = 0x00000800,
00060
00061
00062
00063
00064 PRM_FLOAT_MINMAX_R = 0x00002000,
00065 PRM_FLOAT_MINMAX_G = 0x00004000,
00066 PRM_FLOAT_MINMAX_B = 0x00008000,
00067 PRM_FLOAT_MINMAX_A = 0x00010000,
00068 PRM_FLOAT_MINMAX_RGBA = 0x00020000,
00069 PRM_FLOAT_MINMAX_MASK = 0x0003E000,
00070
00071 PRM_FLOAT_PALETTE = 0x00040000,
00072
00073
00074 PRM_FLOAT_RAMPEDIT = 0x00080000,
00075 PRM_FLOAT_RGBA = 0x00100000,
00076
00077
00078 };
00079
00080
00081 enum PRM_OrdinalType {
00082 PRM_ORD_NONE = 0x00000000,
00083 PRM_ORD_TOGGLE = 0x00000001,
00084 PRM_ORD_CALLBACK = 0x00000002,
00085 PRM_ORD_SWITCHERLIST = 0x00000004,
00086 PRM_ORD_RGBAMASK = 0x00000008,
00087 PRM_ORD_BUTTONSTRIP = 0x00000010,
00088 PRM_ORD_ICONSTRIP = 0x00000020,
00089 };
00090
00091
00092 enum PRM_StringType {
00093 PRM_STR_NONE = 0x00000000,
00094 PRM_STR_CMD = 0x00000001,
00095 PRM_STR_PATH = 0x00000002,
00096 PRM_STR_ALPHA = 0x00000004,
00097
00098
00099 PRM_STR_OP_REF_LIST = 0x00000008,
00100 PRM_STR_OP_REF_NAME = 0x00000010,
00101 PRM_STR_OP_REF_DATA = 0x00000020,
00102 PRM_STR_OP_REF_PARM = 0x00000040,
00103 PRM_STR_OP_REF_CHILD = 0x00000080,
00104 PRM_STR_OP_REF_MASK = 0x000000F8,
00105
00106
00107
00108 PRM_STR_UNQUOTED = 0x00000100,
00109
00110 PRM_STR_LABEL = 0x00000200,
00111
00112 PRM_STR_SEPARATOR = 0x00000400
00113 };
00114
00115
00116
00117
00118
00119 enum PRM_PathType {
00120 PRM_PATH_NONE = 0x00000000,
00121 PRM_PATH_PIC = 0x00000001,
00122 PRM_PATH_GEO = 0x00000002,
00123 PRM_PATH_RAMP = 0x00000004,
00124 PRM_PATH_CAPT = 0x00000008,
00125 PRM_PATH_CLIP = 0x00000010,
00126
00127 PRM_PATH_PAINT = 0x00000040,
00128 PRM_PATH_LUT = 0x00000080,
00129 PRM_PATH_CMDF = 0x00000100,
00130 PRM_PATH_MIDI = 0x00000200,
00131 PRM_PATH_TXT = 0x00000400,
00132 PRM_PATH_I3D = 0x00000800,
00133 PRM_PATH_CHAN = 0x00001000,
00134 PRM_PATH_SIM = 0x00002000,
00135 PRM_PATH_SIMDATA = 0x00004000,
00136
00137 PRM_PATH_MASK = 0x00007FFF
00138 };
00139
00140
00141
00142
00143
00144
00145
00146 enum PRM_ChannelType {
00147 PRM_CHAN_NONE = 0x00000000,
00148 PRM_CHAN_NAMEXYZW = 0x00000001,
00149 PRM_CHAN_NAMEUVW = 0x00000002,
00150 PRM_CHAN_NAMERGB = 0x00000004,
00151 PRM_CHAN_NAMEBEGINEND = 0x00000008,
00152 PRM_CHAN_NAMEMAXMIN = 0x00000010,
00153 PRM_CHAN_NAMEMINMAX = 0x00000020,
00154 PRM_CHAN_NAMESTARTEND = 0x00000040,
00155 PRM_CHAN_NAMEXYWH = 0x00000080,
00156 PRM_CHAN_MASK = 0x000000FF
00157 };
00158
00159
00160 enum PRM_InterfaceType {
00161 PRM_INTERFACE_NONE = 0x00000000,
00162
00163 PRM_INTERFACE_INVISIBLE = 0x00000001,
00164
00165
00166
00167 PRM_INTERFACE_EXCLUSIVE = 0x00000002,
00168
00169 PRM_INTERFACE_JOIN_NEXT = 0x00000004,
00170
00171 PRM_INTERFACE_LABEL_NONE= 0x00000008,
00172
00173 PRM_INTERFACE_PLAIN = 0x00000010,
00174
00175 PRM_INTERFACE_CHANNEL = 0x00000020
00176 };
00177
00178
00179
00180 enum PRM_BehaviorType {
00181 PRM_BEHAVIOR_NONE = 0x00000000,
00182
00183
00184
00185
00186 PRM_BEHAVIOR_NOREFRESH = 0x00000001,
00187
00188
00189
00190
00191
00192
00193
00194
00195 PRM_BEHAVIOR_NORESIM = 0x00000002,
00196
00197
00198 PRM_BEHAVIOR_NOCOOK = 0x00000004,
00199
00200
00201
00202 PRM_BEHAVIOR_BASEPARM = 0x00000008
00203 };
00204
00205
00206 PRM_Type();
00207 PRM_Type(const PRM_Type &t);
00208 PRM_Type(const PRM_BasicType &bt);
00209 PRM_Type(const PRM_FloatType &at);
00210 PRM_Type(const PRM_OrdinalType &ot);
00211 PRM_Type(const PRM_StringType &st);
00212 PRM_Type(const PRM_PathType &pt);
00213 PRM_Type(const PRM_ChannelType &ct);
00214 PRM_Type(const PRM_InterfaceType &it);
00215 PRM_Type(const PRM_BehaviorType &vt);
00216 PRM_Type(const PRM_BasicType &bt,
00217 const PRM_FloatType &at,
00218 const PRM_OrdinalType &ot,
00219 const PRM_StringType &st,
00220 const PRM_PathType &pt,
00221 const PRM_ChannelType &ct,
00222 const PRM_InterfaceType &it,
00223 const PRM_BehaviorType &vt);
00224 ~PRM_Type()
00225 {
00226 }
00227
00228 void init();
00229
00230 void saveBinary(ostream &os) const;
00231 bool loadBinary(UT_IStream &is);
00232
00233 void invert();
00234 void stripUiType();
00235
00236 const PRM_Type &operator=(const PRM_Type &t);
00237 bool operator==(const PRM_Type &t) const;
00238 bool operator!=(const PRM_Type &t) const;
00239 void operator|=(const PRM_Type &t);
00240 void operator&=(const PRM_Type &t);
00241
00242
00243 operator bool() const;
00244
00245
00246 bool isBasicType(const PRM_BasicType &t) const;
00247 bool isChannelType(const PRM_ChannelType &t) const;
00248 bool hasFloatType(const PRM_FloatType &mask) const;
00249 bool hasOrdinalType(const PRM_OrdinalType &mask) const;
00250 bool hasStringType(const PRM_StringType &mask) const;
00251 bool hasPathType(const PRM_PathType &mask) const;
00252 bool hasInterfaceType(const PRM_InterfaceType &mask) const;
00253 bool hasBehaviorType(const PRM_BehaviorType &mask) const;
00254
00255
00256 bool isOrdinalType() const
00257 { return isBasicType(PRM_BASIC_ORDINAL); }
00258 bool isFloatType() const
00259 { return isBasicType(PRM_BASIC_FLOAT); }
00260 bool isStringType() const
00261 { return isBasicType(PRM_BASIC_STRING); }
00262 bool isVisible() const
00263 { return !hasInterfaceType(PRM_INTERFACE_INVISIBLE); }
00264 bool isAnimatible() const
00265 { return hasInterfaceType(PRM_INTERFACE_CHANNEL); }
00266 bool isSwitcher() const
00267 {
00268 return isOrdinalType()
00269 && hasOrdinalType(PRM_OrdinalType(
00270 PRM_ORD_SWITCHERLIST));
00271 }
00272 bool isCookable() const
00273 {
00274 return !hasBehaviorType(
00275 PRM_BehaviorType(
00276 PRM_BEHAVIOR_NOREFRESH
00277 |PRM_BEHAVIOR_NOCOOK));
00278
00279 }
00280
00281
00282 const PRM_BasicType &getBasicType() const;
00283 const PRM_FloatType &getFloatType() const;
00284 const PRM_OrdinalType &getOrdinalType() const;
00285 const PRM_StringType &getStringType() const;
00286 const PRM_PathType &getPathType() const;
00287 const PRM_ChannelType &getChannelType() const;
00288 const PRM_InterfaceType &getInterfaceType() const;
00289 const PRM_BehaviorType &getBehaviorType() const;
00290
00291 private:
00292 friend const PRM_Type operator|(const PRM_Type &t1, const PRM_Type &t2);
00293 friend const PRM_Type operator&(const PRM_Type &t1, const PRM_Type &t2);
00294 friend const PRM_Type operator~(const PRM_Type &t1);
00295 friend const PRM_Type PRM_STRIP_UI_TYPE(const PRM_Type &t1);
00296
00297 private:
00298 PRM_BasicType myBasicType;
00299 PRM_FloatType myFloatType;
00300 PRM_OrdinalType myOrdinalType;
00301 PRM_StringType myStringType;
00302 PRM_PathType myPathType;
00303 PRM_ChannelType myChannelType;
00304 PRM_InterfaceType myInterfaceType;
00305 PRM_BehaviorType myBehaviorType;
00306 };
00307
00308
00309 inline const PRM_Type operator|(const PRM_Type &t1, const PRM_Type &t2);
00310 inline const PRM_Type operator&(const PRM_Type &t1, const PRM_Type &t2);
00311 inline const PRM_Type operator~(const PRM_Type &t1);
00312 inline const PRM_Type PRM_STRIP_UI_TYPE(const PRM_Type &t1);
00313
00314
00315
00316
00317
00318 PRM_API extern const PRM_Type PRM_TYPE_ZERO;
00319 PRM_API extern const PRM_Type PRM_TYPE_ORDINAL;
00320 PRM_API extern const PRM_Type PRM_TYPE_FLOAT;
00321 PRM_API extern const PRM_Type PRM_TYPE_STRING;
00322 PRM_API extern const PRM_Type PRM_TYPE_BASIC_TYPE;
00323 PRM_API extern const PRM_Type PRM_TYPE_PALETTE;
00324 PRM_API extern const PRM_Type PRM_TYPE_INTEGER;
00325 PRM_API extern const PRM_Type PRM_TYPE_CHANNEL;
00326 PRM_API extern const PRM_Type PRM_TYPE_POLAR;
00327 PRM_API extern const PRM_Type PRM_TYPE_POLARJACK;
00328 PRM_API extern const PRM_Type PRM_TYPE_ANGLEJACK;
00329 PRM_API extern const PRM_Type PRM_TYPE_SPINNER;
00330 PRM_API extern const PRM_Type PRM_TYPE_RANGE;
00331 PRM_API extern const PRM_Type PRM_TYPE_HUECIRCLE;
00332 PRM_API extern const PRM_Type PRM_TYPE_GREYRANGE;
00333 PRM_API extern const PRM_Type PRM_TYPE_SLIDERFRACTION;
00334 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_RGBAX;
00335 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_R;
00336 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_G;
00337 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_B;
00338 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_A;
00339 PRM_API extern const PRM_Type PRM_TYPE_MINMAX_RGBA;
00340 PRM_API extern const PRM_Type PRM_TYPE_RAMPEDIT;
00341 PRM_API extern const PRM_Type PRM_TYPE_RGBA;
00342 PRM_API extern const PRM_Type PRM_TYPE_TOGGLE;
00343 PRM_API extern const PRM_Type PRM_TYPE_CALLBACK;
00344 PRM_API extern const PRM_Type PRM_TYPE_SWITCHERLIST;
00345 PRM_API extern const PRM_Type PRM_TYPE_RGBAMASK;
00346 PRM_API extern const PRM_Type PRM_TYPE_BUTTONSTRIP;
00347 PRM_API extern const PRM_Type PRM_TYPE_ICONSTRIP;
00348 PRM_API extern const PRM_Type PRM_TYPE_CMD;
00349 PRM_API extern const PRM_Type PRM_TYPE_PATH;
00350 PRM_API extern const PRM_Type PRM_TYPE_ALPHA;
00351 PRM_API extern const PRM_Type PRM_TYPE_OP_REF_LIST;
00352 PRM_API extern const PRM_Type PRM_TYPE_OP_REF_NAME;
00353 PRM_API extern const PRM_Type PRM_TYPE_OP_REF_DATA;
00354 PRM_API extern const PRM_Type PRM_TYPE_OP_REF_PARM;
00355 PRM_API extern const PRM_Type PRM_TYPE_OP_REF_CHILD;
00356 PRM_API extern const PRM_Type PRM_TYPE_OP_REF_MASK;
00357 PRM_API extern const PRM_Type PRM_TYPE_UNQUOTED;
00358 PRM_API extern const PRM_Type PRM_TYPE_LABEL;
00359 PRM_API extern const PRM_Type PRM_TYPE_SEPARATOR;
00360 PRM_API extern const PRM_Type PRM_TYPE_PIC;
00361 PRM_API extern const PRM_Type PRM_TYPE_GEO;
00362 PRM_API extern const PRM_Type PRM_TYPE_RAMP;
00363 PRM_API extern const PRM_Type PRM_TYPE_CAPT;
00364 PRM_API extern const PRM_Type PRM_TYPE_CLIP;
00365 PRM_API extern const PRM_Type PRM_TYPE_PAINT;
00366 PRM_API extern const PRM_Type PRM_TYPE_LUT;
00367 PRM_API extern const PRM_Type PRM_TYPE_CMDF;
00368 PRM_API extern const PRM_Type PRM_TYPE_MIDI;
00369 PRM_API extern const PRM_Type PRM_TYPE_TXT;
00370 PRM_API extern const PRM_Type PRM_TYPE_I3D;
00371 PRM_API extern const PRM_Type PRM_TYPE_CHAN;
00372 PRM_API extern const PRM_Type PRM_TYPE_SIM;
00373 PRM_API extern const PRM_Type PRM_TYPE_SIMDATA;
00374 PRM_API extern const PRM_Type PRM_TYPE_FILTERS;
00375 PRM_API extern const PRM_Type PRM_TYPE_NAMEXYZW;
00376 PRM_API extern const PRM_Type PRM_TYPE_NAMEUVW;
00377 PRM_API extern const PRM_Type PRM_TYPE_NAMERGB;
00378 PRM_API extern const PRM_Type PRM_TYPE_NAMEBEGINEND;
00379 PRM_API extern const PRM_Type PRM_TYPE_NAMEMAXMIN;
00380 PRM_API extern const PRM_Type PRM_TYPE_NAMEMINMAX;
00381 PRM_API extern const PRM_Type PRM_TYPE_NAMESTARTEND;
00382 PRM_API extern const PRM_Type PRM_TYPE_NAMEXYWH;
00383 PRM_API extern const PRM_Type PRM_TYPE_NAME;
00384 PRM_API extern const PRM_Type PRM_TYPE_NOREFRESH;
00385 PRM_API extern const PRM_Type PRM_TYPE_NORESIM;
00386 PRM_API extern const PRM_Type PRM_TYPE_NOCOOK;
00387 PRM_API extern const PRM_Type PRM_TYPE_INVISIBLE;
00388 PRM_API extern const PRM_Type PRM_TYPE_EXCLUSIVE;
00389 PRM_API extern const PRM_Type PRM_TYPE_JOIN_NEXT;
00390 PRM_API extern const PRM_Type PRM_TYPE_LABEL_NONE;
00391 PRM_API extern const PRM_Type PRM_TYPE_PLAIN;
00392 PRM_API extern const PRM_Type PRM_TYPE_BASEPARM;
00393
00394
00395 enum PRM_MultiType
00396 {
00397 PRM_MULTITYPE_LIST = 0x00000000,
00398 PRM_MULTITYPE_SCROLL = 0x00000001,
00399 PRM_MULTITYPE_SWITCHER = 0x00000002,
00400 PRM_MULTITYPE_NONE = 0x00000004,
00401
00402 PRM_MULTITYPE_RAMP_FLT = 0x00000008,
00403 PRM_MULTITYPE_RAMP_RGB = 0x00000010,
00404 PRM_MULTITYPE_RAMP_MASK = 0x00000018,
00405
00406 PRM_MULTITYPE_TYPEMASK = 0x0FFFFFFF,
00407
00408
00409 PRM_MULTITYPE_NO_CONTROL_UI = 0x10000000
00410 };
00411
00412 enum PRM_RampInterpType {
00413 PRM_RAMP_INTERP_INVALID = -1,
00414 PRM_RAMP_INTERP_CONSTANT = 0,
00415 PRM_RAMP_INTERP_LINEAR,
00416 PRM_RAMP_INTERP_CATMULLROM,
00417 PRM_RAMP_INTERP_MONOTONECUBIC,
00418 PRM_RAMP_INTERP_ITEMS
00419 };
00420 PRM_API UT_SPLINE_BASIS PRMgetRampBasis(int ramp_interp);
00421 PRM_API PRM_RampInterpType PRMgetRampInterp(UT_SPLINE_BASIS basis);
00422
00423 PRM_API const char * PRMgetRampInterpToken(PRM_RampInterpType interp);
00424 PRM_API PRM_RampInterpType PRMgetRampInterpType(const char *token);
00425
00426 class PRM_ChoiceList;
00427 PRM_API PRM_ChoiceList * PRMgetRampInterpMenu();
00428
00429
00430
00431 class PRM_Template;
00432 PRM_API PRM_Template *PRMgetRampTemplate(const char *parent_token,
00433 PRM_MultiType multi_type,
00434 const PRM_SpareData *parent_spare,
00435 PRM_Callback callback);
00436
00437
00438
00439 enum PRM_RampParmIndex
00440 {
00441 PRM_RAMP_PARM_POS,
00442 PRM_RAMP_PARM_VAL,
00443 PRM_RAMP_PARM_INTERP,
00444 PRM_RAMP_NUM_PARMS
00445 };
00446
00447
00448 PRM_API void PRMgetRampChannelToken(const char *parent_token,
00449 PRM_MultiType multi_type,
00450 PRM_RampParmIndex i,
00451 int sub_idx,
00452 UT_String &token);
00453 PRM_API int PRMgetRampChannelCount(PRM_MultiType multi_type,
00454 PRM_RampParmIndex i);
00455
00456
00457
00458
00459
00460
00461 PRM_API void PRMgetRampParmPrefix(const char *parent_token, UT_String &prefix);
00462
00463
00464
00465
00466
00467
00468
00469 enum PRM_TypeExtended
00470 {
00471 PRM_TYPE_NONE,
00472 PRM_TYPE_TOGGLE_JOIN,
00473 PRM_TYPE_JOIN_PAIR,
00474 PRM_TYPE_VEC_SWITCHER,
00475 PRM_TYPE_NO_LABEL,
00476 PRM_TYPE_MINI_MENU,
00477 PRM_TYPE_JUMP_REFERENCE,
00478 PRM_TYPE_NET_REFERENCE,
00479 PRM_TYPE_WIDE_STRING,
00480 PRM_TYPE_COP_CHROMAKEY,
00481 PRM_TYPE_COP_VIDEOKEY,
00482 PRM_TYPE_COP_TEXMAP,
00483 PRM_TYPE_COP_CORNERPIN,
00484 PRM_TYPE_COP_CROP,
00485 PRM_TYPE_COP_SCALE,
00486 PRM_TYPE_COP_SEQUENCE,
00487 PRM_TYPE_SHOP_PATH,
00488 PRM_TYPE_DYNAMIC_PATH,
00489 PRM_TYPE_DYNAMIC_PATH_LIST,
00490 PRM_TYPE_LOGARITHMIC,
00491 PRM_TYPE_FULL_JUMP_REFERENCE,
00492 PRM_TYPE_MATRIX_ROW,
00493 PRM_TYPE_IMAGE_FORMAT_1,
00494 PRM_TYPE_IMAGE_FORMAT_2,
00495 PRM_TYPE_MENU_JOIN,
00496 PRM_TYPE_IMAGE_OPTIONS,
00497 PRM_TYPE_IMAGE_RGBA_OPTIONS
00498
00499
00500
00501
00502
00503
00504
00505 };
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520 PRM_API extern const PRM_Type PRM_LIST_TERMINATOR;
00521
00522 PRM_API extern const PRM_Type PRM_SWITCHER;
00523
00524 PRM_API extern const PRM_Type PRM_SWITCHER_EXCLUSIVE;
00525
00526 PRM_API extern const PRM_Type PRM_SWITCHER_REFRESH;
00527
00528 PRM_API extern const PRM_Type PRM_FLT_E;
00529
00530 PRM_API extern const PRM_Type PRM_FLT;
00531 PRM_API extern const PRM_Type PRM_FLT_J;
00532
00533 PRM_API extern const PRM_Type PRM_XYZ_E;
00534
00535 PRM_API extern const PRM_Type PRM_XYZ;
00536 PRM_API extern const PRM_Type PRM_XYZ_J;
00537
00538 PRM_API extern const PRM_Type PRM_UVW_E;
00539
00540 PRM_API extern const PRM_Type PRM_UVW;
00541 PRM_API extern const PRM_Type PRM_UVW_J;
00542
00543 PRM_API extern const PRM_Type PRM_RGB_E;
00544
00545 PRM_API extern const PRM_Type PRM_RGB;
00546 PRM_API extern const PRM_Type PRM_RGB_J;
00547
00548 PRM_API extern const PRM_Type PRM_RGBA_E;
00549
00550 PRM_API extern const PRM_Type PRM_RGBA;
00551 PRM_API extern const PRM_Type PRM_RGBA_J;
00552
00553 PRM_API extern const PRM_Type PRM_BEGINEND_E;
00554
00555 PRM_API extern const PRM_Type PRM_BEGINEND;
00556 PRM_API extern const PRM_Type PRM_BEGINEND_J;
00557
00558 PRM_API extern const PRM_Type PRM_STARTEND_E;
00559
00560 PRM_API extern const PRM_Type PRM_STARTEND;
00561 PRM_API extern const PRM_Type PRM_STARTEND_J;
00562
00563 PRM_API extern const PRM_Type PRM_INT_E;
00564
00565 PRM_API extern const PRM_Type PRM_INT;
00566 PRM_API extern const PRM_Type PRM_INT_J;
00567
00568 PRM_API extern const PRM_Type PRM_INT_XYZ_E;
00569
00570 PRM_API extern const PRM_Type PRM_INT_XYZ;
00571 PRM_API extern const PRM_Type PRM_INT_XYZ_J;
00572
00573 PRM_API extern const PRM_Type PRM_FLT_MINMAX_E;
00574
00575 PRM_API extern const PRM_Type PRM_FLT_MINMAX;
00576 PRM_API extern const PRM_Type PRM_FLT_MINMAX_J;
00577
00578 PRM_API extern const PRM_Type PRM_INT_MINMAX_E;
00579
00580 PRM_API extern const PRM_Type PRM_INT_MINMAX;
00581 PRM_API extern const PRM_Type PRM_INT_MINMAX_J;
00582
00583 PRM_API extern const PRM_Type PRM_INT_STARTEND_E;
00584
00585 PRM_API extern const PRM_Type PRM_INT_STARTEND;
00586 PRM_API extern const PRM_Type PRM_INT_STARTEND_J;
00587
00588 PRM_API extern const PRM_Type PRM_FLT_RAMPEDIT;
00589
00590 PRM_API extern const PRM_Type PRM_TOGGLE_E;
00591
00592 PRM_API extern const PRM_Type PRM_TOGGLE;
00593 PRM_API extern const PRM_Type PRM_TOGGLE_J;
00594
00595 PRM_API extern const PRM_Type PRM_COMMAND;
00596
00597 PRM_API extern const PRM_Type PRM_FILE_E;
00598
00599 PRM_API extern const PRM_Type PRM_FILE;
00600
00601 PRM_API extern const PRM_Type PRM_PICFILE_E;
00602
00603 PRM_API extern const PRM_Type PRM_PICFILE;
00604
00605 PRM_API extern const PRM_Type PRM_GEOFILE_E;
00606
00607 PRM_API extern const PRM_Type PRM_GEOFILE;
00608
00609 PRM_API extern const PRM_Type PRM_CAPTFILE_E;
00610
00611 PRM_API extern const PRM_Type PRM_CAPTFILE;
00612
00613 PRM_API extern const PRM_Type PRM_RAMPFILE_E;
00614
00615 PRM_API extern const PRM_Type PRM_RAMPFILE;
00616
00617 PRM_API extern const PRM_Type PRM_CLIPFILE_E;
00618
00619 PRM_API extern const PRM_Type PRM_CLIPFILE;
00620
00621 PRM_API extern const PRM_Type PRM_PAINTFILE_E;
00622
00623 PRM_API extern const PRM_Type PRM_PAINTFILE;
00624
00625 PRM_API extern const PRM_Type PRM_LUTFILE_E;
00626
00627 PRM_API extern const PRM_Type PRM_LUTFILE;
00628
00629 PRM_API extern const PRM_Type PRM_CMDFILE_E;
00630
00631 PRM_API extern const PRM_Type PRM_CMDFILE;
00632
00633 PRM_API extern const PRM_Type PRM_MIDIFILE_E;
00634
00635 PRM_API extern const PRM_Type PRM_MIDIFILE;
00636
00637 PRM_API extern const PRM_Type PRM_TXTFILE_E;
00638
00639 PRM_API extern const PRM_Type PRM_TXTFILE;
00640
00641 PRM_API extern const PRM_Type PRM_I3DFILE_E;
00642
00643 PRM_API extern const PRM_Type PRM_I3DFILE;
00644
00645 PRM_API extern const PRM_Type PRM_CHANFILE_E;
00646
00647 PRM_API extern const PRM_Type PRM_CHANFILE;
00648
00649 PRM_API extern const PRM_Type PRM_SIMFILE_E;
00650
00651 PRM_API extern const PRM_Type PRM_SIMFILE;
00652
00653 PRM_API extern const PRM_Type PRM_SIMDATAFILE_E;
00654
00655 PRM_API extern const PRM_Type PRM_SIMDATAFILE;
00656
00657 PRM_API extern const PRM_Type PRM_STRING_E;
00658
00659 PRM_API extern const PRM_Type PRM_STRING;
00660
00661 PRM_API extern const PRM_Type PRM_ALPHASTRING;
00662
00663 PRM_API extern const PRM_Type PRM_STRING_OPLIST;
00664
00665 PRM_API extern const PRM_Type PRM_STRING_OPREF;
00666
00667 PRM_API extern const PRM_Type PRM_STRING_OPREF_CHILD;
00668
00669 PRM_API extern const PRM_Type PRM_ORD_E;
00670
00671 PRM_API extern const PRM_Type PRM_ORD;
00672 PRM_API extern const PRM_Type PRM_ORD_J;
00673
00674 PRM_API extern const PRM_Type PRM_POLAR;
00675
00676 PRM_API extern const PRM_Type PRM_ANGLE_E;
00677
00678 PRM_API extern const PRM_Type PRM_ANGLE;
00679 PRM_API extern const PRM_Type PRM_ANGLE_J;
00680
00681 PRM_API extern const PRM_Type PRM_ANGLEXYZ_E;
00682
00683 PRM_API extern const PRM_Type PRM_ANGLEXYZ;
00684 PRM_API extern const PRM_Type PRM_ANGLEXYZ_J;
00685
00686 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX_E;
00687
00688 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX;
00689 PRM_API extern const PRM_Type PRM_ANGLE_MINMAX_J;
00690
00691 PRM_API extern const PRM_Type PRM_POLARJACK;
00692
00693 PRM_API extern const PRM_Type PRM_INT_SPINNER;
00694
00695 PRM_API extern const PRM_Type PRM_SPINNER;
00696
00697
00698 PRM_API extern const PRM_Type PRM_RANGE;
00699
00700 PRM_API extern const PRM_Type PRM_HUECIRCLE;
00701
00702 PRM_API extern const PRM_Type PRM_PALETTE;
00703
00704 PRM_API extern const PRM_Type PRM_GREYRANGE;
00705
00706 PRM_API extern const PRM_Type PRM_DIRECTION;
00707
00708 PRM_API extern const PRM_Type PRM_DIRECTION_E;
00709 PRM_API extern const PRM_Type PRM_DIRECTION_NOJ;
00710
00711 PRM_API extern const PRM_Type PRM_CALLBACK;
00712
00713
00714 PRM_API extern const PRM_Type PRM_CALLBACK_NOREFRESH;
00715
00716 PRM_API extern const PRM_Type PRM_RGBAMASK;
00717
00718 PRM_API extern const PRM_Type PRM_BUTTONSTRIP;
00719
00720 PRM_API extern const PRM_Type PRM_ICONSTRIP;
00721
00722 PRM_API extern const PRM_Type PRM_MINMAX_R;
00723
00724 PRM_API extern const PRM_Type PRM_MINMAX_G;
00725
00726 PRM_API extern const PRM_Type PRM_MINMAX_B;
00727
00728 PRM_API extern const PRM_Type PRM_MINMAX_A;
00729
00730 PRM_API extern const PRM_Type PRM_MINMAX_RGBA;
00731
00732 PRM_API extern const PRM_Type PRM_LABEL;
00733
00734 PRM_API extern const PRM_Type PRM_SEPARATOR;
00735
00736 PRM_API extern const PRM_Type PRM_HEADING;
00737
00738 PRM_API extern const PRM_Type PRM_JOINED_TOGGLE;
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799 inline void
00800 PRM_Type::init()
00801 {
00802 myBasicType = PRM_BASIC_NONE;
00803 myFloatType = PRM_FLOAT_NONE;
00804 myOrdinalType = PRM_ORD_NONE;
00805 myStringType = PRM_STR_NONE;
00806 myPathType = PRM_PATH_NONE;
00807 myChannelType = PRM_CHAN_NONE;
00808 myInterfaceType = PRM_INTERFACE_NONE;
00809 myBehaviorType = PRM_BEHAVIOR_NONE;
00810 }
00811 inline
00812 PRM_Type::PRM_Type()
00813 {
00814 init();
00815 }
00816
00817 inline
00818 PRM_Type::PRM_Type(const PRM_Type &t)
00819 {
00820 *this = t;
00821 }
00822
00823 inline
00824 PRM_Type::PRM_Type(const PRM_BasicType &bt)
00825 {
00826 init();
00827 myBasicType = bt;
00828 }
00829
00830 inline
00831 PRM_Type::PRM_Type(const PRM_FloatType &at)
00832 {
00833 init();
00834 myFloatType = at;
00835 }
00836
00837 inline
00838 PRM_Type::PRM_Type(const PRM_OrdinalType &ot)
00839 {
00840 init();
00841 myOrdinalType = ot;
00842 }
00843
00844 inline
00845 PRM_Type::PRM_Type(const PRM_StringType &st)
00846 {
00847 init();
00848 myStringType = st;
00849 }
00850
00851 inline
00852 PRM_Type::PRM_Type(const PRM_PathType &pt)
00853 {
00854 init();
00855 myPathType = pt;
00856 }
00857
00858 inline
00859 PRM_Type::PRM_Type(const PRM_ChannelType &ct)
00860 {
00861 init();
00862 myChannelType = ct;
00863 }
00864
00865 inline
00866 PRM_Type::PRM_Type(const PRM_InterfaceType &it)
00867 {
00868 init();
00869 myInterfaceType = it;
00870 }
00871
00872 inline
00873 PRM_Type::PRM_Type(const PRM_BehaviorType &vt)
00874 {
00875 init();
00876 myBehaviorType = vt;
00877 }
00878
00879 inline
00880 PRM_Type::PRM_Type(const PRM_BasicType &bt,
00881 const PRM_FloatType &at,
00882 const PRM_OrdinalType &ot,
00883 const PRM_StringType &st,
00884 const PRM_PathType &pt,
00885 const PRM_ChannelType &ct,
00886 const PRM_InterfaceType &it,
00887 const PRM_BehaviorType &vt)
00888 : myBasicType(bt),
00889 myFloatType(at),
00890 myOrdinalType(ot),
00891 myStringType(st),
00892 myPathType(pt),
00893 myChannelType(ct),
00894 myInterfaceType(it),
00895 myBehaviorType(vt)
00896 {
00897 }
00898
00899 inline const PRM_Type &
00900 PRM_Type::operator=(const PRM_Type &t)
00901 {
00902 myBasicType = t.myBasicType;
00903 myFloatType = t.myFloatType;
00904 myOrdinalType = t.myOrdinalType;
00905 myStringType = t.myStringType;
00906 myPathType = t.myPathType;
00907 myChannelType = t.myChannelType;
00908 myInterfaceType = t.myInterfaceType;
00909 myBehaviorType = t.myBehaviorType;
00910
00911 return *this;
00912 }
00913
00914 inline bool
00915 PRM_Type::operator==(const PRM_Type &t) const
00916 {
00917 return (myBasicType == t.myBasicType &&
00918 myFloatType == t.myFloatType &&
00919 myOrdinalType == t.myOrdinalType &&
00920 myStringType == t.myStringType &&
00921 myPathType == t.myPathType &&
00922 myChannelType == t.myChannelType &&
00923 myInterfaceType == t.myInterfaceType &&
00924 myBehaviorType == t.myBehaviorType);
00925 }
00926
00927 inline bool
00928 PRM_Type::operator!=(const PRM_Type &t) const
00929 {
00930 return !(*this == t);
00931 }
00932
00933 inline
00934 PRM_Type::operator bool() const
00935 {
00936 return (myBasicType != PRM_BASIC_NONE ||
00937 myFloatType != PRM_FLOAT_NONE ||
00938 myOrdinalType != PRM_ORD_NONE ||
00939 myStringType != PRM_STR_NONE ||
00940 myPathType != PRM_PATH_NONE ||
00941 myChannelType != PRM_CHAN_NONE ||
00942 myInterfaceType != PRM_INTERFACE_NONE ||
00943 myBehaviorType != PRM_BEHAVIOR_NONE);
00944 }
00945
00946 inline void
00947 PRM_Type::operator|=(const PRM_Type &t)
00948 {
00949 myBasicType = PRM_BasicType(myBasicType | t.myBasicType);
00950 myFloatType = PRM_FloatType(myFloatType | t.myFloatType);
00951 myOrdinalType = PRM_OrdinalType(myOrdinalType | t.myOrdinalType);
00952 myStringType = PRM_StringType(myStringType | t.myStringType);
00953 myPathType = PRM_PathType(myPathType | t.myPathType);
00954 myChannelType = PRM_ChannelType(myChannelType | t.myChannelType);
00955 myInterfaceType = PRM_InterfaceType(myInterfaceType | t.myInterfaceType);
00956 myBehaviorType = PRM_BehaviorType(myBehaviorType | t.myBehaviorType);
00957 }
00958
00959 inline void
00960 PRM_Type::operator&=(const PRM_Type &t)
00961 {
00962 myBasicType = PRM_BasicType(myBasicType & t.myBasicType);
00963 myFloatType = PRM_FloatType(myFloatType & t.myFloatType);
00964 myOrdinalType = PRM_OrdinalType(myOrdinalType & t.myOrdinalType);
00965 myStringType = PRM_StringType(myStringType & t.myStringType);
00966 myPathType = PRM_PathType(myPathType & t.myPathType);
00967 myChannelType = PRM_ChannelType(myChannelType & t.myChannelType);
00968 myInterfaceType = PRM_InterfaceType(myInterfaceType & t.myInterfaceType);
00969 myBehaviorType = PRM_BehaviorType(myBehaviorType & t.myBehaviorType);
00970 }
00971
00972 inline void
00973 PRM_Type::invert()
00974 {
00975 myBasicType = PRM_BasicType(~myBasicType);
00976 myFloatType = PRM_FloatType(~myFloatType);
00977 myOrdinalType = PRM_OrdinalType(~myOrdinalType);
00978 myStringType = PRM_StringType(~myStringType);
00979 myPathType = PRM_PathType(~myPathType);
00980 myChannelType = PRM_ChannelType(~myChannelType);
00981 myInterfaceType = PRM_InterfaceType(~myInterfaceType);
00982 myBehaviorType = PRM_BehaviorType(~myBehaviorType);
00983 }
00984
00985 inline void
00986 PRM_Type::stripUiType()
00987 {
00988 myInterfaceType = PRM_INTERFACE_NONE;
00989 myBehaviorType = PRM_BEHAVIOR_NONE;
00990 }
00991
00992 inline bool
00993 PRM_Type::isBasicType(const PRM_BasicType &t) const
00994 {
00995 return (myBasicType == t);
00996 }
00997
00998 inline bool
00999 PRM_Type::isChannelType(const PRM_ChannelType &t) const
01000 {
01001 return (myChannelType == t);
01002 }
01003
01004 inline bool
01005 PRM_Type::hasFloatType(const PRM_FloatType &mask) const
01006 {
01007 return ((myFloatType & mask) != 0);
01008 }
01009
01010 inline bool
01011 PRM_Type::hasOrdinalType(const PRM_OrdinalType &mask) const
01012 {
01013 return ((myOrdinalType & mask) != 0);
01014 }
01015
01016 inline bool
01017 PRM_Type::hasStringType(const PRM_StringType &mask) const
01018 {
01019 return ((myStringType & mask) != 0);
01020 }
01021
01022 inline bool
01023 PRM_Type::hasPathType(const PRM_PathType &mask) const
01024 {
01025 return ((myPathType & mask) != 0);
01026 }
01027
01028 inline bool
01029 PRM_Type::hasInterfaceType(const PRM_InterfaceType &mask) const
01030 {
01031 return ((myInterfaceType & mask) != 0);
01032 }
01033
01034 inline bool
01035 PRM_Type::hasBehaviorType(const PRM_BehaviorType &mask) const
01036 {
01037 return ((myBehaviorType & mask) != 0);
01038 }
01039
01040 inline const PRM_Type::PRM_BasicType &
01041 PRM_Type::getBasicType() const
01042 {
01043 return myBasicType;
01044 }
01045
01046 inline const PRM_Type::PRM_FloatType &
01047 PRM_Type::getFloatType() const
01048 {
01049 return myFloatType;
01050 }
01051
01052 inline const PRM_Type::PRM_OrdinalType &
01053 PRM_Type::getOrdinalType() const
01054 {
01055 return myOrdinalType;
01056 }
01057
01058 inline const PRM_Type::PRM_StringType &
01059 PRM_Type::getStringType() const
01060 {
01061 return myStringType;
01062 }
01063
01064 inline const PRM_Type::PRM_PathType &
01065 PRM_Type::getPathType() const
01066 {
01067 return myPathType;
01068 }
01069
01070 inline const PRM_Type::PRM_ChannelType &
01071 PRM_Type::getChannelType() const
01072 {
01073 return myChannelType;
01074 }
01075
01076 inline const PRM_Type::PRM_InterfaceType &
01077 PRM_Type::getInterfaceType() const
01078 {
01079 return myInterfaceType;
01080 }
01081
01082 inline const PRM_Type::PRM_BehaviorType &
01083 PRM_Type::getBehaviorType() const
01084 {
01085 return myBehaviorType;
01086 }
01087
01088 inline const PRM_Type
01089 operator|(const PRM_Type &t1, const PRM_Type &t2)
01090 {
01091 return PRM_Type(
01092 PRM_Type::PRM_BasicType(t1.myBasicType | t2.myBasicType),
01093 PRM_Type::PRM_FloatType(t1.myFloatType | t2.myFloatType),
01094 PRM_Type::PRM_OrdinalType(t1.myOrdinalType | t2.myOrdinalType),
01095 PRM_Type::PRM_StringType(t1.myStringType | t2.myStringType),
01096 PRM_Type::PRM_PathType(t1.myPathType | t2.myPathType),
01097 PRM_Type::PRM_ChannelType(t1.myChannelType | t2.myChannelType),
01098 PRM_Type::PRM_InterfaceType(t1.myInterfaceType | t2.myInterfaceType),
01099 PRM_Type::PRM_BehaviorType(t1.myBehaviorType | t2.myBehaviorType));
01100 }
01101
01102 inline const PRM_Type
01103 operator&(const PRM_Type &t1, const PRM_Type &t2)
01104 {
01105 return PRM_Type(
01106 PRM_Type::PRM_BasicType(t1.myBasicType & t2.myBasicType),
01107 PRM_Type::PRM_FloatType(t1.myFloatType & t2.myFloatType),
01108 PRM_Type::PRM_OrdinalType(t1.myOrdinalType & t2.myOrdinalType),
01109 PRM_Type::PRM_StringType(t1.myStringType & t2.myStringType),
01110 PRM_Type::PRM_PathType(t1.myPathType & t2.myPathType),
01111 PRM_Type::PRM_ChannelType(t1.myChannelType & t2.myChannelType),
01112 PRM_Type::PRM_InterfaceType(t1.myInterfaceType & t2.myInterfaceType),
01113 PRM_Type::PRM_BehaviorType(t1.myBehaviorType & t2.myBehaviorType));
01114 }
01115
01116 inline const PRM_Type
01117 operator~(const PRM_Type &t1)
01118 {
01119 return PRM_Type(
01120 PRM_Type::PRM_BasicType(~t1.myBasicType),
01121 PRM_Type::PRM_FloatType(~t1.myFloatType),
01122 PRM_Type::PRM_OrdinalType(~t1.myOrdinalType),
01123 PRM_Type::PRM_StringType(~t1.myStringType),
01124 PRM_Type::PRM_PathType(~t1.myPathType),
01125 PRM_Type::PRM_ChannelType(~t1.myChannelType),
01126 PRM_Type::PRM_InterfaceType(~t1.myInterfaceType),
01127 PRM_Type::PRM_BehaviorType(~t1.myBehaviorType));
01128 }
01129
01130 inline const PRM_Type
01131 PRM_STRIP_UI_TYPE(const PRM_Type &t1)
01132 {
01133 return PRM_Type(t1.myBasicType,
01134 t1.myFloatType,
01135 t1.myOrdinalType,
01136 t1.myStringType,
01137 t1.myPathType,
01138 t1.myChannelType,
01139 PRM_Type::PRM_INTERFACE_NONE,
01140 PRM_Type::PRM_BEHAVIOR_NONE);
01141 }
01142
01143 #endif