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

Public Types | |
| enum | { kDefaultIID = IID_IFORMFIELDUTILS } |
| enum | NumberingStartValue { kStartNumberingWithStateNumber = -2, kStartNumberingWithNextStateNumber = -1, kStartNumberingWithOne = 1, kStartNumberingWithTwo = 2 } |
| enum | UniqueNamePolicy { kDoesNotNeedToEndInANumber, kMustEndInANumber } |
| enum | { kFixUpList = kTrue, kDontFixUpList = kFalse } |
| typedef K2Pair< UID, Form::AppearanceState > | UIDStatePair |
| typedef K2Vector< UIDStatePair > | UIDStatePairs |
Public Member Functions | |
| virtual bool16 | CanPlaceInAnnotation (const UIDList *inItems) const =0 |
| virtual bool16 | CanEditItems (const UIDList *inItems) const =0 |
| virtual bool16 | CanEditFormItems (const UIDList *inItems) const =0 |
| virtual bool16 | CanDeleteState (Form::AppearanceState inState) const =0 |
| virtual bool16 | IsNormalState (Form::AppearanceState inState) const =0 |
| virtual bool16 | IsOnState (Form::AppearanceState inState) const =0 |
| virtual bool16 | IsOffState (Form::AppearanceState inState) const =0 |
| virtual bool16 | IsDefinedState (Form::AppearanceState inState) const =0 |
| virtual PMString | GetDefinedStateName (Form::AppearanceState inState) const =0 |
| virtual ErrorCode | ProcessChangeStateCmd (const UIDRef &inItemRef, Form::AppearanceState inState) const =0 |
| virtual UIDRef | CreateFormPageItem (const UIDRef &inParent, const PMRect &inBounds, ClassID inFormFieldBoss) const =0 |
| virtual ErrorCode | AddFormFieldContent (UIDRef &inFormField) const =0 |
| virtual IFormFieldFactory * | QueryFormFieldFactory (ClassID inFactoryBoss) const =0 |
| virtual ErrorCode | SetAppearanceState (UIDRef &inPageItem, Form::AppearanceState inState) const =0 |
| virtual Form::AppearanceState | GetChildAppearanceState (IPMUnknown *inPageItem, UIDRef *outAppearanceParent, Form::AppearanceState *outActiveState) const =0 |
| virtual void | AddFormFieldAttributes (IGraphicStyleAttributeBossList *inSrcList, IApplyMultAttributesCmdData *inApplyAttributesCmdData, const PMString &inStyleName) const =0 |
| virtual PMString | GetDefaultStateName (const IAppearanceList *inAppearanceList, Form::AppearanceState inState) const =0 |
| virtual PMString | GetDuplicateName (const IAppearanceList *inAppearanceList, Form::AppearanceState inState) const =0 |
| virtual void | MakeNameUniqueInAppearanceList (const IAppearanceList *inAppearanceList, PMString &inName, NumberingStartValue inStartValue, UniqueNamePolicy inNamePolicy=kDoesNotNeedToEndInANumber) const =0 |
| virtual PMString | GetTargetName (const IPMUnknown *inItem, const ClassID &inStartingAncestorType) const =0 |
| virtual bool16 | CanPlaceInState (const UIDList &inItems, const ClassID &inTargetClass) const =0 |
| virtual bool16 | CanCreateFromItems (const UIDList &inItems, const ClassID &inTargetClass) const =0 |
| virtual UIDList | GetAllFormItemsOfTypeInDocument (const UIDRef &docRef, const ClassID &classID) const =0 |
| virtual ErrorCode | ResetAllMultiStateObjects (const UIDRef &docRef) const =0 |
| virtual ErrorCode | ResetAllButtons (const UIDRef &docRef) const =0 |
| virtual UIDRef | GetStateWrappingGroup (const UIDRef &inItemRef, Form::AppearanceState inState) const =0 |
| virtual bool16 | IsItemOnlyInActiveStates (const UIDRef &inItemRef, UID *outTopmostHidingAncestor=nil) const =0 |
| virtual UIDStatePairs | GetStatesForItem (const UIDRef &inItemRef) const =0 |
| virtual void | SetStatesSoThatItemIsActive (const UIDRef &inItemRef) const =0 |
| virtual void | SelectActiveState (const UIDList &inItems) const =0 |
| int32 | StateToIndex (Form::AppearanceState inState) const |
| Form::AppearanceState | IndexToState (int32 inIndex) const |
| virtual UID | GetSpreadUID (IHierarchy *inPageItemHier) const =0 |
| virtual void | GetPageUIDs (IHierarchy *inPageItemHier, UIDList *outPageUIDs) const =0 |
| virtual bool16 | IsOnPage (ISpread *inSpread, int32 inPagePos, UIDList *ioPageItems, UID inPageItemUID) const =0 |
| virtual void | GetDescendents (IHierarchy *inHierarchy, const PMIID &inInterfaceID, UIDList *outResultList) const =0 |
| virtual void | GetDescendents (const UIDList &inUIDList, const PMIID &inInterfaceID, UIDList *outResultList) const =0 |
| virtual UIDList | ExtractPageItemsWithIID (const UIDList &inUIDList, PMIID inIID) const =0 |
| virtual bool16 | GetFirstAncestorOfClass (const IPMUnknown *inItem, const ClassID &inClassToFind, UIDRef &outItemRef) const =0 |
| virtual ErrorCode | UngroupSingleItemGroups (UIDList &inOutItems, bool16 fixUpItemList=kDontFixUpList) const =0 |
| virtual ErrorCode | ChangeHierarchyPreservingTransform (UIDRef inItemToChange, UID inNewParent) const =0 |
| virtual ErrorCode | GetAppearanceThumbnail (UIDRef inAppearanceItemRef, Form::AppearanceState inState, int32 inMaxWidth, int32 inMaxHeight, AGMImageAccessor **pOutAGMImage) const =0 |
| virtual bool16 | HasButtonOrFormField (const UIDList &inItems, const ClassID &inTargetClass) const =0 |
| virtual void | TakeActionOnMissingFontFormAdornment (ILayoutSelectionSuite *iLayoutSelectionSuite, UIDRef item, bool16 shiftKeyDown, bool16 altOptionKeyDown)=0 |
| virtual bool | DoesHaveFontAttribute (const UIDRef &uidRef)=0 |
| virtual ErrorCode | SetFontFamilyAttrCmd (const UIDList &uidList, const PMString &fontFamilyName) const =0 |
| virtual ErrorCode | SetFontFamilyAttr (const UIDList &uidList, const PMString &fontFamilyName) const =0 |
| virtual ErrorCode | SetFontFamilyUIDAttrCmd (const UIDList &uidList, const UID &fontUID) const =0 |
| virtual ErrorCode | SetFontFamilyUIDAttr (const UIDList &uidList, const UID &fontUID) const =0 |
| virtual ErrorCode | SetFontStyleAttributeCmd (const UIDList &uidList, const PMString &fontStyleName) const =0 |
| virtual ErrorCode | SetFontStyleAttribute (const UIDList &uidList, const PMString &fontStyleName) const =0 |
| virtual bool16 | GetFontFamilyUIDAttr (const UIDRef &uidRef, UID &FontUID) const =0 |
| virtual bool16 | GetFontStyleAttribute (const UIDRef &uidRef, PMString &fontStyleName) 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 |
Some Miscellaneous FormField related utilities.
| anonymous enum |
Ungroups all of the single item groups passed in.
| inOutItems | the items to look through |
| fixUpItemList | if this is true, then when a single-item group is ungrouped, the group's UID is replaced with its child UID in inOutItems |
Make a string unique from all the state names in an appearance list.
| inAppearanceList | the appearance list that the string should be unique in |
| inName | the string to be made unique |
| inStartValue | the number to start numering from |
| inNamePolicy | specify whether the unique name must have a number appended onto it |
| pure virtual |
Add the attribute to the
| inSrcList | |
| inApplyAttributesCmdData | |
| inStyleName |
| pure virtual |
Puts an invisible place holder item in the new page item. If the item is created as a graphic frame, it keep the empty content X from showing up,
The problem is that I want the spline graphic frame hit behavior (always hit within the spline), but I don't want the x if the shape (CFormFieldShape) is going to be drawing something, which is the case for text items, list boxes, and combo boxes if they have no children in the hierarchy.
| inFormField | Form field to receive the dummy content |
| pure virtual |
Determine if a certain form field item can be created from all of the objects in a UIDList.
| inItems | the list of items to check |
| inTargetClass | the ClassID of the form field item in question |
| pure virtual |
| pure virtual |
| pure virtual |
| pure virtual |
| pure virtual |
Determine if all of the objects in a UIDList can be added to a state of the specified form field class.
| inItems | the list of items to check |
| inTargetClass | the ClassID of the object that the items will be added to |
| pure virtual |
Changes the parent of an item, while preserving its transform.
| inItemToChange | the item to move |
| inNewParent | the new parent of the item |
| pure virtual |
Create a new Form Field of a specified type
| inParent | Parent item of new form field |
| inBounds | Bounds of new form field |
| inFormFieldBoss | Type of form field to create (e.g. kPushButtonItemBoss) |
| pure virtual |
Tells whether form field have font attribute. For example TextFields.
| uidRef | - uidRef for form field item |
| pure virtual |
Filter out UIDs with a certain interface, and return them
| inUIDList | a list of UIDs |
| inIID | The interface id to search for |
| pure virtual |
Gets a list of all form items of a specific type in a document.
| docRef | the document |
| pure virtual |
Get rendered appearance of an appearance state
| inAppearanceItemRef | the item to get |
| inState | State to get |
| inMaxWidth | Maximum width of returned bitmap |
| inMaxHeight | Maximum height of returned bitmap |
| pOutAGMImage | [OUT]: On exit, points to address of a newly allocated AGMImageAccessor, which must be deleted by the client. The AGMImageAccessor contains the rendered appearance. |
| pure virtual |
Get the state that a page item appears in
| inPageItem | page item for which we want to know the state The ancestor page item that contains an IAppearanceList On exit, the active state for outAppearanceParent |
| pure virtual |
Get this state's the default state name. On a Multi-State Object this will be "State " followed by a number making the name unique.
| inAppearanceList | the appearance list that the name must be unique in |
| inState | the state to obtain the name of |
| pure virtual |
| pure virtual |
Get all page items under a certain page item that contain a certain interface, also checks inlines of text frames
| inHierarchy | The page item to search under |
| inInterfaceID | The interface to search for |
| outResultList | A list of children items that have inInterfaceID |
| pure virtual |
Get all page items under certain page items that contain a certain interface, also checks inlines of text frames
| inUIDList | The page items to search under |
| inInterfaceID | The interface to search for |
| outResultList | A list of children items that have inInterfaceID |
| pure virtual |
Create a state name that is unique to an appearance list, based on another name.
| inAppearanceList | the appearance list to be unique within |
| inOutName | the name to start with, and after the call, the unique string that results |
| inAppendCopy | whether or not to append the work 'Copy' to the state name while making it unique |
| pure virtual |
Gets the first ancestor of a given class
| inItem | the item whose ancestor is to be looked for |
| inClassToFind | the class of the ancestor to be looked for |
| outItemRef | the ancestor |
| pure virtual |
Gets font's UID for a form field item.
| uidRef | - UID for of form field. |
| fontUIF | - [OUT] Font UID attibute of form field. |
| pure virtual |
Gets font style for a form field item.
| uidRef | - UID for of form field. |
| fontUIF | - [OUT] Font style attibute of form field. |
| pure virtual |
Get the pages of a page item
| inPageItemHier | page item to check, may be an inlined item |
| outPageUIDs | On exit, the pages which inPageItemHier appears on. |
| pure virtual |
Get the spread of a page item
| inPageItemHier | page item to check, may be an inlined item |
| pure virtual |
Gets a list of appearance items and the states that must be set to active in order for to appear in the hierarchy. (Sorted from nearest ancestor to furthest)
| inItemRef | the item to investigate |
| pure virtual |
Reset the name of a state in a given appearance list
| inItem | the item whose name is to be determined |
| inStartingAncestorType | the class of the ancestor to start naming the target from. Ex. if this is kMultiStateObjectItemBoss, then the target name will start with the nearest MSO's name, appending the name of each item between the MSO and inItem |
| pure virtual |
Determine if there's another form field/button in the UIDList provided.
| inItems | the list of items to check |
| inTargetClass | the ClassID of the form field item in question |
| pure virtual |
| pure virtual |
Determine if an item is not in any hidden states. If this returns kTrue, that implies that the item is able to be found while traversing the hierarchy from in a top-down fashion.
| inItemRef | the item in question |
| outTopmostHidingAncestor | optional, if return value is kFalse, the UID of the topmost item in the hierarchy that is hiding inItemRef; otherwise kInvalidUID. |
| pure virtual |
| pure virtual |
| pure virtual |
Determine if a page item, inPageItemUID, is on a page in a spread, also checks to see if inPageItemUID is an inlined item on the page.
| inSpread | Spread to check |
| inPagePos | which page to check on inSpread |
| ioPageItems | (must be non-null) is empty or the result of GetItemsOnPage. If this is called repeatedly for the same spread, this saves extra calls to GetItemsOnPage |
| inPageItemUID | Page item that is being checked |
| pure virtual |
| pure virtual |
Execute a command to change the active state of a Form Field
| inItemRef | Page item supporting appearance states |
| inState | new active state |
| pure virtual |
Get the form field factory for a particular form field type (class id)
| pure virtual |
Resets all buttons to their Normal state.
| docRef | the document to reset |
| pure virtual |
Resets all multi-state objects to their first state.
| docRef | the document to reset |
| pure virtual |
Selects the group that wraps the active state of each item in inItems.
| inItems | the items whose active states to select |
| pure virtual |
Change the state of a form field page item using a command
| pure virtual |
Similar to SetFontFamilyAttrCmd, but it does not create command sequence for operations.
| uidList | - list of UID's on which font family attribute have to be applied |
| pure virtual |
Set font family Attr on form fields(used during PDF export). It creates a command and runs all operation whithin the sequence.
| uidList | - list of UID's on which font family attribute have to be applied |
| fontFamilyName | - font family to be applied |
| pure virtual |
Similar to SetFontFamilyUIDAttrCmd, but it does not create command sequence for operations.
| uidList | - list of UID's on which font family attribute have to be applied |
| fontUID | - font's UID to be applied |
| pure virtual |
Set Font UID on form fields. It creates a command and runs all operation within the sequence.
| uidList | - list of UID's on which font family attribute have to be applied |
| fontUID | - font's UID to be applied |
| pure virtual |
Similar to SetFontStyleAttributeCmd, but it does not create command sequence for operations.
| uidList | - list of UID's on which font family attribute have to be applied |
| fontUID | - font style to be applied |
| pure virtual |
Sets font style attribute on form fields. It creates a command and runs all operation within the sequence.
| uidList | - list of UID's on which font family attribute have to be applied |
| fontUID | - font style to be applied |
| pure virtual |
Sets the active states of all appearance item ancestors such that inItemRef is visible in in the hierarchy.
| inItemRef | the item to cause to appear in the hierarchy |
| pure virtual |
Take action when form's missing font adronment is clicked
| iLayoutSelectionSuite | - Layout selection suite |
| item | - UIDRef of form field item whose adornment is clicked |
| shiftKeyDown | - true if shift key is pressed |
| altOptionKeyDown | - true if alt/option key is presssed |