a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 intuition.library
  ActivateGadget
  ActivateWindow
  AddClass
  AddGList
  AddGadget
  AllocRemember
  AllocScreenBuffer
  AutoRequest
  BeginRefresh
  BuildEasyRequestArgs
  BuildSysRequest
  ChangeScreenBuffer
  ChangeWindowBox
  ClearDMRequest
  ClearMenuStrip
  ClearPointer
  CloseScreen
  CloseWindow
  CloseWorkBench
  CurrentTime
  DisplayAlert
  DisplayBeep
  DisposeObject
  DoGadgetMethodA
  DoubleClick
  DrawBorder
  DrawImage
  DrawImageState
  EasyRequestArgs
  EndRefresh
  EndRequest
  EraseImage
  FreeClass
  FreeRemember
  FreeScreenBuffer
  FreeScreenDrawInfo
  FreeSysRequest
  GadgetMouse
  GetAttr
  GetDefPrefs
  GetDefaultPubScreen
  GetPrefs
  GetScreenData
  GetScreenDrawInfo
  HelpControl
  InitRequester
  IntuiTextLength
  ItemAddress
  LendMenus
  LockIBase
  LockPubScreen
  LockPubScreenList
  MakeClass
  MakeScreen
  ModifyIDCMP
  ModifyProp
  MoveScreen
  MoveWindow
  MoveWindowInFrontOf
  NewModifyProp
  NewObject
  NextObject
  NextPubScreen
  ObtainGIRPort
  OffGadget
  OffMenu
  OnGadget
  OnMenu
  OpenScreen
  OpenScreenTagList
  OpenWindow
  OpenWindowTagList
  OpenWorkBench
  PointInImage
  PrintIText
  PubScreenStatus
  QueryOverscan
  RefreshGList
  RefreshGadgets
  RefreshWindowFrame
  ReleaseGIRPort
  RemakeDisplay
  RemoveClass
  RemoveGList
  RemoveGadget
  ReportMouse
  Request
  ResetMenuStrip
  RethinkDisplay
  ScreenDepth
  ScreenPosition
  ScreenToBack
  ScreenToFront
  ScrollWindowRaster
  SetAttrsA
  SetDMRequest
  SetDefaultPubScreen
  SetEditHook
  SetGadgetAttrsA
  SetMenuStrip
  SetMouseQueue
  SetPointer
  SetPrefs
  SetPubScreenModes
  SetWindowPointerA
  SetWindowTitles
  ShowTitle
  SizeWindow
  SysReqHandler
  TimedDisplayAlert
  UnlockIBase
  UnlockPubScreen
  UnlockPubScreenList
  ViewAddress
  ViewPortAddress
  WBenchToBack
  WBenchToFront
  WindowLimits
  WindowToBack
  WindowToFront
  ZipWindow
Include
GuruMeditation
Docs » Autodocs » intuition.library » ActivateGadget

NAME

	ActivateGadget -- Activate a (string or custom) gadget.

SYNOPSIS

	Success = ActivateGadget( Gadget, Window, Request )
D0 A0 A1 A2
BOOL ActivateGadget( struct Gadget *, struct Window *,
struct Requester * );

FUNCTION

	Activates a string or custom 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 GTYP_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. If you are opening a new window
and want an active gadget in it, it is not sufficient to
assume that the WFLG_ACTIVATE flag has taken effect by the time
OpenWindow() returns, even if you insert a delay of some
finite amount of time. Use the IDCMP_ACTIVEWINDOW IntuiMessage
to tell when your window really becomes active. Many
programs use an event loop that calls ActivateGadget()
whenever they receive the IDCMP_ACTIVEWINDOW message, and also
the IDCMP_MOUSEBUTTONS messages, and so on, to keep the
gadget active until it is used (or the user selects some
other "Cancel" gadget).
- 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 IDCMP_REQSET and IDCMP_REQCLEAR).
- The right mouse button cannot be held down (e.g. menus)
NOTE: Don't try to activate a gadget which is disabled or
not attached to a window or requester.

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. GTYP_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

	At present, this function will not return FALSE if a custom
gadget declines to be activated.

SEE ALSO

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Abyss

FLT
AOA
AYS
KEF

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se