13 #ifndef __PRM_ScriptParm__
14 #define __PRM_ScriptParm__
35 bool asmultiparm =
false);
39 { myPages.append(page); }
42 {
return myPages.entries(); }
44 {
return myPages(idx); }
48 if (!mySizes) buildSizes();
53 {
return myMultiParmFlag; }
56 {
return myMultiType; }
58 { myMultiType = multitype; }
60 int computeTemplateSize();
68 if (!myGroupConditional)
70 return myGroupConditional;
77 void buildConditionals();
93 PRM_SPARM_REQUIRED = 0x001,
94 PRM_SPARM_DIRECTION = 0x002,
95 PRM_SPARM_COLOR = 0x004,
96 PRM_SPARM_OBJECT = 0x008,
97 PRM_SPARM_RENDERER = 0x010,
98 PRM_SPARM_ANIMSTRING = 0x020,
99 PRM_SPARM_OBJECTLIST = 0x040,
100 PRM_SPARM_EMBED = 0x080,
101 PRM_SPARM_LOGARITHMIC = 0x100,
102 PRM_SPARM_OBSOLETE = 0x200,
103 PRM_SPARM_EXPERIMENTAL = 0x400,
104 PRM_SPARM_ALLFLAGS = 0x7FF
107 int parse(
DS_Stream &is,
int multiparm_depth);
110 const char *grouptype,
111 int multiparm_depth);
115 int multiparm_depth);
119 void appendScriptParms(
122 void setFlag(
unsigned flag) { myFlag |= flag; }
124 unsigned getFlag(
unsigned bit)
const {
return myFlag & bit;}
133 {
return myDefaults.entries() ? &myDefaults(0)
136 {
return myDefaults.entries() ? &myDefaults(0)
154 bool clearJoinNext();
157 void enforceOptions();
163 static const char *protectString(
164 const char *
s,
int handlenull=0);
165 static const char *protectString(
166 const char *
s,
int handlenull,
167 bool wrap_in_quotes);
168 static void protectStrcat(
171 static void protectStrcat(
173 int handlenull,
bool wrap_in_quotes);
175 int computeTemplateSize();
180 static bool parseConditional(
DS_Stream &is,
183 static void registerDefaultScriptCallback(
PRM_Callback cb);
193 virtual bool wantsParametersAnimatable()
const;
194 int buildMultiParmTemplate(
200 int parseDefaults(
DS_Stream &is,
int isstring);
202 void clearDefaults();
204 static bool parseConditionalInfo(
DS_Stream &is,
231 static const char *theTokens[];
232 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
const UT_String & getHelpText() const
PRM_ConditionalSwitcher * getGroupConditional()
PRM_MultiType getMultiType() const
PRM_MultiType myMultiType
PRM_Default * getDefaults()
PRM_ConditionalGroup myConditionalGroup
PRM_ConditionalSwitcher * myGroupConditional
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
void addPage(PRM_ScriptPage *page)
PRM_SpareData * mySpareData
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.
PRM_ScriptGroup * getGroup() const