A3DPDFWidgetSetTargetBehaviour

A3DStatus A3DPDFWidgetSetTargetBehaviour(A3DPDFWidget *pWidgetSource, A3DPDFWidget *pWidgetTarget, A3DPDFEWidgetTargetBehaviour eBehaviourOnTarget)
A3DStatus A3DPDFWidgetSetTargetBehaviour(A3DPDFWidget* pWidgetSource, A3DPDFWidget* pWidgetTarget, A3DPDFEWidgetTargetBehaviour eBehaviourOnTarget)

Function to define an interaction between two widgets.

  • kA3DPDFDataIsolate: only the rows in result set are displayed in the widget.
  • kA3DPDFDataHighlight: the widget displays all the rows from its binded table, but only the rows in result set are highlighted.
  • kA3DPDFDataSelect: for this, the result set must contain only one value. Then in this case, the target widget acts as if the user selected the row indexed by this value.
  • kA3DPDFDataIsolateAndSelect: the widget is populated as with kA3DPDFDataIsolate. Then, it acts as if the user selected the first item. This behaviour is valid only for list widgets.

An interaction acts as follows: if the user clicks on the widget source, then a table joint is calculated using the relationship between the table associated from pWidgetSource to the table associated to pWidgetTarget. The result of the joint is a set of indexes in the table related to pWidgetTarget. The widget target is ultimately filled from this result set, depending on the eBehaviourOnTarget value:

A widget can be specifed as target without a source, to be automatically populated whenever the table bound is selected, whatever source widget triggered this selection. For this, use A3DPDFWidgetSetTargetBehaviour(NULL, WidgetTarget);
A widget that has to be populated at init time (when the file is opened) should have a NULL source specified, and the table bound should be set for init time with A3DPDFDataTableSetInitIndex(). A widget not connected to any other widget have automatically the source specified to NULL, and then is automatically populated with all rows of the data table when the file is opened. A widget connected to a source widget with kA3DPDFDataIsolate behaviour always remains empty at init time.

Parameters

pWidgetSource: Widget source of interaction. Can be NULL to automatically populate the target widget at init time

pWidgetTarget: Widget to be refreshed.

eBehaviourOnTarget: Supported values for this kind of widget target: see A3DPDFEWidgetTargetBehaviour

Returns

A3D_SUCCESS in case of success or an error code