Unit 'Intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#aros]

AddGList

Add a linked list of gadgets to a window or requester.

Declaration

Source position: intuition.pas line 3260

function AddGList(

  Window: PWindow;

  Gadget: PGadget;

  Position: LongWord;

  NumGad: LongInt;

  Requester: PRequester

):Word;

Arguments

Window

  

A pointer to the window to get your gadget

Gadget

  

A pointer to the first gadget to be added

Position

  

Integer position in the list for the new gadget (starting from zero as the first position in the list)

NumGad

  

The number of gadgets from the linked list to be added if Numgad equals -1, the entire nil-terminated list of gadgets will be added.

Requester

  

The requester the gadgets will be added to if the GTYP_REQGADGET GadgetType flag is set for the first gadget in the list

Function result

Returns the position of where the first gadget in the list was actually added.

Description

Adds the list of gadgets to the gadget list of the given window or requester linked in at the position in the list specified by the position argument.

See AddGadget() for more information about gadget list position, and more information about gadgets in general.

The requester parameter will be ignored unless the GTYP_REQGADGET bit is set in the GadgetType field of the first gadget in the list. In that case, the gadget list is added to the requester gadgets.

Note: be sure that GTYP_REQGADGET is either set or cleared consistently for all gadgets in the list.

Note also: The window parameter should point to the window that the requester (will) appear in.

Will add Numgad gadgets from gadget list linked by the field TGadget.NextGadget, or until some TGadget.NextGadget field is found to be nil. Does not assume that the Numgad'th gadget has TGadget.NextGadget equal to nil.

Note well: In order to link your gadget list in, the TGadget.NextGadget field of the Numgad'th (or last) gadget will be modified. Thus, if you are adding the first 3 gadgets from a linked list of five gadgets, this call will sever the connection between your third and fourth gadgets.

The gadgets will just be added. To make them visible, you must refresh the window or the gadgets.

See also

AddGadget

  

Add a gadget to the gadget list of a window.

RemoveGadget

  

Remove a gadget from a window.

RemoveGList

  

Remove a sublist of gadgets from a window.

RefreshGadgets

  

Refresh (redraw) the gadget display.

RefreshGList

  

Refresh (redraw) a chosen number of gadgets.


Documentation generated on: 2021-07-30