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

Classes | |
| class | DescriptionPair |
Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTRESULTNODEINFO } |
| enum | NodeType { kInvalid, kGeneric, kCriteria, kStatus, kViolation } |
| enum | GoToSupport { kSupportsNothing, kSupportsShow, kSupportsSelect, kSupportsShowAndSelect, kCantShowRightNow } |
| typedef K2Vector< DescriptionPair > | DescriptionPairVector |
Public Member Functions | |
| virtual NodeType | GetType () const =0 |
| virtual PMString | GetName () const =0 |
| virtual PMString | GetDescription () const =0 |
| virtual void | GetDescriptionPairs (DescriptionPairVector &pairs) const =0 |
| virtual PMString | GetSortValue () const =0 |
| virtual WideString | GetUniqueString () const =0 |
| virtual GoToSupport | GetGoToSupport (PMString *pFailStr=nil) const =0 |
| virtual bool | DoGoTo () const =0 |
| virtual PMString | GetPageNumber () 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 |
Encapsulates information about a node in the aggregated results tree. This tree is built dynamically from the preflight process database via a combination of the engine and the intelligence in each rule.
The node info, as you can see, is read-only. That's because it represents ONLY the information that is required by the UI and reporting mechanisms; there's no provision for the user setting any of this stuff. If you're only looking to consume this data then the method comments below should give you what you need to know.
If you're implementing a rule then you'll need to be able to generate one of these. There are two ways to do this.
In the vast majority of cases you'll use IPreflightAggregatedResultsUtils :: CreateResultNodeInfo() or one of the other utility methods that do some additional configuration (eg CreateGenericNode()). These methods create a kPreflightResultNodeBoss which has on it the IPreflightResultNodeData interface. That contains all the setters. Its IPreflightResultNodeInfo implementation defers to the data interface for everything, and for go-to support it uses the object model (relying on the object ID in the data interface).
If, however, your node needs specific behaviors, such as special go-to support that is not properly handled by the object model, you can create your own IPreflightResultNodeInfo. There is no requirement that the IPreflightResultNodeData be on the same boss (but you might still want to use it for the functions it already provides).
Convenience declaration.
| pure virtual |
Go to the node. You can assume that the document is opened and the frontmost window is the window in which any scrolling should occur.
| pure virtual |
Get the information string, ie the long-form string that would appear in a larger static box such as the information pane in the tree view widget. This is usually just a concatenated form of the description pairs.
| pure virtual |
Deeper dive into descriptions. Sometimes a giant string isn't so useful and requires (error-prone) parsing in order to format nicely in a report or UI. This method provides the individual strings that make up the larger description string.
| pairs | OUT Receives a vector of description pairs |
| pure virtual |
Return the type of go-to support the node offers.
| OUT | If not nil, receives a (optional) string indicating why it can't be selected. This string can be used in, say, a tool tip, or alert. |
| pure virtual |
Get the short name, ie the name that would appear in a tree view widget row.
| pure virtual |
Get the page number string on which the item occurs. (This method may be modified somewhat.) Empty string indicates there is no corresponding page number (eg a swatch).
| pure virtual |
Get the sorting string. This determines the sort order compared to others at the same hierarchy level.
| pure virtual |
Get the node type.
| pure virtual |
Get a unique string – a hash, basically – which uniquely identifies the node apart from all others in a given results set. Typically this is built using the rule ID, object ID hash, etc. This is used to support mapping of results between invalidations in the UI since the IPreflightResultNode::NodeID can vary.