Previous External Development Guide: Adding External Widgets to IDL Next

WIDGET_CONTROL/WIDGET_STUB

The WIDGET_CONTROL procedure has some differences and limitations when used with WIDGET_STUB that are not documented in the IDL Reference Guide. These differences are described below.

Keywords

Only the most general keywords are allowed with WIDGET_CONTROL when used with stub widgets. All other keywords are ignored. Here is a list of those keywords that behave identically with all widgets including stub widgets:

BAD_ID
PRO_SET_VALUE
CLEAR_EVENTS
RESET
EVENT_FUNC
SET_UVALUE
EVENT_PRO
SHOW
FUNC_GET_VALUE
TIMER
GET_UVALUE
TLB_GET_OFFSET
GROUP_LEADER
TLB_GET_SIZE
HOURGLASS
TLB_SET_TITLE
ICONIFY
TLB_SET_XOFFSET
KILL_NOTIFY
TLB_SET_YOFFSET
MANAGED
XOFFSET
NO_COPY
YOFFSET

The following keywords also work with stub widgets, but require additional commentary:

DESTROY

When a widget hierarchy containing stub widgets is destroyed, the following steps are taken:

You should register KILL_NOTIFY callbacks on the topmost stub widget in each widget subtree. Remember that the actual widgets are gone before the callbacks are issued, so don't attempt to access them. However, the callback provides an opportunity to clean up any related resources used by the widget.

MAP, REALIZE, and SENSITIVE

These keywords cause the toolkit-specific, lower layer of the IDL widgets implementation to be called. In the process of satisfying the specified request, any real widgets used by the stub widgets will be processed, along with the ones created by the non-stub widgets, in the usual way. Any additional processing must be provided via CALL_EXTERNAL.

XSIZE, SCR_XSIZE, YSIZE, and SCR_YSIZE

These keywords inform IDL how large the stub widget is expected to be. This information is necessary for IDL to calculate sizes and offsets of the surrounding widgets.

IDL tries to do something reasonable with these requests but, without knowledge of the actual widget being manipulated, it is possible that the results will not be satisfactory. In such cases, the IDL_WidgetStubSetSizeFunc() function can be used to specify a routine that IDL can call to perform the necessary sizing for your stub widget.

  IDL Online Help (March 06, 2007)