Next: XFAddTmp.<WidgetClass> Up: Supporting new widgets Previous: Supporting new widgets

### XFAdd.<WidgetClass>

Each new support file must contain a procedure named ``XFAdd.<WidgetClass>''. All exported procedures in the support file end with the widget class name. This procedure inserts a widget of that class to the application. It gets three parameters. The first parameter can be ignored (set to ''''). The second parameter is an optional widget name. This is not the complete widget path, only the preferred name of the widget at the insertation level. The last parameter is set to ``add'' or `` config''. ``add'' means that the widget is inserted with default parameters, and ``config'' means that the widget will be configured by the user.

The procedure has to guarantee that the widget name is unique. To create a unique widget name, the procedure ``XFMiscGetUniqueName'' can be used. After inserting the widget into the current widget path (``xfStatus(path)''), the new widget must be placed, using the procedure ``XFMiscPositionWidget''. This procedure gets the complete widget path name as parameter. The procedure ``XFMiscBindWidgetTree'' also gets the widget path name, as this is required to set the XF

internal bindings for that widget. Finally the procedure ``XFEditSetPath'' should be called, to update the XF internal lists. This procedure gets the current widget path as parameter.