Mako 7.3.0 API
JawsMako::IFormField Class Referenceabstract

An interface class for a form field. A form field may have multiple child fields and widget annotations, arranged in a tree. More...

#include <interactive.h>

Inheritance diagram for JawsMako::IFormField:

Public Member Functions

virtual IFormFieldPtr clone () const =0
 Clone the form field, which includes a deep clone of any child IFormFields. More...
 
virtual eFieldType getFieldType () const =0
 Get the type of the field. If eFTInherited is returned, the parent field should be consulted to determine the type. More...
 
virtual bool getFieldFlags (uint32 &flags) const =0
 Get the field flags, if present. More...
 
virtual void setFieldFlags (uint32 flags)=0
 Set the field flags - #see eFieldFlags. More...
 
virtual CFormFieldVect getChildFields () const =0
 Get the child fields in a vector. More...
 
virtual CAnnotationReferenceVect getChildWidgets () const =0
 Get references to the child widgets in a vector. More...
 
virtual DOMid getFieldId () const =0
 Get the unique id for this field. This id is preserved across cloning, and therefore all clones of this IFormField will have the same id. This id is particularly useful when merging fields from one form to another. More...
 
virtual void clearChildFields ()=0
 Clear the child fields list.
 
virtual void addChildField (const IFormFieldPtr &field)=0
 Add a child field. An exception will be thrown if the field to be inserted has the same partial name or id as an existing field. More...
 
virtual void removeChildField (const IFormFieldPtr &field)=0
 Remove a child field. More...
 
virtual bool fieldInSubtree (const IFormFieldPtr &field) const =0
 Search the IFormField subtree for a field that has the same id as the given field. The search recurses through the children. More...
 
virtual void clearChildWidgets ()=0
 Clear the child widgets list.
 
virtual void addChildWidget (const IWidgetAnnotationPtr &widget)=0
 Add a child widget. An exception will be thrown if an annotation with the same reference is already present at this level. More...
 
virtual void addChildWidget (const IAnnotationReferencePtr &widgetReference)=0
 Add a child widget by reference. An exception will be thrown if an annotation with the same reference is already present at this level. More...
 
virtual void removeChildWidget (const IWidgetAnnotationPtr &widget)=0
 Remove the given child widget from the field. More...
 
virtual void removeChildWidget (const IAnnotationReferencePtr &widgetReference)=0
 Remove the given child widget from the field, by reference. More...
 
virtual bool widgetInSubtree (const IWidgetAnnotationPtr &widget) const =0
 Search the IFormField subtree for a widget The search recurses through the children. More...
 
virtual bool widgetInSubtree (const IAnnotationReferencePtr &widgetReference) const =0
 Search the IFormField subtree for a widget, by reference The search recurses through the children. More...
 
virtual U8String getPartialName () const =0
 Get the partial name of the field, if defined. If not present, an empty string will be returned. More...
 
virtual void setPartialName (const U8String &name)=0
 Set the partial name of the field. More...
 
virtual bool getValue (CU8StringVect &value) const =0
 Get the value of the field, as an array of strings. More...
 
virtual void setValue (const CU8StringVect &value)=0
 Set the value of the field, as an array of strings. For fields that can take multiple values, eg radio buttons, there will be multiple entries. For fields requiring only a single value, a single entry will be returned. If the field has no value an empty array will be returned. More...
 
virtual void setValue (const U8String &value)
 Convenience form for fields that only need a single value. More...
 
virtual bool getDefaultValue (CU8StringVect &value) const =0
 Get the default value of the field, as an array of strings. More...
 
virtual void setDefaultValue (const CU8StringVect &value)=0
 Set the value of the field, as an array of strings. More...
 
virtual void setDefaultValue (const U8String &value)
 Convenience form for fields that only need a single value. More...
 
virtual bool getDefaultAppearanceString (U8String &defaultAppearanceString) const =0
 Get the default appearance string for variable text, if set. More...
 
virtual void setDefaultAppearanceString (const U8String &defaultAppearanceString)=0
 Set the default appearance string for variable text. More...
 
virtual eQuadding getQuadding () const =0
 Get the Quadding (Justification) for variable text. More...
 
virtual void setQuadding (eQuadding quadding)=0
 Set the Quadding (Justification) for variable text. More...
 
virtual bool getOptions (CFieldOptionVect &options) const =0
 Get the options for this field. More...
 
virtual void setOptions (const CFieldOptionVect &options)=0
 Set the options for this field. More...
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. More...
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to. More...
 

Static Public Member Functions

static JAWSMAKO_API IFormFieldPtr create (const IJawsMakoPtr &jawsMako, eFieldType type=eFTInherited, const U8String &partialName=U8String(), uint32 flags=0, const CFormFieldVect &childFields=CFormFieldVect(), const CAnnotationReferenceVect &childWidgets=CAnnotationReferenceVect())
 Create a new form field. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

An interface class for a form field. A form field may have multiple child fields and widget annotations, arranged in a tree.

Member Function Documentation

◆ addChildField()

virtual void JawsMako::IFormField::addChildField ( const IFormFieldPtr &  field)
pure virtual

Add a child field. An exception will be thrown if the field to be inserted has the same partial name or id as an existing field.

Parameters
fieldField to be added

◆ addChildWidget() [1/2]

virtual void JawsMako::IFormField::addChildWidget ( const IAnnotationReferencePtr &  widgetReference)
pure virtual

Add a child widget by reference. An exception will be thrown if an annotation with the same reference is already present at this level.

Parameters
widgetReferenceThe widget, by reference, to be added

◆ addChildWidget() [2/2]

virtual void JawsMako::IFormField::addChildWidget ( const IWidgetAnnotationPtr &  widget)
pure virtual

Add a child widget. An exception will be thrown if an annotation with the same reference is already present at this level.

Parameters
widgetThe widget to be added

◆ clone()

virtual IFormFieldPtr JawsMako::IFormField::clone ( ) const
pure virtual

Clone the form field, which includes a deep clone of any child IFormFields.

Returns
IFormFieldPtr The cloned field

◆ create()

static JAWSMAKO_API IFormFieldPtr JawsMako::IFormField::create ( const IJawsMakoPtr &  jawsMako,
eFieldType  type = eFTInherited,
const U8String partialName = U8String(),
uint32  flags = 0,
const CFormFieldVect &  childFields = CFormFieldVect(),
const CAnnotationReferenceVect &  childWidgets = CAnnotationReferenceVect() 
)
static

Create a new form field.

Parameters
jawsMakoThe Mako instance
typeThe type of field to create
partialNameThe desired partial name of the field
flagsThe field flags to set (see eFieldFlags)
childFieldsA vector of child fields for this field
childWidgetsA vector of child widgets for this field
Returns
IFormFieldPtr The new form field

◆ fieldInSubtree()

virtual bool JawsMako::IFormField::fieldInSubtree ( const IFormFieldPtr &  field) const
pure virtual

Search the IFormField subtree for a field that has the same id as the given field. The search recurses through the children.

Parameters
fieldField to search for
Returns
bool True if found, otherwise false

◆ getChildFields()

virtual CFormFieldVect JawsMako::IFormField::getChildFields ( ) const
pure virtual

Get the child fields in a vector.

Returns
CFormFieldVect The vector of child fields

◆ getChildWidgets()

virtual CAnnotationReferenceVect JawsMako::IFormField::getChildWidgets ( ) const
pure virtual

Get references to the child widgets in a vector.

Returns
CAnnotationReferenceVect The vector of child widgets' references

◆ getDefaultAppearanceString()

virtual bool JawsMako::IFormField::getDefaultAppearanceString ( U8String defaultAppearanceString) const
pure virtual

Get the default appearance string for variable text, if set.

Parameters
defaultAppearanceStringA reference to receive the default appearance string
Returns
bool true if the field defines a default appearance. If false, the value may be inherited from a parent field

◆ getDefaultValue()

virtual bool JawsMako::IFormField::getDefaultValue ( CU8StringVect &  value) const
pure virtual

Get the default value of the field, as an array of strings.

Parameters
valueA vector to receive the value. For fields that can take multiple values, such as radio buttons or choices, there may be multiple entries. For fields requiring only a single entry.
Returns
bool True if the field has a value. If false, the value may be stored in a parent field

◆ getFieldFlags()

virtual bool JawsMako::IFormField::getFieldFlags ( uint32 &  flags) const
pure virtual

Get the field flags, if present.

Parameters
flagsReference to receive the flags - #see eFieldFlags
Returns
bool False if the flags have not been set for this field, otherwise true. If false, the parent field should be consulted.

◆ getFieldId()

virtual DOMid JawsMako::IFormField::getFieldId ( ) const
pure virtual

Get the unique id for this field. This id is preserved across cloning, and therefore all clones of this IFormField will have the same id. This id is particularly useful when merging fields from one form to another.

Returns
DOMid The unique id for this field

◆ getFieldType()

virtual eFieldType JawsMako::IFormField::getFieldType ( ) const
pure virtual

Get the type of the field. If eFTInherited is returned, the parent field should be consulted to determine the type.

Returns
eFieldType The field type

◆ getOptions()

virtual bool JawsMako::IFormField::getOptions ( CFieldOptionVect &  options) const
pure virtual

Get the options for this field.

Parameters
optionsReference to receive the options
Returns
bool true if the option is present. If false, the options may be inherited and the parent field should be consulted.

◆ getPartialName()

virtual U8String JawsMako::IFormField::getPartialName ( ) const
pure virtual

Get the partial name of the field, if defined. If not present, an empty string will be returned.

Returns
U8String The partial name of the field

◆ getQuadding()

virtual eQuadding JawsMako::IFormField::getQuadding ( ) const
pure virtual

Get the Quadding (Justification) for variable text.

Returns
eQuadding The quadding to use, or eQInherited if it is inherited from a parent field

◆ getValue()

virtual bool JawsMako::IFormField::getValue ( CU8StringVect &  value) const
pure virtual

Get the value of the field, as an array of strings.

Parameters
valueA vector to receive the value. For fields that can take multiple values, such as radio buttons or choices, there may be multiple entries. For fields requiring only a single entry.
Returns
bool True if the field has a value. If false, the value may be stored in a parent field

◆ removeChildField()

virtual void JawsMako::IFormField::removeChildField ( const IFormFieldPtr &  field)
pure virtual

Remove a child field.

Parameters
fieldField to be removed

◆ removeChildWidget() [1/2]

virtual void JawsMako::IFormField::removeChildWidget ( const IAnnotationReferencePtr &  widgetReference)
pure virtual

Remove the given child widget from the field, by reference.

Parameters
widgetReferenceThe widget, by reference, to be removed

◆ removeChildWidget() [2/2]

virtual void JawsMako::IFormField::removeChildWidget ( const IWidgetAnnotationPtr &  widget)
pure virtual

Remove the given child widget from the field.

Parameters
widgetThe widget to be removed

◆ setDefaultAppearanceString()

virtual void JawsMako::IFormField::setDefaultAppearanceString ( const U8String defaultAppearanceString)
pure virtual

Set the default appearance string for variable text.

Parameters
defaultAppearanceStringThe desired default appearance string

◆ setDefaultValue() [1/2]

virtual void JawsMako::IFormField::setDefaultValue ( const CU8StringVect &  value)
pure virtual

Set the value of the field, as an array of strings.

For fields that can take multiple values, eg radio buttons, there will be multiple entries. For fields requiring only a single value, a single entry must be specified. Pass an empty vector to clear the value.

Parameters
valueThe value.

◆ setDefaultValue() [2/2]

virtual void JawsMako::IFormField::setDefaultValue ( const U8String value)
inlinevirtual

Convenience form for fields that only need a single value.

Parameters
valueThe string value for the field.

◆ setFieldFlags()

virtual void JawsMako::IFormField::setFieldFlags ( uint32  flags)
pure virtual

Set the field flags - #see eFieldFlags.

Parameters
flagsThe desired flags.

◆ setOptions()

virtual void JawsMako::IFormField::setOptions ( const CFieldOptionVect &  options)
pure virtual

Set the options for this field.

Parameters

◆ setPartialName()

virtual void JawsMako::IFormField::setPartialName ( const U8String name)
pure virtual

Set the partial name of the field.

Parameters
nameThe partial name

◆ setQuadding()

virtual void JawsMako::IFormField::setQuadding ( eQuadding  quadding)
pure virtual

Set the Quadding (Justification) for variable text.

Parameters
quaddingThe quadding to use

◆ setValue() [1/2]

virtual void JawsMako::IFormField::setValue ( const CU8StringVect &  value)
pure virtual

Set the value of the field, as an array of strings. For fields that can take multiple values, eg radio buttons, there will be multiple entries. For fields requiring only a single value, a single entry will be returned. If the field has no value an empty array will be returned.

Parameters
valueThe value.

◆ setValue() [2/2]

virtual void JawsMako::IFormField::setValue ( const U8String value)
inlinevirtual

Convenience form for fields that only need a single value.

Parameters
valueThe string value for the field.

◆ widgetInSubtree() [1/2]

virtual bool JawsMako::IFormField::widgetInSubtree ( const IAnnotationReferencePtr &  widgetReference) const
pure virtual

Search the IFormField subtree for a widget, by reference The search recurses through the children.

Parameters
widgetReferenceThe widget, by reference, to search for
Returns
bool True if found, otherwise false

◆ widgetInSubtree() [2/2]

virtual bool JawsMako::IFormField::widgetInSubtree ( const IWidgetAnnotationPtr &  widget) const
pure virtual

Search the IFormField subtree for a widget The search recurses through the children.

Parameters
widgetThe widget to search for
Returns
bool True if found, otherwise false

The documentation for this class was generated from the following file: