|
RE:.0
To amplify what Leo has said in response to
> I want to add a varying length pulldown menu to this menu bar. To
> accomodate the varying length feature, the code for this pulldown
> menu must obviously be done in 'C'.
As of V2 DECwindows, anything doable in C is doable in UIL (in terms of widget
creation.) A "varying length pulldown menu" is a snap in UIL, particularly
if you know what the "variable" parts of the menu will be. There are two
ways to go here:
1) Declare the extra pulldown objects* in UIL, but don't parent
them to the pulldown menu in question (i.e. don't declare them in
the pulldown menu's "controls" section). When you need to make the
new objects appear in the pulldown, simply fetch them from the UID file.
(Of course, they will [by default] be added to the end of the menu.)
2) Declare the extra pulldown entities in UIL, but declare them
"unmanaged" when listing them in the controls section of the pulldown
menu. At run time, simply Manage/Unmanage them as needed. (This
method is somewhat less efficient, since the memory for the "invisible"
objects is allocated whether they are used or not. However, the cost is
minimal if you use the "gadget" variant of the object.)
If (on the other hand) you DON'T know what the "variant" parts will be, you
can declare a "generic" object of the appropriate type in UIL, choosing the
argument/callback values you know all such "variant" objects will need. Then,
when you are ready to create such an object at run time, use the DRM routine
FetchWidgetOverride on the "generic" object, supplying the "variable"
arguments in the routine arg list. (This is a variation on scenario 1 above.)
(*)- such as extra push_buttons, pulldown_entries, or toggle_buttons
|