12 #ifndef __DS_ParmReader__
13 #define __DS_ParmReader__
52 int copy(
const char *sp[],
64 const char *
getString(
int idx)
const {
return myStrings[idx]; }
66 {
return myStringMeanings[idx]; }
90 if ( value ) myValue = ::strdup( value );
91 if ( label ) myLabel = ::strdup( label );
95 if ( myValue ) ::free( myValue );
96 if ( myLabel ) ::free( myLabel );
99 const char *
getValue()
const {
return myValue; }
110 : myToken(0), myValue(0)
112 if (token) myToken = ::strdup(token);
113 if (value) myValue = ::strdup(value);
117 if (myToken) ::free(myToken);
118 if (myValue) ::free(myValue);
132 const char *desc,
const char *
label,
133 const char *default_settings)
134 : myChannelName(0), myType(0), myDesc(0), myLabel(0)
136 if (channelname) myChannelName = ::strdup(channelname);
137 if (type) myType = ::strdup(type);
138 if (desc) myDesc = ::strdup(desc);
139 if (label) myLabel = ::strdup(label);
140 if (default_settings)
141 myDefaultSettings = ::strdup(default_settings);
145 if (myChannelName) ::free(myChannelName);
146 if (myType) ::free(myType);
147 if (myDesc) ::free(myDesc);
148 if (myLabel) ::free(myLabel);
149 if (myDefaultSettings) ::free(myDefaultSettings);
153 const char *
getType()
const {
return myType; }
154 const char *
getDesc()
const {
return myDesc; }
159 char *myChannelName, *myType, *myDesc, *myLabel, *myDefaultSettings;
165 const char *
type,
const char *prompt,
const char *desc,
166 const char *
mask,
int dragging,
167 const char *menu,
int asterisk,
168 int input_index=-1,
int input_required=0)
169 : myParmName(0), myType(0), myDesc(0), myPrompt(0), myMask(0), myMenu(0)
171 myDragging = dragging;
172 myAsterisk = asterisk;
173 myInputIndex = input_index;
174 myInputRequired = input_required;
175 if (parm_name) myParmName = ::strdup(parm_name);
176 if (type) myType = ::strdup(type);
177 if (prompt) myPrompt = ::strdup(prompt);
178 if (desc) myDesc = ::strdup(desc);
179 if (mask) myMask = ::strdup(mask);
180 if (menu) myMenu = ::strdup(menu);
184 if (myParmName) ::free(myParmName);
185 if (myType) ::free(myType);
186 if (myPrompt) ::free(myPrompt);
187 if (myDesc) ::free(myDesc);
188 if (myMenu) ::free(myMenu);
189 if (myMask) ::free(myMask);
193 const char *
getType()
const {
return myType; }
195 const char *
getDesc()
const {
return myDesc; }
198 const char *
getMenu()
const {
return myMenu; }
204 char *myParmName, *myType, *myPrompt, *myDesc, *myMask, *myMenu;
205 int myDragging, myAsterisk;
206 int myInputIndex, myInputRequired;
216 { myControlParm.append( ::strdup(parm) );
217 myControlValue.append( ::strdup(value) ); }
237 void addHelpText(
const char *text);
267 bool setTypeByToken(
const char *token );
268 const char *getTypeToken()
const;
271 bool isInvisible()
const;
273 void setLogarithmic(
bool flag);
274 bool isLogarithmic()
const;
280 void setFlag(
unsigned flag ) { myFlag |= flag; }
281 void clearFlag(
unsigned flag = (
unsigned)-1 ){ myFlag &= ~flag; }
282 unsigned getFlag(
unsigned flag )
const {
return myFlag & flag; }
298 unsigned lightChan = 1 );
301 virtual const char *getClassName()
const;
305 virtual int open(
const char *fileName ) = 0;
306 virtual void close() = 0;
312 virtual int parse() = 0;
318 virtual const char *getScriptTypeName() = 0;
319 virtual const char *getScriptName() = 0;
320 virtual const char *getScriptLabel() = 0;
321 virtual const char *getScriptHelp() = 0;
322 virtual const char *getScriptInfo() = 0;
DS_SelectorList myReservedSelectors
DS_HandleList myBoundHandles
DS_DefaultValue * myDefault
void setFlag(unsigned flag)
virtual const char * getRenderMask()
fpreal * getFloat() const
const char * getPrimMask() const
GLuint GLsizei const GLchar * label
DS_SelectorBinding * mySelector
void clearFlag(unsigned flag=(unsigned)-1)
DS_HandleList & getBoundHandles()
const char * getValue() const
UT_String myRenderManType
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
int getInputRequired() const
const char * getDesc() const
DS_AttributeValue(const char *token, const char *value)
const char * getMenu() const
const char * getPrompt() const
DS_SelectorList myUnboundSelectors
DS_SelectorBinding(const char *parm_name, const char *type, const char *prompt, const char *desc, const char *mask, int dragging, const char *menu, int asterisk, int input_index=-1, int input_required=0)
DS_SelectorList & getUnboundSelectors()
const char * getParmName() const
UT_ValArray< DS_SelectorBinding * > DS_SelectorList
PRM_MultiType myMultiType
DS_HandleBinding(const char *channelname, const char *type, const char *desc, const char *label, const char *default_settings)
UT_ValArray< DS_MenuChoice * > DS_Menu
virtual int getNumInputLabels() const
DS_AttributeList myAttributes
UT_StringList & getGroups()
const char * getDesc() const
CH_ScriptLanguage myMenuScriptLanguage
UT_ValArray< DS_AttributeValue * > DS_AttributeList
DS_SelectorList & getReservedSelectors()
const char * getType() const
DS_HandleList & getReservedHandles()
unsigned getFlag(unsigned flag) const
UT_ValArray< DS_DisableInfo * > DS_DisableList
DS_DisableList myDisableInfo
int isDoingGroups() const
UT_ValArray< DS_HandleBinding * > DS_HandleList
const char * getDefaultSettings() const
virtual const char * getInputLabel(int)
UT_Array< char * > myControlParm
const char * getChannelName() const
CH_StringMeaning getStringMeaning(int idx) const
GLenum GLsizei GLsizei GLint * values
DS_HandleList myReservedHandles
UT_Array< char * > myControlValue
void addInfo(const char *parm, const char *value)
const char * getString(int idx) const
const char * getToken() const
const char * getLabel() const
const char * getType() const
UT_ValArray< DS_ParmInfo * > DS_ParmInfoList
int getInputIndex() const
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.