InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFormField Class Referenceabstract

#include <IFormField.h>

Inheritance diagram for IFormField:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IFORMFIELD }
 

Public Member Functions

virtual bool16 SupportsDefinedStates () const =0
 
virtual bool16 SupportsUndefinedStates () const =0
 
virtual bool16 SupportsState (Form::AppearanceState inState) const =0
 
virtual bool16 SupportsCustomStateNames () const =0
 
virtual void GetIconRsrcID (PMRsrcID *outRsrcID)=0
 
virtual PMString GetStateName (Form::AppearanceState inState) const =0
 
virtual ErrorCode SetStateName (Form::AppearanceState inState, const PMString &inName)=0
 
virtual IFormFieldFactoryQueryFormFieldFactory ()=0
 
virtual void AddDefaultAttributes (IGraphicStyleAttributeBossList *outAttrs)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Base type for FormField.

A form page item is identified as a form using this interface. IFormField implements behaviors that may be different among different form field types (e.g. push buttons, text fields...) A form page item supports form-specific graphic attributes, and is exported as an widget annotation in a PDF file.

Member Function Documentation

virtual void IFormField::AddDefaultAttributes (IGraphicStyleAttributeBossListoutAttrs)
pure virtual

Adds all graphic attributes appropriate for the IFormField to outAttrs. All properties of a form field are graphic attributes, except the appearance states which are IAppearanceLists and page items. This is used when creating a new form field, for example, so that it contains default versions of all the attributes of the form field.

Parameters
outAttrsis a pointer to a attribute list that attributes will be
See Also
IGraphicStyleAttributeBossList
virtual void IFormField::GetIconRsrcID (PMRsrcIDoutRsrcID)
pure virtual

Gets Icon to use for icon frame adornment

Parameters
outRsrcIDPoints to resource id of icon on exit
virtual PMString IFormField::GetStateName (Form::AppearanceState inState) const
pure virtual

Get human-readable name for an appearance state type. For example, a check box and a radio button have different names for the kState*On states ("* Checked" versus "* Selected")

Parameters
inStatestate you want the name for
Returns
PMString of state name
virtual IFormFieldFactory* IFormField::QueryFormFieldFactory ()
pure virtual

Get a factory interface that matches the form type. This factory provides form field utilities that have implementations that are specific to a form field type. So, for example, if this IFormField is implemented as a PushButtonFormField, the factory returned is PushButtonFormFieldFactory.

Returns
A form field factory that corresponds to this IFormField.
virtual ErrorCode IFormField::SetStateName (Form::AppearanceState inState,
const PMStringinName 
)
pure virtual

Sets the human-readable name for the state.

Parameters
inStatestate you want the name for
inNamethe name you would like to assign to the state
Returns
kSuccess if the state was renamed, otherwise kFailure
virtual bool16 IFormField::SupportsCustomStateNames () const
pure virtual

Indicates whether you can assign custom names to this item's states.

Returns
kTrue if custom names can be assigned, kFalse otherwise
virtual bool16 IFormField::SupportsDefinedStates () const
pure virtual

Determine whether this form field supports any of the states in Form::DefinedAppearanceState

Returns
kTrue if this form field supports any of the states in Form::DefinedAppearanceState, otherwise kFalse
virtual bool16 IFormField::SupportsState (Form::AppearanceState inState) const
pure virtual

Determine whether this form field can have an appearance state of a particular type Example, push buttons support kStateNormal, kStateOver, kStateDown. text fields only support kStateNormal

Parameters
inStateType of state
Returns
kTrue if state is supported on this form field (regardless of whether it exists or not)
virtual bool16 IFormField::SupportsUndefinedStates () const
pure virtual

Determine whether this form field supports Form::AppearanceState values other than those defined in Form::DefinedAppearanceState - if this is true, all Form::AppearanceState values greater than Form::kStateLast are supported states.

Returns
kTrue if this form field supports states other than those in Form::DefinedAppearanceState, otherwise kFalse