|
| enum | ScriptDataType { s_empty, s_boolean, s_string, s_shortint, s_longint, s_longlongint, s_double, s_object, s_objectlist, s_list, s_date, s_file, s_enumeration, s_unit, s_record, s_stream, s_function } |
| |
| enum | UnitType { kXCoordinate, kYCoordinate, kPoints, kTextUnits, kTextSizeUnits, kLineUnits } |
| |
| typedef object_type | data_type |
| |
|
| | ScriptData (const ScriptData &other) |
| |
| | ScriptData (int16 integer, bool16 isBoolean=kFalse) |
| |
| | ScriptData (int32 integer) |
| |
| | ScriptData (int64 integer) |
| |
| | ScriptData (ScriptID enumerator) |
| |
| | ScriptData (PMReal real) |
| |
| | ScriptData (const PMString &string) |
| |
| | ScriptData (const WideString &string) |
| |
| | ScriptData (IScript *object) |
| |
| | ScriptData (IPMStream *stream) |
| |
| | ScriptData (const ScriptList &objectList) |
| |
| | ScriptData (const ScriptListData &list) |
| |
| | ScriptData (const ScriptRecordData &record) |
| |
| | ScriptData (uint64 date) |
| |
| | ScriptData (const IDFile &file) |
| |
| virtual ScriptData::ScriptDataType | GetType () const |
| |
| virtual bool16 | IsEmpty () const |
| |
| void | SetBoolean (bool16 boolean) |
| |
| ErrorCode | GetBoolean (bool16 *const boolean) const |
| |
| void | SetInt16 (int16 integer) |
| |
| ErrorCode | GetInt16 (int16 *const integer) const |
| |
| void | SetInt32 (int32 integer) |
| |
| ErrorCode | GetInt32 (int32 *const integer) const |
| |
| void | SetInt64 (int64 integer) |
| |
| ErrorCode | GetInt64 (int64 *const integer) const |
| |
| void | SetEnumeration (ScriptID enumeration) |
| |
| ErrorCode | GetEnumeration (ScriptID *const enumeration) const |
| |
| void | SetPMReal (PMReal real) |
| |
| ErrorCode | GetPMReal (PMReal *const real) const |
| |
| void | SetPMString (const PMString &string) |
| |
| ErrorCode | GetPMString (PMString &string) const |
| |
| virtual void | SetWideString (const WideString &string) |
| |
| virtual ErrorCode | GetWideString (WideString &string) const |
| |
| void | SetObject (IScript *object) |
| |
| IScript * | QueryObject () const |
| |
| void | SetObjectList (const ScriptList &objectList) |
| |
| ErrorCode | GetObjectList (ScriptList &objectList) const |
| |
| void | SetStream (IPMStream *stream) |
| |
| IPMStream * | QueryStream () const |
| |
| void | SetFunction (IScriptCoreFunctor *func) |
| |
| IScriptCoreFunctor * | QueryFunction () const |
| |
| void | SetList (const ScriptListData &list) |
| |
| ErrorCode | GetList (ScriptListData &list) const |
| |
| void | SetRecord (const ScriptRecordData &record) |
| |
| ErrorCode | GetRecord (ScriptRecordData &record) const |
| |
| void | SetDate (uint64 date) |
| |
| ErrorCode | GetDate (uint64 *const date) const |
| |
| void | SetFile (const IDFile &file) |
| |
| ErrorCode | GetFile (IDFile *const file, const RequestContext &context, bool16 validateFolder=kTrue) const |
| |
| ErrorCode | GetFileIfFile (IDFile &file, bool16 validateFolder=kTrue) const |
| |
| void | SetUnit (const PMReal &unit, UnitType unitType, const IScript *script, const EngineContext &context) |
| |
| void | SetUnit (const PMReal &unit, IUnitOfMeasure *unitOfMeasure) |
| |
| ErrorCode | GetUnit (PMReal *const unit, UnitType unitType, const IScript *script, const EngineContext &context, bool16 allowNaN=kFalse) const |
| |
| ErrorCode | RetrieveUnit (PMReal *const unit) const |
| |
| ErrorCode | ParseUnit (PMReal *const unit, IUnitOfMeasure *unitOfMeasure) const |
| |
| ErrorCode | ConvertUnit (PMReal *const real, const ScriptID &unitType, const RequestContext &context) const |
| |
| ErrorCode | ConvertUnit (PMString &string) const |
| |
| bool16 | IsEqual (const ScriptData &scriptData, const RequestContext &context) const |
| |
| bool16 | operator== (const ScriptData &scriptData) const |
| |
| | ScriptData (adobe::move_from< ScriptData > other) |
| |
| ScriptData & | operator= (ScriptData other) |
| |
| virtual void | Reset () |
| |
| virtual void | ReadWrite (IPMStream *s, bool16 doPlatformReadWrite=kTrue) |
| |
| PMString | GetTypeAsString (const RequestContext &context) const |
| |
| PMString | GetValueAsString (const RequestContext &context) const |
| |
| adobe::vector< PMString > | GetValueAsVectorOfString (const RequestContext &context) const |
| |
ScriptData is a class that can hold any of the data types supported by the scripting architecture.
HOW UNITS WORK On input: The user can pass in a numerical value or a string like "1in" and a ScriptProvider can ask for this data as a unit. If user passed in a string, it will get converted to points accordingly, so for "1in" you'll get 72 points, for 1 we'll check what the horizontal or vertical ruler were when the event came in and convert the value to points. So for example if the user passes in 5 and their horizontal ruler is in ciceros and the ScriptProvider asks for the the horizontal value, we'll assume 5 means 5 ciceros, convert it to the proper number of points and give you back that value.
On output: The provider can call SetUnit, pass in a PMReal representing points and indicate whether the data represents a horizontal or vertical value. We will then convert this value to the appropriate units based on what the user's ruler settings were at the time the event came in.
In scripting DOM verersion CS5 (kCS5ScriptVersion) or later, a measurement unit is added to the script engine's preference. IScriptPreferences. If the preference has a valid measurement unit: On input, if a numerical value is passed in, we assume the type is the one in the preference. On output, the passed in value representing points will be converted to the type stored in the preference.See also IUnitOfMeasureSettings.h for information on unit of measure types
Convert a unit type in ScritData to points and return it. Script providers should call this method to get the value of a unit.
In scripting DOM verersion CS5 (kCS5ScriptVersion) or later, if the script engine's preference has a valid measurement unit, we assume ScriptData hold a value in the preference's unit. unitType is ignored. In earlier versions or if the preference doesn't have a valid measurment type, we assume ScriptData holds a value in units of "unitType".
In kCS5ScriptVersion or later, if the unit value is NaN and allowNaN is kFalse, kNaNError is returned.