DtvLong dal_wdg_cre_wdg (idm, type, en1, en2, rel, ide, elm, tbo, tbj)

Creates the widget of the mask specifying all parameters required for representing the entity-relationship definition.

Input Parameters Significance
DtvLong idm Id of he mask of the widget
DtvLong type type of the widget from < wdgdef.h > :
entity widget = WDG_type_ENT
refine relation widget = WDG_type_REF
aggregate relation widget = WDG_type_AGG
entity type widget = WDG_type_type
file widget = WDG_type_FIL
DtvLong en1 Id of the entity-1 of the widget [0 = no value specified]
DtvLong en2 Id of the entity-2 of the widget [0 = no value specified]
DtvLong rel Id of the relation of the widget [0 = no value specified]
DtvLong ide Id of the parent of the widget [0 = no value specified]
char *elm name of the parent element [0 = no value specified]
char *tbo name of the original table [0 = no value specified]
char *tbj name of the join table [0 = no value specified]

Output Parameters Significance
no -

Return Code Significance
value Id of the widget

The assignment of the parameters starting with en1 depends on the widget type you pass in type. The following table shows the rules for assigning these parameters.

type en1 en2 rel ide elm tbo tbj
WDG_type_ENT Entit Entit 0 0 0 Tab-Ent Tab-Ent
WDG_type_REF Ent-1 Ent-2 Relat [Ide-1] [Nam-1] Tab-Rel Tab-En2
WDG_type_AGG Ent-2 Ent-1 Relat [Ide-2] [Nam-2] Tab-Rel Tab-En1
WDG_type_type Entit Entit type 0 0 Tab-Typ Tab-Ent
WDG_type_FIL 0 0 0 0 0 0 0