|##########|
|#MAGIC   #|DBGFFBIF
|#PROJECT #|""
|#PATHS   #|"StdProject"
|#FLAGS   #|xx---x--x---xxx--x--------------
|#USERSW  #|--------------------------------
|#USERMASK#|--------------------------------
|#SWITCHES#|x----xxxxx-xx---
|##########|
DEFINITION MODULE GBTextEdit;

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

CONST
  TextEditType   = CAST(LONGINT,"TEDI".data);

TYPE
  TextEditFlags  = (modified,dummy31=31);
  TextEditFlagSet= SET OF TextEditFlags;
  FlowTextGadPtr = POINTER TO FlowTextGadget;
  FlowTextGadget = RECORD OF I.MasterGadget;
                     textFlags : TextEditFlagSet;
                   END;

VAR
  GBTextEditBase : LibraryPtr;

LIBRARY GBTextEditBase BY - 30
    PROCEDURE CreateFlowTextGadget(con   IN A0 : GB.GadContext;
                                   minW  IN D0,
                                   maxW  IN D1,
                                   minH  IN D2,
                                   maxH  IN D3 : INTEGER;
                                   font  IN A1 : EFontPtr;
                                   bsize IN D4 : INTEGER;
                                   id    IN D5 : LONGINT):GB.GadBoxPtr;

LIBRARY GBTextEditBase BY - 36
    PROCEDURE ModifyFlowTextGadget(win  IN A0 : I.WindowPtr;
                                   gad  IN A1 : FlowTextGadPtr;
                                   text IN A2 : SysStringPtr);

LIBRARY GBTextEditBase BY - 42
    PROCEDURE GetFlowTextValue(gad  IN A0 : FlowTextGadPtr;
                               buff IN A1 : SysStringPtr;
                               len  IN D0 : INTEGER):INTEGER;

LIBRARY GBTextEditBase BY - 48
    PROCEDURE SetFlowTextCursor(win  IN A0 : I.WindowPtr;
                                gad  IN A1 : FlowTextGadPtr;
                                pos  IN D0 : INTEGER);

LIBRARY GBTextEditBase BY - 54
    PROCEDURE ActivateFlowTextGadget(win   IN A0 : I.WindowPtr;
                                     gad   IN A1 : FlowTextGadPtr;
                                     force IN D0 : BOOLEAN);

LIBRARY GBTextEditBase BY - 60
    PROCEDURE GetFlowTextBlock(gad  IN A0 : FlowTextGadPtr;
                               buff IN A1 : SysStringPtr;
                               len  IN D0 : INTEGER):INTEGER;

LIBRARY GBTextEditBase BY - 66
    PROCEDURE GCSetFlowTextValue(con  IN A0 : GB.GadContext;
                                 id   IN D0 : LONGINT;
                                 text IN A1 : SysStringPtr);

LIBRARY GBTextEditBase BY - 72
    PROCEDURE GCGetFlowTextValue(con  IN A0 : GB.GadContext;
                                 id   IN D0 : LONGINT;
                                 buff IN A1 : SysStringPtr;
                                 len  IN D1 : INTEGER):INTEGER;

LIBRARY GBTextEditBase BY - 78
    PROCEDURE GCSetFlowTextCursor(con IN A0 : GB.GadContext;
                                  id  IN D0 : LONGINT;
                                  pos IN D1 : INTEGER);

LIBRARY GBTextEditBase BY - 84
    PROCEDURE GCGetFlowTextCursor(con IN A0 : GB.GadContext;
                                  id  IN D0 : LONGINT):INTEGER;

LIBRARY GBTextEditBase BY - 90
    PROCEDURE GCGetFlowTextBlock(con  IN A0 : GB.GadContext;
                                 id   IN D0 : LONGINT;
                                 buff IN A1 : SysStringPtr;
                                 len  IN D1 : INTEGER):INTEGER;

LIBRARY GBTextEditBase BY - 96
    PROCEDURE GCActivateFlowTextGadget(con   IN A0 : GB.GadContext;
                                       id    IN D0 : LONGINT;
                                       force IN D1 : BOOLEAN);


END GBTextEdit.

