TABLE OF CONTENTS

pGadget.library/pOS_GadgetHandleIEvent
pGadget.library/pOS_CalcGadgetBox
pGadget.library/pOS_CalcGadgetInnerBox
pGadget.library/pOS_DrawGadget
pGadget.library/pOS_NewGObjectA
pGadget.library/pOS_DisposeGObject
pGadget.library/pOS_ObtainGRastPort
pGadget.library/pOS_ReleaseGRastPort
pGadget.library/pOS_GadgetHitTest
pGadget.library/pOS_GadgetHitTestC
pGadget.library/pOS_LinkGadHelpIDs
pGadget.library/pOS_AddLinkGadHelpID
pGadget.library/pOS_AddLinkGadHelpAll
pGadget.library/pOS_CalcRelMousePoint
pGadget.library/pOS_GadgetDeleteDragList
pGadget.library/pOS_GadgetDropTest
pGadget.library/pOS_GadgetDropIEvent
pGadget.library/pOS_DrawDisableRect
pGadget.library/pOS_IsGadgetMember


pGadget.library/pOS_GadgetHandleIEvent

   NAME
       pOS_GadgetHandleIEvent -- evaluate an InputEvent

   SYNOPSIS
        BOOL pOS_GadgetHandleIEvent(Unit,InputEvent);
        _R_D0                      _R_A0    _R_A1

        BOOL pOS_GadgetHandleIEvent(
                   struct pOS_IntuiUnit*,struct pOS_InputEvent*);

   FUNCTION

   INPUTS
        Unit       - pIntui-Unit
        InputEvent - Event

   RESULT
        TRUE => Event was completely evaluated

   SEE ALSO



pGadget.library/pOS_CalcGadgetBox

   NAME
       pOS_CalcGadgetBox -- calculate gadget size

   SYNOPSIS
        VOID pOS_CalcGadgetBox(window,gadget,rectangle);
                              _R_A0    _R_A1   _R_A2

        VOID pOS_CalcGadgetBox(
                   const struct pOS_Window*,const struct pOS_Gadget*,
                   struct pOS_Rectangle*);

   FUNCTION
        Calculates a gadget coodinate in a window. If the gadget
        is displayed relative to the window size, pOS_CalcGadgetBox()
        calculates the current absolute size.

   INPUTS
        window    - gadget-window
        gadget    - gadget that should be calculated
        rectangle - result

   RESULT

   SEE ALSO



pGadget.library/pOS_CalcGadgetInnerBox

   NAME
       pOS_CalcGadgetInnerBox -- calculate gadget drawing area

   SYNOPSIS
        VOID pOS_CalcGadgetInnerBox(window,gadget,rectangle);
                                     _R_A0    _R_A1   _R_A2

        VOID pOS_CalcGadgetInnerBox(
                   const struct pOS_Window*,const struct pOS_Gadget*,
                   struct pOS_Rectangle*);

   FUNCTION
        See pOS_CalcGadgetBox()
        The result of this calculation is the area in which the gadget
        has to draw itself. The function takes care of the gadget's border:
        it is not part of the result.

   INPUTS
        window    - gadget-window
        gadget    - gadget that should be calculated
        rectangle - result

   RESULT

   SEE ALSO



pGadget.library/pOS_DrawGadget

   NAME
       pOS_DrawGadget -- draw a gadget

   SYNOPSIS
        VOID pOS_DrawGadget(gadget,method,mode);
                           _R_A0    _R_A1 _R_D0

        VOID pOS_DrawGadget(
                   const struct pOS_Gadget*,struct pOS_GadgetMethod*,ULONG);

   FUNCTION
        Prior to calling this function the following things have to be
        initialized:
          imth_Render.imre_Info
          imth_Render.imre_NewTick
          imth_Render.imre_OldTick
        The gadget is drawn with drawing mode `mode`.

   INPUTS
        gadget  - gadget that should be drawn
        method  - initialized data structure
        mode    - (enum pOS_GadgetClassRender)
   RESULT

   SEE ALSO



pGadget.library/pOS_NewGObjectA

   NAME
       pOS_NewGObjectA -- create a new object

   SYNOPSIS
        obj = pOS_NewGObjectA(NClass,name, ver,  tagList);
        _R_D0                 _R_A0  _R_A1 _R_D0  _R_A2

        __ARID__ APTR pOS_NewGObjectA(
                   struct pOS_NClass*,const CHAR*,ULONG,const pOS_TagItem*);

   FUNCTION

   INPUTS
        NClass  - pointer to the class
        name    - class name
        ver     - class version
        tagList - parameters

   RESULT
        New object or NULL.

   SEE ALSO



pGadget.library/pOS_DisposeGObject

   NAME
       pOS_DisposeGObject -- delete an object

   SYNOPSIS
        VOID pOS_DisposeGObject(object);
                                _R_A0

        VOID pOS_DisposeGObject(__ARID__ APTR);

   FUNCTION
        An object that was created with pOS_NewGObjectA() has
        to be deleted with this function.

   INPUTS
        object - object that should be deleted

   RESULT

   SEE ALSO



pGadget.library/pOS_ObtainGRastPort

   NAME
       pOS_ObtainGRastPort -- get gadget-rastport

   SYNOPSIS
        rp = pOS_ObtainGRastPort(gadget,info);
        _R_D0                    _R_A0   _R_A1

        struct pOS_RastPort *pOS_ObtainGRastPort(
                   const struct pOS_Gadget*,const struct pOS_IClassInfo*);

   FUNCTION
        A gadget may draw only within a rastport that was obtained with
        this function. After drawing this rastport has to be released
        with pOS_ReleaseGRastPort()

   INPUTS
        gadget - gadget that is about to be drawn
        info   - class data

   RESULT
        A rastport or NULL

   SEE ALSO



pGadget.library/pOS_ReleaseGRastPort

   NAME
        pOS_ReleaseGRastPort -- release gadget-rastport

   SYNOPSIS
        VOID pOS_ReleaseGRastPort(info,rp);
                               _R_A0   _R_A1

        VOID pOS_ReleaseGRastPort(
                   const struct pOS_IClassInfo*,struct pOS_RastPort*);

   FUNCTION
        Release a rastport that was obtained with pOS_ObtainGRastPort()

   INPUTS
        info - class data
        rp   - rastport obtained using pOS_ObtainGRastPort()

   RESULT

   SEE ALSO



pGadget.library/pOS_GadgetHitTest

   NAME
       pOS_GadgetHitTest -- get a position within a gadget

   SYNOPSIS
        gad = pOS_GadgetHitTest(method,gadget);
        _R_D0                   _R_A0   _R_A1

       struct pOS_Gadget* pOS_GadgetHitTest(
                struct pOS_GadgetMethod*,const struct pOS_Gadget*);

   FUNCTION
        Prior to calling this function
           imth_HitTest.imht_AMouse
           imth_HitTest.imht_RMouse
        have to be initialized. GCLMTH_HitTest is written to imth_Method.
        If the position imht_AMouse is located in this gadget, the
        corresponding gadget is returned. The result may or may not be
        the submitted gadget.

   INPUTS
        method - initialized method
        gadget - gadget that should be checked

   RESULT
        Gadget that is located at the specified position.

   SEE ALSO



pGadget.library/pOS_GadgetHitTestC

   NAME
       pOS_GadgetHitTestC --

   SYNOPSIS
        gad = pOS_GadgetHitTestC(method,gadget,mode);
        _R_D0                   _R_A0   _R_A1  _R_D0

       struct pOS_Gadget* pOS_GadgetHitTestC(
                   const struct pOS_GadgetMethod*,const struct pOS_Gadget*,
                   ULONG mode);

   FUNCTION
        Same as pOS_GadgetHitTest() but 'method' is not changed.


   INPUTS
        method - initialized method
        gadget - gadget that should  be checked
        mode   - 0

   RESULT
        Gadget that is located at the specified position.

   SEE ALSO



pGadget.library/pOS_LinkGadHelpIDs

   NAME
       pOS_LinkGadHelpIDs -- creates a full help-path

   SYNOPSIS
        str = pOS_LinkGadHelpIDs(screen, point, buffer, bufSize, level);
        _R_D0                   _R_A0   _R_A1  _R_A2    _R_D0    _R_D1

       const CHAR* pOS_LinkGadHelpIDs(
                   struct pOS_Screen*,const struct pOS_Point*,
                   CHAR*,size_t,ULONG level);

   FUNCTION
        Creates the complete help-path for a pixel position.


   INPUTS
        screen  - screen on which the HelpID should be calculated
        point   - relative (to the screen) pixel position
        buffer  - buffer for help-path
        bufSize - buffer length in bytes
        level   - working level (0,1,2...)

   RESULT
        buffer or NULL if no help available

   SEE ALSO



pGadget.library/pOS_AddLinkGadHelpID

   NAME
       pOS_AddLinkGadHelpID -- append a help-string

   SYNOPSIS
        VOID pOS_AddLinkGadHelpID(method,name);
                                 _R_A0   _R_A1

       VOID pOS_AddLinkGadHelpID(struct pOS_GadgetMethod*,const CHAR*);

   FUNCTION

   INPUTS
        method - initialized 'imth_Help' data
        name   - help-string to append

   RESULT

   SEE ALSO



pGadget.library/pOS_AddLinkGadHelpAll

   NAME
       pOS_AddLinkGadHelpAll -- run through gadget-tree and create help-path

   SYNOPSIS
        ULONG pOS_AddLinkGadHelpAll(gadget,method);
         _R_D0                      _R_A0   _R_A1

       ULONG pOS_AddLinkGadHelpAll(
                   const struct pOS_Gadget*,struct pOS_GadgetMethod*);

   FUNCTION

   INPUTS
        gadget - gadget for which the help is created
        method - initialized 'imth_Help' data

   RESULT
        current level

   SEE ALSO



pGadget.library/pOS_CalcRelMousePoint

   NAME
       pOS_CalcRelMousePoint -- calc relative gadget-coordinates

   SYNOPSIS
        pOS_CalcRelMousePoint(gadget, window,abs,  rel);
                              _R_A0  _R_A1  _R_A2  _R_A3

       VOID pOS_CalcRelMousePoint(
                   const struct pOS_Gadget*,const struct pOS_Window*,
                   const struct pOS_Point*,struct pOS_Point*);

   FUNCTION

   INPUTS
        gadget - gadget
        window - window to which gadget belongs
        abs    - absolute coordinates in window
        rel    - result: relative coordinates in gadget

   RESULT

   SEE ALSO



pGadget.library/pOS_GadgetDeleteDragList

   NAME
       pOS_GadgetDeleteDragList -- release drag-object

   SYNOPSIS
        pOS_GadgetDeleteDragList(DragList);
                                 _R_A0

        VOID pOS_GadgetDeleteDragList(struct pOS_DragList*);

   FUNCTION
        All drag-objects are send to the sending gadget and
        released.

   INPUTS
        DragList - list of drag-objects

   RESULT

   SEE ALSO



pGadget.library/pOS_GadgetDropTest

   NAME
       pOS_GadgetDropTest -- calc drop-position within gadget

   SYNOPSIS
        gad = pOS_GadgetDropTest(method,gadget);
        _R_D0                    _R_A0   _R_A1

        struct pOS_Gadget* pOS_GadgetDropTest(
                   struct pOS_GadgetMethod*,const struct pOS_Gadget*);

   FUNCTION
        Prior to calling this function
           imth_DropTest.imdt_AMouse
           imth_DropTest.imdt_RMouse
        have to be initialized. GCLMTH_DropTest is written to imth_Method.
        If imdt_AMouse is located within `gadget`, the corresponing gadget
        is returned. This may or may not be the submitted gadget.

   INPUTS
        method - initialized method
        gadget - gadget that should be checked

   RESULT
        Gadget that is located at the given position.

   SEE ALSO



pGadget.library/pOS_GadgetDropIEvent

   NAME
       pOS_GadgetDropIEvent -- evaluate InputEvent during Drag&Drop

   SYNOPSIS
        BOOL pOS_GadgetDropIEvent(Unit,  ie,  DragList);
        _R_D0                   _R_A0   _R_A1  _R_A2

        BOOL pOS_GadgetDropIEvent(
                   struct pOS_IntuiUnit*,struct pOS_InputEvent*,
                   struct pOS_DragList*);

   FUNCTION

   INPUTS
        Unit     - pIntui-Unit
        ie       - Event
        DragList - list of drag-objects

   RESULT

   SEE ALSO



pGadget.library/pOS_DrawDisableRect

   NAME
       pOS_DrawDisableRect -- draw a grid

   SYNOPSIS
        pOS_DrawDisableRect(rp,x1,y1,x2,y2);
                       _R_A0   _R_D0 - _R_D3

        VOID pOS_DrawDisableRect(
                   struct pOS_RastPort*,SLONG,SLONG,SLONG,SLONG);

   FUNCTION

   INPUTS
        rp          - RastPort
        x1,y1,x2,y2 - drawing area

   RESULT

   SEE ALSO



pGadget.library/pOS_IsGadgetMember

   NAME
       pOS_IsGadgetMember -- check if gadget is a member

   SYNOPSIS
        BOOL pOS_IsGadgetMember(grpGad,membGad);
        _R_D0                   _R_A0   _R_A1

        BOOL pOS_IsGadgetMember(
                   const struct pOS_Gadget*,const struct pOS_Gadget*);

   FUNCTION
        Checks if membGad is a member (direct on indirect) of the group
        grpGad.

        Grp1
        {
          Grp2
          {
            Gad21
            Gad22
          }
          Gad11
          Gad12
        }

        Gad11 and Gad12 are members of Grp1.
        Gad21 and Gad22 are members of Grp2 and Grp1.

   INPUTS
        grpGad  - group
        membGad - gagdet that should be checked

   RESULT
        TRUE => gadget is a direct or indirect member of grpGad

   SEE ALSO



