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 » AddGadget

NAME

	AddGadget -- Add a gadget to the gadget list of a window.

SYNOPSIS

	RealPosition = AddGadget( Window, Gadget, Position )
D0 A0 A1 D0
UWORD AddGadget( struct Window *, struct Gadget *, UWORD );

FUNCTION

	Adds the specified gadget to the gadget list of the given window,
linked in at the position in the list specified by the position
argument (that is, if Position == 0, the gadget will be inserted
at the head of the list, and if Position == 1 then the gadget will
be inserted after the first gadget and before the second). If the
position you specify is greater than the number of gadgets in the
list, your gadget will be added to the end of the list.
Calling AddGadget() does not cause your gadget to be redisplayed.
The benefit of this is that you may add several gadgets without
having the gadget list redrawn every time.
This procedure returns the position at which your gadget was added.
NOTE: A relatively safe way to add the gadget to the end of the
list is to specify a position of -1 (i.e., (UWORD) ~0). That way,
only the 65536th (and multiples of it) will be inserted at the wrong
position. The return value of the procedure will tell you where it was
actually inserted.
NOTE: The system window gadgets are initially added to the
front of the gadget list. The reason for this is: If you position
your own gadgets in some way that interferes with the graphical
representation of the system gadgets, the system's ones will be "hit"
first by user. If you then start adding gadgets to the front of the
list, you will disturb this plan, so beware. On the other hand, if
you don't violate the design rule of never overlapping your gadgets,
there's no problem.
NOTE: You may not add your own gadgets to a screen. Gadgets may
be added to backdrop windows, however, which can be visually similar,
but also provide an IDCMP channel for gadget input messages.

INPUTS

	Window = pointer to the window to get your gadget
Gadget = pointer to the new gadget
Position = integer position in the list for the new gadget (starting
from zero as the first position in the list)

RESULT

	Returns the position of where the gadget was actually added.

BUGS

SEE ALSO

AddGList(), RemoveGadget(), RemoveGList()

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:

Razor 1911

AOA
RZR
RBS
TBL

Comments:

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