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