|##########|
|#MAGIC   #|DBGIDJGK
|#PROJECT #|""
|#PATHS   #|"StdProject"
|#FLAGS   #|xx---x--x----xx-----------------
|#USERSW  #|--------------------------------
|#USERMASK#|--------------------------------
|#SWITCHES#|x----xxxxx-xx---
|##########|
DEFINITION MODULE GBMultiPanel;

IMPORT EGSGadBox AS GB;
IMPORT EGSIntui  AS I;
FROM Exec IMPORT LibraryPtr;
FROM System IMPORT SysStringPtr,Regs;

CONST
  SuperPanelType   = CAST(LONGINT,"PANL".data);

TYPE
  MultiPanelGadPtr = POINTER TO MultiPanelGadget;
  MultiPanelGadget = RECORD OF I.MasterGadget;
                       selected : INTEGER;
                       panel    : GB.MultiPanel;
                       gads     : POINTER TO ARRAY OF I.BoolGadPtr;
                     END;

  PanelPair        = RECORD
                       name     : SysStringPtr;
                       box      : GB.GadBoxPtr;
                     END;
  PanelPairArray   = ARRAY OF PanelPair;
  PanelPairArrayPtr= POINTER TO PanelPairArray;


VAR GBMPanelBase : LibraryPtr;

LIBRARY GBMPanelBase BY - 30
    PROCEDURE CreateMultiPanelGadget(con   IN A0 : GB.GadContext;
                                     pairs IN A1 : PanelPairArrayPtr;
                                     id    IN D0 : LONGINT):GB.GadBoxPtr;

PROCEDURE CreatePanelPair(REF name   : STRING;
                              box    : GB.GadBoxPtr):PanelPair;

PROCEDURE CreateMultiPanelGadgetL(    con   : GB.GadContext;
                                      id    : LONGINT;
                                  REF pairs : LIST OF PanelPair):GB.GadBoxPtr;


LIBRARY GBMPanelBase BY - 36
    PROCEDURE ModifyMultiPanelGadget(win IN A0 : I.WindowPtr;
                                     gad IN A1 : MultiPanelGadPtr;
                                     sel IN D0 : INTEGER);

LIBRARY GBMPanelBase BY - 42
    PROCEDURE GCSetMultiPanelValue(con IN A0 : GB.GadContext;
                                   id  IN D0 : LONGINT;
                                   sel IN D1 : INTEGER);

LIBRARY GBMPanelBase BY - 48
    PROCEDURE GCGetMultiPanelValue(con IN A0 : GB.GadContext;
                                   id  IN D0 : LONGINT):INTEGER


END GBMultiPanel.
