GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/****************************************************************************1**2*W gaptext.h XGAP source Frank Celler3**4**5*Y Copyright 1995-1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany6*Y Copyright 1997, Frank Celler, Huerth, Germany7**8** The GapTextWidget is intended to be used as a simple front end to the9** text widget with a gap text source and an ascii sink attached to it. It10** is a subclass of the standard text widget supplied with X11R4 and should11** work with X11R5 and X11R6.12*/13#ifndef _gaptext_h14#define _gaptext_h151617/*****************************************************************************18**1920*D XtNinputCallback . . . . . . . function to call in case of keyboard input21*D XtNcheckCaretPos . . . . . . . . function to validate new caret position22*D XtNtinyFont . . . . . . . . . . . . . . tiny font for all graphic windows23*D XtNsmallFont . . . . . . . . . . . . . small font for all graphic windows24*D XtNnormalFont . . . . . . . . . . . . normal font for all graphic windows25*D XtNlargeFont . . . . . . . . . . . . . large font for all graphic windows26*D XtNhugeFont . . . . . . . . . . . . . . huge font for all graphic windows27*D XtNtitlePosition . . . . . . . . position of title in all graphic windows28*D XtNquitGapCtrD . . . . . . . . . . . . . . . . . . . . quit gap on ctr-D29*D XtNpasteGapPrompt . . . . . . . . paste 'gap>' prompt into gap talk window30*D XtNcolorModel . . . . . . . . color model to use in a gap graphics window31*D XtNcolors . . . . . . . . . . . . . colors to use in a gap graphic window32**33** All other resources are defined in <X11/Xaw/Text.h>34*/35#define XtNinputCallback "inputCallback"36#define XtCInputCallback "InputCallback"3738#define XtNcheckCaretPos "checkCaretPos"39#define XtCCheckCaretPos "CheckCaretPos"4041#define XtNtinyFont "tinyFont"42#define XtCTinyFont "TinyFont"4344#define XtNsmallFont "smallFont"45#define XtCSmallFont "SmallFont"4647#define XtNnormalFont "normalFont"48#define XtCNormalFont "NormalFont"4950#define XtNlargeFont "largeFont"51#define XtCLargeFont "LargeFont"5253#define XtNhugeFont "hugeFont"54#define XtCHugeFont "HugeFont"5556#define XtNtitlePosition "titlePosition"57#define XtCTitlePosition "TitlePosition"5859#define XtNquitGapCtrD "quitGapCtrD"60#define XtCQuitGapCtrD "QuitGapCtrD"6162#define XtNpasteGapPrompt "pasteGapPrompt"63#define XtCPasteGapPrompt "PasteGapPrompt"6465#define XtNcolorModel "colorModel"66#define XtCColorModel "ColorModel"6768#define XtNcolors "colors"69#define XtCColors "Colors"707172/****************************************************************************73**7475*T GapTextClassRec . . . . . . . . . . . . . . . . . . gap text class record76*/77typedef struct {int empty;} GapClassPart;7879typedef struct _GapTextClassRec80{81CoreClassPart core_class;82SimpleClassPart simple_class;83TextClassPart text_class;84GapClassPart gap_class;85}86GapTextClassRec;8788extern GapTextClassRec gapTextClassRec;899091/****************************************************************************92**93*T GapRec . . . . . . . . . . . . . . . . . . . . . . . . gap widget record94*/95typedef struct96{97/* function to call when receiving input */98void (*input_callback)();99100/* function to position caret */101Int (*check_caret_pos)();102103/* input buffer for unprocessed input */104String buffer;105UInt size;106UInt length;107108/* flags for paste options */109Boolean drop_gap_prompt; /* current state */110Boolean paste_gap_prompt; /* user setting */111112/* fonts */113XFontStruct * tiny_font;114XFontStruct * small_font;115XFontStruct * normal_font;116XFontStruct * large_font;117XFontStruct * huge_font;118119/* other resources */120String title_position;121Boolean quit_gap_ctrd;122String color_model;123String colors;124}125GapPart;126127typedef struct _GapRec128{129CorePart core;130SimplePart simple;131TextPart text;132GapPart gap;133}134GapRec;135136137/****************************************************************************138**139*T GapTextWidgetClass . . . . . . . . . . . . . . . . . . . class datatype140*/141typedef struct _GapTextClassRec *GapTextWidgetClass;142143144/****************************************************************************145**146*T GapTextWidget . . . . . . . . . . . . . . . . . . . . . instance datatype147*/148typedef struct _GapRec *GapTextWidget;149150151/****************************************************************************152**153*V gapTextWidgetClass . . . . . . . . . . . . . . . . . . class definition154*/155extern WidgetClass gapTextWidgetClass;156157158/****************************************************************************159**160161*T GapSrcClassRec . . . . . . . . . . . . . . . . . gap source class record162*/163164typedef struct _GapSrcClassPart {char * empty;} GapSrcClassPart;165166typedef struct _GapSrcClassRec167{168ObjectClassPart object_class;169TextSrcClassPart text_src_class;170GapSrcClassPart gap_src_class;171}172GapSrcClassRec;173174extern GapSrcClassRec gapSrcClassRec;175176177/****************************************************************************178**179*T GapSrcRec . . . . . . . . . . . . . . . . . . . gap source object record180*/181typedef struct _GapSrcPart182{183String buffer; /* buffer holding the text */184UInt size; /* size of buffer */185UInt * lines; /* start of lines in <buffer> */186UInt length; /* size of text in <buffer> */187}188GapSrcPart;189190typedef struct _GapSrcRec191{192ObjectPart object;193TextSrcPart text_src;194GapSrcPart gap_src;195}196GapSrcRec;197198199/****************************************************************************200**201*T GapSrcObjectClass . . . . . . . . . . . . . . . . . . . . class datatype202*/203typedef struct _GapSrcClassRec *GapSrcObjectClass;204205206/****************************************************************************207**208*T GapSrcObject . . . . . . . . . . . . . . . . . . . . . instance datatype209*/210typedef struct _GapSrcRec *GapSrcObject;211212213/****************************************************************************214**215*V gapSrcObjectClass . . . . . . . . . . . . . . . . . . . class definition216*/217extern WidgetClass gapSrcObjectClass;218219220/****************************************************************************221**222223*P Prototypes . . . . . . . . . . . prototypes of public gap text functions224*/225extern void GTBell( Widget );226extern void GTDeleteLeft( Widget );227extern void GTDeleteRight( Widget );228extern void GTInsertText( Widget, String, Int );229extern void GTMoveCaret( Widget, Int );230extern Int GTPosition( Widget );231extern void GTReplaceText( Widget, String, Int );232extern void GTSetPosition( Widget, Int );233extern void GTDropGapPrompt( Widget, Boolean );234235#endif236237238/****************************************************************************239**240241*E gaptext.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here242*/243244245