|
John,
I just saw reference to a ActivateGadget() function in a USENET posting.
I'll check the AutoDocs tonight, but it sounds like this either does what
we want, or simulates the user selecting a gadget.
John
|
| that "auto" selecting is a new feature of 1.2, should be documented
in the 1.2 enhancer manual somewhere. There were code examples
floating around about the time 1.2 came out that showed how to kludge
that behavior to be backward compatible with 1.1, or just doing
an OS check to make sure you were running 1.2 or greater before
doing the new call. Might be something on a Fred Fish disk about
it.
-Dave
|
| Here it is:
NAME
ActivateGadget -- Activate a (String) Gadget.
SYNOPSIS
Success = ActivateGadget(Gadget, Window, Request)
D0 A0 A1 A2
BOOL Success;
struct Gadget *Gadget;
struct Window *Window;
struct Requester
FUNCTION
Activates a String Gadget. If successful, this means that the user
does not need to click in the gadget before typing.
The Window parameter must point to the window which contains the Gadget.
If the gadget is actually in a Requester, the Window must contain
the Requester, and a pointer to the Requester must also be
passed. The Requester parameter must only be valid if the Gadget
has the REQGADGET flag set, a requirement for all Requester Gadgets.
The success of this function depends on a rather complex set
of conditions. The intent is that the user is never interrupted from
what interactions he may have underway.
The current set of conditions includes:
- The Window must be active. (Use the ACTIVEWINDOW IDCMP).
- No other gadgets may be in use. This includes system gadgets,
such as those for window sizing, dragging, etc.
- If the gadget is in a Requester, that Requester must
be active. (Use the REQSET and REQCLEAR IDCMP).
- The right mouse button cannot be held down (e.g. menus
INPUTS
Gadget = pointer to the Gadget that you want activated.
Window = pointer to a Window structure containing the Gadget.
Requester = pointer to a Requester (may by NULL if this isn't
a Requester Gadget (i.e. REQGADGET is not set)).
RESULT
If the conditions above are met, and the Gadget is in fact a String
Gadget, then this function will return TRUE, else FALSE.
BUGS
SEE ALSO
|