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>
Public Member Functions | |
virtual IFormFieldPtr | clone () const =0 |
Clone the form field, which includes a deep clone of any child IFormFields. | |
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. | |
virtual bool | getFieldFlags (uint32 &flags) const =0 |
Get the field flags, if present. | |
virtual void | setFieldFlags (uint32 flags)=0 |
Set the field flags - #see eFieldFlags. | |
virtual CFormFieldVect | getChildFields () const =0 |
Get the child fields in a vector. | |
virtual CAnnotationReferenceVect | getChildWidgets () const =0 |
Get references to the child widgets in a vector. | |
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. | |
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. | |
virtual void | removeChildField (const IFormFieldPtr &field)=0 |
Remove a child field. | |
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. | |
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. | |
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. | |
virtual void | removeChildWidget (const IWidgetAnnotationPtr &widget)=0 |
Remove the given child widget from the field. | |
virtual void | removeChildWidget (const IAnnotationReferencePtr &widgetReference)=0 |
Remove the given child widget from the field, by reference. | |
virtual bool | widgetInSubtree (const IWidgetAnnotationPtr &widget) const =0 |
Search the IFormField subtree for a widget The search recurses through the children. | |
virtual bool | widgetInSubtree (const IAnnotationReferencePtr &widgetReference) const =0 |
Search the IFormField subtree for a widget, by reference The search recurses through the children. | |
virtual U8String | getPartialName () const =0 |
Get the partial name of the field, if defined. If not present, an empty string will be returned. | |
virtual void | setPartialName (const U8String &name)=0 |
Set the partial name of the field. | |
virtual bool | getValue (CU8StringVect &value) const =0 |
Get the value of the field, as an array of strings. | |
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. | |
virtual void | setValue (const U8String &value) |
Convenience form for fields that only need a single value. | |
virtual bool | getDefaultValue (CU8StringVect &value) const =0 |
Get the default value of the field, as an array of strings. | |
virtual void | setDefaultValue (const CU8StringVect &value)=0 |
Set the value of the field, as an array of strings. | |
virtual void | setDefaultValue (const U8String &value) |
Convenience form for fields that only need a single value. | |
virtual bool | getDefaultAppearanceString (U8String &defaultAppearanceString) const =0 |
Get the default appearance string for variable text, if set. | |
virtual void | setDefaultAppearanceString (const U8String &defaultAppearanceString)=0 |
Set the default appearance string for variable text. | |
virtual eQuadding | getQuadding () const =0 |
Get the Quadding (Justification) for variable text. | |
virtual void | setQuadding (eQuadding quadding)=0 |
Set the Quadding (Justification) for variable text. | |
virtual bool | getOptions (CFieldOptionVect &options) const =0 |
Get the options for this field. | |
virtual void | setOptions (const CFieldOptionVect &options)=0 |
Set the options for this field. | |
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. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
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. | |
Additional Inherited Members | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
An interface class for a form field. A form field may have multiple child fields and widget annotations, arranged in a tree.
|
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.
field | Field to be added |
|
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.
widgetReference | The widget, by reference, to be added |
|
pure virtual |
Add a child widget. An exception will be thrown if an annotation with the same reference is already present at this level.
widget | The widget to be added |
|
pure virtual |
Clone the form field, which includes a deep clone of any child IFormFields.
|
static |
Create a new form field.
jawsMako | The Mako instance |
type | The type of field to create |
partialName | The desired partial name of the field |
flags | The field flags to set (see eFieldFlags) |
childFields | A vector of child fields for this field |
childWidgets | A vector of child widgets for this field |
|
pure virtual |
Search the IFormField subtree for a field that has the same id as the given field. The search recurses through the children.
field | Field to search for |
|
pure virtual |
Get the child fields in a vector.
|
pure virtual |
Get references to the child widgets in a vector.
|
pure virtual |
Get the default appearance string for variable text, if set.
defaultAppearanceString | A reference to receive the default appearance string |
|
pure virtual |
Get the default value of the field, as an array of strings.
value | A 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. |
|
pure virtual |
Get the field flags, if present.
flags | Reference to receive the flags - #see eFieldFlags |
|
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.
|
pure virtual |
Get the type of the field. If eFTInherited is returned, the parent field should be consulted to determine the type.
|
pure virtual |
Get the options for this field.
options | Reference to receive the options |
|
pure virtual |
Get the partial name of the field, if defined. If not present, an empty string will be returned.
|
pure virtual |
Get the Quadding (Justification) for variable text.
|
pure virtual |
Get the value of the field, as an array of strings.
value | A 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. |
|
pure virtual |
Remove a child field.
field | Field to be removed |
|
pure virtual |
Remove the given child widget from the field, by reference.
widgetReference | The widget, by reference, to be removed |
|
pure virtual |
Remove the given child widget from the field.
widget | The widget to be removed |
|
pure virtual |
Set the default appearance string for variable text.
defaultAppearanceString | The desired default appearance string |
|
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.
value | The value. |
|
inlinevirtual |
Convenience form for fields that only need a single value.
value | The string value for the field. |
|
pure virtual |
Set the field flags - #see eFieldFlags.
flags | The desired flags. |
|
pure virtual |
Set the options for this field.
options The desired options
|
pure virtual |
Set the partial name of the field.
name | The partial name |
|
pure virtual |
Set the Quadding (Justification) for variable text.
quadding | The quadding to use |
|
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.
value | The value. |
|
inlinevirtual |
Convenience form for fields that only need a single value.
value | The string value for the field. |
|
pure virtual |
Search the IFormField subtree for a widget, by reference The search recurses through the children.
widgetReference | The widget, by reference, to search for |
|
pure virtual |
Search the IFormField subtree for a widget The search recurses through the children.
widget | The widget to search for |