1 | /* |
---|
2 | * $Id: TextDisplay.h,v 1.2 1999-01-22 23:17:03 ghudson Exp $ |
---|
3 | * |
---|
4 | * Copyright 1990, 1991 by the Massachusetts Institute of Technology. |
---|
5 | * |
---|
6 | * For copying and distribution information, please see the file |
---|
7 | * <mit-copyright.h>. |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef _Xj_TextDisplay_h |
---|
12 | #define _Xj_TextDisplay_h |
---|
13 | |
---|
14 | #include "Jets.h" |
---|
15 | |
---|
16 | extern JetClass textDisplayJetClass; |
---|
17 | extern void SetText(); |
---|
18 | extern void MoveText(); |
---|
19 | extern int CountLines(); |
---|
20 | extern int VisibleLines(); |
---|
21 | extern void SetLine(); |
---|
22 | extern void AddText(); |
---|
23 | |
---|
24 | typedef struct {int littlefoo;} TextDisplayClassPart; |
---|
25 | |
---|
26 | typedef struct _TextDisplayClassRec { |
---|
27 | CoreClassPart core_class; |
---|
28 | TextDisplayClassPart textDisplay_class; |
---|
29 | } TextDisplayClassRec; |
---|
30 | |
---|
31 | extern TextDisplayClassRec textDisplayClassRec; |
---|
32 | |
---|
33 | typedef struct { |
---|
34 | char *text; |
---|
35 | int topLine, numLines, visLines; |
---|
36 | int charWidth; |
---|
37 | int charHeight; |
---|
38 | int displayWidth, displayHeight; |
---|
39 | int columns; |
---|
40 | char **lineStarts; |
---|
41 | int lineStartsSize; |
---|
42 | char *startSelect, *endSelect, *startPivot, *endPivot; |
---|
43 | char *selection; |
---|
44 | int startEnd; |
---|
45 | char *realStart, *realEnd; |
---|
46 | Boolean buttonDown; |
---|
47 | int whichButton; |
---|
48 | GC gc, selectgc, gc_clear, gc_fill; |
---|
49 | int foreground, background; |
---|
50 | int hl_foreground, hl_background; |
---|
51 | char *hl_fg_name, *hl_bg_name; |
---|
52 | Boolean reverseVideo; |
---|
53 | XFontStruct *font; |
---|
54 | XjCallback *resizeProc; |
---|
55 | XjCallback *scrollProc; |
---|
56 | int realized; |
---|
57 | int internalBorder; |
---|
58 | int multiClickTime; |
---|
59 | Time lastUpTime; |
---|
60 | short clickTimes; |
---|
61 | char *charClass; |
---|
62 | int scrollDelay1, scrollDelay2; |
---|
63 | } TextDisplayPart; |
---|
64 | |
---|
65 | typedef struct _TextDisplayRec { |
---|
66 | CorePart core; |
---|
67 | TextDisplayPart textDisplay; |
---|
68 | } TextDisplayRec; |
---|
69 | |
---|
70 | typedef struct _TextDisplayRec *TextDisplayJet; |
---|
71 | typedef struct _TextDisplayClassRec *TextDisplayJetClass; |
---|
72 | |
---|
73 | #define XjCText "Text" |
---|
74 | #define XjNtext "text" |
---|
75 | #define XjCResizeProc "ResizeProc" |
---|
76 | #define XjNresizeProc "resizeProc" |
---|
77 | #define XjCScrollProc "ScrollProc" |
---|
78 | #define XjNscrollProc "scrollProc" |
---|
79 | #define XjCBorderWidth "BorderWidth" |
---|
80 | #define XjNinternalBorder "internalBorder" |
---|
81 | #define XjCMultiClickTime "MultiClickTime" |
---|
82 | #define XjNmultiClickTime "multiClickTime" |
---|
83 | #define XjCCharClass "CharClass" |
---|
84 | #define XjNcharClass "charClass" |
---|
85 | #define XjCScrollDelay "ScrollDelay" |
---|
86 | #define XjNscrollDelay "scrollDelay" |
---|
87 | #define XjNscrollDelay2 "scrollDelay2" |
---|
88 | #define XjNhighlightForeground "highlightForeground" |
---|
89 | #define XjNhighlightBackground "highlightBackground" |
---|
90 | #define XjNdisplayWidth "displayWidth" |
---|
91 | #define XjNdisplayHeight "displayHeight" |
---|
92 | #define XjCDisplayWidth "DisplayWidth" |
---|
93 | #define XjCDisplayHeight "DisplayHeight" |
---|
94 | |
---|
95 | #endif /* _Xj_TextDisplay_h */ |
---|