HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PRM_ScriptParm Class Reference

#include <PRM_ScriptParm.h>

Public Types

enum  {
  PRM_SPARM_REQUIRED = 0x001, PRM_SPARM_DIRECTION = 0x002, PRM_SPARM_COLOR = 0x004, PRM_SPARM_OBJECT = 0x008,
  PRM_SPARM_RENDERER = 0x010, PRM_SPARM_ANIMSTRING = 0x020, PRM_SPARM_OBJECTLIST = 0x040, PRM_SPARM_EMBED = 0x080,
  PRM_SPARM_LOGARITHMIC = 0x100, PRM_SPARM_OBSOLETE = 0x200, PRM_SPARM_EXPERIMENTAL = 0x400, PRM_SPARM_ALLFLAGS = 0x7FF
}
 

Public Member Functions

 PRM_ScriptParm ()
 
virtual ~PRM_ScriptParm ()
 
int parse (DS_Stream &is, int multiparm_depth)
 
int parseGroup (DS_Stream &is, PRM_ScriptPage *page, const char *grouptype, int multiparm_depth)
 
bool parseMultiParm (DS_Stream &is, PRM_MultiType multitype, PRM_ScriptPage *page, int multiparm_depth)
 
int parseGroupAttribute (DS_Stream &is)
 
int parseRange (DS_Stream &is)
 
void appendScriptParms (UT_ValArray< PRM_ScriptParm * > &parms)
 
void setFlag (unsigned flag)
 
void clearFlag (unsigned flag)
 
unsigned getFlag (unsigned bit) const
 
PRM_ScriptGroupgetGroup () const
 
PRM_NamegetName ()
 
const PRM_NamegetName () const
 
const PRM_TypegetType () const
 
PRM_TypeExtended getTypeExtended () const
 
PRM_MultiType getMultiType () const
 
const PRM_DefaultgetDefaults () const
 
PRM_DefaultgetDefaults ()
 
PRM_RangegetRange () const
 
int getSize () const
 
PRM_ChoiceListgetMenu () const
 
const UT_StringgetOption () const
 
const UT_StringgetHelpText () const
 
PRM_ConditionalGroupgetConditionalGroup ()
 
PRM_TemplategetMultiTemplate ()
 
bool getBaseParm () const
 
PRM_SpareDatagetSpareData (bool create=false)
 
bool hasObsoleteGroup () const
 
PRM_ScriptParmcreateObsoleteGroupParm ()
 
bool clearJoinNext ()
 
void enforceOptions ()
 Some parameter dialogs require options for every parameter. More...
 
int computeTemplateSize ()
 
void fillTemplate (PRM_Template *array, int &idx, PRM_ScriptImports *&imports, int nest_level)
 

Static Public Member Functions

static const char * protectString (const char *s, int handlenull=0)
 
static const char * protectString (const char *s, int handlenull, bool wrap_in_quotes)
 
static void protectStrcat (UT_WorkBuffer &dest, const char *s, int handlenull=0)
 
static void protectStrcat (UT_WorkBuffer &dest, const char *s, int handlenull, bool wrap_in_quotes)
 
static bool parseConditional (DS_Stream &is, PRM_Conditional &cond)
 
static void registerDefaultScriptCallback (PRM_Callback cb)
 

Protected Member Functions

virtual PRM_ScriptGroupnewGroup (bool asmultiparm=false)
 
virtual PRM_ScriptPagenewPage ()
 
virtual int handleUnknown (DS_Stream &is, UT_String &token)
 
virtual PRM_Callback getScriptParmCallback () const
 
virtual bool wantsParametersAnimatable () const
 
int buildMultiParmTemplate (PRM_ScriptImports *&imports, int nest_level)
 
int parseMenu (DS_Stream &is)
 
int parseAttribute (DS_Stream &is)
 
int parseDefaults (DS_Stream &is, int isstring)
 
void clearMenu ()
 
void clearDefaults ()
 

Static Protected Member Functions

static bool parseConditionalInfo (DS_Stream &is, PRM_Conditional &cond)
 

Protected Attributes

PRM_ScriptGroupmyGroup
 
PRM_ScriptGroupmyObsoleteGroup
 
PRM_ChoiceListmyMenu
 
PRM_NamemyMenuNames
 
PRM_TemplatemyMultiTemplate
 
int myMenuType
 
PRM_Name myName
 
PRM_Type myType
 
PRM_TypeExtended myTypeExtended
 
PRM_MultiType myMultiType
 
int myVectorSize
 
UT_Array< PRM_DefaultmyDefaults
 
UT_StringArray myDefaultStrings
 
PRM_RangemyRange
 
PRM_SpareDatamySpareData
 
PRM_ConditionalGroup myConditionalGroup
 
unsigned myFlag
 
UT_String myHelpText
 
int myToolboxLevel
 
bool myBaseParm
 
UT_String myOption
 

Static Protected Attributes

static const char * theTokens []
 
static int theNumParms []
 

Detailed Description

Definition at line 87 of file PRM_ScriptParm.h.

Member Enumeration Documentation

anonymous enum
Enumerator
PRM_SPARM_REQUIRED 
PRM_SPARM_DIRECTION 
PRM_SPARM_COLOR 
PRM_SPARM_OBJECT 
PRM_SPARM_RENDERER 
PRM_SPARM_ANIMSTRING 
PRM_SPARM_OBJECTLIST 
PRM_SPARM_EMBED 
PRM_SPARM_LOGARITHMIC 
PRM_SPARM_OBSOLETE 
PRM_SPARM_EXPERIMENTAL 
PRM_SPARM_ALLFLAGS 

Definition at line 92 of file PRM_ScriptParm.h.

Constructor & Destructor Documentation

PRM_ScriptParm::PRM_ScriptParm ( )
virtual PRM_ScriptParm::~PRM_ScriptParm ( )
virtual

Member Function Documentation

void PRM_ScriptParm::appendScriptParms ( UT_ValArray< PRM_ScriptParm * > &  parms)
int PRM_ScriptParm::buildMultiParmTemplate ( PRM_ScriptImports *&  imports,
int  nest_level 
)
protected
void PRM_ScriptParm::clearDefaults ( )
protected
void PRM_ScriptParm::clearFlag ( unsigned  flag)
inline

Definition at line 123 of file PRM_ScriptParm.h.

bool PRM_ScriptParm::clearJoinNext ( )

Clear any type or extended type settings related to joining. Returns true if any settings were changed.

void PRM_ScriptParm::clearMenu ( )
protected
int PRM_ScriptParm::computeTemplateSize ( )
PRM_ScriptParm* PRM_ScriptParm::createObsoleteGroupParm ( )
void PRM_ScriptParm::enforceOptions ( )

Some parameter dialogs require options for every parameter.

void PRM_ScriptParm::fillTemplate ( PRM_Template array,
int idx,
PRM_ScriptImports *&  imports,
int  nest_level 
)
bool PRM_ScriptParm::getBaseParm ( ) const
inline

Definition at line 145 of file PRM_ScriptParm.h.

PRM_ConditionalGroup& PRM_ScriptParm::getConditionalGroup ( )
inline

Definition at line 143 of file PRM_ScriptParm.h.

const PRM_Default* PRM_ScriptParm::getDefaults ( ) const
inline

Definition at line 132 of file PRM_ScriptParm.h.

PRM_Default* PRM_ScriptParm::getDefaults ( )
inline

Definition at line 135 of file PRM_ScriptParm.h.

unsigned PRM_ScriptParm::getFlag ( unsigned  bit) const
inline

Definition at line 124 of file PRM_ScriptParm.h.

PRM_ScriptGroup* PRM_ScriptParm::getGroup ( ) const
inline

Definition at line 126 of file PRM_ScriptParm.h.

const UT_String& PRM_ScriptParm::getHelpText ( ) const
inline

Definition at line 142 of file PRM_ScriptParm.h.

PRM_ChoiceList* PRM_ScriptParm::getMenu ( ) const
inline

Definition at line 140 of file PRM_ScriptParm.h.

PRM_Template* PRM_ScriptParm::getMultiTemplate ( )
PRM_MultiType PRM_ScriptParm::getMultiType ( ) const
inline

Definition at line 131 of file PRM_ScriptParm.h.

PRM_Name& PRM_ScriptParm::getName ( )
inline

Definition at line 127 of file PRM_ScriptParm.h.

const PRM_Name& PRM_ScriptParm::getName ( ) const
inline

Definition at line 128 of file PRM_ScriptParm.h.

const UT_String& PRM_ScriptParm::getOption ( ) const
inline

Definition at line 141 of file PRM_ScriptParm.h.

PRM_Range* PRM_ScriptParm::getRange ( ) const
inline

Definition at line 138 of file PRM_ScriptParm.h.

virtual PRM_Callback PRM_ScriptParm::getScriptParmCallback ( ) const
protectedvirtual
int PRM_ScriptParm::getSize ( ) const
inline

Definition at line 139 of file PRM_ScriptParm.h.

PRM_SpareData* PRM_ScriptParm::getSpareData ( bool  create = false)
const PRM_Type& PRM_ScriptParm::getType ( ) const
inline

Definition at line 129 of file PRM_ScriptParm.h.

PRM_TypeExtended PRM_ScriptParm::getTypeExtended ( ) const
inline

Definition at line 130 of file PRM_ScriptParm.h.

virtual int PRM_ScriptParm::handleUnknown ( DS_Stream is,
UT_String token 
)
protectedvirtual
bool PRM_ScriptParm::hasObsoleteGroup ( ) const
inline

Definition at line 149 of file PRM_ScriptParm.h.

virtual PRM_ScriptGroup* PRM_ScriptParm::newGroup ( bool  asmultiparm = false)
protectedvirtual
virtual PRM_ScriptPage* PRM_ScriptParm::newPage ( )
protectedvirtual
int PRM_ScriptParm::parse ( DS_Stream is,
int  multiparm_depth 
)
int PRM_ScriptParm::parseAttribute ( DS_Stream is)
protected
static bool PRM_ScriptParm::parseConditional ( DS_Stream is,
PRM_Conditional cond 
)
static
static bool PRM_ScriptParm::parseConditionalInfo ( DS_Stream is,
PRM_Conditional cond 
)
staticprotected
int PRM_ScriptParm::parseDefaults ( DS_Stream is,
int  isstring 
)
protected
int PRM_ScriptParm::parseGroup ( DS_Stream is,
PRM_ScriptPage page,
const char *  grouptype,
int  multiparm_depth 
)
int PRM_ScriptParm::parseGroupAttribute ( DS_Stream is)
int PRM_ScriptParm::parseMenu ( DS_Stream is)
protected
bool PRM_ScriptParm::parseMultiParm ( DS_Stream is,
PRM_MultiType  multitype,
PRM_ScriptPage page,
int  multiparm_depth 
)
int PRM_ScriptParm::parseRange ( DS_Stream is)
static void PRM_ScriptParm::protectStrcat ( UT_WorkBuffer dest,
const char *  s,
int  handlenull = 0 
)
static
static void PRM_ScriptParm::protectStrcat ( UT_WorkBuffer dest,
const char *  s,
int  handlenull,
bool  wrap_in_quotes 
)
static
static const char* PRM_ScriptParm::protectString ( const char *  s,
int  handlenull = 0 
)
static

Inserts double backslashes to protect verbatim strings in script files. If wrap_in_quotes is set to true, then protectString() and protectStrcat() will wrap the string in double quotes when necessary (i.e. string contains whitespace or a double quote).

static const char* PRM_ScriptParm::protectString ( const char *  s,
int  handlenull,
bool  wrap_in_quotes 
)
static
static void PRM_ScriptParm::registerDefaultScriptCallback ( PRM_Callback  cb)
static
void PRM_ScriptParm::setFlag ( unsigned  flag)
inline

Definition at line 122 of file PRM_ScriptParm.h.

virtual bool PRM_ScriptParm::wantsParametersAnimatable ( ) const
protectedvirtual

Member Data Documentation

bool PRM_ScriptParm::myBaseParm
protected

Definition at line 226 of file PRM_ScriptParm.h.

PRM_ConditionalGroup PRM_ScriptParm::myConditionalGroup
protected

Definition at line 222 of file PRM_ScriptParm.h.

UT_Array<PRM_Default> PRM_ScriptParm::myDefaults
protected

Definition at line 218 of file PRM_ScriptParm.h.

UT_StringArray PRM_ScriptParm::myDefaultStrings
protected

Definition at line 219 of file PRM_ScriptParm.h.

unsigned PRM_ScriptParm::myFlag
protected

Definition at line 223 of file PRM_ScriptParm.h.

PRM_ScriptGroup* PRM_ScriptParm::myGroup
protected

Definition at line 207 of file PRM_ScriptParm.h.

UT_String PRM_ScriptParm::myHelpText
protected

Definition at line 224 of file PRM_ScriptParm.h.

PRM_ChoiceList* PRM_ScriptParm::myMenu
protected

Definition at line 209 of file PRM_ScriptParm.h.

PRM_Name* PRM_ScriptParm::myMenuNames
protected

Definition at line 210 of file PRM_ScriptParm.h.

int PRM_ScriptParm::myMenuType
protected

Definition at line 212 of file PRM_ScriptParm.h.

PRM_Template* PRM_ScriptParm::myMultiTemplate
protected

Definition at line 211 of file PRM_ScriptParm.h.

PRM_MultiType PRM_ScriptParm::myMultiType
protected

Definition at line 216 of file PRM_ScriptParm.h.

PRM_Name PRM_ScriptParm::myName
protected

Definition at line 213 of file PRM_ScriptParm.h.

PRM_ScriptGroup* PRM_ScriptParm::myObsoleteGroup
protected

Definition at line 208 of file PRM_ScriptParm.h.

UT_String PRM_ScriptParm::myOption
protected

Definition at line 229 of file PRM_ScriptParm.h.

PRM_Range* PRM_ScriptParm::myRange
protected

Definition at line 220 of file PRM_ScriptParm.h.

PRM_SpareData* PRM_ScriptParm::mySpareData
protected

Definition at line 221 of file PRM_ScriptParm.h.

int PRM_ScriptParm::myToolboxLevel
protected

Definition at line 225 of file PRM_ScriptParm.h.

PRM_Type PRM_ScriptParm::myType
protected

Definition at line 214 of file PRM_ScriptParm.h.

PRM_TypeExtended PRM_ScriptParm::myTypeExtended
protected

Definition at line 215 of file PRM_ScriptParm.h.

int PRM_ScriptParm::myVectorSize
protected

Definition at line 217 of file PRM_ScriptParm.h.

int PRM_ScriptParm::theNumParms[]
staticprotected

Definition at line 232 of file PRM_ScriptParm.h.

const char* PRM_ScriptParm::theTokens[]
staticprotected

Definition at line 231 of file PRM_ScriptParm.h.


The documentation for this class was generated from the following file: