![]() | InDesign SDK 20.5 |
#include <IPreflightRuleUI.h>

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTRULEUI } |
| enum | UnitType { kDefaultUnit = -1, kXCoordinate, kYCoordinate, kPoints, kTextUnits, kTextSizeUnits, kLineUnits, kPercent, kCoordinateGroupWithConstrain, kCoordinateGroupNoConstrain, kEnumerator, kStaticText } |
Public Member Functions | |
| virtual bool | HasUI () const =0 |
| virtual IControlView * | CreateCustomUI (IDataBase *iUIDataBase) const =0 |
| virtual bool | ApplyDataToCustomUI (IControlView *iCustomUI, IPreflightRuleData *iRuleDataToApply) const =0 |
| virtual bool | GetDataFromCustomUI (IControlView *iCustomUI, IPreflightRuleData *iRuleData) const =0 |
| virtual PMString | GetDataParemeterDescription (const IPreflightRuleData::Key &key) const =0 |
| virtual UnitType | GetDataParemeterUnitType (const IPreflightRuleData::Key &key) const =0 |
| virtual bool | GetDataParemeterRange (const IPreflightRuleData::Key &key, ScriptData &maxData, ScriptData &minData) const =0 |
| virtual bool | ValidateParameterData (const IPreflightRuleData::Key &key, const ScriptData &newData, PMString &errorString) const =0 |
| virtual bool | GetDataParemeterMapping (const IPreflightRuleData::Key &key, ScriptListData &enumData, ScriptListData &stringData) const =0 |
| virtual IPreflightRuleData::Key | GetDataParamRoot () const =0 |
| virtual void | GetDataParamParent (const IPreflightRuleData::Key &key, IPreflightRuleData::Key &keyParent) const =0 |
| virtual bool | GetDataParamDirectChildren (const IPreflightRuleData::Key &key, std::vector< IPreflightRuleData::Key > &keyList) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface sits on a rule boss and provides rule-specific UI entry points. If the rule does not have any data parameters, then no implementation is needed.
If the rule wants to provide its own custom UI to be included in the InDesign preflight profile rule definition dialog, the following methods require implementation. These three methods allows the profile rule definition UI to embed the rule's custom UI, apply data to the UI, and retrieve data from the UI.
Note that if custom UI is used then there's no need to implement any of the methods for creating auto generated UI.
If the rule has simple data parameters and wants the InDesign preflight profile rule definition UI to construct automatically InDesign's UI widgets to represent the rule's data parameters, the remaining methods described in this class should have some implementation. To auto-generate the UI, we use these data and widget mapping: boolean data => checkbox PMReal, longint, shortint, string => edit boxes within this mapping, the data's UI UnitType specifies the edit box details. enumerator, longint, shortint, boolean can be mapped to a dropdown list. kCoordinateGroupWithConstrain & kCoordinateGroupNoConstrain will generate a special group control containing n editboxes either with a lock or without a lock contrain. The lock constrain will affect all edit units in the group alike.
This is the UI unit/value type for the data parameters. Use kDefaultUnit to indicate that the data value can be represented with default type.
| pure virtual |
Apply specified rule data to the cutom UI. The custom UI view passed is the same IControlView* initially created from CreateCustomUI ().
| iCustomUI | is the custom UI control view to apply the data to. |
| iRuleDataToApply | is the rule data to apply to the custome UI widget. |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the cutom UI for this rule
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Retrieve rule data from the specified cutom UI. The custom UI view passed is the same IControlView* initially created from CreateCustomUI (). This is called when the main profile rule definition dialog is notified there're rule data changes. The custom UI notifies this change by broadcasting on the profile dialog's IDialogController's subject with the following arguments: theChange = kProfileCustomRuleDataChangeMessage protocol IID = IID_IPROFILEDLGUTILS changedBy = the custom UI controlview In turn, the main rule definition UI will ask for rule data from custom UI with this call.
| iCustomUI | is the custom UI control view to retrieve the data from. This should match the controlview which it originally broadcasted the data change. |
| iRuleData | is the rule data to which the custome UI widget should set the resulting rule data. |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the specified parameter key's direct child parameter keys.
| key | is the parameter key. |
| keyList | is the parameter's list of child parameter keys. |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the specified parameter key's parent. If the rule has a flat list of data parameters, then the parent is the root.
| key | is the parameter key. |
| keyParent | is the parameter's parent. |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the description of the specified data key for this rule.
| key | is the specified data key |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the data value mapping for this data parameter. This is used when specifying the data parameter as a dropdown list. This mapping allows mapping of integer values to a string for the dropdown list.
| key | is the specified data key |
| enumData | is the list of enum values for this data key |
| stringData | is the list of strings mapped to the corresponding enum values for this data key |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the maximum and minimum range for this data paramete.
| key | is the specified data key |
| maxData | is the upper limit for this data key |
| minData | is the lower limit for this data key |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Get the data parameter unit type. It can be one of type, UnitType defined above.
| key | is the specified data key |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.
| pure virtual |
Validate new data value for the specified data key. This is needed if data requires more than just validating between max and min range specified by method GetDataParemeterRange.
| key | is the specified data key |
| newData | is the new data value for this key to validate. |
| errorString | is the error alert string to be shown if there's an error with this new value. If the errorString is a custom error string, it should be translated first. errorString is empty if there's no error or if alert is not needed. |
Implemented in PreflightFontRuleUI, and PreflightBlackOverprintRuleUI.