13 #ifndef __PRM_ScriptParm__
14 #define __PRM_ScriptParm__
37 bool asmultiparm =
false);
43 { myPages.append(page); }
46 {
return myPages.entries(); }
48 {
return myPages(idx); }
52 if (!mySizes) buildSizes();
57 {
return myMultiParmFlag; }
60 {
return myMultiType; }
62 { myMultiType = multitype; }
64 int computeTemplateSize();
72 if (!myGroupConditional)
74 return myGroupConditional;
81 void buildConditionals();
101 PRM_SPARM_REQUIRED = 0x001,
102 PRM_SPARM_DIRECTION = 0x002,
103 PRM_SPARM_COLOR = 0x004,
104 PRM_SPARM_OBJECT = 0x008,
105 PRM_SPARM_RENDERER = 0x010,
106 PRM_SPARM_ANIMSTRING = 0x020,
107 PRM_SPARM_OBJECTLIST = 0x040,
108 PRM_SPARM_EMBED = 0x080,
109 PRM_SPARM_LOGARITHMIC = 0x100,
110 PRM_SPARM_OBSOLETE = 0x200,
111 PRM_SPARM_EXPERIMENTAL = 0x400,
112 PRM_SPARM_ALLFLAGS = 0x7FF
115 int parse(
DS_Stream &is,
int multiparm_depth);
118 const char *grouptype,
119 int multiparm_depth);
123 int multiparm_depth);
127 void appendScriptParms(
130 void setFlag(
unsigned flag) { myFlag |= flag; }
132 unsigned getFlag(
unsigned bit)
const {
return myFlag & bit;}
141 {
return myDefaults.entries() ? &myDefaults(0)
144 {
return myDefaults.entries() ? &myDefaults(0)
162 bool clearJoinNext();
165 void enforceOptions();
171 static const char *protectString(
172 const char *
s,
int handlenull=0);
173 static const char *protectString(
174 const char *
s,
int handlenull,
175 bool wrap_in_quotes);
176 static void protectStrcat(
179 static void protectStrcat(
181 int handlenull,
bool wrap_in_quotes);
183 int computeTemplateSize();
188 static bool parseConditional(
DS_Stream &is,
191 static void registerDefaultScriptCallback(
PRM_Callback cb);
201 virtual bool wantsParametersAnimatable()
const;
202 int buildMultiParmTemplate(
208 int parseDefaults(
DS_Stream &is,
int isstring);
210 void clearDefaults();
212 static bool parseConditionalInfo(
DS_Stream &is,
239 static const char *theTokens[];
240 static int theNumParms[];
const UT_String & getOption() const
unsigned getFlag(unsigned bit) const
PRM_ScriptPage * getPage(int idx)
void clearFlag(unsigned flag)
bool hasObsoleteGroup() const
PRM_Default * getDefaults()
const PRM_Default * getDefaults() const
PRM_Template * myMultiTemplate
PRM_MultiType getMultiType() const
UT_Array< PRM_Default > myDefaults
const PRM_Type & getType() const
PRM_TypeExtended myTypeExtended
PRM_Range * getRange() const
PRM_MultiType myMultiType
void setMultiType(PRM_MultiType multitype)
void setFlag(unsigned flag)
PRM_ConditionalGroup & getConditionalGroup()
UT_ValArray< PRM_ScriptPage * > myPages
PRM_TypeExtended getTypeExtended() const
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
const UT_String & getHelpText() const
PRM_ConditionalSwitcher * getGroupConditional()
PRM_MultiType getMultiType() const
PRM_MultiType myMultiType
PRM_Default * getDefaults()
PRM_ConditionalGroup myConditionalGroup
PRM_ConditionalSwitcher * myGroupConditional
GA_API const UT_StringHolder parms
This class allow setting multiple conditionals for a PRM_Template.
PRM_ScriptGroup * myGroup
PRM_ChoiceList * getMenu() const
UT_StringArray myDefaultStrings
const PRM_Name & getName() const
PRM_ScriptGroup * myObsoleteGroup
PRM_SpareData * mySpareData
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.
PRM_ScriptGroup * getGroup() const